From nma at 12000.org Wed Oct 10 21:01:29 2018 From: nma at 12000.org (Nasser M. Abbasi) Date: Wed, 10 Oct 2018 14:01:29 -0500 Subject: [tex4ht] Question on using .cfg and \DeclareGraphicsExtensions Message-ID: Hello; In my tex4ht .cfg file, which I use for all the builds, it has the following -------------------- \RequirePackage{mathjax-latex-4ht} \Preamble{xhtml} \DeclareGraphicsExtensions{.svg,.png} \Configure{Picture}{.svg} etc.... --------------------- The use of \DeclareGraphicsExtensions{.svg,.png} is needed to allow the code below it to work. The above works well, as long as I make sure to add \usepackage{graphicx} in each Latex file which is being compiled by make4ht, otherwise will get an error ! Undefined control sequence. l.4 \DeclareGraphicsExtensions So in all my latex files, I include the graphics package even though it might not be used, just to avoid this error. Is there a way around this? I can't include the graphics package itself in the .cfg, and I need to use the command \DeclareGraphicsExtensions in .cfg file. If you like to see the full .cfg I am using and the full commands, they are listed here https://www.12000.org/my_notes/faq/LATEX/htch4.htm#x5-680004.1 Thanks --Nasser From michal.h21 at gmail.com Wed Oct 10 21:15:25 2018 From: michal.h21 at gmail.com (Michal Hoftich) Date: Wed, 10 Oct 2018 21:15:25 +0200 Subject: [tex4ht] Question on using .cfg and \DeclareGraphicsExtensions In-Reply-To: References: Message-ID: Hi Nasser, > The use of \DeclareGraphicsExtensions{.svg,.png} is needed > to allow the code below it to work. > > The above works well, as long as I make sure to > add > > \usepackage{graphicx} > > in each Latex file which is being compiled by make4ht, > otherwise will get an error you can use \@ifpackageloaded{graphicx} for test of its presence. The full configuration file is bellow: ----------------------- \RequirePackage{mathjax-latex-4ht} \Preamble{xhtml} \makeatletter \@ifpackageloaded{graphicx}{% \DeclareGraphicsExtensions{.svg,.png} %this below to make it resize the SVG image, if it is there, to %what is in the includegraphics. %thanks to @Michal.h21 for this trick \newcommand\emwidth{10} \newcommand\CalcRem[1]{\strip at pt\dimexpr(#1)/\emwidth} \Configure{graphics*} {svg} {\Picture[pict]{\csname Gin at base\endcsname.svg \space style="width:\CalcRem{\Gin at req@width}em;" }% \special{t4ht+ at File: \csname Gin at base\endcsname.svg} } }{} \makeatother \Configure{Picture}{.svg} \begin{document} \edef\mymathjaxconf{\detokenize{MathJax.Hub.Config({ TeX: { MAXBUFFER: 40*1024, Macros : { relax: "{}", setlength: ["{}", 2], allowbreak: "{}", }}, });}} \ExplSyntaxOn \regex_replace_all:nnN{ \x{23}\x{23}}{\x{23}}{\mymathjaxconf} \ExplSyntaxOff \Configure{@HEAD}{\HCode{}} \EndPreamble -------------------- Best regards, Michal From nma at 12000.org Wed Oct 10 22:24:42 2018 From: nma at 12000.org (Nasser M. Abbasi) Date: Wed, 10 Oct 2018 15:24:42 -0500 Subject: [tex4ht] Question on using .cfg and \DeclareGraphicsExtensions In-Reply-To: References: Message-ID: Thanks Michal, The command \@ifpackageloaded{graphicx} worked great, I did not know about it. Best, --Nasser On 10/10/2018 2:15 PM, Michal Hoftich wrote: > Hi Nasser, > >> The use of \DeclareGraphicsExtensions{.svg,.png} is needed >> to allow the code below it to work. >> >> The above works well, as long as I make sure to >> add >> >> \usepackage{graphicx} >> >> in each Latex file which is being compiled by make4ht, >> otherwise will get an error > > you can use \@ifpackageloaded{graphicx} for test of its presence. The > full configuration file is bellow: > > ----------------------- > \RequirePackage{mathjax-latex-4ht} > \Preamble{xhtml} > > \makeatletter > \@ifpackageloaded{graphicx}{% > \DeclareGraphicsExtensions{.svg,.png} > > %this below to make it resize the SVG image, if it is there, to > %what is in the includegraphics. > %thanks to @Michal.h21 for this trick > \newcommand\emwidth{10} > \newcommand\CalcRem[1]{\strip at pt\dimexpr(#1)/\emwidth} > \Configure{graphics*} > {svg} > {\Picture[pict]{\csname Gin at base\endcsname.svg > \space style="width:\CalcRem{\Gin at req@width}em;" > }% > \special{t4ht+ at File: \csname Gin at base\endcsname.svg} > } > }{} > \makeatother > \Configure{Picture}{.svg} > \begin{document} > \edef\mymathjaxconf{\detokenize{MathJax.Hub.Config({ > TeX: { > MAXBUFFER: 40*1024, > Macros : { > relax: "{}", > setlength: ["{}", 2], > allowbreak: "{}", > }}, > });}} > > \ExplSyntaxOn > \regex_replace_all:nnN{ \x{23}\x{23}}{\x{23}}{\mymathjaxconf} > \ExplSyntaxOff > > \Configure{@HEAD}{\HCode{}} > > \EndPreamble > -------------------- > > Best regards, > Michal > From nma at 12000.org Thu Oct 11 05:00:18 2018 From: nma at 12000.org (Nasser M. Abbasi) Date: Wed, 10 Oct 2018 22:00:18 -0500 Subject: [tex4ht] new problem with tex4ht and matjax, table of content with math in section titles Message-ID: <715727b5-8ab1-3f4a-d1a8-beeea67bff6f@12000.org> Hello; I am not sure if this is a mathjax issue or tex4ht. It only shows up when using mathjax with tex4ht. Here is the MWE first -------------------------------- \documentclass[11pt]{article}% \begin{document} \tableofcontents \section{$u(0)=0,u^{\prime}(L)=0$} test1 \section{$u(0)=0, u\left(L \right) +u^{\prime}(L)=0$} test 2 \end{document} ------------------------------- The problem is in the table of content that shows up. It looks like this https://www.12000.org/tmp/101018/toc.jpg The command used to compile it is make4ht -ulm draft -c ./nma_mathjax.cfg foo.tex "htm,notoc*,p-width,charset=utf-8" " -cunihtf -utf8" Where nma_mathjax.cfg is (using the minimal version) ---------------------- \RequirePackage{mathjax-latex-4ht} \Preamble{xhtml} \begin{document} \EndPreamble ------------------- The file mathjax-latex-4ht.sty was downloaded from https://raw.githubusercontent.com/michal-h21/helpers4ht/master/mathjax-latex-4ht.sty It seems related to mathjax, since when I compile the same file using my old .cfg file, which does not use mathjax but uses svg, the TOC looks fine and math in the section title is not corrupted. Also the PDF is ok when compiling using lualatex foo.tex. Any hints or ideas when the TOC is messed up when using mathjax? Is one not supposed to use math in section titles with mathjax? Using texlive 2018. Thanks --Nasser From michal.h21 at gmail.com Thu Oct 11 13:57:32 2018 From: michal.h21 at gmail.com (Michal Hoftich) Date: Thu, 11 Oct 2018 13:57:32 +0200 Subject: [tex4ht] new problem with tex4ht and matjax, table of content with math in section titles In-Reply-To: <715727b5-8ab1-3f4a-d1a8-beeea67bff6f@12000.org> References: <715727b5-8ab1-3f4a-d1a8-beeea67bff6f@12000.org> Message-ID: Hi Nasser, > The problem is in the table of content that shows up. It looks > like this > > https://www.12000.org/tmp/101018/toc.jpg > > The command used to compile it is > > It seems related to mathjax, since when I compile > the same file using my old .cfg file, which does > not use mathjax but uses svg, the TOC looks fine and > math in the section title is not corrupted. > > Also the PDF is ok when compiling using lualatex foo.tex. > It seems that \left and \right commands are expanded once when written to TOC. I've fixed this issue in the MathJax support file, but it is possible that such issues may happen again. TOC business is quite huge in tex4ht and it is hard to debug. Best regards, Michal From rlserrano2002 at gmail.com Thu Oct 11 17:34:23 2018 From: rlserrano2002 at gmail.com (Raimundo Serrano) Date: Thu, 11 Oct 2018 12:34:23 -0300 Subject: [tex4ht] Problems installing TeXlive in CentOS7 Message-ID: Hello there, I'm unable to install the "install-tl" file from the command line. What I'm doing is: # perl install-tl it returns: # cannot contact mirror.ctan.org, returning a backbone server! Loading http://www.ctan.org/tex-archive/systems/texlive/tlnet/tlpkg/texlive.tlpdb install-tl: TLPDB::from_file could not download http://www.ctan.org/tex-archive/systems/texlive/tlnet/tlpkg/texlive.tlpdb; install-tl: maybe the repository setting should be changed. I already tried using "rsync" or wget to change the repository http though the problems remain. I use proxy to navigate. As said in the subject, I run CentOS7 and the installation from their repo gives lot of package errors after installing. Therefore I downloaded the install-tl file to install by myself. Thanks for any help. Ray From nma at 12000.org Thu Oct 11 19:23:56 2018 From: nma at 12000.org (Nasser M. Abbasi) Date: Thu, 11 Oct 2018 12:23:56 -0500 Subject: [tex4ht] new problem with tex4ht and matjax, table of content with math in section titles In-Reply-To: References: <715727b5-8ab1-3f4a-d1a8-beeea67bff6f@12000.org> Message-ID: On 10/11/2018 6:57 AM, Michal Hoftich wrote: > Hi Nasser, > >> The problem is in the table of content that shows up. It looks >> like this >> >> https://www.12000.org/tmp/101018/toc.jpg >> >> The command used to compile it is >> > >> It seems related to mathjax, since when I compile >> the same file using my old .cfg file, which does >> not use mathjax but uses svg, the TOC looks fine and >> math in the section title is not corrupted. >> >> Also the PDF is ok when compiling using lualatex foo.tex. >> > > It seems that \left and \right commands are expanded once when written > to TOC. I've fixed this issue in the MathJax support file, but it is > possible that such issues may happen again. TOC business is quite huge > in tex4ht and it is hard to debug. > > Best regards, > Michal > Thanks again Michal. I downloaded your style file from https://github.com/michal-h21/helpers4ht And it worked very well. TOC looks OK now with mathjax. I hope in texlive 2019 these style files will become part of texlive. --Nasser From michal.h21 at gmail.com Thu Oct 11 19:33:23 2018 From: michal.h21 at gmail.com (Michal Hoftich) Date: Thu, 11 Oct 2018 19:33:23 +0200 Subject: [tex4ht] new problem with tex4ht and matjax, table of content with math in section titles In-Reply-To: References: <715727b5-8ab1-3f4a-d1a8-beeea67bff6f@12000.org> Message-ID: > And it worked very well. TOC looks OK now with mathjax. > > I hope in texlive 2019 these style files will become part of > texlive. I will add it eventually, even in TL 2018. I have just too long ToDo list :( Best, Michal From reinhard.kotucha at web.de Thu Oct 11 19:47:10 2018 From: reinhard.kotucha at web.de (Reinhard Kotucha) Date: Thu, 11 Oct 2018 19:47:10 +0200 Subject: [tex4ht] Problems installing TeXlive in CentOS7 In-Reply-To: References: Message-ID: <23487.35998.228690.968876@gargle.gargle.HOWL> On 2018-10-11 at 12:34:23 -0300, Raimundo Serrano wrote: > Hello there, > I'm unable to install the "install-tl" file from the command line. You are asking on the wrong mailing list. Ask here: http://tug.org/mailman/listinfo/tex-live BTW, it's quite unusual that mirror.ctan.org is inaccessible. You can use the -repository option in order to try another repository, see http://tug.org/texlive/doc/tlmgr.html#OPTIONS Regards, Reinhard -- ------------------------------------------------------------------ Reinhard Kotucha Phone: +49-511-3373112 Marschnerstr. 25 D-30167 Hannover mailto:reinhard.kotucha at web.de ------------------------------------------------------------------ From nma at 12000.org Mon Oct 15 00:56:39 2018 From: nma at 12000.org (Nasser M. Abbasi) Date: Sun, 14 Oct 2018 17:56:39 -0500 Subject: [tex4ht] Another problem compiling tex4ht to HTML using mathjax mode. Forbidden control sequence found while scanning use of \AltMathOne. Message-ID: <6a084cf5-a553-7516-7371-b20796c0c891@12000.org> I've found another issue using mathjax mode with make4ht. The following MWE compiles OK using lualatex and when using svg and when using default png. But when using mathjax it gives strange error: ------------------------------------ (/usr/local/texlive/2018/texmf-dist/tex/generic/tex4ht/html5.4ht)) (./foo.aux)) (/usr/local/texlive/2018/texmf-dist/tex/latex/lm/ot1lmtt.fd) Runaway argument? \int _{0}^{1}x\ J_{p}\left ( ax\right ) \ J_{p}\left ( bx\right ) \ d\ETC. ! Forbidden control sequence found while scanning use of \AltMathOne. \par l.8 0 & if\ a\neq b\\ ? x ------------------------- This code comes from auto-generated Latex code. But as I said above, it compiles OK, except when using mathjax. So it seems some conflict with may be the style file used or something mathjax does not like? I am using the same command: make4ht -ulm default -c ./nma_mathjax.cfg foo.tex "htm,notoc*,p-width,charset=utf-8" " -cunihtf -utf8" Where nma_mathjax.cfg is (using the minimal version) ---------------------- \RequirePackage{mathjax-latex-4ht} \Preamble{xhtml} \begin{document} \EndPreamble ------------------- The file mathjax-latex-4ht.sty was downloaded from https://github.com/michal-h21/helpers4ht/blob/master/mathjax-latex-4ht.sty When I remove the mathjax, it compiles OK, i.e. using this command make4ht -ulm default foo.tex "htm,notoc*,p-width,charset=utf-8" " -cunihtf -utf8" No error. Here is the latex file ----------------- \documentclass[11pt]{article}% \usepackage{amsmath} \begin{document} \begin{tabular}[c]{|l|p{5.5in}|}\hline Orthogonality & $\int_{0}^{1}x\ J_{p}\left( ax\right) \ J_{p}\left( bx\right) \ dx=\left\{ \begin{array}[c]{ll}% 0 & if\ a\neq b\\ \frac{1}{2}J_{p+1}^{2}\left( a\right) =\frac{1}{2}J_{p-1}^{2}\left( a\right) =\frac{1}{2}J_{p}^{^{\prime}2}\left( a\right) & if\ a=b \end{array} \right. \ a,b$ are zeros of $J_{p}$\\\hline recursive formula & $\frac{d}{dx}\left[ x^{p}J_{p}\right] =x^{p}J_{p-1}$, \ \ $\frac{d}{dx}\left[ \frac{1}{x^{p}}J_{p}\right] =-\frac{1}{x^{p}}% J_{p+1},$ \ \ $J_{p-1}+J_{p+1}=\frac{2p}{x}J_{p},$ \ \ \ $J_{p-1}% -J_{p+1}=2J_{p}^{\prime}$\\\hline \end{tabular} \end{document} ---------------------------------- In case the above gets messed up in the email, I've also put a copy here https://www.12000.org/tmp/10142018/foo.tex Thanks for any hints on what the problem is. This mathjax seems like a tricky thing integrate with tex4ht. I am only using it becuase it makes compiling with tex4ht very fast. --Nasser From michal.h21 at gmail.com Mon Oct 15 11:23:55 2018 From: michal.h21 at gmail.com (Michal Hoftich) Date: Mon, 15 Oct 2018 11:23:55 +0200 Subject: [tex4ht] Another problem compiling tex4ht to HTML using mathjax mode. Forbidden control sequence found while scanning use of \AltMathOne. In-Reply-To: <6a084cf5-a553-7516-7371-b20796c0c891@12000.org> References: <6a084cf5-a553-7516-7371-b20796c0c891@12000.org> Message-ID: Hi Nasser, > > This code comes from auto-generated Latex code. But as I said > above, it compiles OK, except when using mathjax. So it seems > some conflict with may be the style file used or something > mathjax does not like? the issue is with & characters in your inline math. It is not MathJax's fault, it is issue with TeX parsing. I don't know how to fix that, playing with catcodes didn't help. Only solution I've found is to use { } around the problematic math element (not every one, just the problematic ones). So your example may look like this: \documentclass[11pt]{article}% \usepackage{amsmath} \begin{document} \begin{tabular}[c]{|l|p{5.5in}|}\hline Orthogonality &{$\int_{0}^{1}x\ J_{p}\left( ax\right) \ J_{p}\left( bx\right) \ dx=\left\{ \begin{array}[c]{ll}% 0 & if\ a\neq b\\ \frac{1}{2}J_{p+1}^{2}\left( a\right) =\frac{1}{2}J_{p-1}^{2}\left( a\right) =\frac{1}{2}J_{p}^{^{\prime}2}\left( a\right) & if\ a=b \end{array} \right. \ a,b$} are zeros of $J_{p}$\\\hline recursive formula & $\frac{d}{dx}\left[ x^{p}J_{p}\right] =x^{p}J_{p-1}$, \ \ $\frac{d}{dx}\left[ \frac{1}{x^{p}}J_{p}\right] =-\frac{1}{x^{p}}% J_{p+1},$ \ \ $J_{p-1}+J_{p+1}=\frac{2p}{x}J_{p},$ \ \ \ $J_{p-1}% -J_{p+1}=2J_{p}^{\prime}$\\\hline \end{tabular} \end{document} If anybody know a better solution, I would be happy :) Best regards, Michal From nma at 12000.org Mon Oct 15 16:44:13 2018 From: nma at 12000.org (Nasser M. Abbasi) Date: Mon, 15 Oct 2018 09:44:13 -0500 Subject: [tex4ht] Another problem compiling tex4ht to HTML using mathjax mode. Forbidden control sequence found while scanning use of \AltMathOne. In-Reply-To: References: <6a084cf5-a553-7516-7371-b20796c0c891@12000.org> Message-ID: <4a0179c0-593f-5ba2-6802-ea131fad49fd@12000.org> On 10/15/2018 4:23 AM, Michal Hoftich wrote: > Hi Nasser, > > >> >> This code comes from auto-generated Latex code. But as I said >> above, it compiles OK, except when using mathjax. So it seems >> some conflict with may be the style file used or something >> mathjax does not like? > > the issue is with & characters in your inline math. It is not > MathJax's fault, it is issue with TeX parsing. I don't know how to fix > that, playing with catcodes didn't help. Only solution I've found is > to use { } around the problematic math element (not every one, just > the problematic ones). So your example may look like this: > > \documentclass[11pt]{article}% > \usepackage{amsmath} > \begin{document} > \begin{tabular}[c]{|l|p{5.5in}|}\hline > Orthogonality &{$\int_{0}^{1}x\ J_{p}\left( ax\right) \ J_{p}\left( > bx\right) \ dx=\left\{ > \begin{array}[c]{ll}% > 0 & if\ a\neq b\\ > \frac{1}{2}J_{p+1}^{2}\left( a\right) =\frac{1}{2}J_{p-1}^{2}\left( > a\right) =\frac{1}{2}J_{p}^{^{\prime}2}\left( a\right) & if\ a=b > \end{array} > \right. \ a,b$} are zeros of $J_{p}$\\\hline > recursive formula & $\frac{d}{dx}\left[ x^{p}J_{p}\right] =x^{p}J_{p-1}$, > \ \ $\frac{d}{dx}\left[ \frac{1}{x^{p}}J_{p}\right] =-\frac{1}{x^{p}}% > J_{p+1},$ \ \ $J_{p-1}+J_{p+1}=\frac{2p}{x}J_{p},$ \ \ \ $J_{p-1}% > -J_{p+1}=2J_{p}^{\prime}$\\\hline > \end{tabular} > > \end{document} > > If anybody know a better solution, I would be happy :) > > Best regards, > Michal > Thanks Michal for looking at this. I've just changed the code as you showed in the file I have, (there were more cases like the one in the example above). So I added {} around all of them and now it compiles ok with mathjax. But what I do not understand, is that you say it is a tex parsing issue. But why it only happen when using mathjax mode? Thanks, --Nasser From michal.h21 at gmail.com Mon Oct 15 17:26:33 2018 From: michal.h21 at gmail.com (Michal Hoftich) Date: Mon, 15 Oct 2018 17:26:33 +0200 Subject: [tex4ht] Another problem compiling tex4ht to HTML using mathjax mode. Forbidden control sequence found while scanning use of \AltMathOne. In-Reply-To: <4a0179c0-593f-5ba2-6802-ea131fad49fd@12000.org> References: <6a084cf5-a553-7516-7371-b20796c0c891@12000.org> <4a0179c0-593f-5ba2-6802-ea131fad49fd@12000.org> Message-ID: Hi Nasser, > Thanks Michal for looking at this. I've just changed the code > as you showed in the file I have, (there were more cases > like the one in the example above). So I added {} around all of them > and now it compiles ok with mathjax. > Fine :) > But what I do not understand, is that you say it is a tex parsing > issue. But why it only happen when using mathjax mode? Because the math contents are being passed to a TeX macro that converts it to a plain text that is written to the HTML code. This normally doesn't happen in MathML or picture math output. Best, Michal From nma at 12000.org Sat Oct 20 19:05:02 2018 From: nma at 12000.org (Nasser M. Abbasi) Date: Sat, 20 Oct 2018 20:05:02 +0300 Subject: [tex4ht] [bug #403] tex4ht fails with scrartcl class when defining \rm command. Argument of \popthree has an extra Message-ID: <20181020-200441.sv199.82989@puszcza.gnu.org.ua> URL: Summary: tex4ht fails with scrartcl class when defining \rm command. Argument of \popthree has an extra Project: tex4ht Submitted by: nma123 Submitted on: Sat 20 Oct 2018 08:04:41 PM EEST Category: None Priority: 5 - Normal Severity: 3 - Minor Status: None Privacy: Public Assigned to: None Originator Email: Open/Closed: Open Discussion Lock: Any _______________________________________________________ Details: Posted at https://tex.stackexchange.com/questions/455994/tex4ht-fails-with-scrartcl-class-when-defining-rm-command-argument-of-popthre This MWE compiles OK with lualatex and pdflatex but fails with tex4ht. Why? And this happens only when using scrartcl and not with article. --------------------- \documentclass[11pt]{scrartcl}%{article} \DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm} \begin{document} test \end{document} ------------------ Now ------------------ make4ht -ulm draft foo.tex .... (/usr/local/texlive/2018/texmf-dist/tex/generic/tex4ht/html5.4ht)) (/usr/local/texlive/2018/texmf-dist/tex/generic/tex4ht/scrartcl.4ht ! Argument of \popthree has an extra }. \par l.33 \:temp{rm} ? ------------------------ I also tried \documentclass[11pt,enabledeprecatedfontcommands]{scrartcl} But make4ht still gave same error. _______________________________________________________ Reply to this item at: _______________________________________________ Message sent via/by Puszcza http://puszcza.gnu.org.ua/ From michal.h21 at gmail.com Sat Oct 20 20:11:06 2018 From: michal.h21 at gmail.com (Michal Hoftich) Date: Sat, 20 Oct 2018 20:11:06 +0200 Subject: [tex4ht] [bug #403] tex4ht fails with scrartcl class when defining \rm command. Argument of \popthree has an extra In-Reply-To: <20181020-200441.sv199.82989@puszcza.gnu.org.ua> References: <20181020-200441.sv199.82989@puszcza.gnu.org.ua> Message-ID: <20181020-211106.sv189.42852@puszcza.gnu.org.ua> Follow-up Comment #1, bug #403 (project tex4ht): tex4ht patches the old font commands in the code for basic classes. configuration for scrartcl class duplicates this code, otherwise the compilation fails. I don't really understand this patching in the first place, I cannot see any difference when it is removed, other than that Nasser's code can compile without error. It seems like a really old hack that isn't useful any more. I've removed the patching from the .4ht files, but kept them in the sources, so it can be returned back if it causes any issues. _______________________________________________________ Reply to this item at: _______________________________________________ Message sent via/by Puszcza http://puszcza.gnu.org.ua/ From karl at freefriends.org Sun Oct 21 00:48:23 2018 From: karl at freefriends.org (Karl Berry) Date: Sat, 20 Oct 2018 22:48:23 GMT Subject: [tex4ht] [bug #403] tex4ht fails with scrartcl class when defining \rm command. Argument of \popthree has an extra In-Reply-To: <20181020-211106.sv189.42852@puszcza.gnu.org.ua> References: <20181020-200441.sv199.82989@puszcza.gnu.org.ua> <20181020-211106.sv189.42852@puszcza.gnu.org.ua> Message-ID: <20181021-014823.sv118.63202@puszcza.gnu.org.ua> Update of bug #403 (project tex4ht): Open/Closed: Open => Closed _______________________________________________________ Follow-up Comment #2: michal updated tex4ht (r435) and i updated tl (r48958). hope it flies ... _______________________________________________________ Reply to this item at: _______________________________________________ Message sent via/by Puszcza http://puszcza.gnu.org.ua/ From mail+tex4ht at branleb.de Thu Oct 25 21:30:02 2018 From: mail+tex4ht at branleb.de (Florian Zumkeller-Quast) Date: Thu, 25 Oct 2018 22:30:02 +0300 Subject: [tex4ht] [bug #172] oolatex: Spurious spaces after cross references and citations In-Reply-To: <20121213-141709.sv193.88342@puszcza.gnu.org.ua> References: <20121213-141709.sv193.88342@puszcza.gnu.org.ua> Message-ID: <20181025-222944.sv5865.69412@puszcza.gnu.org.ua> Follow-up Comment #1, bug #172 (project tex4ht): I can't confirm the behaviour for \ref{} and \cite{} but only for \footnote{} and \footcite{}. In those cases, there is a possibility for a dirty workaround: $ cat /usr/share/texmf/tex4ht/base/unix/tex4ht.env | sed -E "s:(4oo.+)(mv):\1sed -E 's/( )\{2,\}( ~/texmf/tex4ht/base/unix/tex4ht.env && mktexlsr This changes the "packing" behaviour of "-coo" to not just move the generated content.xml, but to replace the unwanted whitespaces first. For my usecase this seems to work. (Make sure the paths are correct and exist on your system and that you don't override already existing custom settings on your system!) This workaround is based on some assumptions: 1. The Bug seems to be fixed for \ref and \cite 2. But it is still present for footnotes 3. A single whitespace before a link tag is valid and there because the TeX-Author wanted it 4. Multiple Spaces are Bug-induced code that is completely unwanted. _______________________________________________________ Reply to this item at: _______________________________________________ Message sent via/by Puszcza http://puszcza.gnu.org.ua/ From michal.h21 at gmail.com Thu Oct 25 23:59:51 2018 From: michal.h21 at gmail.com (Michal Hoftich) Date: Thu, 25 Oct 2018 23:59:51 +0200 Subject: [tex4ht] [bug #172] oolatex: Spurious spaces after cross references and citations In-Reply-To: <20181025-222944.sv5865.69412@puszcza.gnu.org.ua> References: <20121213-141709.sv193.88342@puszcza.gnu.org.ua> <20181025-222944.sv5865.69412@puszcza.gnu.org.ua> Message-ID: <20181026-005951.sv189.81488@puszcza.gnu.org.ua> Follow-up Comment #2, bug #172 (project tex4ht): Thank you for the report, the original issue indeed seems to be fixed. The footnote issue can be fixed without need to use sed. I cannot find the source of the spurious spaces, but tex4ht can be instructed to ignore spaces using the \special{t4ht@)} command. I've added this command to the footnote configuration in the ooffice configuration file and it seems to fix the issue. BTW, it is better to use make4ht -f odt filename.tex instead of the old mk4ht oolatex, it fixes lot of issues with file names, Unicode and it also supports filtering of the XML files before the xt-pipes processing. See https://tex.stackexchange.com/a/447968/2891 for example. The additional information about tex4ht \special commands can be found for example here: https://www.kodymirus.cz/src4ht/tex4ht-moz18.html _______________________________________________________ Reply to this item at: _______________________________________________ Message sent via/by Puszcza http://puszcza.gnu.org.ua/ From mail+tex4ht at branleb.de Fri Oct 26 15:00:02 2018 From: mail+tex4ht at branleb.de (Florian Zumkeller-Quast) Date: Fri, 26 Oct 2018 16:00:02 +0300 Subject: [tex4ht] [bug #404] Using label/ref seems to be broken with opendocument export Message-ID: <20181026-155517.sv5865.25492@puszcza.gnu.org.ua> URL: Summary: Using label/ref seems to be broken with opendocument export Project: tex4ht Submitted by: branleb Submitted on: Fr 26 Okt 2018 15:55:17 EEST Category: None Priority: 5 - Normal Severity: 5 - Normal Status: None Privacy: Public Assigned to: None Originator Email: Open/Closed: Open Discussion Lock: Any _______________________________________________________ Details: When using \label{} and \ref{} (or \pageref{} in TeX, the opendocument output seems to be broken. The referenced Label is just not rendered visibly. I've attached a MWE and the generated .odt file. I'm using: htxelatex test-labelref.tex "xhtml,ooffice" "ooffice/! -cmozhtf" "-coo -cvalidate" to generated that file. When running xelatex to generate a pdf file, everything works fine. The TeX-Code line
Something about Section \ref{sec:1} and --\ref{sec:2}-- to show something else
on p.~\pageref{sec:1}.
results in
Something about Section
1 and –2– to show
something else on p.3.
    
