Hi, I try to HTML->PDF some HTML pages using ConTeXt. Unfortunally, some of them contain tables for layout reasons. Seemingly there is no pagebreak possible within a \bTD. Any ideas what to do in this case? An additional problem is that <td><h2>foo</h2></td> appear. which gets translated as: \defineXMLsingular[h2] \section \defineXMLenvironment[table] \bTABLE \eTABLE \defineXMLnested[tr] \bTR \eTR \defineXMLnested[td] \bTD \eTD \defineXMLnested[th] \bTH \eTH How should I define "h2" in order to get a section (bookmarks, table of contents) within that bTD ... eTD, currently 'foo' is rendered in the normal textsize. Tobias PS: If you want to play with the very premature version: http://www.physik.fu-berlin.de/~tburnus/html2pdf-2/?url1=http%3A%2F%2Fwww.physik.fu-berlin.de%2F&url2=en-pdf%2Fportrait%2F -- This above all: To thine own self be true / And it must follow as the night the day / Thou canst not then be false to any man.
At 06:22 PM 12/12/2002 +0100, you wrote:
Hi,
I try to HTML->PDF some HTML pages using ConTeXt. Unfortunally, some of them contain tables for layout reasons. Seemingly there is no pagebreak possible within a \bTD. Any ideas what to do in this case?
An additional problem is that <td><h2>foo</h2></td> appear.
which gets translated as: \defineXMLsingular[h2] \section
\defineXMLenvironment[table] \bTABLE \eTABLE \defineXMLnested[tr] \bTR \eTR \defineXMLnested[td] \bTD \eTD \defineXMLnested[th] \bTH \eTH
How should I define "h2" in order to get a section (bookmarks, table of contents) within that bTD ... eTD, currently 'foo' is rendered in the normal textsize.
[[ beware: singular is meant for empty elements (this way you can treat 'm different) ]] \starttext \usemodule[contml] \autoXMLnamespace [context] \setupTABLE[split=yes] \defineXMLcommand[h1] {\ifinner \expandafter \bfd \else \expandafter \section \fi} \startbuffer <table> <tr> <td> <h1> misusing tags </h1> </td> </tr> <tr> <td> misusing the h1 tag for </td> </tr> <tr> <td> getting a larger font is </td> </tr> <tr> <td> a typical example of how </td> </tr> <tr> <td> html tags are misused </td> </tr> </table> \stopbuffer \dorecurse{20}{\processXMLbuffer} \stoptext ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@wxs.nl Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com ------------------------------------------------------------------------- information: http://www.pragma-ade.com/roadmap.pdf documentation: http://www.pragma-ade.com/showcase.pdf -------------------------------------------------------------------------
Hi, Hans Hagen wrote:
At 06:22 PM 12/12/2002 +0100, you wrote: \usemodule[contml] \autoXMLnamespace [context] Need to look why this spoils the table width to about 3em.
\setupTABLE[split=yes] This only breaks between </tr><tr> not within a single cell. Which creates a problem for the HTML-pages which use tables for Layout. (I know, they shouldn't, but they do!)
Gruß, Tobias -- This above all: To thine own self be true / And it must follow as the night the day / Thou canst not then be false to any man.
At 11:18 AM 12/13/2002 +0100, you wrote:
Hi,
Hans Hagen wrote:
At 06:22 PM 12/12/2002 +0100, you wrote: \usemodule[contml] \autoXMLnamespace [context] Need to look why this spoils the table width to about 3em.
\setupTABLE[split=yes] This only breaks between </tr><tr> not within a single cell. Which creates a problem for the HTML-pages which use tables for Layout. (I know, they shouldn't, but they do!)
an TD is a framed which is by nature unbreakable Hans ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@wxs.nl Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com ------------------------------------------------------------------------- information: http://www.pragma-ade.com/roadmap.pdf documentation: http://www.pragma-ade.com/showcase.pdf -------------------------------------------------------------------------
participants (2)
-
Hans Hagen
-
Tobias Burnus