From: Jirka Kosek Date: Thu, 6 Dec 2001 18:05:14 +0000 (+0000) Subject: Added support for TeX math in alt element. When using PassiveTeX, TeX equations can... X-Git-Tag: release/1.79.1~6^2~6045 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bfe20799d817bfd7f7474781279c4d6824349c84;p=docbook-dsssl Added support for TeX math in alt element. When using PassiveTeX, TeX equations can be directly passed to TeX. When using HTML, TeX file with code necessary to produce image equivalents of equations is generated. --- diff --git a/xsl/fo/Makefile.param b/xsl/fo/Makefile.param index 04294075d..426160a03 100644 --- a/xsl/fo/Makefile.param +++ b/xsl/fo/Makefile.param @@ -110,6 +110,7 @@ PARAMS=../params/admon.graphics.xml \ ../params/table.entry.padding.xml \ ../params/tablecolumns.extension.xml \ ../params/textinsert.extension.xml \ + ../params/tex.math.in.alt.xml \ ../params/title.font.family.xml \ ../params/title.margin.left.xml \ ../params/toc.indent.width.xml \ diff --git a/xsl/fo/math.xsl b/xsl/fo/math.xsl index 23c0585cd..9ea86c3d8 100644 --- a/xsl/fo/math.xsl +++ b/xsl/fo/math.xsl @@ -15,10 +15,59 @@ ******************************************************************** --> - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $ + + $ + + + + + + + + $$ + + $$ + + + + + Your equation is misplaced. It should be in inlineequation, equation or informalequation. + + diff --git a/xsl/fo/param.ent b/xsl/fo/param.ent index c95d04d57..3a0062514 100644 --- a/xsl/fo/param.ent +++ b/xsl/fo/param.ent @@ -110,6 +110,7 @@ + diff --git a/xsl/fo/param.xweb b/xsl/fo/param.xweb index 02d6de043..2ebbd02a1 100644 --- a/xsl/fo/param.xweb +++ b/xsl/fo/param.xweb @@ -107,6 +107,7 @@ to be incomplete. Don't forget to read the source, too :-) &arbortext.extensions; &fop.extensions; &passivetex.extensions; +&tex.math.in.alt; &xep.extensions; @@ -380,6 +381,7 @@ around all these parameters. + diff --git a/xsl/html/Makefile.param b/xsl/html/Makefile.param index 98ab68e60..166406c05 100644 --- a/xsl/html/Makefile.param +++ b/xsl/html/Makefile.param @@ -123,6 +123,8 @@ PARAMS=../params/admon.graphics.xml \ ../params/table.borders.with.css.xml \ ../params/tablecolumns.extension.xml \ ../params/textinsert.extension.xml \ + ../params/tex.math.in.alt.xml \ + ../params/tex.math.file.xml \ ../params/toc.list.type.xml \ ../params/toc.section.depth.xml \ ../params/ulink.target.xml \ diff --git a/xsl/html/docbook.xsl b/xsl/html/docbook.xsl index b5b447b51..70809608a 100644 --- a/xsl/html/docbook.xsl +++ b/xsl/html/docbook.xsl @@ -192,11 +192,17 @@ + + + + + + diff --git a/xsl/html/math.xsl b/xsl/html/math.xsl index 502a930d8..c13fb8e73 100644 --- a/xsl/html/math.xsl +++ b/xsl/html/math.xsl @@ -19,4 +19,216 @@ + + + + + + + + + + + + + + + + + + + + + Unsupported TeX math notation: + + + + + + + + + + + + + \nopagenumbers + + + + \bye + + + + + + + + + + + + + + + + + + \special{dvi2bitmap outputfile + + } + $ + + $ + \vfill\eject + + + + + + + + + + + + + + + + + + \special{dvi2bitmap outputfile + + } + $$ + + $$ + \vfill\eject + + + + + + + + \documentclass{article} + \pagestyle{empty} + \begin{document} + + + + \end{document} + + + + + + + + + + + + + + + + + + \special{dvi2bitmap outputfile + + } + $ + + $ + \newpage + + + + + + + + + + + + + + + + + + \special{dvi2bitmap outputfile + + } + $$ + + $$ + \newpage + + + + + + + + + 1 + + + + + + + + + 0 + + + + 0 + + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/xsl/html/param.ent b/xsl/html/param.ent index 1a17c34bb..47d663e57 100644 --- a/xsl/html/param.ent +++ b/xsl/html/param.ent @@ -123,6 +123,8 @@ + + diff --git a/xsl/html/param.xweb b/xsl/html/param.xweb index 31597bd6d..4a963bae1 100644 --- a/xsl/html/param.xweb +++ b/xsl/html/param.xweb @@ -216,6 +216,8 @@ to be incomplete. Don't forget to read the source, too :-) &shade.verbatim.style; &punct.honorific; &segmentedlist.as.table; +&tex.math.in.alt; +&tex.math.file; Chunking @@ -395,6 +397,8 @@ around all these parameters. + + diff --git a/xsl/params/tex.math.file.xml b/xsl/params/tex.math.file.xml new file mode 100644 index 000000000..fd0fcf087 --- /dev/null +++ b/xsl/params/tex.math.file.xml @@ -0,0 +1,24 @@ + + +tex.math.file +string + + +tex.math.file + + + + + + + + + +Description + +Name of auxiliary file for TeX equations. This file can be +processed by dvi2bitmap to get bitmap versions of equations for HTML +output. + + + diff --git a/xsl/params/tex.math.in.alt.xml b/xsl/params/tex.math.in.alt.xml new file mode 100644 index 000000000..8b2baa5d4 --- /dev/null +++ b/xsl/params/tex.math.in.alt.xml @@ -0,0 +1,36 @@ + + +tex.math.in.alt +string + + +tex.math.in.alt + + + + + + + + + +Description + +If you want type math directly in TeX notation into +alt element, this parameter specifies notation +used. Currently are supported two values -- +plain and latex. Empty value +means that you are not using TeX math. + +If you want use this feature, you should process your FO with +PassiveTeX, which only supports TeX math notation. When calling +stylsheet, don't forget to specify also +passivetex.extensions=1. + +If you want equations in HTML, just process generated file +tex-math-equations.tex by TeX or LaTeX. Then run +dvi2bitmap program on result DVI file. You will get images for +equations in your document. + + +