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
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
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
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
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: Convert to HTML patch. Opinions / Testing.
On 15/09/06, Benji Fisher [EMAIL PROTECTED] wrote: I think the decision of whether to include the p tags should be based on principles of logical mark-up: are these naturally paragraphs? This depends upon if you are writing a book or some code. The spacing of the lines should be governed by the whitespace of the sourcecode, and I cant think of how you define a paragraph of code. But consider this: The whole file is contained in a p, so the gap introduced (if any) will either be right at the top or bottom of the code (or both?), neither of which are benificial to the format of the page. Agree? Regards Edd
Re: Convert to HTML patch. Opinions / Testing.
On 14/09/06, Mikolaj Machowski [EMAIL PROTECTED] wrote: Dnia sobota, 9 września 2006 20:03, Edd Barrett napisał: - I removed p's because you cannot contain a span in a p according to w3. An unstyled p would make no difference in this case anyway. While I agree with most of your changes *where* span cannot be inside of p? m. Your right. You can have spans in p's.. hmmm . I could have swore the validator moaned at me the first time i tried it. Still the p's wouldnt make any difference to formatting in this case. If you really want them back I can alter the patch, but I dont really see the need. best Regards Edd
Re: Convert to HTML patch. Opinions / Testing.
Hi Benji, You are absolutely correct. This must have slipped past me. I have ammended my patch. New patch is here: http://arameus.net/users/edd/vim-test/2html.vim.diff Thankyou for your support. Best Regards Edd PS, Does anyone know how to disable HTML sending in gmail? Ezalm does not like it when gmail sends a multiple mime types in a message. I'm having to use mozilla to post to your lists. I dont have this problem with the openbsd lists.
Convert to HTML patch. Opinions / Testing.
Hello vim-dev, I really liked the Convert to HTML function in gvim, but wished that it could be a little more correct in terms of the w3 standard. So I wrote a patch. Here is an outline of what I have done: - The script used to only declare a !DOCTYPE if CSS was enabled (html_use_css). All (X)HTML documents parsed by a browser should contain a doctype. I modified the script so as to always include a doctype. - You cannot put font tags in a pre according to w3, so I have forced html_no_pre if CSS is disabled. The original value of html_no_pre is restored when execution 2html.vim is complete. - I have changed DOCTYPE's (both HTML/XHTML) to transitional because (X)HTML strict disallows tags like bgcolor, link, alink and vlink in the body tag. - I removed p's because you cannot contain a span in a p according to w3. An unstyled p would make no difference in this case anyway. I have tested my work on opera 9.01 and Mozilla 1.7.13 on an OpenBSD 4.0-beta snapshot(about 2 weeks old), and all pages seem to look identical to before my modifications, but this time they pass w3's validation (http://validator.w3.org). So... I went forth and emailed a patch to the maintainer (bram@), who casted his doubt as to whether this was the right thing to do, as browsers usually don't support w3's standards, and also beacuse I have only tested on 2 browsers. He reccommended I post a patch to vim-dev@ asking for testing and opinions, so here I am. Here is the patch: http://arameus.net/users/edd/vim-test/2html.vim.diff Also in the same directory you will see the output of my tests, please test them on other browsers. I am completely new to your development community (but I've been using vim for many years), so I aplogize if I have broken any coding style rules/other rules. =) Best Regards Edd