So, in summary, the reference is rendered, but not in the correct way. (Btw, shouldn't it be text:reference-ref instead of t4htlink? See http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part1.html#element-text_reference-ref) If you need any further information to reproduce the behaviour, please let me know. _______________________________________________________ File Attachments: ------------------------------------------------------- Date: Fr 26 Okt 2018 15:55:17 EEST Name: test-labelref.tex Size: 403B By: branleb ------------------------------------------------------- Date: Fr 26 Okt 2018 15:55:17 EEST Name: test-labelref.pdf Size: 17kB By: branleb ------------------------------------------------------- Date: Fr 26 Okt 2018 15:55:17 EEST Name: test-labelref.odt Size: 8kB By: branleb _______________________________________________________ Reply to this item at: _______________________________________________ Message sent via/by Puszcza http://puszcza.gnu.org.ua/ From nma at 12000.org Fri Oct 26 15:19:31 2018 From: nma at 12000.org (Nasser M. Abbasi) Date: Fri, 26 Oct 2018 08:19:31 -0500 Subject: [tex4ht] another strange error when using make4ht with mathjax mode Message-ID: Hello; This MWE only fails to compile when using make4ht in mathjax mode. It is snippet from old code. May be not well written. But this used to compile OK and still compiles OK when not using mathjax mode in make4ht. -------------------------------- \documentclass[11pt]{article} \usepackage{amsmath,mathtools,amssymb} \begin{document} \begin{tabular}[c]{|l|l|}\hline $ \begin{tabular}[c]{l}% $i\in C(J)$\\ $j\notin C(J)$ \end{tabular} $ & $f_{ij}=0$\\\hline \end{tabular} \end{document} ------------------------------------ Now when I compile it with mathjax, it gives this error ------------------------------------- (/usr/local/texlive/2018/texmf-dist/tex/latex/amsfonts/umsb.fd) (/usr/local/texlive/2018/texmf-dist/tex/latex/lm/ot1lmtt.fd) ! Missing $ inserted. $ l.10 $j\notin C(J)$ ? x ---------------------------------- command used make4ht -ulm default -c ./nma_mathjax.cfg foo.tex "htm,0,notoc*,p-width,charset=utf-8" " -cunihtf -utf8" Where nma_mathjax.cfg is -------------------- \RequirePackage{mathjax-latex-4ht} \Preamble{xhtml} \begin{document} \EndPreamble ------------- And mathjax-latex-4ht.sty is https://github.com/michal-h21/helpers4ht/blob/master/mathjax-latex-4ht.sty Why does it fail only in mathjax mode? It compiles OK in lulatex, and svg. TL 2018 on Linux. Thank you, ---Nasser From hammond at csc.albany.edu Fri Oct 26 19:03:52 2018 From: hammond at csc.albany.edu (William F Hammond) Date: Fri, 26 Oct 2018 13:03:52 -0400 Subject: [tex4ht] another strange error when using make4ht with mathjax mode In-Reply-To: (Nasser M. Abbasi's message of "Fri, 26 Oct 2018 08:19:31 -0500") References: Message-ID: "Nasser M. Abbasi" writes: > This MWE only fails to compile when using make4ht in mathjax mode. I think it is more serious than whether or not mathjax is used. > It is snippet from old code. May be not well written. But > this used to compile OK and still compiles OK when not using > mathjax mode in make4ht. > > -------------------------------- > \documentclass[11pt]{article} > \usepackage{amsmath,mathtools,amssymb} > > \begin{document} > \begin{tabular}[c]{|l|l|}\hline > $ > \begin{tabular}[c]{l}% > $i\in C(J)$\\ > $j\notin C(J)$ > \end{tabular} > $ & $f_{ij}=0$\\\hline > \end{tabular} > \end{document} > ------------------------------------ Why place "tabular" inside math, especially inline math? This cannot sensibly become HTML because one cannot put a block element -- -- inside an inline element -- . Making use of a suitable LaTeX profile should trap problems of this type. (I find that simply removing the '$' markup in the first cell of the outer tabular surrounding the inner tabular will fix it.) -- Bill From nma at 12000.org Fri Oct 26 19:39:54 2018 From: nma at 12000.org (Nasser M. Abbasi) Date: Fri, 26 Oct 2018 12:39:54 -0500 Subject: [tex4ht] another strange error when using make4ht with mathjax mode In-Reply-To: References: Message-ID: <47874c10-859f-43e8-c88b-079ea78ac0be@12000.org> On 10/26/2018 12:03 PM, William F Hammond wrote: > "Nasser M. Abbasi" writes: > >> This MWE only fails to compile when using make4ht in mathjax mode. > > I think it is more serious than whether or not mathjax is used. > >> It is snippet from old code. May be not well written. But >> this used to compile OK and still compiles OK when not using >> mathjax mode in make4ht. >> >> -------------------------------- >> \documentclass[11pt]{article} >> \usepackage{amsmath,mathtools,amssymb} >> >> \begin{document} >> \begin{tabular}[c]{|l|l|}\hline >> $ >> \begin{tabular}[c]{l}% >> $i\in C(J)$\\ >> $j\notin C(J)$ >> \end{tabular} >> $ & $f_{ij}=0$\\\hline >> \end{tabular} >> \end{document} >> ------------------------------------ > > Why place "tabular" inside math, especially inline math? > I use Scientific word. This is very old document for a HW. May be 10 years old. I must have selected the table in the GUI and then pressed math mode button. This made SW put a $$ around the table. The point is, this compiles with no problem. I've compiled this folder many times before when I run make on the source tree, It only gives now since I am using mathjax mode. Agree, I would not select math mode now when making table like this in SW. I will try to change it in SW. > This cannot sensibly become HTML because one cannot put a block element > --
-- inside an inline element -- . > > Making use of a suitable LaTeX profile should trap problems of this > type. > > (I find that simply removing the '$' markup in the first > cell of the outer tabular surrounding the inner tabular will > fix it.) > > > -- Bill Yes. Removing $$ from outside inner table removes the error. But again, if this is an invalid latex, then lualatex should give an error. But it compiles it with no error. Using TL 2018. Thank you, --Nasser From michal.h21 at gmail.com Sat Oct 27 13:04:43 2018 From: michal.h21 at gmail.com (Michal Hoftich) Date: Sat, 27 Oct 2018 13:04:43 +0200 Subject: [tex4ht] another strange error when using make4ht with mathjax mode In-Reply-To: <47874c10-859f-43e8-c88b-079ea78ac0be@12000.org> References: <47874c10-859f-43e8-c88b-079ea78ac0be@12000.org> Message-ID: Hi Nasser, > > Why place "tabular" inside math, especially inline math? > > > > I use Scientific word. This is very old document for a HW. May be > 10 years old. I must have selected the table in the GUI and then > pressed math mode button. This made SW put a $$ around the table. > > The point is, this compiles with no problem. I've compiled this folder > many times before when I run make on the source tree, It only gives > now since I am using mathjax mode. lualatex maybe isn't complaining, but it really doesn't make sense to use tabular inside inline math. I don't think that it would work for MathML either. Even if you managed to compile it and keep the table as LaTeX code, MathJax doesn't support tabular, so it cannot render it. Best, Michal From michal.h21 at gmail.com Sat Oct 27 22:22:28 2018 From: michal.h21 at gmail.com (Michal Hoftich) Date: Sat, 27 Oct 2018 22:22:28 +0200 Subject: [tex4ht] [bug #404] Using label/ref seems to be broken with opendocument export In-Reply-To: <20181026-155517.sv5865.25492@puszcza.gnu.org.ua> References: <20181026-155517.sv5865.25492@puszcza.gnu.org.ua> Message-ID: <20181027-232228.sv189.85490@puszcza.gnu.org.ua> Follow-up Comment #1, bug #404 (project tex4ht): It seems that post-processing by Xtpipes haven't been executed on the content.xml file, because it should replace tags with valid OpenDocument elements. Anyway, on my machine Xtpipes replace only some links, they doesn't replace the destinations in section titles. I also think text:a element should be used for links to get the hyperlink functionality. I've created Lua filter for make4ht that replaces the link handling in xtpipes. The links produced by it are clickable. The modified xtpipes file, make4ht build file and sample ODT file are attached. The command used for the compilation is make4ht -uf odt test-labelref.tex "TocLink" It is necessary to use the development version of make4ht[1], because I fixed some bugs while working on this example. [1] https://github.com/michal-h21/make4ht (file #302, file #303, file #304) _______________________________________________________ Additional Item Attachment: File name: test-labelref.odt Size:7 KB File name: test-labelref.mk4 Size:1 KB File name: oo-text.4xt Size:13 KB _______________________________________________________ Reply to this item at: _______________________________________________ Message sent via/by Puszcza http://puszcza.gnu.org.ua/ From nma at 12000.org Mon Oct 29 22:36:48 2018 From: nma at 12000.org (Nasser M. Abbasi) Date: Mon, 29 Oct 2018 16:36:48 -0500 Subject: [tex4ht] big problem with table of content when section titles contain math using mathjax Message-ID: <9bd20b8f-8b36-9006-9488-0438cbb5e20c@12000.org> Hello, I found a really big problem using mathjax with tex4ht. When a section or subsection title contain math, the table of content that shows in HTML is all corrupted. This is only when using mathjax mode. Add \cprotect{} around the section of subsection title that contains math had no effect. These files were compiled fine as is for years with no problem before when using svg for math. I made a MWE to show the problem. ============ \documentclass[12pt]{article} \usepackage{amsmath,mathtools,amssymb} \usepackage{graphicx} \begin{document} \title{MWE showing the pronblem} \maketitle \tableofcontents \section{Listing of integrals} \subsection{\quad $\int e^x \left(1-x^3+x^4-x^5+x^6\right) \, dx$} test \subsection{\quad $\int \frac{e^{\frac{x}{2+x^2}} \left(2-x^2\right)}{2 x+x^3} \, dx$} test2 \end{document} =================== Here is a screen shot showing the result https://www.12000.org/tmp/102918/screen_shot_mathjax.jpg The HTML for toc is ================== =============================== Compiled the above using same command I used in earlier examples, which is make4ht -ulm default -c ./nma_mathjax.cfg report.tex "htm,0,notoc*,p-width,charset=utf-8" " -cunihtf -utf8" Where nma_mathjax.cfg is ------------------------- \RequirePackage{mathjax-latex-4ht} \Preamble{xhtml} \begin{document} \EndPreamble ------------------- And mathjax-latex-4ht.sty is from https://github.com/michal-h21/helpers4ht/blob/master/mathjax-latex-4ht.sty If I compile the same file using svg for math or just using default setting for make4ht , then the TOC is correct. make4ht -ulm default report.tex No issue. Again, this from large files that always used to compile OK and TOC with math in it had no issue showing in HTML before. Does one need to modify something in the mathjax-latex-4ht.sty to make the TOC show OK? Do I need to modify something in my Latex to make it work with mathjax? TL 2018. Thank you --Nasser From michal.h21 at gmail.com Tue Oct 30 10:45:45 2018 From: michal.h21 at gmail.com (Michal Hoftich) Date: Tue, 30 Oct 2018 10:45:45 +0100 Subject: [tex4ht] big problem with table of content when section titles contain math using mathjax In-Reply-To: <9bd20b8f-8b36-9006-9488-0438cbb5e20c@12000.org> References: <9bd20b8f-8b36-9006-9488-0438cbb5e20c@12000.org> Message-ID: Hi Nasser, > Does one need to modify something in the mathjax-latex-4ht.sty to > make the TOC show OK? Do I need to modify something in my Latex to > make it work with mathjax? This is the same issue as you had with \left and \right in TOC some time ago. The \int and \, commands must be redefined to not expand in TOC. I've updated mathjax-latex-4ht and created new command: \fixmathjaxtoc. It takes command name as an argument and redefines it so it doesn't expand. You can use it in your .cfg file in this way: \fixmathjaxtoc\int. But you should let me know about unsupported commands anyway, as I should fix the sources as well. Best regards, Michal From nma at 12000.org Tue Oct 30 13:50:17 2018 From: nma at 12000.org (Nasser M. Abbasi) Date: Tue, 30 Oct 2018 07:50:17 -0500 Subject: [tex4ht] big problem with table of content when section titles contain math using mathjax In-Reply-To: References: <9bd20b8f-8b36-9006-9488-0438cbb5e20c@12000.org> Message-ID: On 10/30/2018 4:45 AM, Michal Hoftich wrote: > Hi Nasser, > >> Does one need to modify something in the mathjax-latex-4ht.sty to >> make the TOC show OK? Do I need to modify something in my Latex to >> make it work with mathjax? > > This is the same issue as you had with \left and \right in TOC some > time ago. The \int and \, commands must be redefined to not expand in > TOC. I've updated mathjax-latex-4ht and created new command: > \fixmathjaxtoc. It takes command name as an argument and redefines it > so it doesn't expand. You can use it in your .cfg file in this way: > \fixmathjaxtoc\int. But you should let me know about unsupported > commands anyway, as I should fix the sources as well. > > Best regards, > Michal > Thanks Michal; Your new style file fixed some of the problems in the TOC, but I see few other entries in the TOC still have problems when I run it on my main file (not the MWE I gave) I guess these needs to be added to \fixmathjaxtoc. btw, I did not have to do anything to my .cfg? I just needed to download your new style file which has this command in it. I now running the full build and will make list of all these commands that needs to be added. There is over 70,000 entries in the TOC spreads of hundreds of web pages anbd it takes days to compile, so it will take me sometime to make a list of all of them and give it to you. For example on one file, I get now this TOC in HTML (using your new updated style file). You can see some still needs to be fixed https://www.12000.org/tmp/102918/screen_shot_mathjax_2.jpg While the same file using svg looks like this https://www.12000.org/tmp/102918/screen_shot_svg.jpg Thanks again for your help. --Nasser From michal.h21 at gmail.com Tue Oct 30 14:09:30 2018 From: michal.h21 at gmail.com (Michal Hoftich) Date: Tue, 30 Oct 2018 14:09:30 +0100 Subject: [tex4ht] big problem with table of content when section titles contain math using mathjax In-Reply-To: References: <9bd20b8f-8b36-9006-9488-0438cbb5e20c@12000.org> Message-ID: > Your new style file fixed some of the problems in the TOC, > but I see few other entries in the TOC still have problems > when I run it on my main file (not the MWE I gave) > I am sure there will be lot of such commands. > I guess these needs to be added to \fixmathjaxtoc. > Yes > btw, I did not have to do anything to my .cfg? I just needed to > download your new style file which has this command in it. > No, I've added fixes for your test file already. > I now running the full build and will make list of all > these commands that needs to be added. > > There is over 70,000 entries in the TOC spreads of hundreds of > web pages anbd it takes days to compile, so it will take me > sometime to make a list of all of them and give it to you. > > For example on one file, I get now this TOC in HTML (using > your new updated style file). You can see some still needs > to be fixed > > https://www.12000.org/tmp/102918/screen_shot_mathjax_2.jpg > > While the same file using svg looks like this > > https://www.12000.org/tmp/102918/screen_shot_svg.jpg > Yes, please make a list of wrong commands. I guess it will be long :) Best regards, Michal From nma at 12000.org Thu Nov 1 01:43:33 2018 From: nma at 12000.org (Nasser M. Abbasi) Date: Wed, 31 Oct 2018 19:43:33 -0500 Subject: [tex4ht] big problem with table of content when section titles contain math using mathjax In-Reply-To: References: <9bd20b8f-8b36-9006-9488-0438cbb5e20c@12000.org> Message-ID: On 10/30/2018 8:09 AM, Michal Hoftich wrote: > > Yes, please make a list of wrong commands. I guess it will be long :) > > Best regards, > Michal > Hello Michal; There were lots of errors, but the good thing it seems they all are related to the latex math names not working in toc. So I edited your mathjax-latex-4ht.sty file on my PC and added these entries to what you allready have there: \fixmathjaxtoc\sin \fixmathjaxtoc\cos \fixmathjaxtoc\tan \fixmathjaxtoc\arcsin \fixmathjaxtoc\arccos \fixmathjaxtoc\arctan \fixmathjaxtoc\csc \fixmathjaxtoc\sec \fixmathjaxtoc\cot \fixmathjaxtoc\sinh \fixmathjaxtoc\cosh \fixmathjaxtoc\tanh \fixmathjaxtoc\coth \fixmathjaxtoc\log To the section where it says % fixes for tables of contents I've rebuild few files and I longer see the problems in the TOC. I still need to rebuild all the files and check each visually just in case I missed some other math name not listed above. This will take few more days since there are hundreds of files to build and check. If I found one I missed, will email you so you can add it to you master style file on git. Thank you --Nasser From michal.h21 at gmail.com Thu Nov 1 08:42:32 2018 From: michal.h21 at gmail.com (Michal Hoftich) Date: Thu, 1 Nov 2018 08:42:32 +0100 Subject: [tex4ht] big problem with table of content when section titles contain math using mathjax In-Reply-To: References: <9bd20b8f-8b36-9006-9488-0438cbb5e20c@12000.org> Message-ID: Hi Nasser, > If I found one I missed, will email you so you can add it to you > master style file on git. Thanks. I've added the missing commands to the master. Please keep me informed about anything you will find. Best, Michal From michal.h21 at gmail.com Thu Nov 1 12:14:43 2018 From: michal.h21 at gmail.com (Michal Hoftich) Date: Thu, 1 Nov 2018 12:14:43 +0100 Subject: [tex4ht] [bug #404] Using label/ref seems to be broken with opendocument export In-Reply-To: <20181027-232228.sv189.85490@puszcza.gnu.org.ua> References: <20181026-155517.sv5865.25492@puszcza.gnu.org.ua> <20181027-232228.sv189.85490@puszcza.gnu.org.ua> Message-ID: <20181101-131442.sv189.40178@puszcza.gnu.org.ua> Follow-up Comment #2, bug #404 (project tex4ht): I've added the hyperlink fixing filter to the make4ht ODT format. It is available on Github. It requires updated LuaXML library, where I fixed one critical issue. _______________________________________________________ Reply to this item at: _______________________________________________ Message sent via/by Puszcza http://puszcza.gnu.org.ua/ From michal.h21 at gmail.com Mon Nov 12 11:01:43 2018 From: michal.h21 at gmail.com (Michal Hoftich) Date: Mon, 12 Nov 2018 11:01:43 +0100 Subject: [tex4ht] Automatic HTF file generation Message-ID: Hi all, I've finally finished the Htfgen project [1]. It's objective is to automatize the creation of the HTF font mapping files. These files are used by tex4ht to map character codes in the DVI files to Unicode. There are two new scripts: scanfdfile and dvitohtf. The first one searches for declared fonts in the FD files, the other generates literate TeX file for HTF generation. Sample usage is as follows: cat /usr/local/texlive/2018/texmf-dist/tex/latex/ebgaramond/*.fd | scanfdfile | dvitohtf > ebgaramont-htf.tex tex ebgaramont-htf.tex This will create HTF files for all detected fonts defined in FD files for EB Garamond. dvitohtf can also generate HTF files for missing fonts in the DVI file. So if tex4ht reports missing HTF files, it can be used directly on the DVI file: dvitohtf sample.dvi > missing.tex tex missing.tex dvitohtf supports both virtual and tfm fonts. It looks for virtual fonts first, the tfm file is used only when no vf is found. It looks for all fonts referenced in the virtual font and tries to look for corresponding .enc files in pdftex.map. The .enc files contain glyph lists, which are then mapped to Unicode. It also parses the .pfb file for font family name and tries to detect style (italic, bold, small caps) from the font full name saved in the .pfb file. It computes hashes for the font tables, so duplicate font tables aren't written, the fonts with same characters just link to the first used font. If no .enc file is found, then the font cannot be supported. There can be also missing mappings between glyphs and Unicode. The missing mappings are reported in the TeX file. Htfgen contains large mapping files, but some fonts just use some custom glyphs which doesn't have Unicode equivalent. For example Q_u ligatures etc. In this case the mapping must be added by hand to glyphlists/glyphlist-fixes.txt. It works reasonably well for fonts generated by Fontinst, because they usually use standard glyph names, contains .enc files, etc. For complex virtual fonts, especially math, it fails. HTF files for such fonts still needs to be created by hand. What to do now? There are some wrong HTF files in tex4ht sources, for example Linux Libertine support is wrong for some ligatures. I am sure there will be more examples, especially fonts with large number of ligatures. Their support has been added few years ago, but only in T1 font encoding. We should remove HTF generation for these files from the huge literate sources for fonts and create smaller literate TeX file for each of these fonts. This should speed up the tex4ht build and it should be easier to manage. Any volunteers are welcomed. Best regards, Michal [1] https://github.com/michal-h21/htfgen From deimantas.galcius at gmail.com Thu Nov 15 06:45:05 2018 From: deimantas.galcius at gmail.com (Deimantas Galcius) Date: Thu, 15 Nov 2018 07:45:05 +0200 Subject: [tex4ht] Automatic HTF file generation In-Reply-To: References: Message-ID: Hi Michal, > I've finally finished the Htfgen project [1]. It's objective is to > automatize the creation of the HTF font mapping files. It's awesome. > If no .enc file is found, then the font cannot be supported. Encoding vector is always embedded in Type1 font. If encoding vector is not specified in map file, you can get it from pfb/pfa file. > We should remove HTF generation for these files from > the huge literate sources for fonts and create smaller literate TeX > file for each of these fonts. I'm not sure about this. Probably it is the way to go (if it makes maintenance easier). We are talking here about hundreds of smaller literate sources and thousands of htf files, right? IMHO literate sources are good for manual editing and documentation. Auto-generated literate sources would not be meant for manual editing, would it be? Did you consider generating htf files directly? How do you test these htf fonts? I'm sorry, I have too many lame questions... Best regards, -- deimi From michal.h21 at gmail.com Thu Nov 15 13:25:24 2018 From: michal.h21 at gmail.com (Michal Hoftich) Date: Thu, 15 Nov 2018 13:25:24 +0100 Subject: [tex4ht] Automatic HTF file generation In-Reply-To: References: Message-ID: Hi Deimi, > It's awesome. Thanks :) > Encoding vector is always embedded in Type1 font. If encoding vector is > not specified in map file, you can get it from pfb/pfa file. You are right, I did't know about that. It should fix most of the problems. It shouldn't be hard to write parser for the /Encoding array. > > I'm not sure about this. Probably it is the way to go (if it makes maintenance easier). > We are talking here about hundreds of smaller literate sources and thousands of htf files, right? > IMHO literate sources are good for manual editing and documentation. > Auto-generated literate sources would not be meant for manual editing, would it be? We can of course generate the htf fonts directly, the literate sources are just easier to maintain and to keep in SVN. They are not meant for editing, althouth some mechanism for hand crafted HTF should be invented. > Did you consider generating htf files directly? > How do you test these htf fonts? Just some test documents, we should create a proper testing framework for fonts (and other files of course too, but this is another question) > I'm sorry, I have too many lame questions... These were good questions :) Best regards, Michal From michal.h21 at gmail.com Thu Nov 15 23:19:44 2018 From: michal.h21 at gmail.com (Michal Hoftich) Date: Thu, 15 Nov 2018 23:19:44 +0100 Subject: [tex4ht] tex4ht talk in Brno Message-ID: Hi all, I will talk about tex4ht and make4ht development at CSTUG meeting on 15th December in Brno, Czech Republic. The talk will be in Czech, so I am not sure how many potential listeners I can find here. I think I should inform you anyway :) The invitation with an abstract is attached. Best regards, Michal -------------- next part -------------- A non-text attachment was scrubbed... Name: vh18info.pdf Type: application/pdf Size: 188841 bytes Desc: not available URL: From karl at freefriends.org Thu Nov 15 23:56:44 2018 From: karl at freefriends.org (Karl Berry) Date: Thu, 15 Nov 2018 22:56:44 GMT Subject: [tex4ht] Automatic HTF file generation In-Reply-To: Message-ID: <201811152256.wAFMuiV5001992@freefriends.org> > Encoding vector is always embedded in Type1 font. Usually the /Encoding vector in a given Type 1 is only a subset of the characters available in the font. The only way to know what is there is to parse the entire file. But there are lots of utilities in this area; I suspect something out there will dump a list of characters from a pfb. -k From michal.h21 at gmail.com Fri Nov 16 00:44:21 2018 From: michal.h21 at gmail.com (Michal Hoftich) Date: Fri, 16 Nov 2018 00:44:21 +0100 Subject: [tex4ht] Automatic HTF file generation In-Reply-To: <201811152256.wAFMuiV5001992@freefriends.org> References: <201811152256.wAFMuiV5001992@freefriends.org> Message-ID: > > Encoding vector is always embedded in Type1 font. > > Usually the /Encoding vector in a given Type 1 is only a subset of the > characters available in the font. The only way to know what is there is > to parse the entire file. But there are lots of utilities in this area; > I suspect something out there will dump a list of characters from a pfb. -k > I will parse the .pfb files only when no enc is available. We will see how it is useful. Worse thing is large number of non-standard glyph names used in TeX fonts. We need to map each glyph to Unicode, it is not always easy to find a correct mapping. Best, Michal From michal.h21 at gmail.com Sat Nov 17 11:32:39 2018 From: michal.h21 at gmail.com (Michal Hoftich) Date: Sat, 17 Nov 2018 11:32:39 +0100 Subject: [tex4ht] Automatic HTF file generation In-Reply-To: References: <201811152256.wAFMuiV5001992@freefriends.org> Message-ID: > I will parse the .pfb files only when no enc is available. We will see > how it is useful. Worse thing is large number of non-standard glyph > names used in TeX fonts. We need to map each glyph to Unicode, it is > not always easy to find a correct mapping. It turned quite well, it works even for complex math and symbol fonts. The only issue is that these fonts often use custom glyphs which I cannot find Unicode equivalent for. For example, it works for this old issue, which prompted me to create Htfgen in the first place: https://puszcza.gnu.org.ua/bugs/?236 The attached file contains literate source file for fonts required for the DVI file used by Nasser's sample. Note that it contains huge number of "Missing glyph" messages. These won't work until glyph to unicode mapping is added to Htfgen. Best regards, Michal -------------- next part -------------- A non-text attachment was scrubbed... Name: newtxt.tex Type: text/x-tex Size: 40345 bytes Desc: not available URL: From nma at 12000.org Sun Nov 18 20:27:02 2018 From: nma at 12000.org (Nasser M. Abbasi) Date: Sun, 18 Nov 2018 13:27:02 -0600 Subject: [tex4ht] problem using \sl and \sc in tex4ht when using matghjax mode Message-ID: <98de60b3-f7bc-1667-1e79-5824a85a342e@12000.org> There is problem translating Latex code to HTML when using mathjax mode when latex uses the old \sl and \sc commands. This is code generated by Maple Latex so it is not possible to change it and not practical to edit it by hand each time since this is autogenerated each time the files are compiled. Maplesoft seems to have abandoned working maintaining its Latex export for some other exotic math rendering software so no chance this will fixed by them. I do not know what I need to change in mathjax-latex-4ht.sty to fix this. Here is a MWE ---------------- \documentclass[11pt]{article} \usepackage{amsmath,mathtools,amssymb} \begin{document} \begin{align*} %code below is copied from part of Maple's Latex u &= s{{\sl I}_{0}} \\ &= s{{\sc I}_{0}} \\ &= s{{\rm I}_{0}} \end{align*} \end{document} ------------------------ When compiled using mathjax mode, it gives https://www.12000.org/tmp/11182018/screen_shot.jpg I also tried using this class istead \documentclass[11pt,enabledeprecatedfontcommands]{scrartcl}%this also fail I also tried adding \makeatletter \DeclareOldFontCommand{\sl}{\normalfont\slshape}{\@nomath\sl} \DeclareOldFontCommand{\sc}{\normalfont\scshape}{\@nomath\sc} \makeatother But had no effect on resulting HTML. This seems to affect only \sl and \sc commands, but there might be more. Is it possible to change mathjax-latex-4ht.sty to work around this? The command I used to compile is the same as before and described here =================== make4ht -ulm default -c ./nma_mathjax.cfg report.tex "htm,0,notoc*,p-width,charset=utf-8" " -cunihtf -utf8" Where nma_mathjax.cfg is ------------------------- \RequirePackage{mathjax-latex-4ht} \Preamble{xhtml} \begin{document} \EndPreamble ------------------- And mathjax-latex-4ht.sty is from https://github.com/michal-h21/helpers4ht/blob/master/mathjax-latex-4ht.sty ======================== This problem only shows with mathjax. No problem when using SVG. Thank you for any help. --Nasser From michal.h21 at gmail.com Sun Nov 18 21:34:15 2018 From: michal.h21 at gmail.com (Michal Hoftich) Date: Sun, 18 Nov 2018 21:34:15 +0100 Subject: [tex4ht] problem using \sl and \sc in tex4ht when using matghjax mode In-Reply-To: <98de60b3-f7bc-1667-1e79-5824a85a342e@12000.org> References: <98de60b3-f7bc-1667-1e79-5824a85a342e@12000.org> Message-ID: Hi Nasser, > Maplesoft seems to have abandoned working maintaining its > Latex export for some other exotic math rendering software > so no chance this will fixed by them. That's unfortunate! > > I also tried using this class istead > > \documentclass[11pt,enabledeprecatedfontcommands]{scrartcl}%this also fail > > I also tried adding > > \makeatletter > \DeclareOldFontCommand{\sl}{\normalfont\slshape}{\@nomath\sl} > \DeclareOldFontCommand{\sc}{\normalfont\scshape}{\@nomath\sc} > \makeatother > > But had no effect on resulting HTML. > This needs to be fixed in the MatJax configuration, the definitions on TeX side don't have any effect on MathJax. > This seems to affect only \sl and \sc commands, but there > might be more. > The configuration may look like this: ------------------------------ \RequirePackage{mathjax-latex-4ht} \Preamble{xhtml} \Configure{@HEAD}{\HCode{ }} \begin{document} \EndPreamble ------------------------- MathJax doesn't seem to support small caps, so we must fakt it a bit. You may need to add more command definitions to the macros section in the config file. Note that you can use only command supported by MathJax. I am not sure if it is a good idea to to add these definitions to mathjax-latex-4h. Best regards, Michal From nma at 12000.org Sun Nov 18 22:03:32 2018 From: nma at 12000.org (Nasser M. Abbasi) Date: Sun, 18 Nov 2018 15:03:32 -0600 Subject: [tex4ht] problem using \sl and \sc in tex4ht when using matghjax mode In-Reply-To: References: <98de60b3-f7bc-1667-1e79-5824a85a342e@12000.org> Message-ID: <43485c46-3c4f-f2a6-7ad8-cfca7c73877a@12000.org> On 11/18/2018 2:34 PM, Michal Hoftich wrote: > \Configure{@HEAD}{\HCode{ > > }} The above worked very well. I've added it to my .cfg file. Now I just have to remember there are 2 places with MathJax.Hub.Config setting. One in the personal .cfg and another place in the mathjax-latex-4h.sty file. Thank you for the help as always. --Nasser From nma at 12000.org Mon Nov 19 01:26:08 2018 From: nma at 12000.org (Nasser M. Abbasi) Date: Sun, 18 Nov 2018 18:26:08 -0600 Subject: [tex4ht] Problem rendering operator name in HTML when using mathjax mode. Message-ID: <9957dd1a-9716-bcfb-e7ef-2d850e54abb6@12000.org> I just found a new problem that I can't resolve. I had to use \newcommand{\LommelS}[1]{\operatorname{LommelS#1}} To correctly compile code in Latex generated by Maple. I could not use \DeclareMathOperator{\LommelS1}{LommelS1} since a number can't be at end of operator. I posted question about this here https://tex.stackexchange.com/questions/460667/declaremathoperator-not-working-on-some-math-names-with-a-number-at-the-end And the answer given is what I am using. So the following MWE works fine in lualatex and pdf ===================== \documentclass[11pt]{article} \usepackage{amsmath,mathtools,amssymb} \newcommand{\LommelS}[1]{\operatorname{LommelS#1}} \begin{document} \[ \LommelS1 x + \LommelS2 y \] \end{document} ========================= However, when compiled using make4ht with mathjax mode it does not work. It gives this https://www.12000.org/tmp/11182018/screen_shot_2.jpg I tried to do same Trick like Michal showed and changed my .cfg to use \Configure{@HEAD}{\HCode{ }} Tried few other things above, but nothing is working. I do not understand what mathjax wants me to type above. There is no issue when compiling with SVG. Is command such as \newcommand{\LommelS}[1]{\operatorname{LommelS#1}} not supported in the translation to HTML using mathjax? I used sthe ame command to compile this as I just showed in last email. But for completion, here they are make4ht -ulm default -c ./nma_mathjax.cfg report.tex "htm,0,notoc*,p-width,charset=utf-8" " -cunihtf -utf8" Where nma_mathjax.cfg is ------------------------- \RequirePackage{mathjax-latex-4ht} \Preamble{xhtml} \begin{document} \EndPreamble ------------------- Any workaround with this issue? Thank you --Nasser From michal.h21 at gmail.com Mon Nov 19 08:52:54 2018 From: michal.h21 at gmail.com (Michal Hoftich) Date: Mon, 19 Nov 2018 08:52:54 +0100 Subject: [tex4ht] Problem rendering operator name in HTML when using mathjax mode. In-Reply-To: <9957dd1a-9716-bcfb-e7ef-2d850e54abb6@12000.org> References: <9957dd1a-9716-bcfb-e7ef-2d850e54abb6@12000.org> Message-ID: Hi Nasser, > > I tried to do same Trick like Michal showed and changed my .cfg > to use > > \Configure{@HEAD}{\HCode{ > > }} > You must provide declaration for the \LommelS macro: \RequirePackage{mathjax-latex-4ht} \Preamble{xhtml} \Configure{@HEAD}{\HCode{ }} \begin{document} \EndPreamble You can use the same declaration as Egreg provided, it is just necessary to declare it to have a parameter. See the MathJax documentation for this: https://docs.mathjax.org/en/latest/tex.html#defining-tex-macros Best, Michal From nma at 12000.org Wed Nov 21 01:44:35 2018 From: nma at 12000.org (Nasser M. Abbasi) Date: Tue, 20 Nov 2018 18:44:35 -0600 Subject: [tex4ht] why \newcommand has no effect when compiling to HTML using mathjax mode, why? Message-ID: <234dfb14-3c27-2dee-e63c-20700d6fb7c5@12000.org> Maple generates wrong Latex code. It generates \tauL when it should be \tau L. As a workaround until Maplesoft fixes its latex code (which will never happen), I defined a command to change \tauL to \tau L and added it to the preample. This solution works OK in pdf and also when compiling to HTML in SVG. But when compiling using mathjax mode, the \newcommand is not having any effect, as the generated HTML still shows \tauL. Here is a MWE =================================== \documentclass[11pt]{article} \usepackage{amsmath,mathtools,amssymb} %\newcommand{\tauL}{\tau L} %Another option to use \usepackage{xspace} \newcommand{\tauL}{\ensuremath{\tau L}\xspace} \begin{document} \[ {\rm d}\tauL \sin(x) %bad code generated by Maple. \] \end{document} ==================================== Here is how the HTML looks in mathjax vs. svg https://www.12000.org/tmp/11202018/screen_shot.png As a workaround, I used the method given by Michal and add this configuration %thanks to Michal Hoftich. Added Nov 18, 2018 to handle Maple Latex export problem \Configure{@HEAD}{\HCode{ }} And now it works in mathjax. But my question is: Why \newcommand inside Latex had no effect when compiling to mathjax but it work in SVG? Thanks --Nasser From michal.h21 at gmail.com Wed Nov 21 09:27:27 2018 From: michal.h21 at gmail.com (Michal Hoftich) Date: Wed, 21 Nov 2018 09:27:27 +0100 Subject: [tex4ht] why \newcommand has no effect when compiling to HTML using mathjax mode, why? In-Reply-To: <234dfb14-3c27-2dee-e63c-20700d6fb7c5@12000.org> References: <234dfb14-3c27-2dee-e63c-20700d6fb7c5@12000.org> Message-ID: Hi Nasser, > But my question is: Why \newcommand inside Latex had no effect > when compiling to mathjax but it work in SVG? Because the \newcommand isn't included in HTML so MathJax cannot see it. Moreover, it is quite possible that you will need different command declarations for LaTeX and MathJax. In the SVG mode, part of rendered DVI file is converted to image, the DVI file contains result of full macro expansion, so it doesn't suffer from such issues. MathML output also contains all commands expanded. Best, Michal From michal.h21 at gmail.com Thu Nov 29 19:34:31 2018 From: michal.h21 at gmail.com (Michal Hoftich) Date: Thu, 29 Nov 2018 19:34:31 +0100 Subject: [tex4ht] New features Message-ID: Hi all, I've added some new features to tex4ht. They are available in the HTML output mode. The first feature is simpler way to include external CSS and JavaScript files. Two new configurations are available: AddJs and AddCss. They can be used as follows: \Configure{AddJs}{hello.js} \Configure{AddCss}{hello.css} These commands just insert the correct HTML tags to the document and register these files for post-processing, so they can be copied to a output directory or post-processed using filters. The second feature is webfonts support. Again, it just inserts some CSS instructions and registers the font files for a post-processing. I think the main use case for this feature is in ebooks, where fonts can be bundled. More information can be found here: https://github.com/michal-h21/tex4ht-doc/blob/master/sections/webfonts.tex Best regards, Michal From nma at 12000.org Tue Dec 4 03:30:02 2018 From: nma at 12000.org (Nasser M. Abbasi) Date: Tue, 4 Dec 2018 04:30:02 +0200 Subject: [tex4ht] [bug #405] Using adjustbox in tex4ht does not work. Is this known limitation? Message-ID: <20181204-042625.sv199.21165@puszcza.gnu.org.ua> URL: Summary: Using adjustbox in tex4ht does not work. Is this known limitation? Project: tex4ht Submitted by: nma123 Submitted on: Tue 04 Dec 2018 04:26:25 AM EET Category: None Priority: 5 - Normal Severity: 3 - Minor Status: None Privacy: Public Assigned to: None Originator Email: Open/Closed: Open Discussion Lock: Any _______________________________________________________ Details: From https://tex.stackexchange.com/questions/463080/using-adjustbox-in-tex4ht-does-not-work-is-this-known-limitation This MWE %----------------------------- \documentclass[12pt]{article} \usepackage{graphicx} \usepackage[export]{adjustbox} \begin{document} \begin{enumerate} \item A \item B \item C \includegraphics[width=2cm, valign= c]{example-image-a} \item D \item E \end{enumerate} \end{document} %----------------------------- Produces correct alignment in pdf, but not in HTML after doing make4ht foo.tex Screen shot of HTML and PDF side by side at above link. Is adjust box supposed to work with tex4ht? If not, is it possible to add support for it if that is not too hard? TL 2018 Thanks --Nasser _______________________________________________________ Reply to this item at: _______________________________________________ Message sent via/by Puszcza http://puszcza.gnu.org.ua/ From nma at 12000.org Tue Dec 4 08:45:13 2018 From: nma at 12000.org (Nasser M. Abbasi) Date: Tue, 4 Dec 2018 01:45:13 -0600 Subject: [tex4ht] multiline equation displays blank when compiling tex4ht using mathjax mode. Message-ID: This MWE (which from auto-generated by Scientific word when asking it to align one very wide equation on multiple lines, so I have no control on avoiding using multline since that is what SW choose to do it internally when it generates the Latex code. ------------------------------- \documentclass[12pt]{article} \usepackage{amsmath} \usepackage{graphicx} \begin{document} \begin{multline*}%just an example of long equation A+\\ B=0 \end{multline*} \end{document} ---------------------------- The above compiles OK in lualatex and in tex4ht using SVG for math, but in mathjax mode the HTML is empty: command used is make4ht -ulm default -c ./nma_mathjax.cfg foo.tex "htm,0,notoc*,p-width,charset=utf-8" " -cunihtf -utf8" and nma_mathjax.cfg is ------------------------ \RequirePackage{mathjax-latex-4ht} \Preamble{xhtml} \begin{document} \EndPreamble ------------------------ I googled multiline and mathjax and can't decided if it supports it or not so far. If mathjax does not support multiline environment, is there a way to configure this using mathjax-latex-4ht.sty somehow? any other suggestions what to do? TL 2018 Thanks --Nasser From michal.h21 at gmail.com Tue Dec 4 10:06:34 2018 From: michal.h21 at gmail.com (Michal Hoftich) Date: Tue, 4 Dec 2018 10:06:34 +0100 Subject: [tex4ht] multiline equation displays blank when compiling tex4ht using mathjax mode. In-Reply-To: References: Message-ID: Hi Nasser, > If mathjax does not support multiline environment, is there a way > to configure this using mathjax-latex-4ht.sty somehow? any other > suggestions what to do? It was a bug in mathjax-latex-4ht, I didn't know that images are requested for these environments, so the \VerbMath{multline*} wasn't enough. It should be fixed now. Best regards, Michal From michal.h21 at gmail.com Tue Dec 4 10:28:24 2018 From: michal.h21 at gmail.com (Michal Hoftich) Date: Tue, 4 Dec 2018 10:28:24 +0100 Subject: [tex4ht] [bug #405] Using adjustbox in tex4ht does not work. Is this known limitation? In-Reply-To: <20181204-042625.sv199.21165@puszcza.gnu.org.ua> References: <20181204-042625.sv199.21165@puszcza.gnu.org.ua> Message-ID: <20181204-112824.sv189.73892@puszcza.gnu.org.ua> Follow-up Comment #1, bug #405 (project tex4ht): I've posted an answer on TeX.sx. I will copy it here as well: You are right, small piece of CSS can fix that: \Preamble{xhtml} \Css{li img{vertical-align:middle;}} \begin{document} \EndPreamble tex4ht doesn't try to match visual appearance of the PDF version in HTML, so it is necessary to style it according to your needs sometimes. _______________________________________________________ Reply to this item at: _______________________________________________ Message sent via/by Puszcza http://puszcza.gnu.org.ua/ From michal.h21 at gmail.com Tue Dec 4 16:02:04 2018 From: michal.h21 at gmail.com (Michal Hoftich) Date: Tue, 4 Dec 2018 16:02:04 +0100 Subject: [tex4ht] MathJax support Message-ID: Hi all, I've just added new literate source to tex4ht, tex4ht-mathjax.tex. It is a modified version of mathjax-latex-4ht.sty from the Helpers4ht project [1]. I've also added the "mathjax" option to `html4-math.4ht`, so it should be possible to require the MathJax rendering of math using this option. I need to add this option also for the MathML output. Anyway, with this option it will be possible to use MathJax directly using make4ht filename.tex "mathjax" without need to use Helpers4ht and configuration files. Best regards, Michal [1] https://github.com/michal-h21/helpers4ht/blob/master/mathjax-latex-4ht.sty From nma at 12000.org Tue Dec 4 20:10:23 2018 From: nma at 12000.org (Nasser M. Abbasi) Date: Tue, 4 Dec 2018 13:10:23 -0600 Subject: [tex4ht] MathJax support In-Reply-To: References: Message-ID: On 12/4/2018 9:02 AM, Michal Hoftich wrote: > Hi all, > > I've just added new literate source to tex4ht, tex4ht-mathjax.tex. It > is a modified version of mathjax-latex-4ht.sty from the Helpers4ht > project [1]. I've also added the "mathjax" option to `html4-math.4ht`, > so it should be possible to require the MathJax rendering of math > using this option. I need to add this option also for the MathML > output. > > Anyway, with this option it will be possible to use MathJax directly using > > make4ht filename.tex "mathjax" > > without need to use Helpers4ht and configuration files. > > Best regards, > Michal > > > [1] https://github.com/michal-h21/helpers4ht/blob/master/mathjax-latex-4ht.sty > Thanks Michal. But I can't get it to work. Is this supposed to be in the source now? I just did now _full_ update for TL 2018. Two issues =========== 1) when I compile a file, it generates png images and do not do mathjax. 2) when I use my main .cfg, now I get error make4ht -ulm default -c ~/nma_mathjax.cfg foo.tex "htm,mathjax" ================================= (/usr/local/texlive/2018/texmf-dist/tex/generic/tex4ht/html4-math.4ht) (/usr/local/texlive/2018/texmf-dist/tex/generic/tex4ht/html5.4ht)) (./foo.aux) ! Undefined control sequence. l.184 \ExplSyntaxOn ? ====================================== Because in my main .cfg file, I am using \ExplSyntax on. But lets stay with the first issue for now. Using this MWE ================================== \documentclass[12pt]{article} \usepackage{amsmath} \usepackage{graphicx} \begin{document} \begin{multline*} A \sin x+\\ \cos x=0 \end{multline*} \end{document} ========================= Compiled using make4ht -ulm default -c ./nma_mathjax.cfg foo.tex "htm,mathjax" Where the local .cfg above is this: ========================= >cat nma_mathjax.cfg \Preamble{xhtml} \begin{document} \EndPreamble > ===================== So I removed the first line that was there which was \RequirePackage{mathjax-latex-4ht} Becuase you said it is no longer needed? But now it generaes png for images. Looking at the HTML, there is no mathjax configuration at all in it. Same thing if I use make4ht foo.tex "htm,mathjax" Am I doing something wrong? Or may be the updates are not there yet? Thanks --Nasser From michal.h21 at gmail.com Tue Dec 4 20:28:30 2018 From: michal.h21 at gmail.com (Michal Hoftich) Date: Tue, 4 Dec 2018 20:28:30 +0100 Subject: [tex4ht] MathJax support In-Reply-To: References: Message-ID: Hi Nasser,, > Am I doing something wrong? Or may be the updates are not > there yet? It is only in the source, I think Karl will say when it is available in TL. It may take few days. Best regards, Michal From karl at freefriends.org Thu Dec 6 03:13:55 2018 From: karl at freefriends.org (Karl Berry) Date: Wed, 5 Dec 2018 19:13:55 -0700 Subject: [tex4ht] MathJax support In-Reply-To: Message-ID: <201812060213.wB62DtDe028780@freefriends.org> It is only in the source, I think Karl will say when it is available in TL. It may take few days. I've (finally) updated TL, but I missed tonight's rebuild, so it'll be yet another day. Sorry for the delay. -k From michal.h21 at gmail.com Thu Dec 6 09:00:14 2018 From: michal.h21 at gmail.com (Michal Hoftich) Date: Thu, 6 Dec 2018 09:00:14 +0100 Subject: [tex4ht] MathJax support In-Reply-To: <201812060213.wB62DtDe028780@freefriends.org> References: <201812060213.wB62DtDe028780@freefriends.org> Message-ID: > I've (finally) updated TL, but I missed tonight's rebuild, so it'll be > yet another day. Sorry for the delay. -k Karl, thanks as always! There is no need to hurry. Best, Michal From nma at 12000.org Sun Dec 9 07:53:03 2018 From: nma at 12000.org (Nasser M. Abbasi) Date: Sun, 9 Dec 2018 00:53:03 -0600 Subject: [tex4ht] MathJax support In-Reply-To: References: Message-ID: <80f99e51-b4d5-3243-6d00-0c5b094240c9@12000.org> On 12/4/2018 1:28 PM, Michal Hoftich wrote: > Hi Nasser,, > >> Am I doing something wrong? Or may be the updates are not >> there yet? > > It is only in the source, I think Karl will say when it is available > in TL. It may take few days. > > Best regards, > Michal > Thank you again and to Karl also. I updated TL just now and it look like sources are in now. >make4ht --version make4ht version v0.2c On first test, I get many errors when I try the command make4ht foo1.tex "htm,mathjax" ---------------------------------- \documentclass[12pt]{article} \usepackage{graphicx} \usepackage{amsmath} \begin{document} $\sin x$ \end{document} --------------------- Gives ---------------------------- (/usr/local/texlive/2018/texmf-dist/tex/generic/tex4ht/mathjax-latex-4ht.4ht (/usr/local/texlive/2018/texmf-dist/tex/latex/etoolbox/etoolbox.sty Package etoolbox Warning: Patching '\begin' failed! (etoolbox) '\AtBeginEnvironment' will not work. Package etoolbox Warning: Patching '\end' failed! (etoolbox) '\AtEndEnvironment' will not work. Package etoolbox Warning: Patching '\begin' failed! (etoolbox) '\BeforeBeginEnvironment' will not work. Package etoolbox Warning: Patching '\end' failed! (etoolbox) '\AfterEndEnvironment' will not work. ) (/usr/local/texlive/2018/texmf-dist/tex/generic/tex4ht/usepackage.4ht) (/usr/local/texlive/2018/texmf-dist/tex/latex/l3kernel/expl3.sty (/usr/local/texlive/2018/texmf-dist/tex/latex/l3kernel/expl3-code.tex) (/usr/local/texlive/2018/texmf-dist/tex/latex/l3kernel/l3dvips.def)) (/usr/local/texlive/2018/texmf-dist/tex/latex/environ/environ.sty (/usr/local/texlive/2018/texmf-dist/tex/latex/trimspaces/trimspaces.sty))) l.338 --- TeX4ht warning --- \Configure{MathjaxSource}? --- ! LaTeX Error: Missing \begin{document} in `'. See the LaTeX manual or LaTeX Companion for explanation. Type H for immediate help. ... l.338 \Configure{MathjaxSource}{h ttps://cdnjs.cloudflare.com/ajax/libs/mathj... ? ! Missing $ inserted. $ l.338 ...thjax/2.7.5/latest.js?config=TeX-AMS-MML_ HTMLorMML} ? ! Extra }, or forgotten $. l.338 ...5/latest.js?config=TeX-AMS-MML_HTMLorMML} ---------------------------------- lualatex compiles the above with no error. Here is \listfiles -------------- *File List* article.cls 2014/09/29 v1.4h Standard LaTeX document class size12.clo 2014/09/29 v1.4h Standard LaTeX file (size option) graphicx.sty 2017/06/01 v1.1a Enhanced LaTeX Graphics (DPC,SPQR) keyval.sty 2014/10/28 v1.15 key=value parser (DPC) graphics.sty 2017/06/25 v1.2c Standard LaTeX Graphics (DPC,SPQR) trig.sty 2016/01/03 v1.10 sin cos tan (DPC) graphics.cfg 2016/06/04 v1.11 sample graphics configuration luatex.def 2018/01/08 v1.0l Graphics/color driver for luatex amsmath.sty 2017/09/02 v2.17a AMS math features amstext.sty 2000/06/29 v2.01 AMS text amsgen.sty 1999/11/30 v2.0 generic functions amsbsy.sty 1999/11/29 v1.2d Bold Symbols amsopn.sty 2016/03/08 v2.02 operator names supp-pdf.mkii epstopdf-base.sty 2016/05/15 v2.6 Base part for package epstopdf infwarerr.sty 2016/05/16 v1.4 Providing info/warning/error messages (HO) grfext.sty 2016/05/16 v1.2 Manage graphics extensions (HO) kvdefinekeys.sty 2016/05/16 v1.4 Define keys (HO) ltxcmds.sty 2016/05/16 v1.23 LaTeX kernel commands for general use (HO) kvoptions.sty 2016/05/16 v3.12 Key value format for package options (HO) kvsetkeys.sty 2016/05/16 v1.17 Key value parser (HO) etexcmds.sty 2016/05/16 v1.6 Avoid name clashes with e-TeX commands (HO) ifluatex.sty 2016/05/16 v1.4 Provides the ifluatex switch (HO) pdftexcmds.sty 2018/09/10 v0.29 Utility functions of pdfTeX for LuaTeX (HO) ifpdf.sty 2018/09/07 v3.3 Provides the ifpdf switch epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Live ------------------------ Am I doing something wrong? I have no changed anything on my end, just did sudo /usr/local/texlive/2018/bin/x86_64-linux/tlmgr update --all Then tried make4ht. This is on Linux ubuntu Thanks --Nasser From nma at 12000.org Sun Dec 9 07:58:35 2018 From: nma at 12000.org (Nasser M. Abbasi) Date: Sun, 9 Dec 2018 00:58:35 -0600 Subject: [tex4ht] MathJax support In-Reply-To: <80f99e51-b4d5-3243-6d00-0c5b094240c9@12000.org> References: <80f99e51-b4d5-3243-6d00-0c5b094240c9@12000.org> Message-ID: <5ccef8b7-b2d9-6496-c95c-605aa2a6ef35@12000.org> In addition, now when I run my standard makefile, tex4ht is broken :( so I can't build any more make4ht -ulm default -e ~/new.mk4 -c ~/nma_mathjax.cfg foo1.tex "htm,0,notoc*,p-width,charset=utf-8" " -cunihtf -utf8" >make4ht -ulm default -e ~/new.mk4 -c ~/nma_mathjax.cfg foo1.tex "htm,0,notoc*,p-width,charset=utf-8" " -cunihtf -utf8" Output dir: Compiler: dvilualatex Latex options: -jobname=foo1 tex4ht.sty : /home/me/nma_mathjax.cfg,htm,0,notoc*,p-width,charset=utf-8,charset=utf-8 tex4ht -cunihtf -utf8 build_file /home/me/new.mk4 ... (/usr/local/texlive/2018/texmf-dist/tex/generic/tex4ht/mathjax-latex-4ht.4ht (/usr/local/texlive/2018/texmf-dist/tex/generic/tex4ht/usepackage.4ht) ! LaTeX3 Error: Control sequence \alteqtoks already defined. For immediate help type H . ... l.24 \cs_new_protected:Npn \alteqtoks #1 ? ------------------------------------------------- It looks new updated broke something in tex4ht as I am using same command as before the updates which always worked. Thanks --Nasser On 12/9/2018 12:53 AM, Nasser M. Abbasi wrote: > On 12/4/2018 1:28 PM, Michal Hoftich wrote: >> Hi Nasser,, >> >>> Am I doing something wrong? Or may be the updates are not >>> there yet? >> >> It is only in the source, I think Karl will say when it is available >> in TL. It may take few days. >> >> Best regards, >> Michal >> > > Thank you again and to Karl also. > > I updated TL just now and it look like sources are in now. > >> make4ht --version > make4ht version v0.2c > > On first test, I get many errors when I try the command > > make4ht foo1.tex "htm,mathjax" > > ---------------------------------- > \documentclass[12pt]{article} > \usepackage{graphicx} > \usepackage{amsmath} > > \begin{document} > > $\sin x$ > > \end{document} > --------------------- > > Gives > > ---------------------------- > (/usr/local/texlive/2018/texmf-dist/tex/generic/tex4ht/mathjax-latex-4ht.4ht > (/usr/local/texlive/2018/texmf-dist/tex/latex/etoolbox/etoolbox.sty > > Package etoolbox Warning: Patching '\begin' failed! > (etoolbox) '\AtBeginEnvironment' will not work. > > > Package etoolbox Warning: Patching '\end' failed! > (etoolbox) '\AtEndEnvironment' will not work. > > > Package etoolbox Warning: Patching '\begin' failed! > (etoolbox) '\BeforeBeginEnvironment' will not work. > > > Package etoolbox Warning: Patching '\end' failed! > (etoolbox) '\AfterEndEnvironment' will not work. > > ) (/usr/local/texlive/2018/texmf-dist/tex/generic/tex4ht/usepackage.4ht) > (/usr/local/texlive/2018/texmf-dist/tex/latex/l3kernel/expl3.sty > (/usr/local/texlive/2018/texmf-dist/tex/latex/l3kernel/expl3-code.tex) > (/usr/local/texlive/2018/texmf-dist/tex/latex/l3kernel/l3dvips.def)) > (/usr/local/texlive/2018/texmf-dist/tex/latex/environ/environ.sty > (/usr/local/texlive/2018/texmf-dist/tex/latex/trimspaces/trimspaces.sty))) > l.338 --- TeX4ht warning --- \Configure{MathjaxSource}? --- > > ! LaTeX Error: Missing \begin{document} in `'. > > See the LaTeX manual or LaTeX Companion for explanation. > Type H for immediate help. > ... > > l.338 \Configure{MathjaxSource}{h > ttps://cdnjs.cloudflare.com/ajax/libs/mathj... > > ? > ! Missing $ inserted. > > $ > l.338 ...thjax/2.7.5/latest.js?config=TeX-AMS-MML_ > HTMLorMML} > ? > ! Extra }, or forgotten $. > l.338 ...5/latest.js?config=TeX-AMS-MML_HTMLorMML} > ---------------------------------- > > lualatex compiles the above with no error. > Here is \listfiles > > -------------- > *File List* > article.cls 2014/09/29 v1.4h Standard LaTeX document class > size12.clo 2014/09/29 v1.4h Standard LaTeX file (size option) > graphicx.sty 2017/06/01 v1.1a Enhanced LaTeX Graphics (DPC,SPQR) > keyval.sty 2014/10/28 v1.15 key=value parser (DPC) > graphics.sty 2017/06/25 v1.2c Standard LaTeX Graphics (DPC,SPQR) > trig.sty 2016/01/03 v1.10 sin cos tan (DPC) > graphics.cfg 2016/06/04 v1.11 sample graphics configuration > luatex.def 2018/01/08 v1.0l Graphics/color driver for luatex > amsmath.sty 2017/09/02 v2.17a AMS math features > amstext.sty 2000/06/29 v2.01 AMS text > amsgen.sty 1999/11/30 v2.0 generic functions > amsbsy.sty 1999/11/29 v1.2d Bold Symbols > amsopn.sty 2016/03/08 v2.02 operator names > supp-pdf.mkii > epstopdf-base.sty 2016/05/15 v2.6 Base part for package epstopdf > infwarerr.sty 2016/05/16 v1.4 Providing info/warning/error messages (HO) > grfext.sty 2016/05/16 v1.2 Manage graphics extensions (HO) > kvdefinekeys.sty 2016/05/16 v1.4 Define keys (HO) > ltxcmds.sty 2016/05/16 v1.23 LaTeX kernel commands for general use (HO) > kvoptions.sty 2016/05/16 v3.12 Key value format for package options (HO) > kvsetkeys.sty 2016/05/16 v1.17 Key value parser (HO) > etexcmds.sty 2016/05/16 v1.6 Avoid name clashes with e-TeX commands (HO) > ifluatex.sty 2016/05/16 v1.4 Provides the ifluatex switch (HO) > pdftexcmds.sty 2018/09/10 v0.29 Utility functions of pdfTeX for LuaTeX (HO) > ifpdf.sty 2018/09/07 v3.3 Provides the ifpdf switch > epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Live > ------------------------ > > Am I doing something wrong? I have no changed anything on my end, > just did > > sudo /usr/local/texlive/2018/bin/x86_64-linux/tlmgr update --all > > Then tried make4ht. > > This is on Linux ubuntu > > Thanks > --Nasser > From michal.h21 at gmail.com Sun Dec 9 09:36:31 2018 From: michal.h21 at gmail.com (Michal Hoftich) Date: Sun, 9 Dec 2018 09:36:31 +0100 Subject: [tex4ht] MathJax support In-Reply-To: <5ccef8b7-b2d9-6496-c95c-605aa2a6ef35@12000.org> References: <80f99e51-b4d5-3243-6d00-0c5b094240c9@12000.org> <5ccef8b7-b2d9-6496-c95c-605aa2a6ef35@12000.org> Message-ID: Hi Nasser, > It looks new updated broke something in tex4ht as I am using same > command as before the updates which always worked. I've forgot to anounce that I updated also latex.4ht, which contains \NewConfigure{MathjaxSource}. It cannot work without this definition. The correct version of latex.4ht is attached to this email. Another issue is that you probably require mathjax-latex-4ht.sty in your .cfg file. You need to remove it, because it clashes with the code defined in tex4ht now. Best regards, Michal -------------- next part -------------- A non-text attachment was scrubbed... Name: latex.4ht Type: application/octet-stream Size: 72997 bytes Desc: not available URL: From nma at 12000.org Sun Dec 9 11:23:03 2018 From: nma at 12000.org (Nasser M. Abbasi) Date: Sun, 9 Dec 2018 04:23:03 -0600 Subject: [tex4ht] MathJax support In-Reply-To: References: <80f99e51-b4d5-3243-6d00-0c5b094240c9@12000.org> <5ccef8b7-b2d9-6496-c95c-605aa2a6ef35@12000.org> Message-ID: <876216f3-ec23-483b-dd67-167b4dee3626@12000.org> On 12/9/2018 2:36 AM, Michal Hoftich wrote: > Hi Nasser, > >> It looks new updated broke something in tex4ht as I am using same >> command as before the updates which always worked. > > I've forgot to anounce that I updated also latex.4ht, which contains > \NewConfigure{MathjaxSource}. It cannot work without this definition. > The correct version of latex.4ht is attached to this email. > > Another issue is that you probably require mathjax-latex-4ht.sty in > your .cfg file. You need to remove it, because it clashes with the > code defined in tex4ht now. > > Best regards, > Michal > Thanks Michal. I overwrote /usr/local/texlive/2018/texmf-dist/tex/generic/tex4ht/latex.4ht with the file you attached and now make4ht foo1.tex "htm,mathjax" using the example latex I posted in my last email does _not_ give an error any more. But I found another syntax error testing it more. This MWE ===================================== \documentclass[12pt]{article} \usepackage{graphicx} \usepackage{amsmath} \begin{document} \begin{align*} \overrightarrow{\sum}F_x &= Mx'' \\ F(t) -kx -H &= Mx'' \tag{1}% \end{align*} \end{document} ========================================= Gives an error compiling using make4ht foo1.tex "htm,mathjax" ===================== (/usr/local/texlive/2018/texmf-dist/tex/generic/tex4ht/html4-math.4ht) (/usr/local/texlive/2018/texmf-dist/tex/generic/tex4ht/html5.4ht)) (./foo1.aux) ! Misplaced \cr. \math at cr@@@ ->\cr l.11 \end{align*} ? x ================== It compiles OK using make4ht foo1.tex "htm" and compiles OK with lualatex and compiles OK with SVG for math. Only in mathjax mode it gives error. Any idea why this now fails in mathjax mode? I am sure this compiled OK in mathjax before the latest updates. Thank you for your help. --Nasser From michal.h21 at gmail.com Sun Dec 9 11:44:58 2018 From: michal.h21 at gmail.com (Michal Hoftich) Date: Sun, 9 Dec 2018 11:44:58 +0100 Subject: [tex4ht] MathJax support In-Reply-To: <876216f3-ec23-483b-dd67-167b4dee3626@12000.org> References: <80f99e51-b4d5-3243-6d00-0c5b094240c9@12000.org> <5ccef8b7-b2d9-6496-c95c-605aa2a6ef35@12000.org> <876216f3-ec23-483b-dd67-167b4dee3626@12000.org> Message-ID: > ===================== > (/usr/local/texlive/2018/texmf-dist/tex/generic/tex4ht/html4-math.4ht) > (/usr/local/texlive/2018/texmf-dist/tex/generic/tex4ht/html5.4ht)) (./foo1.aux) > ! Misplaced \cr. > \math at cr@@@ ->\cr > > l.11 \end{align*} > > ? x > ================== > > It compiles OK using make4ht foo1.tex "htm" and compiles OK > with lualatex and compiles OK with SVG for math. Only in mathjax > mode it gives error. > > Any idea why this now fails in mathjax mode? I am sure this > compiled OK in mathjax before the latest updates. Yes, it seems that configurations for math environments didn't take a place. Try the attached fixed version of mathjax-latex-4ht.4ht. Best, Michal -------------- next part -------------- A non-text attachment was scrubbed... Name: mathjax-latex-4ht.4ht Type: application/octet-stream Size: 3204 bytes Desc: not available URL: From nma at 12000.org Sun Dec 9 12:07:10 2018 From: nma at 12000.org (Nasser M. Abbasi) Date: Sun, 9 Dec 2018 05:07:10 -0600 Subject: [tex4ht] MathJax support In-Reply-To: References: <80f99e51-b4d5-3243-6d00-0c5b094240c9@12000.org> <5ccef8b7-b2d9-6496-c95c-605aa2a6ef35@12000.org> <876216f3-ec23-483b-dd67-167b4dee3626@12000.org> Message-ID: <401ab4ff-f4a1-e6dc-1c82-04650179c292@12000.org> On 12/9/2018 4:44 AM, Michal Hoftich wrote: >> It compiles OK using make4ht foo1.tex "htm" and compiles OK >> with lualatex and compiles OK with SVG for math. Only in mathjax >> mode it gives error. >> >> Any idea why this now fails in mathjax mode? I am sure this >> compiled OK in mathjax before the latest updates. > > > Yes, it seems that configurations for math environments didn't take a > place. Try the attached fixed version of mathjax-latex-4ht.4ht. > > Best, > Michal > Thanks Michal. I replaced /usr/local/texlive/2018/texmf-dist/tex/generic/tex4ht/mathjax-latex-4ht.4ht with the file you attached and now the error went away. But I am little confused. Even though the file compiles ok now using make4ht foo.tex "htm,mathjax" the math does not display at all. I looked at the HTML generated and see no place where it loads mathjax. ie. I see no \Configure{@HEAD}{\HCode{ \Hnewline}} like you had in the old mathjax-latex-4ht.sty file (which I no longer use). Is a user now supposed to add the above line to their .cfg manually? If so, no problem, I can do this but it was not clear. thanks --Nasser From michal.h21 at gmail.com Sun Dec 9 12:25:21 2018 From: michal.h21 at gmail.com (Michal Hoftich) Date: Sun, 9 Dec 2018 12:25:21 +0100 Subject: [tex4ht] MathJax support In-Reply-To: <401ab4ff-f4a1-e6dc-1c82-04650179c292@12000.org> References: <80f99e51-b4d5-3243-6d00-0c5b094240c9@12000.org> <5ccef8b7-b2d9-6496-c95c-605aa2a6ef35@12000.org> <876216f3-ec23-483b-dd67-167b4dee3626@12000.org> <401ab4ff-f4a1-e6dc-1c82-04650179c292@12000.org> Message-ID: > I looked at the HTML generated and see no place where it loads mathjax. > > ie. I see no > > \Configure{@HEAD}{\HCode{ \Hnewline}} > It should be included in html4-math.4ht, in the configuration for MathjaxSource. Does the attached version work? M. -------------- next part -------------- A non-text attachment was scrubbed... Name: html4-math.4ht Type: application/octet-stream Size: 39373 bytes Desc: not available URL: From nma at 12000.org Sun Dec 9 12:54:00 2018 From: nma at 12000.org (Nasser M. Abbasi) Date: Sun, 9 Dec 2018 05:54:00 -0600 Subject: [tex4ht] MathJax support In-Reply-To: References: <80f99e51-b4d5-3243-6d00-0c5b094240c9@12000.org> <5ccef8b7-b2d9-6496-c95c-605aa2a6ef35@12000.org> <876216f3-ec23-483b-dd67-167b4dee3626@12000.org> <401ab4ff-f4a1-e6dc-1c82-04650179c292@12000.org> Message-ID: <84fb9ccd-83fb-800e-5bc0-185a4b8d11c6@12000.org> On 12/9/2018 5:25 AM, Michal Hoftich wrote: >> I looked at the HTML generated and see no place where it loads mathjax. >> >> ie. I see no >> >> \Configure{@HEAD}{\HCode{ \Hnewline}} >> > > It should be included in html4-math.4ht, in the configuration for > MathjaxSource. Does the attached version work? > > M. > hi Michal, It is allready in html4-math.4ht >grep -i cdnjs /usr/local/texlive/2018/texmf-dist/tex/generic/tex4ht/html4-math.4ht \Configure{MathjaxSource}{https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML} I found why it does it now work on my end. When I use my .cfg, the above line does not show in the HTML. I did remove the old require mathjax-latex-4ht.sty from my .cfg. But I think the reason is that my .cfg has additional mathjax configurations I needed which you said to add it to .cfg before, since I could not add it to mathjax-latex-4ht.sty. It uses your \ExplSyntaxOn \regex_replace_all:nnN{ \x{23}\x{23}}{\x{23}}{\mymathjaxconf} \ExplSyntaxOff trick. May be the order is now messed up from before when it worked? Because I am doing additional MathJax.Hub.Config({ in my .cfg, which does show in HTML, something now went wrong? This all worked before. I need these additional fixes in my .cfg. I am attaching my .cfg file. Can you please try on your end? THis is how I called it make4ht -c ./nma_mathjax.cfg foo1.tex "htm,mathjax" Now mathjax do _not_ load in HTML, but when I do make4ht foo1.tex "htm,mathjax" Then it loads. Any work arounds? Getting Mathjax to work is hard! Thank you, --Nasser -------------- next part -------------- \Preamble{xhtml} \Configure{VERSION}{} \Configure{DOCTYPE}{\HCode{\Hnewline}} \Configure{HTML}{\HCode{\Hnewline}}{\HCode{\Hnewline}} \Configure{@HEAD}{} \Configure{@HEAD}{\HCode{\Hnewline}} \Configure{@HEAD}{\HCode{\Hnewline}} \Configure{@HEAD}{\HCode{\Hnewline}} %thanks to Michal Hoftich. Added Nov 18, 2018 to handle Maple Latex export problem \Configure{@HEAD}{\HCode{ }} \begin{document} %---------------------------------- %support for \relax and \setlength by Michal \edef\mymathjaxconf{\detokenize{MathJax.Hub.Config({ TeX: { MAXBUFFER: 40*1024, Macros : { relax: "{}", setlength: ["{}", 2], allowbreak: "{}", sech: ["\\operatorname{sech}"], csch: ["\\operatorname{csch}"], arcsec: ["\\operatorname{arcsec}"], arccot: ["\\operatorname{arccot}"], arccsc: ["\\operatorname{arccsc}"], arccosh: ["\\operatorname{arccosh}"], arcsinh: ["\\operatorname{arcsinh}"], arctanh: ["\\operatorname{arctanh}"], arcsech: ["\\operatorname{arcsech}"], arccsch: ["\\operatorname{arccsch}"], arccoth: ["\\operatorname{arccoth}"], erf: ["\\operatorname{erf}"], AiryAi: ["\\operatorname{AiryAi}"], AiryBi: ["\\operatorname{AiryBi}"], BesselJ: ["\\operatorname{BesselJ}"], BesselY: ["\\operatorname{BesselY}"], BesselK: ["\\operatorname{BesselK}"], BesselI: ["\\operatorname{BesselI}"], WhittakerM: ["\\operatorname{WhittakerM}"], WhittakerW: ["\\operatorname{WhittakerW}"], LambertW: ["\\operatorname{LambertW}"], RootOf: ["\\operatorname{RootOf}"], erfi: ["\\operatorname{erfi}"], Ei: ["\\operatorname{Ei}"], Si: ["\\operatorname{Si}"], Ci: ["\\operatorname{Ci}"], Ssi: ["\\operatorname{Ssi}"], Shi: ["\\operatorname{Shi}"], Chi: ["\\operatorname{Chi}"], Li: ["\\operatorname{Li}"], HeunC: ["\\operatorname{HeunC}"], HeunCPrime: ["\\operatorname{HeunCPrime}"], FresnelC: ["\\operatorname{FresnelC}"], EllipticE: ["\\operatorname{EllipticE}"], EllipticCE: ["\\operatorname{EllipticCE}"], EllipticF: ["\\operatorname{EllipticF}"], EllipticK: ["\\operatorname{EllipticK}"], EllipticCK: ["\\operatorname{EllipticCK}"], EllipticPi: ["\\operatorname{EllipticPi}"], EllipticCPi: ["\\operatorname{EllipticCPi}"], LegendreP: ["\\operatorname{LegendreP}"], LegendreQ: ["\\operatorname{LegendreQ}"], dilog: ["\\operatorname{dilog}"], polylog: ["\\operatorname{polylog}"], StruveH: ["\\operatorname{StruveH}"], StruveL: ["\\operatorname{StruveL}"] }}, });}} \ExplSyntaxOn \regex_replace_all:nnN{ \x{23}\x{23}}{\x{23}}{\mymathjaxconf} \ExplSyntaxOff \Configure{@HEAD}{\HCode{}} \EndPreamble From michal.h21 at gmail.com Sun Dec 9 21:20:06 2018 From: michal.h21 at gmail.com (Michal Hoftich) Date: Sun, 9 Dec 2018 21:20:06 +0100 Subject: [tex4ht] MathJax support In-Reply-To: <84fb9ccd-83fb-800e-5bc0-185a4b8d11c6@12000.org> References: <80f99e51-b4d5-3243-6d00-0c5b094240c9@12000.org> <5ccef8b7-b2d9-6496-c95c-605aa2a6ef35@12000.org> <876216f3-ec23-483b-dd67-167b4dee3626@12000.org> <401ab4ff-f4a1-e6dc-1c82-04650179c292@12000.org> <84fb9ccd-83fb-800e-5bc0-185a4b8d11c6@12000.org> Message-ID: > May be the order is now messed up from before when it worked? > > Because I am doing additional MathJax.Hub.Config({ in my .cfg, > which does show in HTML, something now went wrong? This all worked > before. I need these additional fixes in my .cfg. > > I am attaching my .cfg file. Can you please try on your end? The issue is that you use \Configure{@HEAD}{} in your configuration file. It removes all configurations that goes to the HTML header, including MathJax loading. In fact, I don't think you need to configure VERSION, DOCTYPE, HTML and first three @HEAD (for charset, generator and css file). You should just remove it, make4ht already produces HTML 5 file. Best regards, Michal From nma at 12000.org Sun Dec 9 23:39:35 2018 From: nma at 12000.org (Nasser M. Abbasi) Date: Sun, 9 Dec 2018 16:39:35 -0600 Subject: [tex4ht] MathJax support In-Reply-To: References: <80f99e51-b4d5-3243-6d00-0c5b094240c9@12000.org> <5ccef8b7-b2d9-6496-c95c-605aa2a6ef35@12000.org> <876216f3-ec23-483b-dd67-167b4dee3626@12000.org> <401ab4ff-f4a1-e6dc-1c82-04650179c292@12000.org> <84fb9ccd-83fb-800e-5bc0-185a4b8d11c6@12000.org> Message-ID: <03f1f383-e9ef-a6bd-a7ae-ae1183ca570a@12000.org> On 12/9/2018 2:20 PM, Michal Hoftich wrote: >> May be the order is now messed up from before when it worked? >> >> Because I am doing additional MathJax.Hub.Config({ in my .cfg, >> which does show in HTML, something now went wrong? This all worked >> before. I need these additional fixes in my .cfg. >> >> I am attaching my .cfg file. Can you please try on your end? > > > The issue is that you use \Configure{@HEAD}{} in your configuration > file. It removes all configurations that goes to the HTML header, > including MathJax loading. In fact, I don't think you need to > configure VERSION, DOCTYPE, HTML and first three @HEAD (for charset, > generator and css file). You should just remove it, make4ht already > produces HTML 5 file. > > Best regards, > Michal > hi Micahl; But this is severe restriction now that users can no longer use \Configure{@HEAD} in their .cfg files? I need to use \Configure{@HEAD} to add javascript code \Configure{@HEAD}{\HCode{\Hnewline \Hnewline }} and others like it. How else would one do these things if one can't do them using HEAD in my common site .cfg file? Is it posssible to design your mathjax configuration without this restriction on users .cfg not being able to use \Configure{@HEAD} by any chance? In the way you had it before, this was not an issue and it worked well. Thank you, --Nasser From michal.h21 at gmail.com Mon Dec 10 00:16:45 2018 From: michal.h21 at gmail.com (Michal Hoftich) Date: Mon, 10 Dec 2018 00:16:45 +0100 Subject: [tex4ht] MathJax support In-Reply-To: <03f1f383-e9ef-a6bd-a7ae-ae1183ca570a@12000.org> References: <80f99e51-b4d5-3243-6d00-0c5b094240c9@12000.org> <5ccef8b7-b2d9-6496-c95c-605aa2a6ef35@12000.org> <876216f3-ec23-483b-dd67-167b4dee3626@12000.org> <401ab4ff-f4a1-e6dc-1c82-04650179c292@12000.org> <84fb9ccd-83fb-800e-5bc0-185a4b8d11c6@12000.org> <03f1f383-e9ef-a6bd-a7ae-ae1183ca570a@12000.org> Message-ID: > > But this is severe restriction now that users can no longer > use \Configure{@HEAD} in their .cfg files? > You can use \Configure{@HEAD}{some code}, just not \Configure{@HEAD}{}, because it removes all additions to @HEAD before that point. This is also why you use all those \Configure{@HEAD}{\HCode{\Hnewline}}. It is not necessary anymore. I think this comes from a old configuration file for MathJax which predates the HTML5 support in tex4ht. Best, Michal From nma at 12000.org Mon Dec 10 00:42:22 2018 From: nma at 12000.org (Nasser M. Abbasi) Date: Sun, 9 Dec 2018 17:42:22 -0600 Subject: [tex4ht] MathJax support In-Reply-To: References: <80f99e51-b4d5-3243-6d00-0c5b094240c9@12000.org> <5ccef8b7-b2d9-6496-c95c-605aa2a6ef35@12000.org> <876216f3-ec23-483b-dd67-167b4dee3626@12000.org> <401ab4ff-f4a1-e6dc-1c82-04650179c292@12000.org> <84fb9ccd-83fb-800e-5bc0-185a4b8d11c6@12000.org> <03f1f383-e9ef-a6bd-a7ae-ae1183ca570a@12000.org> Message-ID: On 12/9/2018 5:16 PM, Michal Hoftich wrote: >> >> But this is severe restriction now that users can no longer >> use \Configure{@HEAD} in their .cfg files? >> > > You can use \Configure{@HEAD}{some code}, just not > \Configure{@HEAD}{}, because it removes all additions to @HEAD before > that point. This is also why you use all those > \Configure{@HEAD}{\HCode{\Hnewline}}. It is > not necessary anymore. I think this comes from a old configuration > file for MathJax which predates the HTML5 support in tex4ht. > > Best, > Michal > Thanks Michal; Sorry I miss-understood you. I removed \Configure{@HEAD}{} and now it works, but kept the other ones. All this initial \Configure{@HEAD}{} code I had there for ever, for many years now. But I removed it now for mathjax to work. Will now test your new set up more in my main build and will report any problems I find since things seems to have settled OK now to use it. --Nasser From nma at 12000.org Mon Dec 10 01:14:49 2018 From: nma at 12000.org (Nasser M. Abbasi) Date: Sun, 9 Dec 2018 18:14:49 -0600 Subject: [tex4ht] on eqnarray in mathjax mode Message-ID: Hello; eqnarray does not work in mathjax mode. I do not use eqnarray myself explicitly any more, but this is from old latex files and noticed it does not work in mathjax: ======================================= \documentclass[12pt]{article} %test for eqnarray in mathjax %\usepackage{amsmath}%not needed for eqnarray \begin{document} \begin{eqnarray*} \rightarrow\sum F&=& M x'' \\ F \left( t \right) + k R \theta + b R \theta' + H &=& M x'' \end{eqnarray*} \end{document} ======================================== Compiled with make4ht foo.tex "htm,mathjax" The generated image in png for some reason, and not mathjax rendered. =============================
  ∑             ′′
        →     F   =   M x
