I would like to convert my ConTeXt document to both PDF and "plain" HTML. I need plain HTML output (i.e., not XML or XHTML) because my institution's web based management software allows me to copy/paste plain HTML snippets but not XML or XHTML. Is it possible for ConTeXt to output HTML so that the result looks as close to the PDF output as possible? Troy Henderson
On 2013–02–19 Troy Henderson wrote:
I would like to convert my ConTeXt document to both PDF and "plain" HTML.
My suggestion: Use markdown (or reST) with pandoc.
I need plain HTML output (i.e., not XML or XHTML) because my institution's web based management software allows me to copy/paste plain HTML snippets but not XML or XHTML.
ConTeXt does output XML, not XHTML. You would need to do the XML → XHTML conversion yourself.
Is it possible for ConTeXt to output HTML so that the result looks as close to the PDF output as possible?
\startnitpicking HTML does not look like anything. It's a markup language that simply states that *this* element is a header and *that* element is a list, etc. How the HTML is rendered is mostly controlled by the CSS. \stopnitpicking Within the limits of CSS you obtain a quite close match¹. But it's up to you to create the matching CSS. Marco ¹ http://tex.stackexchange.com/a/55945/5245
On 02/19/2013 09:22 AM, Marco Patzer wrote:
Within the limits of CSS you obtain a quite close match¹. But it's up to you to create the matching CSS.
Marco
You can do a pretty good job of matching the printed page with HTML5 + CSS3 here's a good reference: http://www.w3schools.com/html/default.asp Unfortunately, implementation of these standards is a bit spotty. The problem is in the browsers. Chrome/Chromium has done the best job of implementing HTML5 to date, IE the worst. with Firefox and Safari in between. Similarly, EPUB (based on XHTML) is in a similar situation. EPUB3 is based on HTML5 while EPUB2 on XHTML1.1 The corresponding CSS support tells you how well most e-book readers handle the new format. At the moment, there is very little support for EPUB3 in applications and dedicated readers (Kindle, Nook & al.) It's best if you design your document with these formats in mind or put up with how your document is rendered. As a not-very-good fallback, you can always convert your document to PNG/JPEG images and use HTML to simply display them in the proper order. -- Bill Meahan Westland, Michigan USA
Am 2013-02-19 um 19:08 schrieb Bill Meahan:
On 02/19/2013 09:22 AM, Marco Patzer wrote:
Within the limits of CSS you obtain a quite close match¹. But it's up to you to create the matching CSS.
Marco
You can do a pretty good job of matching the printed page with HTML5 + CSS3 here's a good reference: http://www.w3schools.com/html/default.asp
No, that's not a good reference. Please read http://w3fools.com/ and refere to an actual reference like http://www.w3.org/wiki/HTML/Elements or https://developer.mozilla.org/en-US/docs/HTML/Element Greetlings, Hraban --- http://www.fiee.net/texnique/ http://wiki.contextgarden.net https://www.cacert.org (I'm an assurer)
On Feb 19, 2013, at 2:09 PM, Henning Hraban Ramm wrote:
No, that's not a good reference. Please read http://w3fools.com/ and refere to an actual reference like http://www.w3.org/wiki/HTML/Elements or https://developer.mozilla.org/en-US/docs/HTML/Element
It seems it's a bit more complex than that. One article which seemed even-handed: http://readwrite.com/2011/01/17/w3schools-responds-to-w3fools and some valid discussion at: http://meta.stackoverflow.com/questions/120621/w3fools-alternatives William -- William Adams senior graphic designer Fry Communications Sphinx of black quartz, judge my vow.
On Tue, 19 Feb 2013, Troy Henderson wrote:
I would like to convert my ConTeXt document to both PDF and "plain" HTML. I need plain HTML output (i.e., not XML or XHTML) because my institution's web based management software allows me to copy/paste plain HTML snippets but not XML or XHTML.
I was in a similar position, and, in the end opted for markdown + gpp-preprocessing as the input format, and using pandoc to convert from markdown to HTML and ConTeXt. Aditya
participants (6)
-
Aditya Mahajan
-
Bill Meahan
-
Henning Hraban Ramm
-
Marco Patzer
-
Troy Henderson
-
William Adams