Re: Convert2HTML Again
On 12/10/06, Benji Fisher [EMAIL PROTECTED] wrote: span class=bar (text) /span in the body, while the non-CSS version will have something like font color=#EEE bgcolor=333 (text) /font and now the CSS version is easier to read. Yes I see, If i had written this from scratch i would have not included font tags atall because they are depricated. I was just respecting the existing code to be honest. This would have to be something you take up with the original writer(?) or Bram(?). I'll check the syntax error highlight for you too. Will probably get a chance at the weekend. Thanks for your time. Best Regards Edd
Re: Convert2HTML Again
On 01/10/06, Edd Barrett [EMAIL PROTECTED] wrote: Hope your enjoying your weekend. As promised i have ammended the patch. Hi Guys, I havent recieved any feedback on this patch yet, did anyone get a chance to look at it? Sorry to be a bore. Best Regards Edd
Convert2HTML Again
(Sorry if you recieve this twice, I don't think the first one made it onto the list for whatever reason.) On 26/09/06, Edd Barrett [EMAIL PROTECTED] wrote: Ill add this in as soon as I can, but university work is coming in hard at the moment so it might not be until the weekend. Greetings all, Hope your enjoying your weekend. As promised i have ammended the patch. I have run some tests as before and uploaded them (along with the new patch) here: http://arameus.net/users/edd/vim-test2/ All of the files with _courier.html as a suffix are with a font set using :let html_font=courier. This sets all css/font tags to this font and appends , monospace as a fallback incase the user does not have that font. Also i realized that style= in a body tag is css and replaced that with a big old font tag around the whole text if html_use_css is not set. Best Regards Edd
Re: Convert2HTML Again
Michael Schaap wrote: A.J.Mechelynck wrote: I second the motion; and since the font actually used is the first one found from the font-family item, I suggest (all on one line): +execute normal! A\npre { font-family: 'Courier New', monospace; color: . s:fgc . ; background-color: . s:bgc . ; }\e which will pick Courier New if found, and some generic monospace font otherwise. (Note: I don't know how it got here, but I have Courier New installed not only on my Windoze box but also on this SuSE-Linux box where I am now.) I beg you, please don't hardcode Courier New! Not only is it the worst possible monospaced screen font, it is also Microsoft specific (in spite of it finding its way onto Tony's Linux box). (Even Microsoft has seen the light, and changed the default monospaced font to Consolas in Windows Vista.) The proper thing to do is to only list font-family: monospace. That will use the default monospaced font on any platform, which is Courier New by default in any case on current Windows browsers. Only people who have consciously chosen to change their monospaced font (and people on non-Windows platforms) will not see Courier New. On my system just using monospace looks better than Courier New. This completely depends on the system, of course. When using monospace on MS-Windows, don't you get the same font as with Courier New anyway? Perhaps just using monospace works best for most people. At least we should avoid using Courier, I think everybody agrees with that. The suggestion from Benji Fisher to add a variable to allow people to use another font sounds good to me. Make sure it's properly documented, especially about using more than one name and quotes around the name. -- Every time I lose weight, it finds me again! /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\download, build and distribute -- http://www.A-A-P.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org///
Re: Convert2HTML Again
The suggestion from Benji Fisher to add a variable to allow people to use another font sounds good to me. Make sure it's properly documented, especially about using more than one name and quotes around the name. Great, Ill add this in as soon as I can, but university work is coming in hard at the moment so it might not be until the weekend. Best Regards Edd
Re: Convert2HTML Again
Edward L. Fox wrote: But we should change one thing before we include this patch into the official version. In the patch file, line 97: +execute normal! A\npre { font-family: courier; color: . s:fgc . ; background-color: . s:bgc . ; }\e Should be: +execute normal! A\npre { font-family: Courier, monospace; color: . s:fgc . ; background-color: . s:bgc . ; }\e As W3C suggested, every font-family indication must finish with a *GENERIC* font family name, possible values are serif, sans-serif or monospace. So I added monospace here. Since there's a fair amount of anti-Courier feelings, and undoubtedly no matter what font is selected someone won't like it, why not set things up to default to whatever but to be easily overridden in one's .vimrc. In other words, if !exists(g:Convert2Html_font) let g:Convert2Html_font= '...whatever font gets selected for a default...' endif then later, when you're about to use it: exe norm! A\npre{font-family:.g:Convert2Html_font.';color:'.s:fgc.';background-color:'.s:bgc.;}\e Regards, Chip Campbell
Re: Convert2HTML Again
Does that mean that you are waiting for Bram to give his blessing? Na, just that it's not my decision to make. I'll just do the code. Best Regards Edd
Re: Convert2HTML Again
On Sun, 2006-09-24 at 16:41 +0200, A.J.Mechelynck wrote: Steve Hall wrote: On Sun, 2006-09-24 at 00:31 +0200, Michael Schaap wrote: I beg you, please don't hardcode Courier New! [snip] It's not just the proper way, it's the first thing discussed in the specification: http://www.w3.org/TR/REC-CSS2/fonts.html#font-specification It is said nowhere in that document that a generic-family should be the only element in a font-face specification. [snip] In fact that W3C document mentions selecting a font by a single string only to dismiss it as inappropriate because of lack of standardization. My point was that the generic families were designed for an obvious reason...to fall back to something that works everywhere. Why wouldn't we want Vim to work just this way? Designers, not converters, should select font faces. If the converter is going to attempt to select one, than it had better do a good job of understanding what platform I am writing for, what fonts are available for that platform, and selecting one that follows my intentions within all the details of that specification. -- Steve Hall [ digitect dancingpaper com ]
Re: Convert2HTML Again
[Resending because Thunderbird sent the original email in HTML, which vim.org promptly bounced. Grrr.] Steve Hall wrote: On Sun, 2006-09-24 at 16:41 +0200, A.J.Mechelynck wrote: Steve Hall wrote: On Sun, 2006-09-24 at 00:31 +0200, Michael Schaap wrote: I beg you, please don't hardcode Courier New! [snip] It's not just the proper way, it's the first thing discussed in the specification: http://www.w3.org/TR/REC-CSS2/fonts.html#font-specification It is said nowhere in that document that a generic-family should be the only element in a font-face specification. [snip] In fact that W3C document mentions selecting a font by a single string only to dismiss it as inappropriate because of lack of standardization. My point was that the generic families were designed for an obvious reason...to fall back to something that works everywhere. Why wouldn't we want Vim to work just this way? Designers, not converters, should select font faces. If the converter is going to attempt to select one, than it had better do a good job of understanding what platform I am writing for, what fonts are available for that platform, and selecting one that follows my intentions within all the details of that specification. Whatever is chosen should be compatible with CSS, allowing the designer to specify a font for pre or #vim-pre (or whatever the class is). -- /George V. Reilly [EMAIL PROTECTED] http://www.georgevreilly.com/blog The biggest mistake is not learning from all your other mistakes.
Re: Convert2HTML Again
Edward L. Fox wrote: But we should change one thing before we include this patch into the official version. In the patch file, line 97: +execute normal! A\npre { font-family: courier; color: . s:fgc . ; background-color: . s:bgc . ; }\e Should be: +execute normal! A\npre { font-family: Courier, monospace; color: . s:fgc . ; background-color: . s:bgc . ; }\e As W3C suggested, every font-family indication must finish with a *GENERIC* font family name, possible values are serif, sans-serif or monospace. So I added monospace here. I'd like to request that the wretchedly ugly Courier font *NOT* be hardcoded in to 2html.vim. I always end up removing it when I use 2html. The font-family should either be just monospace or allow a global variable to set the font. (Under Windows, Courier is the bitmapped font with the hexagonal letter forms and Courier New is the less ugly Truetype font with the spindly strokes. For a picture of the two fonts, see http://www.georgevreilly.com/courier.png Under Kubuntu, Courier looks a lot more like Courier New.) -- /George V. Reilly [EMAIL PROTECTED] http://www.georgevreilly.com/blog The biggest mistake is not learning from all your other mistakes.
Re: Convert2HTML Again
Hello all, On 23/09/06, George V. Reilly [EMAIL PROTECTED] wrote: Edward L. Fox wrote: But we should change one thing before we include this patch into the official version. In the patch file, line 97: +execute normal! A\npre { font-family: courier; color: . s:fgc . ; background-color: . s:bgc . ; }\e Should be: +execute normal! A\npre { font-family: Courier, monospace; color: . s:fgc . ; background-color: . s:bgc . ; }\e As W3C suggested, every font-family indication must finish with a *GENERIC* font family name, possible values are serif, sans-serif or monospace. So I added monospace here. Agreed. I didn't know this until now. I will update my patch later today. I'd like to request that the wretchedly ugly Courier font *NOT* be hardcoded in to 2html.vim. I always end up removing it when I use 2html. The font-family should either be just monospace or allow a global variable to set the font. I favour the variable, but courier is a good default. Most books use the courier font for verbatim text like code, it is the globally recognized this part is code font. Again I will update my patch and reply when done. Best Regards Edd
Re: Convert2HTML Again
George V. Reilly wrote: Edward L. Fox wrote: But we should change one thing before we include this patch into the official version. In the patch file, line 97: +execute normal! A\npre { font-family: courier; color: . s:fgc . ; background-color: . s:bgc . ; }\e Should be: +execute normal! A\npre { font-family: Courier, monospace; color: . s:fgc . ; background-color: . s:bgc . ; }\e As W3C suggested, every font-family indication must finish with a *GENERIC* font family name, possible values are serif, sans-serif or monospace. So I added monospace here. I'd like to request that the wretchedly ugly Courier font *NOT* be hardcoded in to 2html.vim. I always end up removing it when I use 2html. The font-family should either be just monospace or allow a global variable to set the font. (Under Windows, Courier is the bitmapped font with the hexagonal letter forms and Courier New is the less ugly Truetype font with the spindly strokes. For a picture of the two fonts, see http://www.georgevreilly.com/courier.png Under Kubuntu, Courier looks a lot more like Courier New.) I second the motion; and since the font actually used is the first one found from the font-family item, I suggest (all on one line): +execute normal! A\npre { font-family: 'Courier New', monospace; color: . s:fgc . ; background-color: . s:bgc . ; }\e which will pick Courier New if found, and some generic monospace font otherwise. (Note: I don't know how it got here, but I have Courier New installed not only on my Windoze box but also on this SuSE-Linux box where I am now.) Best regards, Tony.
Re: Convert2HTML Again
Edd Barrett wrote: Hello all, On 23/09/06, George V. Reilly [EMAIL PROTECTED] wrote: Edward L. Fox wrote: But we should change one thing before we include this patch into the official version. In the patch file, line 97: +execute normal! A\npre { font-family: courier; color: . s:fgc . ; background-color: . s:bgc . ; }\e Should be: +execute normal! A\npre { font-family: Courier, monospace; color: . s:fgc . ; background-color: . s:bgc . ; }\e As W3C suggested, every font-family indication must finish with a *GENERIC* font family name, possible values are serif, sans-serif or monospace. So I added monospace here. Agreed. I didn't know this until now. I will update my patch later today. I'd like to request that the wretchedly ugly Courier font *NOT* be hardcoded in to 2html.vim. I always end up removing it when I use 2html. The font-family should either be just monospace or allow a global variable to set the font. I favour the variable, but courier is a good default. Most books use the courier font for verbatim text like code, it is the globally s/the courier font/some Courier font/ Courier New is a fixed-width scalable font which has the typical Courier look, but unlike the bitmapped Courier font, it displays correctly (with curves, not enlarged bitmaps) in all font sizes. I use it in Vim on Windoze when editing Russian (because my favourite font, Lucida_Console, is not actually fixed-width in bold Cyrillic) or Arabic (because Lucida_Console simply lacks Arabic glyphs). An alternative to hardcoding the font face name would be inferring it from e.g. the 'guifont' option; but this might be less than obvious on non-GTK2 non-kvim X11 versions of the GUI (cf. :help XLFD), and it would of course not be possible in Console Vim. recognized this part is code font. Again I will update my patch and reply when done. Best Regards Edd Best regards, Tony.
Re: Convert2HTML Again
A.J.Mechelynck wrote: I second the motion; and since the font actually used is the first one found from the font-family item, I suggest (all on one line): +execute normal! A\npre { font-family: 'Courier New', monospace; color: . s:fgc . ; background-color: . s:bgc . ; }\e which will pick Courier New if found, and some generic monospace font otherwise. (Note: I don't know how it got here, but I have Courier New installed not only on my Windoze box but also on this SuSE-Linux box where I am now.) I beg you, please don't hardcode Courier New! Not only is it the worst possible monospaced screen font, it is also Microsoft specific (in spite of it finding its way onto Tony's Linux box). (Even Microsoft has seen the light, and changed the default monospaced font to Consolas in Windows Vista.) The proper thing to do is to only list font-family: monospace. That will use the default monospaced font on any platform, which is Courier New by default in any case on current Windows browsers. Only people who have consciously chosen to change their monospaced font (and people on non-Windows platforms) will not see Courier New. - Michael
Re: Convert2HTML Again
On Sun, 2006-09-24 at 00:31 +0200, Michael Schaap wrote: I beg you, please don't hardcode Courier New! Hear, hear! Not only is it the worst possible monospaced screen font, it is also Microsoft specific (in spite of it finding its way onto Tony's Linux box). (Even Microsoft has seen the light, and changed the default monospaced font to Consolas in Windows Vista.) The proper thing to do is to only list font-family: monospace. That will use the default monospaced font on any platform, which is Courier New by default in any case on current Windows browsers. Only people who have consciously chosen to change their monospaced font (and people on non-Windows platforms) will not see Courier New. It's not just the proper way, it's the first thing discussed in the specification: http://www.w3.org/TR/REC-CSS2/fonts.html#font-specification -- Steve Hall [ digitect dancingpaper com ]
Re: Convert2HTML Again
I beg you, please don't hardcode Courier New! Hear, hear! Not only is it the worst possible monospaced screen font, it is also Microsoft specific (in spite of it finding its way onto Tony's Linux box). (Even Microsoft has seen the light, and changed the default monospaced font to Consolas in Windows Vista.) The proper thing to do is to only list font-family: monospace. That will use the default monospaced font on any platform, which is Courier New by default in any case on current Windows browsers. Only people who have consciously chosen to change their monospaced font (and people on non-Windows platforms) will not see Courier New. It's not just the proper way, it's the first thing discussed in the specification: http://www.w3.org/TR/REC-CSS2/fonts.html#font-specification Again ... I await a decision Regards Edd
Re: Convert2HTML Again
Hi developers, On 9/22/06, Bram Moolenaar [EMAIL PROTECTED] wrote: Edd - I have spoken to your development team and I think we have come to a conclusion. I draw your attention to this thread: http://tech.groups.yahoo.com/group/vimdev/message/44853 Lemme know your opinions. I haven't heard from people who have actually made changes to this script in the past. Most remarks I have seen are I think..., which isn't definitive. I still don't know why the p /p was there. There must have been a reason, it didn't get there by accicent. I last talked about this with Edward Fox, let me copy this message to him. Edward, what is your opinion about this patch? This script works perfectly. Edd Barrett also solved another problem made by the previous maintainer that the leading space doesn't appear under xhtml mode, which I didn't solved last time I modified this script. Thanks Edd! But we should change one thing before we include this patch into the official version. In the patch file, line 97: +execute normal! A\npre { font-family: courier; color: . s:fgc . ; background-color: . s:bgc . ; }\e Should be: +execute normal! A\npre { font-family: Courier, monospace; color: . s:fgc . ; background-color: . s:bgc . ; }\e As W3C suggested, every font-family indication must finish with a *GENERIC* font family name, possible values are serif, sans-serif or monospace. So I added monospace here. - Bram -- Zen Microsystems: we're the om in .com /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\download, build and distribute -- http://www.A-A-P.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org/// Best regards, Edward L. Fox