F \lef t(t\right) + kR θ + bR θ′ + H  =   M x′′
========================= It looks like this https://www.12000.org/tmp/1292018/screen_shot.png The question is, is eqnarray supposed to work in mathjax? googling around I see examples where it works in mathjax on the net. Thank you, --Nasser From nma at 12000.org Mon Dec 10 01:28:40 2018 From: nma at 12000.org (Nasser M. Abbasi) Date: Sun, 9 Dec 2018 18:28:40 -0600 Subject: [tex4ht] \def does not seem to work in mathjax mode. Message-ID: <1e3aad55-0637-bd98-5b33-0e0e37b1f782@12000.org> The following MWE does not compile OK in mathjax mode. It works in lualatex and in default mode and in SVG mode. ============================= \documentclass[12pt]{article} \usepackage{amsmath} \begin{document} \def\st{\sin\theta(t)} \begin{align*} \dot{\theta}(t) & = \st \end{align*} \end{document} ================================ Compiled using make4ht foo.tex "htm,mathjax" It gives https://www.12000.org/tmp/1292018/screen_shot_2.png The problem is in the use of \def\st{\sin\theta(t)} The latex code might not be the best, but it works in the other systems. Workaround for mathjax is easy, change it to ======================== \begin{document} \begin{align*} \dot{\theta}(t) & = \sin\theta(t) \end{align*} \end{document} ======================= is \def not supposed to work in mathjax mode? Thanks --Nasser From michal.h21 at gmail.com Mon Dec 10 18:02:33 2018 From: michal.h21 at gmail.com (Michal Hoftich) Date: Mon, 10 Dec 2018 18:02:33 +0100 Subject: [tex4ht] on eqnarray in mathjax mode In-Reply-To: References: Message-ID: Hi Nasser, > > The question is, is eqnarray supposed to work in mathjax? > googling around I see examples where it works in mathjax on > the net. I've added configurations for eqnarray to MathJax config, thanks for the report. Best, Michal From michal.h21 at gmail.com Mon Dec 10 18:45:46 2018 From: michal.h21 at gmail.com (Michal Hoftich) Date: Mon, 10 Dec 2018 18:45:46 +0100 Subject: [tex4ht] \def does not seem to work in mathjax mode. In-Reply-To: <1e3aad55-0637-bd98-5b33-0e0e37b1f782@12000.org> References: <1e3aad55-0637-bd98-5b33-0e0e37b1f782@12000.org> Message-ID: Hi Nasser, > The problem is in the use of \def\st{\sin\theta(t)} > > The latex code might not be the best, but it works > in the other systems. Just add the macro definition to the MathJax configuration as in http://tug.org/pipermail/tex4ht/2018q4/002129.html Best, Michal From nma at 12000.org Thu Dec 20 08:13:38 2018 From: nma at 12000.org (Nasser M. Abbasi) Date: Thu, 20 Dec 2018 01:13:38 -0600 Subject: [tex4ht] Very strange problem with tex4ht using mathjax mode. Problem with \ followed by \] on new line. CR being stripped causing problem. Message-ID: <6b3da467-417d-4e6e-5fb6-1c35ba5848db@12000.org> This is probably the weirdest problem I found using mathjax. I am having hard time understanding how to work around this problem. The same HTML generated using mathjax mode looks Ok on my computer but does not look OK after ftp'ed up to the the server then looking at it in the browser there. Here is a MWE ------------------------------------- \documentclass[11pt]{article}% \usepackage{amsmath} \begin{document} Therefore \[ A=0\ \] Hence \end{document} ---------------------------------- Any one notice any problem with the above code? It is valid latex and compiles OK with all systems. Compiled this using make4ht foo1.tex "htm,mathjax" And there is _NO_ problem, when I view it on my computer, running windows 10, via localhost: URL using my local apache web server running on windows. Here comes the issue. I ftp the above HTML file to my hosting server and then view it there, now it is no longer working. The same exact HTML file and .css. Here is screen shot side by side. Both views are using Chrom browser. One on local PC and one on the server. https://www.12000.org/tmp/122018/screen_shot.png When I view source of the page on screen, it looks the same as on my PC ===========================

