Package: tex4ht Version: 20050402.1817-1 Severity: normal Tags: patch The primitive \middle of eTeX seems to be unsupported for MathML output.
Files below are enclosed between lines starting with '------'. Minimal input file: --------- test .tex ---------------- \documentclass{article} \begin{document} \begin{displaymath} \left< A \middle| B \right> \end{displaymath} \end{document} ---------- end of text.tex --------- The following command works on this file to obtain xhtml output with math represented by images: /usr/share/tex4ht/xhlatex test.tex However, if I try to obtain xhtml+mathml with the following command: /usr/share/tex4ht/xhmlatex test.tex then TeX errors occur during compilattion (all 3 runs), the first of which is ! Missing } inserted. <inserted text> } l.5 \left< A \middle | B \right> ? The log file is at the end of this email. The following patch seems to solve the problem. I strongly recommend to check this patch because I am neither an expert in MathML, nor do I understand the code of mathml.4ht. The patch is only for the part of mathml.4ht supporting LaTeX, similar pacth should apply to the part supporting plain TeX. The idea of the patch: I more or less copied the support for \bigm and modified it for \middle. As for MathML output my idea is that \middle should produce the same as \bigm except that the mathsize attribute is replaced with stretchy="true". (This is to indicate that the height of the delimiter after \middle should be adjusted to the formula.) The patch: --- /usr/share/texmf/tex/generic/tex4ht/mathml.4ht Thu Apr 7 04:21:21 2005 +++ tex4ht/mathml.4ht Wed Jun 1 16:29:35 2005 @@ -666,6 +666,7 @@ \NewConfigure{biggr}{2} \NewConfigure{bigl}{2} \NewConfigure{bigm}{2} +\NewConfigure{middle}{2} \NewConfigure{bigr}{2} \Configure{Biggm} {\bgroup @@ -707,6 +708,15 @@ {\Configure{mathrel}{}{}{}{}}% } {\egroup} +\Configure{middle} + {\bgroup + \Configure{mathrel}{*} + {<mo \mml:class="MathClass-rel" + fence="true" stretchy="true" >} + {</mo>} + {\Configure{mathrel}{}{}{}{}}% + } + {\egroup} \:CheckOption{mathml-} \if:Option \Configure{Biggl} @@ -878,6 +888,8 @@ \HLet\bigl=\:tempc \def\:tempc#1{\a:bigm\mathrel{\left:right\big{#1\:EMPTY}}\b:bigm} \HLet\bigm=\:tempc +\def\:tempc#1{\a:middle\mathrel{\left:right#1\:EMPTY}\b:middle} +\HLet\middle=\:tempc \def\:tempc#1{\:EMPTY \a:bigr\mathclose{\left:right\big{#1\:EMPTY}}\b:bigr% \ht:[EMAIL PROTECTED])\ht:[EMAIL PROTECTED] --------------- test.log (for the erronous case) ------------ This is e-TeX, Version 3.14159-2.1 (Web2C 7.4.5) (format=latex 2005.5.29) 1 JUN 2005 16:19 entering extended mode **\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCo de"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c. [EMAIL PROTECTED]@[EMAIL PROTECTED],xhtml,mathml] {tex4ht}}\le t\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\de f\csname tex4ht\endcsname{#1,xhtml,mathml}\def\HCode####1 {\documentstyle[tex4ht ,[EMAIL PROTECTED] .a.b.c. \inp ut test.tex (./test.tex (/usr/share/texmf/tex/latex/base/article.cls Document Class: article 2001/04/21 v1.4e Standard LaTeX document class (/usr/share/texmf/tex/latex/base/size10.clo File: size10.clo 2001/04/21 v1.4e Standard LaTeX file (size option) ) [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] \abovecaptionskip=\skip41 \belowcaptionskip=\skip42 \bibindent=\dimen102 ) (/usr/share/texmf/tex/generic/tex4ht/tex4ht.sty version 2005-03-25-09:49 Package: tex4ht -------------------------------------- --- Note --- for _ at preamble, use the command line option `early_' -------------------------------------- -------------------------------------- --- Note --- for ^ at preamble, use the command line option `early^' -------------------------------------- ) (/usr/share/texmf/tex/generic/tex4ht/tex4ht.4ht version 2005-02-21-19:18 -------------------------------------- --- Note --- for additional information, use the command line option `info' -------------------------------------- :::::::::::::::::::::::::::::::::::::::::: TeX4ht info is available in the log file :::::::::::::::::::::::::::::::::::::::::: -------------------------------------- --- Note --- For MathML on MSIE + MathPlayer use the command line option `mathp layer' -------------------------------------- ) (/usr/share/texmf/tex/generic/tex4ht/tex4ht.sty version 2005-03-25-09:49 --- needs --- tex4ht test --- \tmp:cnt=\count87 \openout15 = `test.tmp'. (./test.tmp) \tmp:toks=\toks14 \tmp:dim=\skip43 (./test.xref) \:refout=\write3 \openout3 = `test.xref'. (/usr/share/texmf/tex/generic/tex4ht/html4.4ht version 2005-03-26-10:15 -------------------------------------- --- Note --- to remove the DOCTYPE declaration use the command line option `no- DOCTYPE' -------------------------------------- ) (/usr/share/texmf/tex/generic/tex4ht/unicode.4ht version 2005-02-21-19:11 ) (/usr/share/texmf/tex/generic/tex4ht/mathml.4ht version 2005-03-12-10:08 ) (/usr/share/texmf/tex/generic/tex4ht/html-mml.4ht version 2005-03-12-10:08 ) (/usr/share/texmf/tex/generic/tex4ht/html4-uni.4ht) -------------------------------------- --- Note --- for marking of the base font, use the command line option `fonts+' -------------------------------------- -------------------------------------- --- Note --- for non active _, use the command line option `no_' -------------------------------------- -------------------------------------- --- Note --- for _ of catcode 13, use the command line option `_13' -------------------------------------- -------------------------------------- --- Note --- for non active ^, use the command line option `no^' -------------------------------------- -------------------------------------- --- Note --- for ^ of catcode 13, use the command line option `^13' -------------------------------------- (/usr/share/texmf/tex/generic/tex4ht/html4.4ht version 2005-03-26-10:15 -------------------------------------- --- Note --- for alternative charset, use the command line option `charset=...' -------------------------------------- -------------------------------------- --- Note --- to ignore CSS font decoration, use the `NoFonts' command line opti on -------------------------------------- -------------------------------------- --- Note --- for jpg bitmaps, use the `jpg' command line option -------------------------------------- -------------------------------------- --- Note --- for gif bitmaps, use the `gif' command line option -------------------------------------- -------------------------------------- --- Note --- for content and toc in 2 frames, use the command line option `fram es' -------------------------------------- -------------------------------------- --- Note --- for content, toc, and footnotes in 3 frames, use the command line option `frames-fn' -------------------------------------- -------------------------------------- --- Note --- for file extension name xht, use the command line option `xht' -------------------------------------- TeX4ht package options: xhtml,mathml -------------------------------------- --- Note --- for inline CSS code, use the command line option `css-in' -------------------------------------- -------------------------------------- --- Note --- for pop ups on mouse over, use the command line option `mouseover' -------------------------------------- -------------------------------------- --- Note --- for addressing images in a subdirectory, use the command line opti on `imgdir:.../' -------------------------------------- ) (/usr/share/texmf/tex/generic/tex4ht/unicode.4ht version 2005-02-21-19:11 ) (/usr/share/texmf/tex/generic/tex4ht/mathml.4ht version 2005-03-12-10:08 ) (/usr/share/texmf/tex/generic/tex4ht/html-mml.4ht version 2005-03-12-10:08 ) (/usr/share/texmf/tex/generic/tex4ht/html4-uni.4ht) \:tokwrite=\toks15 \:tokpage=\toks16 -------------------------------------- --- Note --- for back links to toc, use the command line option `sections+' -------------------------------------- -------------------------------------- --- Note --- for linear crosslinks of pages, use the command line option `next' -------------------------------------- \openout15 = `test.4ct'. \:tocout=\write4 \openout4 = `test.4tc'. (/usr/share/texmf/tex/generic/tex4ht/html4.4ht version 2005-03-26-10:15 ) (/usr/share/texmf/tex/generic/tex4ht/unicode.4ht version 2005-02-21-19:11 ) (/usr/share/texmf/tex/generic/tex4ht/mathml.4ht version 2005-03-12-10:08 ) (/usr/share/texmf/tex/generic/tex4ht/html-mml.4ht version 2005-03-12-10:08 ) (/usr/share/texmf/tex/generic/tex4ht/html4-uni.4ht) (/usr/share/texmf/tex/generic/tex4ht/latex.4ht version 2005-03-27-10:43 -------------------------------------- --- Note --- for links into captions, instead of float heads, use the command l ine option `refcaption' -------------------------------------- (/usr/share/texmf/tex/generic/tex4ht/html4.4ht version 2005-03-26-10:15 -------------------------------------- --- Note --- for enumerated list elements li's without value attributes, use th e command line option `li-' -------------------------------------- -------------------------------------- --- Note --- for CSS2 code, use the command line option `css2' -------------------------------------- -------------------------------------- --- Note --- for pictorial tabular, use the command line option `pic-tabular' -------------------------------------- -------------------------------------- --- Note --- for bitmap fbox'es, use the command line option `pic-fbox' -------------------------------------- -------------------------------------- --- Note --- for bitmap framebox'es, use the command line option `pic-framebox' -------------------------------------- -------------------------------------- --- Note --- for inline footnotes use command line option `fn-in' -------------------------------------- -------------------------------------- --- Note --- for a JavaHelp output format, use the command line option `javahel p' -------------------------------------- -------------------------------------- --- Note --- for tracing of latex font commands, use the command line option `f onts' -------------------------------------- -------------------------------------- --- Note --- for width specifications of tabular p entries, use the `p-width' c ommand line option or a configuration similar to \Configure{HColWidth}{\HCode{ style="width:\HColWidth"}} -------------------------------------- ) (/usr/share/texmf/tex/generic/tex4ht/unicode.4ht version 2005-02-21-19:11 ) (/usr/share/texmf/tex/generic/tex4ht/mathml.4ht version 2005-03-12-10:08 ) (/usr/share/texmf/tex/generic/tex4ht/html-mml.4ht version 2005-03-12-10:08 ) (/usr/share/texmf/tex/generic/tex4ht/html4-uni.4ht)) (/usr/share/texmf/tex/generic/tex4ht/fontmath.4ht version 2005-03-27-10:43 (/usr/share/texmf/tex/generic/tex4ht/html4.4ht version 2005-03-26-10:15 ) (/usr/share/texmf/tex/generic/tex4ht/unicode.4ht version 2005-02-21-19:11 ) (/usr/share/texmf/tex/generic/tex4ht/mathml.4ht version 2005-03-12-10:08 LaTeX Font Info: External font `cmex10' loaded for size (Font) <7> on input line 1143. LaTeX Font Info: External font `cmex10' loaded for size (Font) <5> on input line 1143. [1 ] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21] -------------------------------------- --- Note --- for sources failing to produce clean mathml code, try the command line option `mathml-' -------------------------------------- [22] [23] [24] [25]) (/usr/share/texmf/tex/generic/tex4ht/html-mml.4ht version 2005-03-12-10:08 ) (/usr/share/texmf/tex/generic/tex4ht/html4-uni.4ht)) (/usr/share/texmf/tex/generic/tex4ht/article.4ht version 2005-03-27-10:43 (/usr/share/texmf/tex/generic/tex4ht/html4.4ht version 2005-03-26-10:15 -------------------------------------- --- Note --- for automatic sectioning pagination, use the command line option ` 1', `2', `3', '4', '5', '6', or '7' -------------------------------------- -------------------------------------- --- Note --- for files named after section titles, use the command line option `sec-filename' -------------------------------------- -------------------------------------- --- Note --- for i-columns index, use the command line option `index=i' (e.g., index=2) -------------------------------------- ) (/usr/share/texmf/tex/generic/tex4ht/unicode.4ht version 2005-02-21-19:11 ) (/usr/share/texmf/tex/generic/tex4ht/mathml.4ht version 2005-03-12-10:08 ) (/usr/share/texmf/tex/generic/tex4ht/html-mml.4ht version 2005-03-12-10:08 ) (/usr/share/texmf/tex/generic/tex4ht/html4-uni.4ht)) (/usr/share/texmf/tex/generic/tex4ht/html4.4ht version 2005-03-26-10:15 ) (/usr/share/texmf/tex/generic/tex4ht/unicode.4ht version 2005-02-21-19:11 ) (/usr/share/texmf/tex/generic/tex4ht/mathml.4ht version 2005-03-12-10:08 ) (/usr/share/texmf/tex/generic/tex4ht/html-mml.4ht version 2005-03-12-10:08 ) (/usr/share/texmf/tex/generic/tex4ht/html4-uni.4ht)) (./test.aux) \openout1 = `test.aux'. LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 3. LaTeX Font Info: ... okay on input line 3. LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 3. LaTeX Font Info: ... okay on input line 3. LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 3. LaTeX Font Info: ... okay on input line 3. LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 3. LaTeX Font Info: ... okay on input line 3. LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 3. LaTeX Font Info: ... okay on input line 3. LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 3. LaTeX Font Info: ... okay on input line 3. --- file test.css --- ! Missing } inserted. <inserted text> } l.5 \left< A \middle | B \right> ? ! Missing } inserted. <inserted text> } l.5 \left< A \middle | B \right> ? ! Extra }, or forgotten \right. \a:right #1->\egroup \Send {GROUP}{0}{ close="\expandafter \ifx \csname \str... l.5 \left< A \middle| B \right> ? ! Extra }, or forgotten \right. \a:right ...lr del\endcsname \fi "\space }\egroup l.5 \left< A \middle| B \right> ? [1] (./test.aux) ) Here is how much of TeX's memory you used: 3754 strings out of 95669 39091 string characters out of 1193311 199979 words of memory out of 1000001 6768 multiletter control sequences out of 10000+50000 3640 words of font info for 14 fonts, out of 500000 for 1000 19 hyphenation exceptions out of 1000 34i,5n,33p,641b,209s stack positions out of 1500i,500n,5000p,200000b,5000s Output written on test.dvi (26 pages, 17632 bytes). ------------- end of test.log ------------------------------- -- System Information Debian Release: 3.0 Architecture: i386 Kernel: Linux gabor 2.6.9.20041228 #1 Tue Dec 28 17:03:16 CET 2004 i686 Locale: LANG=hu_HU.iso88592, LC_CTYPE=hu_HU.iso88592 Versions of packages tex4ht depends on: ii libc6 2.3.2.ds1-22 GNU C Library: Shared libraries an ii libkpathsea3 2.0.2-30 path search library for teTeX (run ii tetex-bin 2.0.2-30 The teTeX binary files Gabor Braun -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]