Therefore \[ A=0\\] Hence

==================================== The web hosting server runs Linux Apache. So it could be some encoding issue. The problem goes away when changing \[ A=0\ \] to \[ A=0 \] Now you might ask, when I wrote A=0\ there instead of A=0? I did not. This is fragment of code generated by Scientific word. SW tends to add lots of \ for spacing everywhere. Next, I went to this file DIFF free site, which does byte by byte difference. I copied the HTML on my PC and the HTML on the server and compared them side by side. It turned out that on the server the _carriage return_ after A\ was stripped out!, so the code on the server actually is A\\] while on the PC the CR is still there, so it actually like this A=0\ \] Here is screen shot side by side the file difference. Left screen shot is on the server, and right side is same HTML on the PC https://www.12000.org/tmp/122018/diff.png note that there is no issue with the code as is compiled in latex or SVG for math. Only issue is with mathjax and only when ftp'ing it to the Linux server. Any suggestion what one should do to avoid this problem? Is problem this to be expected? luckily this problem does not show in many places. For now, I can manually remove the \ after the A. But SW will put it back next time I edit the file. And this problem could be there in many other places also but I have not noticed it before. I am using TL 2018 >make4ht --version make4ht version v0.2c From nma at 12000.org Thu Dec 20 08:56:55 2018 From: nma at 12000.org (Nasser M. Abbasi) Date: Thu, 20 Dec 2018 01:56:55 -0600 Subject: [tex4ht] Very strange problem with tex4ht using mathjax mode. Problem with \ followed by \] on new line. CR being stripped causing problem. In-Reply-To: <6b3da467-417d-4e6e-5fb6-1c35ba5848db@12000.org> References: <6b3da467-417d-4e6e-5fb6-1c35ba5848db@12000.org> Message-ID: <928e48d7-005a-f0b4-836f-dcd1c14c5091@12000.org> Problem solved. I use filezilla FTP software. Been using it for years with Its default for AUTO for file type transfer. I now changed the file type to be explicit BINARY and now when I upload the HTML generated, the carriage return is not stripped. It is there. So mathjax is happy and now it looks the same as it does locally. This is first time I had issue with the setting for FTP, may be because before I was using images for math and this was never an issue. The default was AUTO, but now will make sure to change to binary next time I install fillezilla. Even though transfering text files between different OS's using binary can be a problem due to different end of line encoding, but I compile everything on Linux on the local PC even though the deskstop itself is windows, so using binary for transfer should be OK. Case seems to be closed. Thank you --Nasser On 12/20/2018 1:13 AM, Nasser M. Abbasi wrote: > This is probably the weirdest problem I found using mathjax. > > I am having hard time understanding how to work around this > problem. > > The same HTML generated using mathjax mode looks Ok on my computer > but does not look OK after ftp'ed up to the the server then looking > at it in the browser there. > > Here is a MWE > > ------------------------------------- > \documentclass[11pt]{article}% > \usepackage{amsmath} > \begin{document} > Therefore > \[ > A=0\ > \] > Hence > \end{document} > ---------------------------------- > > Any one notice any problem with the above code? It is > valid latex and compiles OK with all systems. > > Compiled this using > > make4ht foo1.tex "htm,mathjax" > > And there is _NO_ problem, when I view it on my computer, running > windows 10, via localhost: URL using my local apache web server running > on windows. > > Here comes the issue. I ftp the above HTML file to my hosting server > and then view it there, now it is no longer working. > > The same exact HTML file and .css. > > Here is screen shot side by side. Both views are using Chrom browser. > One on local PC and one on the server. > > https://www.12000.org/tmp/122018/screen_shot.png > > When I view source of the page on screen, it looks the same as on my PC > =========================== > > > > > > > > > > > > >

Therefore \[ A=0\\] Hence >

> > > > ==================================== > > The web hosting server runs Linux Apache. So it could be some encoding > issue. > > The problem goes away when changing > > \[ > A=0\ > \] > > to > > \[ > A=0 > \] > > Now you might ask, when I wrote A=0\ there instead of A=0? I did not. > This is fragment of code generated by Scientific word. SW tends to add > lots of \ for spacing everywhere. > > Next, I went to this file DIFF free site, which does byte by byte difference. > > I copied the HTML on my PC and the HTML on the server and compared them > side by side. > > It turned out that on the server the _carriage return_ after A\ was > stripped out!, so the code on the server actually is A\\] while on the PC > the CR is still there, so it actually like this > > A=0\ > \] > > Here is screen shot side by side the file difference. Left > screen shot is on the server, and right side is same HTML on the PC > > https://www.12000.org/tmp/122018/diff.png > > note that there is no issue with the code as is compiled in latex or SVG for > math. Only issue is with mathjax and only when ftp'ing it to the Linux server. > > Any suggestion what one should do to avoid this problem? Is problem this to > be expected? > > luckily this problem does not show in many places. For now, I can manually > remove the \ after the A. But SW will put it back next time > I edit the file. And this problem could be there in many > other places also but I have not noticed it before. > > I am using TL 2018 > >> make4ht --version > make4ht version v0.2c > > From michal.h21 at gmail.com Thu Dec 20 09:38:08 2018 From: michal.h21 at gmail.com (Michal Hoftich) Date: Thu, 20 Dec 2018 09:38:08 +0100 Subject: [tex4ht] Very strange problem with tex4ht using mathjax mode. Problem with \ followed by \] on new line. CR being stripped causing problem. In-Reply-To: <928e48d7-005a-f0b4-836f-dcd1c14c5091@12000.org> References: <6b3da467-417d-4e6e-5fb6-1c35ba5848db@12000.org> <928e48d7-005a-f0b4-836f-dcd1c14c5091@12000.org> Message-ID: Hi Nasser, On Thu, Dec 20, 2018 at 8:57 AM Nasser M. Abbasi wrote: > > Problem solved. > > I use filezilla FTP software. Been using it for years with > Its default for AUTO for file type transfer. > > I now changed the file type to be explicit BINARY > and now when I upload the HTML generated, the carriage return > is not stripped. It is there. That's great that you found a solution, this particular issue would be hard to track otherwise. Best regards, Michal From michal.h21 at gmail.com Tue Dec 25 17:00:49 2018 From: michal.h21 at gmail.com (Michal Hoftich) Date: Tue, 25 Dec 2018 17:00:49 +0100 Subject: [tex4ht] [bug #406] The optional argument for \chapter is ignored in TOC with Memoir class Message-ID: <20181225-180049.sv189.14900@puszcza.gnu.org.ua> URL: Summary: The optional argument for \chapter is ignored in TOC with Memoir class Project: tex4ht Submitted by: michal_h21 Submitted on: Tue 25 Dec 2018 06:00:49 PM EET Category: None Priority: 5 - Normal Severity: 5 - Normal Status: None Privacy: Public Assigned to: None Originator Email: Open/Closed: Open Discussion Lock: Any _______________________________________________________ Details: I will reproduce a report from the tex4ebook issue tracker [1] --- The \chapter takes two parameters: in curly brackets (more common) and square brackets (less common). If just curly brackets are used, that text is used for both the TOC and chapter header. If curly and square are used, then the text in square brackets are used by LaTeX for the TOC and the text in curly brackets are used for the chapter header. Tex4ebook appears to ignore the square brackets and use whatever's in the curly brackets for both TOC and chapter headers. This is a problem for my current project because I have newlines in the chapter names where they appear at chapter headers, but this is ugly in the TOC. In the context of this bug report, if only square brackets are used, it is legal for demons to fly out of the author's nose. \documentclass{memoir} \begin{document} \tableofcontents* \chapter[First Chapter]{First\\ Chapter} \chapter[Second Chapter]{Second\\ Chapter} \chapter[Third Chapter]{Third\\ Chapter} \end{document} --- I don't know how to fix this yet. [1] https://github.com/michal-h21/tex4ebook/issues/51 _______________________________________________________ Reply to this item at: _______________________________________________ Message sent via/by Puszcza http://puszcza.gnu.org.ua/ From michal.h21 at gmail.com Tue Dec 25 19:17:58 2018 From: michal.h21 at gmail.com (Michal Hoftich) Date: Tue, 25 Dec 2018 19:17:58 +0100 Subject: [tex4ht] [bug #407] Support for the `svg` package Message-ID: <20181225-201758.sv189.14142@puszcza.gnu.org.ua> URL: Summary: Support for the `svg` package Project: tex4ht Submitted by: michal_h21 Submitted on: Tue 25 Dec 2018 08:17:58 PM EET Category: None Priority: 5 - Normal Severity: 5 - Normal Status: None Privacy: Public Assigned to: None Originator Email: Open/Closed: Open Discussion Lock: Any _______________________________________________________ Details: Hi all, The `svg` package can be used for inclusion of the SVG graphics in the LaTeX documents. It uses Inkscape for conversion from the source file to EPS or PNG. Since `tex4ht` and HTML supports SVG, this conversion step is unnecessary and we can just include the picture directly (except for the ODT output, because it doesn't support SVG). The basic support should be as simple as `\renewcommand\includesvg[2][]{\includegraphics{#2}}`. There is one issue though. We already have a `svg.4ht` file, it is used by the `tex4ht.4ht` for the `svg` option. I guess it should be safe to rename this file to something like `svg-option.4ht` and use the `svg.4ht` for configurations for the `svg` package. Best, Michal _______________________________________________________ Reply to this item at: _______________________________________________ Message sent via/by Puszcza http://puszcza.gnu.org.ua/ From karl at freefriends.org Tue Dec 25 22:57:22 2018 From: karl at freefriends.org (Karl Berry) Date: Tue, 25 Dec 2018 21:57:22 GMT Subject: [tex4ht] [bug #407] Support for the `svg` package In-Reply-To: <20181225-201758.sv189.14142@puszcza.gnu.org.ua> References: <20181225-201758.sv189.14142@puszcza.gnu.org.ua> Message-ID: <20181225-235722.sv118.32149@puszcza.gnu.org.ua> Follow-up Comment #1, bug #407 (project tex4ht): I agree about renaming the option file, fwiw ... --thanks, k. _______________________________________________________ Reply to this item at: _______________________________________________ Message sent via/by Puszcza http://puszcza.gnu.org.ua/ From michal.h21 at gmail.com Thu Dec 27 21:25:15 2018 From: michal.h21 at gmail.com (Michal Hoftich) Date: Thu, 27 Dec 2018 21:25:15 +0100 Subject: [tex4ht] [bug #407] Support for the `svg` package In-Reply-To: <20181225-235722.sv118.32149@puszcza.gnu.org.ua> References: <20181225-201758.sv189.14142@puszcza.gnu.org.ua> <20181225-235722.sv118.32149@puszcza.gnu.org.ua> Message-ID: <20181227-222515.sv189.80483@puszcza.gnu.org.ua> Follow-up Comment #2, bug #407 (project tex4ht): I've renamed the svg.4ht file to svg-option.4ht and added basic support for the Svg.sty package. I hope everything works. Best, M. _______________________________________________________ Reply to this item at: _______________________________________________ Message sent via/by Puszcza http://puszcza.gnu.org.ua/ From nma at 12000.org Sat Dec 29 06:01:58 2018 From: nma at 12000.org (Nasser M. Abbasi) Date: Fri, 28 Dec 2018 23:01:58 -0600 Subject: [tex4ht] problems using mathjax mode with siunitx package Message-ID: <982e3410-9c35-5c19-7775-b35ab8fecd3f@12000.org> Hello; I am trying the new mathjax mode with some old latex files that make heavy use of \usepackage{siunitx} None of the siunitx code works in mathjax but works OK in lualatex and in png or svg for math with make4ht. Here is a MWE -------------------------------- \documentclass[11pt]{article}% \usepackage{amsmath} \usepackage{siunitx} \DeclareSIUnit\ft{ft} \begin{document} \begin{align*} S &= \SI{2775}{\square\ft} \end{align*} \end{document} ---------------------- Compiled using make4ht foo1.tex "htm,mathjax" It looks like this in HTML https://www.12000.org/tmp/122818/mathjax.png The HTML generated is --------------------------------------

\begin{align*} S &= \SI{2775}{\square \ft } \end{align*}

--------------------------- So mathjax does not know about siunitx. Other than rewriting all the latex code so not to use this package, which I really do not want to do, is there a way to work around this? Is new configuration needed somewhere? I have other\DeclareSIUnit macros in the code such as \DeclareSIUnit\ft{ft} \DeclareSIUnit\deg{deg} etc... Using TL 2018 Thank you for any hints how to handle this. --Nasser