From hammond at csc.albany.edu Mon Jul 30 23:43:00 2012 From: hammond at csc.albany.edu (William F Hammond) Date: Mon, 30 Jul 2012 17:43:00 -0400 Subject: [tex4ht] text/html with mathjax as small mod of tex4ht/xhmlatex Message-ID: It's not clear to me how to configure things so that html5 (text/html serialization) with mathjax is spun out of tex4ht, but small ad hoc adjustments to the examples from arXiv referenced below suggest that it ought to be fairly easy to create a variant of xhmlatex for it. http://www.albany.edu/~hammond/demos/Html5/arXiv/ -- Bill From michal.h21 at gmail.com Thu Aug 2 12:41:55 2012 From: michal.h21 at gmail.com (Michal Hoftich) Date: Thu, 2 Aug 2012 12:41:55 +0200 Subject: [tex4ht] text/html with mathjax as small mod of tex4ht/xhmlatex In-Reply-To: References: Message-ID: Hi, I managed to get points 1 - 4 from your list with following config file "mathjax.cfg" ------------------ \Preamble{xhtml,mathml} \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}} \Configure{@HEAD}{\HCode{ \Hnewline }} \Configure{@HEAD}{\HCode{\Hnewline}} \begin{document} \EndPreamble -------------------- I don't know about xhmlatex script, but after compiling one of your sample files with htlatex 1109.1881v2.tex "mathjax, charset=utf-8,NoFonts" " -cunihtf -utf8" I got only few errors from w3c validator, caused with conversion of some math construct to png image and including this image to mathml. I think your point no. 5 isn't really necessary, in html5 elements, which cannot have any content, like , can be self-closing. Michal 2012/7/30 William F Hammond > > > It's not clear to me how to configure things so that html5 > (text/html serialization) with mathjax is spun out of > tex4ht, but small ad hoc adjustments to the examples from > arXiv referenced below suggest that it ought to be fairly > easy to create a variant of xhmlatex for it. > > http://www.albany.edu/~hammond/demos/Html5/arXiv/ > > -- Bill > From puszcza-hackers at gnu.org.ua Thu Aug 30 23:28:00 2012 From: puszcza-hackers at gnu.org.ua (l690401@rtrtr.com) Date: Thu, 30 Aug 2012 21:28:00 +0000 Subject: [tex4ht] [bug #167] Unicode input character a-acute goes wrong Message-ID: <20120830-212800.sv188.54149@puszcza.gnu.org.ua> URL: Summary: Unicode input character a-acute goes wrong Project: tex4ht Submitted by: l690401 Submitted on: Thu 30 Aug 2012 09:27:59 PM GMT 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 calling "htlatex ryba.tex 'html'", all "?"s are transformed just to "'"s. (A-acute to nothing-acute). _______________________________________________________ Reply to this item at: _______________________________________________ Message sent via/by Puszcza http://puszcza.gnu.org.ua/ From puszcza-hackers at gnu.org.ua Fri Aug 31 01:25:41 2012 From: puszcza-hackers at gnu.org.ua (Michal Hoftich) Date: Thu, 30 Aug 2012 23:25:41 +0000 Subject: [tex4ht] [bug #167] Unicode input character a-acute goes wrong In-Reply-To: <20120830-212800.sv188.54149@puszcza.gnu.org.ua> References: <20120830-212800.sv188.54149@puszcza.gnu.org.ua> Message-ID: <20120830-232541.sv189.58425@puszcza.gnu.org.ua> Follow-up Comment #1, bug #167 (project tex4ht): there is not much information, but in order to get correct unicode output, you need: 1. use usepackage[utf8]{inputenc} in your source file 2. use command line options for telling tex4ht that your file is in unicode. For example: htlatex ryba.tex "xhtml, utf-8" " -cunihtf -utf8" _______________________________________________________ Reply to this item at: _______________________________________________ Message sent via/by Puszcza http://puszcza.gnu.org.ua/ From dbitouze at wanadoo.fr Tue Sep 4 09:43:50 2012 From: dbitouze at wanadoo.fr (Denis =?ISO-8859-15?B?Qml0b3V66Q==?=) Date: Tue, 4 Sep 2012 09:43:50 +0200 Subject: [tex4ht] \autoref from hyperref with tex4ht (reborn) Message-ID: <20120904094350.4995c8d6@wanadoo.fr> Hi, despite an up to date TL 2012, I'm facing the same trouble as pointed out in http://tug.org/pipermail/tex4ht/2011q2/000307.html: \documentclass{article} \usepackage{hyperref} \begin{document} \begin{figure} \caption{My figure.} \label{fig} \end{figure} See~\autoref{fig}. \end{document} still gives: * "See Figure 1" with pdflatex, * "See 1" with htlatex. My File List is attached to this message. Would it be possible to update nameref.4ht on CTAN? Thanks in anticipation. -- Denis -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: file-list.txt URL: From cvr at river-valley.org Tue Sep 4 19:10:30 2012 From: cvr at river-valley.org (Radhakrishnan CV) Date: Tue, 4 Sep 2012 22:40:30 +0530 Subject: [tex4ht] \autoref from hyperref with tex4ht (reborn) In-Reply-To: <20120904094350.4995c8d6@wanadoo.fr> References: <20120904094350.4995c8d6@wanadoo.fr> Message-ID: On Tue, Sep 4, 2012 at 1:13 PM, Denis Bitouz? wrote: > Hi, > > despite an up to date TL 2012, I'm facing the same trouble as pointed > out in http://tug.org/pipermail/tex4ht/2011q2/000307.html: > > \documentclass{article} > \usepackage{hyperref} > \begin{document} > \begin{figure} > \caption{My figure.} > \label{fig} > \end{figure} > See~\autoref{fig}. > \end{document} > > still gives: > > * "See Figure 1" with pdflatex, > * "See 1" with htlatex. > Sorry, I could not replicate the problem. Maybe my nameref.4ht is modified one. Anyway, attaching herewith denis.zip which has your above example document plus all output and logs. Also attaching my version of nameref.4ht. Best -- Radhakrishnan -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: nameref.4ht Type: application/octet-stream Size: 5612 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: denis.zip Type: application/zip Size: 14218 bytes Desc: not available URL: From cvr at river-valley.org Tue Sep 4 19:38:06 2012 From: cvr at river-valley.org (Radhakrishnan CV) Date: Tue, 4 Sep 2012 23:08:06 +0530 Subject: [tex4ht] \autoref from hyperref with tex4ht (reborn) In-Reply-To: <20120904192403.797a76f4@wanadoo.fr> References: <20120904094350.4995c8d6@wanadoo.fr> <20120904192403.797a76f4@wanadoo.fr> Message-ID: On Tue, Sep 4, 2012 at 10:54 PM, Denis Bitouz? wrote: > Le mardi 04/09/12 ? 22h40, > Radhakrishnan CV a ?crit : > > > [...] Maybe my nameref.4ht is modified one. > > It is the case :) Here are the md5sum of yours and the TL 2012's one: > > 1033c267d0968c78f6b5239216f0cd0d ./nameref.4ht > a510f8a5ed6b8478825c1e8c1e45c191 > /usr/local/texlive/2012/texmf-dist/tex/generic/tex4ht/nameref.4ht > So sorry, it was my fault. Will update as quickly as possible. Best regards -- Radhakrishnan -------------- next part -------------- An HTML attachment was scrubbed... URL: From cvr at river-valley.org Tue Sep 4 19:38:06 2012 From: cvr at river-valley.org (Radhakrishnan CV) Date: Tue, 4 Sep 2012 23:08:06 +0530 Subject: [tex4ht] \autoref from hyperref with tex4ht (reborn) In-Reply-To: <20120904192403.797a76f4@wanadoo.fr> References: <20120904094350.4995c8d6@wanadoo.fr> <20120904192403.797a76f4@wanadoo.fr> Message-ID: On Tue, Sep 4, 2012 at 10:54 PM, Denis Bitouz? wrote: > Le mardi 04/09/12 ? 22h40, > Radhakrishnan CV a ?crit : > > > [...] Maybe my nameref.4ht is modified one. > > It is the case :) Here are the md5sum of yours and the TL 2012's one: > > 1033c267d0968c78f6b5239216f0cd0d ./nameref.4ht > a510f8a5ed6b8478825c1e8c1e45c191 > /usr/local/texlive/2012/texmf-dist/tex/generic/tex4ht/nameref.4ht > So sorry, it was my fault. Will update as quickly as possible. Best regards -- Radhakrishnan -------------- next part -------------- An HTML attachment was scrubbed... URL: From dbitouze at wanadoo.fr Tue Sep 4 19:24:03 2012 From: dbitouze at wanadoo.fr (Denis =?ISO-8859-15?B?Qml0b3V66Q==?=) Date: Tue, 4 Sep 2012 19:24:03 +0200 Subject: [tex4ht] \autoref from hyperref with tex4ht (reborn) In-Reply-To: References: <20120904094350.4995c8d6@wanadoo.fr> Message-ID: <20120904192403.797a76f4@wanadoo.fr> Le mardi 04/09/12 ? 22h40, Radhakrishnan CV a ?crit : > [...] Maybe my nameref.4ht is modified one. It is the case :) Here are the md5sum of yours and the TL 2012's one: 1033c267d0968c78f6b5239216f0cd0d ./nameref.4ht a510f8a5ed6b8478825c1e8c1e45c191 /usr/local/texlive/2012/texmf-dist/tex/generic/tex4ht/nameref.4ht Best regards. -- Denis From dbitouze at wanadoo.fr Tue Sep 4 20:38:32 2012 From: dbitouze at wanadoo.fr (Denis =?ISO-8859-15?B?Qml0b3V66Q==?=) Date: Tue, 4 Sep 2012 20:38:32 +0200 Subject: [tex4ht] \autoref from hyperref with tex4ht (reborn) In-Reply-To: References: <20120904094350.4995c8d6@wanadoo.fr> <20120904192403.797a76f4@wanadoo.fr> Message-ID: <20120904203832.6af7a7ea@wanadoo.fr> Le mardi 04/09/12 ? 23h08, Radhakrishnan CV a ?crit : > So sorry, it was my fault. You're welcome! > Will update as quickly as possible. Thanks a lot. -- Denis From dbitouze at wanadoo.fr Tue Sep 4 20:55:22 2012 From: dbitouze at wanadoo.fr (Denis =?ISO-8859-15?B?Qml0b3V66Q==?=) Date: Tue, 4 Sep 2012 20:55:22 +0200 Subject: [tex4ht] Unnumbered theorems and hyperref In-Reply-To: <20120904204349.1fa9522b@wanadoo.fr> References: <20120904204349.1fa9522b@wanadoo.fr> Message-ID: <20120904205522.6b14b4a0@wanadoo.fr> Le mardi 04/09/12 ? 20h43, Denis Bitouz? a ?crit : Sorry, I wasn't precise enough... > As long as hyperref is loaded or the theorem stay unnumbered (remove the star to make it numbered) > , the following MCE: > > \documentclass{article} > \usepackage{amsthm} > \usepackage{hyperref} > % > \newtheorem*{theo}{Theorem} > % > \begin{document} > \begin{theo} > Test. > \end{theo} > \end{document} > > gives the error: > > ! TeX capacity exceeded, sorry [input stack size=5000]. > \font at name -> > \OT1/cmr/m/n/10 > l.8 \begin{theo} In any case, pdflatex compilation is OK. -- Denis From dbitouze at wanadoo.fr Tue Sep 4 20:43:49 2012 From: dbitouze at wanadoo.fr (Denis =?ISO-8859-15?B?Qml0b3V66Q==?=) Date: Tue, 4 Sep 2012 20:43:49 +0200 Subject: [tex4ht] Unnumbered theorems and hyperref Message-ID: <20120904204349.1fa9522b@wanadoo.fr> Hello, I have run into another bug. As long as hyperref is loaded, the following MCE: \documentclass{article} \usepackage{amsthm} \usepackage{hyperref} % \newtheorem*{theo}{Theorem} % \begin{document} \begin{theo} Test. \end{theo} \end{document} gives the error: ! TeX capacity exceeded, sorry [input stack size=5000]. \font at name -> \OT1/cmr/m/n/10 l.8 \begin{theo} Best regards. -- Denis From dbitouze at wanadoo.fr Tue Sep 4 19:37:48 2012 From: dbitouze at wanadoo.fr (Denis =?ISO-8859-15?B?Qml0b3V66Q==?=) Date: Tue, 4 Sep 2012 19:37:48 +0200 Subject: [tex4ht] \autoref from hyperref with tex4ht (reborn) In-Reply-To: <20120904192403.797a76f4@wanadoo.fr> References: <20120904094350.4995c8d6@wanadoo.fr> <20120904192403.797a76f4@wanadoo.fr> Message-ID: <20120904193748.7a17dcd5@wanadoo.fr> Le mardi 04/09/12 ? 19h24, Denis Bitouz? a ?crit : > It is the case :) I forgot to mention that your nameref.4ht is working like charm! -- Denis From dbitouze at wanadoo.fr Tue Sep 4 20:51:36 2012 From: dbitouze at wanadoo.fr (Denis =?ISO-8859-15?B?Qml0b3V66Q==?=) Date: Tue, 4 Sep 2012 20:51:36 +0200 Subject: [tex4ht] Another bugs Message-ID: <20120904205136.5cba481a@wanadoo.fr> Hello, some months ago, I was facing another bugs I reported on https://puszcza.gnu.org.ua/ but I had no news about them. Since this list is more responsive (thanks to Radhakrishnan ;), I let you know them: https://puszcza.gnu.org.ua/bugs/?162 https://puszcza.gnu.org.ua/bugs/?163 https://puszcza.gnu.org.ua/bugs/?164 Best regards. -- Denis From puszcza-hackers at gnu.org.ua Wed Sep 5 11:38:48 2012 From: puszcza-hackers at gnu.org.ua (CV Radhakrishnan) Date: Wed, 5 Sep 2012 09:38:48 +0000 Subject: [tex4ht] [bug #162] Extra space in html output with some predefined TeX commands In-Reply-To: <20120517-095057.sv128.90036@puszcza.gnu.org.ua> References: <20120517-093733.sv128.9801@puszcza.gnu.org.ua> <20120517-095057.sv128.90036@puszcza.gnu.org.ua> Message-ID: <20120905-093848.sv119.43240@puszcza.gnu.org.ua> Update of bug #162 (project tex4ht): Assigned to: None => cvr _______________________________________________________ Reply to this item at: _______________________________________________ Message sent via/by Puszcza http://puszcza.gnu.org.ua/ From puszcza-hackers at gnu.org.ua Wed Sep 5 11:44:15 2012 From: puszcza-hackers at gnu.org.ua (CV Radhakrishnan) Date: Wed, 5 Sep 2012 09:44:15 +0000 Subject: [tex4ht] [bug #162] Extra space in html output with some predefined TeX commands In-Reply-To: <20120905-093848.sv119.43240@puszcza.gnu.org.ua> References: <20120517-093733.sv128.9801@puszcza.gnu.org.ua> <20120517-095057.sv128.90036@puszcza.gnu.org.ua> <20120905-093848.sv119.43240@puszcza.gnu.org.ua> Message-ID: <20120905-094415.sv119.96957@puszcza.gnu.org.ua> Follow-up Comment #2, bug #162 (project tex4ht): The html output created by TeX4ht is similar to pdf. There is no spurious space. See:

LATEX foo

LATEXfoo The element introduces a space after it while rendering in a browser. If you comment out the span.LATEX entries from *.css, and refresh your browser, the spurious space disappears. I am out of wits here. Radhakrishnan _______________________________________________________ Reply to this item at: _______________________________________________ Message sent via/by Puszcza http://puszcza.gnu.org.ua/ From mr_heller at yahoo.dk Wed Sep 5 18:22:22 2012 From: mr_heller at yahoo.dk (Martin Heller) Date: Wed, 5 Sep 2012 18:22:22 +0200 Subject: [tex4ht] \autoref from hyperref with tex4ht (reborn) In-Reply-To: References: <20120904094350.4995c8d6@wanadoo.fr> Message-ID: <50477C3E.7090502@yahoo.dk> Radhakrishnan CV wrote, on 04-09-2012 19:10: > Sorry, I could not replicate the problem. Maybe my nameref.4ht is > modified one. Anyway, attaching herewith denis.zip which has your above > example document plus all output and logs. Also attaching my version of > nameref.4ht. This version of nameref.4ht still gives me problems with the input file below when compiled with htlatex test.tex "html,4" (this is a duplicate of the reports: and , sorry) % test.tex \documentclass{book} \usepackage{hyperref} \setcounter{secnumdepth}{4} \begin{document} \tableofcontents \chapter{Chapter} \label{chap:chapter} \section{Section} \label{sec:section} \subsection{Subsection} \label{subsec:section} \subsubsection{Subsubsection} \label{subsubsec:section} \begin{figure} \caption{Figure.} \label{fig:test} \end{figure} \chapter{Second Chapter} \autoref{fig:test}\\ \autoref{chap:chapter}\\ \autoref{sec:section}\\ \autoref{subsec:section}\\ \autoref{subsubsec:section}\\ Figure~\ref{fig:test}\\ Chapter~\ref{chap:chapter}\\ Section~\ref{sec:section}\\ Subsection~\ref{subsec:section}\\ Subsubsection~\ref{subsubsec:section} \end{document} From dbitouze at wanadoo.fr Fri Sep 7 15:44:45 2012 From: dbitouze at wanadoo.fr (Denis =?ISO-8859-15?B?Qml0b3V66Q==?=) Date: Fri, 7 Sep 2012 15:44:45 +0200 Subject: [tex4ht] \TeX logo not well formed in table of contents Message-ID: <20120907154445.4614b398@wanadoo.fr> Hi, unlike \LaTeX logo, \TeX logo is not well formed in table of contents (in current text, it is OK). Indeed, the following MCE: \documentclass{article} \begin{document} \tableofcontents \section{\LaTeX{}} \LaTeX{} \section{\TeX{}} \TeX{} \end{document} leads to:

1 LATEX
2 TEX
whereas, in the current text, \TeX logo is coded: TEX Is there a simple workaround? Thanks! -- Denis From dbitouze at wanadoo.fr Fri Sep 7 16:29:25 2012 From: dbitouze at wanadoo.fr (Denis =?ISO-8859-15?B?Qml0b3V66Q==?=) Date: Fri, 7 Sep 2012 16:29:25 +0200 Subject: [tex4ht] [glossaries] First (long) occurrence of an acronym not long in title Message-ID: <20120907162925.124e275e@wanadoo.fr> Hi, consider the following test.tex MCE: \documentclass{article} \usepackage[nonumberlist]{glossaries} \makeglossaries \newacronym{tex4ht}{\TeX4ht}{\TeX{} for HTML} \title{\gls{tex4ht}} \begin{document} %\maketitle \gls{tex4ht} \printglossary \end{document} and compile it with: htlatex test makeglossaries test htlatex test Because of the commented \maketitle, the first occurrence of the "acronym" \gls{tex4ht} (that appears in the current text) is displayed correctly (long form followed by the short form in brackets). But, if the title appears (\maketitle uncommented), the fist occurrence of the "acronym" (that appears this time in the title) is not displayed correctly: it is displayed as a not first occurrence (only the short form is displayed). BTW, this wrong behaviour doesn't arise if the file is compiled with pdflatex instead of htlatex. Do you know a way to get the right behaviour ? Thanks! -- Denis From dbitouze at wanadoo.fr Sun Sep 9 11:25:01 2012 From: dbitouze at wanadoo.fr (Denis =?ISO-8859-15?B?Qml0b3V66Q==?=) Date: Sun, 9 Sep 2012 11:25:01 +0200 Subject: [tex4ht] Spurious line break (
) with \lstinputlisting Message-ID: <20120909112501.37a648a8@wanadoo.fr> Hello, let us compile, with htlatex, the following test1.tex and test2.tex files (that should lead to the same html output): %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % test1.tex % %%%%%%%%%%%%% \documentclass{article} \usepackage{listings} \begin{document} \begin{lstlisting} test \end{lstlisting} \end{document} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % test2.tex % %%%%%%%%%%%%% \documentclass{article} \usepackage{filecontents} \begin{filecontents*}{test.pgm} test \end{filecontents*} \usepackage{listings} \begin{document} \lstinputlisting{test.pgm} \end{document} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% The interesting parts of test1.html and test2.html (reformatted by myself) are: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % interesting part of test1.html % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
test
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % interesting part of test2.html % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
test
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% In test2.html, we first notice a spurious non-break space, probably not so disturbing. What is much more inconvenient is the spurious line break (
) that make every lstinputed listing starting by a blank line. The following test.tex file, to be compiled with: htlatex test "test" highlights the trouble: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % test.tex % %%%%%%%%%%%% \documentclass{article} \usepackage{filecontents} \begin{filecontents*}{test.pgm} test \end{filecontents*} \begin{filecontents*}{test.cfg} \Preamble{html} \Css{div.lstinputlisting {border: 1px solid;}} \begin{document} \EndPreamble \end{filecontents*} \usepackage{listings} \lstset{numbers=left} \begin{document} \lstinputlisting{test.pgm} \end{document} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% I had a look at listings.4ht but I'm not not sure what to change in it without side effects. Any help would be strongly welcome :) -- Denis From dbitouze at wanadoo.fr Sun Sep 9 12:15:09 2012 From: dbitouze at wanadoo.fr (Denis =?ISO-8859-15?B?Qml0b3V66Q==?=) Date: Sun, 9 Sep 2012 12:15:09 +0200 Subject: [tex4ht] [SOLVED] Spurious line break (
) with \lstinputlisting In-Reply-To: <20120909112501.37a648a8@wanadoo.fr> References: <20120909112501.37a648a8@wanadoo.fr> Message-ID: <20120909121509.49d5f9d6@wanadoo.fr> Le dimanche 09/09/12 ? 11h25, Denis Bitouz? a ?crit : > Any help would be strongly welcome :) OK, I'll managed after having a look at html4.4ht and adding in the local .cfg file: \Configure{lstinputlisting} {\ifvmode \IgnorePar\fi \EndP \HCode{}% \HCode{
}% \bgroup \tt %\special{t4ht@(}% \Configure{listings} {{\everypar{}\leavevmode}} {{\everypar{}\leavevmode}} {\leavevmode\special{t4ht at +\string&{35}x00A0{59}}x% \HCode{}} {\HCode{}}% } {%\special{t4ht@)} \egroup \ifvmode \IgnorePar\fi \EndP \HCode{
}\par} where, in comparison to the original \Configure{lstinputlisting}:, "
" is removed from: \HCode{
} Maybe this configuration will lead to side effects but, if not, I would strongly suggest to adopt it for future TeX4ht release. -- Denis From dbitouze at wanadoo.fr Sun Sep 9 13:24:03 2012 From: dbitouze at wanadoo.fr (Denis =?ISO-8859-15?B?Qml0b3V66Q==?=) Date: Sun, 9 Sep 2012 13:24:03 +0200 Subject: [tex4ht] [NOT SOLVED] Spurious line break (
) with \lstinputlisting In-Reply-To: <20120909121509.49d5f9d6@wanadoo.fr> References: <20120909112501.37a648a8@wanadoo.fr> <20120909121509.49d5f9d6@wanadoo.fr> Message-ID: <20120909132403.262a6cd7@wanadoo.fr> Le dimanche 09/09/12 ? 12h15, Denis Bitouz? a ?crit : > Maybe this configuration will lead to side effects One of the most famous one is that it removes all the break lines of multiline listings! > but, if not, I would strongly suggest to adopt it for future TeX4ht release. Of course, it is not a good idea! So, sorry for the noise and I'm still looking for a clean solution for this trouble. -- Denis From dbitouze at wanadoo.fr Sun Sep 9 16:06:49 2012 From: dbitouze at wanadoo.fr (Denis =?ISO-8859-15?B?Qml0b3V66Q==?=) Date: Sun, 9 Sep 2012 16:06:49 +0200 Subject: [tex4ht] [Patch submitted] Spurious line break (
) with \lstinputlisting In-Reply-To: <20120909112501.37a648a8@wanadoo.fr> References: <20120909112501.37a648a8@wanadoo.fr> Message-ID: <20120909160649.7f52ab2a@wanadoo.fr> Le dimanche 09/09/12 ? 11h25, Denis Bitouz? a ?crit : > I had a look at listings.4ht but I'm not not sure what to change in it > without side effects. If I'm right, the following patch is a clean solution to the trouble I mentioned. In the original html4.4ht, replace lines 36834 to 36848 by: \Configure{lstinputlisting} {\ifvmode \IgnorePar\fi \EndP \gHAdvance\listingN by 1 \HCode{}% \gdef\start:LstLn{% \HCode{
}% \gdef\start:LstLn{\leavevmode\special{t4ht at +\string&{35}x00A0{59}}x% \HCode{
}}} \bgroup %\special{t4ht@(}% \Configure{listings} {{\everypar{}\leavevmode}} {{\everypar{}\leavevmode}} {\start:LstLn \HCode{}} {\HCode{}}% } {%\special{t4ht@)} \egroup \ifvmode \IgnorePar\fi \EndP \HCode{
}\par} If the original code and this patch are isolated in individual files, the differences between them are: 2a3 > \gHAdvance\listingN by 1 4,5c5,9 < \HCode{
}% < \bgroup \tt %\special{t4ht@(}% --- > \gdef\start:LstLn{% > \HCode{
}% > \gdef\start:LstLn{\leavevmode\special{t4ht at +\string&{35}x00A0{59}}x% > \HCode{
}}} > \bgroup %\special{t4ht@(}% 9,10c13 < {\leavevmode\special{t4ht at +\string&{35}x00A0{59}}x% < \HCode{
}} --- > {\start:LstLn \HCode{}} The first difference is intended to identify the "lstinputed listings" exactly as "lstlistings environment listings" are, and make them share the same counter. The next ones simply apply the code of the original \ConfigureEnv{lstlisting} to the \Configure{lstinputlisting} in order to obtain the same behaviour. It must be noticed the "\tt" removed from the original line: \bgroup \tt %\special{t4ht@(}% of \Configure{lstinputlisting}. This follows lstlisting TeX4ht configuration and should not be a problem because of the "font-family: monospace;" in the lines \Css{div.lstinputlisting{ font-family: monospace; white-space: nowrap; }} of the original html4.4ht. I hope this patch won't have any side effect and will be useful to you. Regards. -- Denis From dbitouze at wanadoo.fr Sun Sep 9 17:06:32 2012 From: dbitouze at wanadoo.fr (Denis =?ISO-8859-15?B?Qml0b3V66Q==?=) Date: Sun, 9 Sep 2012 17:06:32 +0200 Subject: [tex4ht] [Patch submitted] Spurious line break (
) with \lstinputlisting In-Reply-To: <20120909160649.7f52ab2a@wanadoo.fr> References: <20120909112501.37a648a8@wanadoo.fr> <20120909160649.7f52ab2a@wanadoo.fr> Message-ID: <20120909170632.467f8736@wanadoo.fr> Le dimanche 09/09/12 ? 16h06, Denis Bitouz? a ?crit : > \Css{div.lstinputlisting{ > font-family: monospace; > white-space: nowrap; > }} > > of the original html4.4ht. I also suggest to make identical the div.lstlisting and div.lstinputlisting \Css declarations by adding: margin-top:0.5em; margin-bottom:0.5em; to the lstinputlisting's one: \Css{div.lstinputlisting{font-family: monospace; white-space: nowrap; margin-top:0.5em; margin-bottom:0.5em; }} -- Denis From dbitouze at wanadoo.fr Mon Sep 17 16:45:04 2012 From: dbitouze at wanadoo.fr (Denis =?ISO-8859-15?B?Qml0b3V66Q==?=) Date: Mon, 17 Sep 2012 16:45:04 +0200 Subject: [tex4ht] latexmk instead of 3 systematic compilations? Message-ID: <20120917164504.2f5c3bfd@wanadoo.fr> Hello, I didn't look at the reasons htlatex runs systematically 3 times the underlying compilation : latex $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g at addto@macro\@documentclasshook{\RequirePackage[#1,html]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,html}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1 but, to be sure enough compilations have been done, wouldn't it be possible to use a makefile instead, the much powerful I know being latexmk? Thanks. -- Denis From cvr at river-valley.org Mon Sep 17 18:26:29 2012 From: cvr at river-valley.org (Radhakrishnan CV) Date: Mon, 17 Sep 2012 21:56:29 +0530 Subject: [tex4ht] latexmk instead of 3 systematic compilations? In-Reply-To: <20120917164504.2f5c3bfd@wanadoo.fr> References: <20120917164504.2f5c3bfd@wanadoo.fr> Message-ID: On Mon, Sep 17, 2012 at 8:15 PM, Denis Bitouz? wrote: [...] > but, to be sure enough compilations have been done, wouldn't it be > possible to use a makefile instead, the much powerful I know being > latexmk? > That is up to you. You might choose any easiest method. Three compilations are needed to resolve all the cross links correctly. If you are sure about previous compilations, ie., it is not stopped midway due to errors, you need only one LaTeX run. Best -- Radhakrishnan -------------- next part -------------- An HTML attachment was scrubbed... URL: From dbitouze at wanadoo.fr Mon Sep 17 18:40:45 2012 From: dbitouze at wanadoo.fr (Denis =?ISO-8859-15?B?Qml0b3V66Q==?=) Date: Mon, 17 Sep 2012 18:40:45 +0200 Subject: [tex4ht] latexmk instead of 3 systematic compilations? In-Reply-To: References: <20120917164504.2f5c3bfd@wanadoo.fr> Message-ID: <20120917184045.16cdd49e@wanadoo.fr> Le lundi 17/09/12 ? 21h56, Radhakrishnan CV a ?crit : > That is up to you. You might choose any easiest method. Three > compilations are needed to resolve all the cross links correctly. If > you are sure about previous compilations, ie., it is not stopped > midway due to errors, you need only one LaTeX run. OK, thanks. So a subsidiary question is: would it be possible to provide the necessary information? to John Collins, the Latexmk developer, to help him to make Latexmk able to deal with the various TeX4ht compilations? ----------------------- 1. How to know from the log if the cross links resolve correctly or if an extra compilation is needed. Unfortunately, this is beyond my knowledge... -- Denis From dbitouze at wanadoo.fr Mon Sep 17 20:33:08 2012 From: dbitouze at wanadoo.fr (Denis =?ISO-8859-15?B?Qml0b3V66Q==?=) Date: Mon, 17 Sep 2012 20:33:08 +0200 Subject: [tex4ht] latexmk instead of 3 systematic compilations? In-Reply-To: References: <20120917164504.2f5c3bfd@wanadoo.fr> <20120917184045.16cdd49e@wanadoo.fr> Message-ID: <20120917203308.19a0353f@wanadoo.fr> Le lundi 17/09/12 ? 19h58, Matteo Centonza a ?crit : Hi Matteo, > an easy method may be to check whether or not the .xref file changed > since last run (you may use checksum comparison). > > This is the method i currently use in my application. OK, many thanks for this tip. Maybe I could contact John Collins to provide him this information and to ask him to make Latexmk aware of TeX4Ht but Radhakrishnan (or somebody else with better knowledge than mine in TeX4Ht: that's easy :) should be more than me the right man to answer technical questions that could arise... I'm sure it could be a very nice enhancement of TeX4Ht! -- Denis From matteo at metatype.it Mon Sep 17 19:58:51 2012 From: matteo at metatype.it (Matteo Centonza) Date: Mon, 17 Sep 2012 19:58:51 +0200 Subject: [tex4ht] latexmk instead of 3 systematic compilations? In-Reply-To: <20120917184045.16cdd49e@wanadoo.fr> References: <20120917164504.2f5c3bfd@wanadoo.fr> <20120917184045.16cdd49e@wanadoo.fr> Message-ID: Hello Denis, 2012/9/17 Denis Bitouz? : > Le lundi 17/09/12 ? 21h56, > Radhakrishnan CV a ?crit : > >> That is up to you. You might choose any easiest method. Three >> compilations are needed to resolve all the cross links correctly. If >> you are sure about previous compilations, ie., it is not stopped >> midway due to errors, you need only one LaTeX run. > > OK, thanks. > > So a subsidiary question is: would it be possible to provide the > necessary information? to John Collins, the Latexmk developer, to help > him to make Latexmk able to deal with the various TeX4ht compilations? > > ----------------------- > 1. How to know from the log if the cross links resolve correctly or > if an extra compilation is needed. Unfortunately, this is beyond > my knowledge... an easy method may be to check whether or not the .xref file changed since last run (you may use checksum comparison). This is the method i currently use in my application. HTH, -m From puszcza-hackers at gnu.org.ua Wed Sep 19 09:27:39 2012 From: puszcza-hackers at gnu.org.ua (Bitouze) Date: Wed, 19 Sep 2012 07:27:39 +0000 Subject: [tex4ht] [bug #162] Extra space in html output with some predefined TeX commands In-Reply-To: <20120905-094415.sv119.96957@puszcza.gnu.org.ua> References: <20120517-093733.sv128.9801@puszcza.gnu.org.ua> <20120517-095057.sv128.90036@puszcza.gnu.org.ua> <20120905-093848.sv119.43240@puszcza.gnu.org.ua> <20120905-094415.sv119.96957@puszcza.gnu.org.ua> Message-ID: <20120919-072739.sv128.94073@puszcza.gnu.org.ua> Follow-up Comment #3, bug #162 (project tex4ht): I found a workaround: it is enough to add, after the span.LATEX entries from *.css: span.LATEX { position:relative; left: 0.4em; } I hope it is exempt of side effects. _______________________________________________________ Reply to this item at: _______________________________________________ Message post? via/par Puszcza http://puszcza.gnu.org.ua/ From puszcza-hackers at gnu.org.ua Wed Sep 19 10:11:03 2012 From: puszcza-hackers at gnu.org.ua (Bitouze) Date: Wed, 19 Sep 2012 08:11:03 +0000 Subject: [tex4ht] [bug #162] Extra space in html output with some predefined TeX commands In-Reply-To: <20120919-072739.sv128.94073@puszcza.gnu.org.ua> References: <20120517-093733.sv128.9801@puszcza.gnu.org.ua> <20120517-095057.sv128.90036@puszcza.gnu.org.ua> <20120905-093848.sv119.43240@puszcza.gnu.org.ua> <20120905-094415.sv119.96957@puszcza.gnu.org.ua> <20120919-072739.sv128.94073@puszcza.gnu.org.ua> Message-ID: <20120919-081103.sv128.59200@puszcza.gnu.org.ua> Follow-up Comment #4, bug #162 (project tex4ht): Well, not that good: the entire "LaTeX" word is shifted to the right and a spurious space appears at its left. Thanks to [http://edward.oconnor.cx/2007/08/tex-poshlet] a (working I hope) workaround would be: Css{.tex, .latex, .tex sub, .latex sub { font-size: 1em; } } Css{.tex sub, .latex sub, .latex sup { text-transform: uppercase; } } Css{.latex sub, .tex sub { vertical-align: -0.25em; margin-left: -0.1667em; margin-right: -0.125em; } } Css{.latex sup { font-size: 0.85em; vertical-align: 0.15em; margin-left: -0.36em; margin-right: -0.15em; } } defTeX{HCode{}THCode{}eHCode{}XHCode{}} defLaTeX{HCode{}LHCode{}aHCode{}THCode{}eHCode{}XHCode{}} _______________________________________________________ Reply to this item at: _______________________________________________ Message post? via/par Puszcza http://puszcza.gnu.org.ua/ From mr_heller at yahoo.dk Thu Sep 20 08:30:47 2012 From: mr_heller at yahoo.dk (Martin Heller) Date: Thu, 20 Sep 2012 08:30:47 +0200 Subject: [tex4ht] \autoref from hyperref with tex4ht (reborn) In-Reply-To: References: <20120904094350.4995c8d6@wanadoo.fr> <50477C3E.7090502@yahoo.dk> Message-ID: <505AB817.2020900@yahoo.dk> Radhakrishnan CV wrote, on 20-09-2012 04:10: > Dear all, > > Seems like, I have fixed the long standing nameref problems in TeX4ht. > The attached nameref.zip has two example files (both provided by > Martin) and output with all kinds of aux files for favour of your > checking. If Martin and Denis are happy with this new version, I shall > update the SVN as soon as I hear from you, inform the list and TeX.SX. > I think the text in the \autoref references at the top of Chapter 2 is not correct. When I compile martin.tex using htlatex martin.tex "html,4" I get "chapter 1", "chapter 1.1", etc. It should, as far as I can tell, be "Chapter 1", "Section 1.1", ... Here is a copy/paste from the html output: Chapter 2 River Valley Technologies Figure 1.1 chapter 1 chapter 1.1 chapter 1.1.1 chapter 1.1.1.1 Theorem 1 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: From cvr at river-valley.org Thu Sep 20 08:34:13 2012 From: cvr at river-valley.org (Radhakrishnan CV) Date: Thu, 20 Sep 2012 12:04:13 +0530 Subject: [tex4ht] \autoref from hyperref with tex4ht (reborn) In-Reply-To: <505AB817.2020900@yahoo.dk> References: <20120904094350.4995c8d6@wanadoo.fr> <50477C3E.7090502@yahoo.dk> <505AB817.2020900@yahoo.dk> Message-ID: On Thu, Sep 20, 2012 at 12:00 PM, Martin Heller wrote: [...] I think the text in the \autoref references at the top of Chapter 2 is not > correct. When I compile martin.tex using > > htlatex martin.tex "html,4" > > I get "chapter 1", "chapter 1.1", etc. It should, as far as I can tell, be > "Chapter 1", "Section 1.1", ... > > Here is a copy/paste from the html output: > Chapter 2 > River Valley Technologies Figure 1.1 > chapter 1 > chapter 1.1 > chapter 1.1.1 > chapter 1.1.1.1 > Theorem 1 > Many many thanks, you are right. I will get back soon. Best regards -- Radhakrishnan -------------- next part -------------- An HTML attachment was scrubbed... URL: From cvr at river-valley.org Thu Sep 20 08:51:37 2012 From: cvr at river-valley.org (Radhakrishnan CV) Date: Thu, 20 Sep 2012 12:21:37 +0530 Subject: [tex4ht] \autoref from hyperref with tex4ht (reborn) In-Reply-To: References: <20120904094350.4995c8d6@wanadoo.fr> <50477C3E.7090502@yahoo.dk> <505AB817.2020900@yahoo.dk> Message-ID: On Thu, Sep 20, 2012 at 12:04 PM, Radhakrishnan CV wrote: > > On Thu, Sep 20, 2012 at 12:00 PM, Martin Heller wrote: > > [...] > > I think the text in the \autoref references at the top of Chapter 2 is not >> correct. When I compile martin.tex using >> >> htlatex martin.tex "html,4" >> >> I get "chapter 1", "chapter 1.1", etc. It should, as far as I can tell, >> be "Chapter 1", "Section 1.1", ... >> >> Here is a copy/paste from the html output: >> Chapter 2 >> River Valley Technologies Figure 1.1 >> chapter 1 >> chapter 1.1 >> chapter 1.1.1 >> chapter 1.1.1.1 >> Theorem 1 >> > > > Many many thanks, you are right. I will get back soon. > Please take a look at the contents of attached archive, nameref1.zip. A screenshot of chapter 2 as it was rendered in Firefox is also attached. Best regards -- Radhakrishnan -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: nameref1.zip Type: application/zip Size: 174758 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: martin.png Type: image/png Size: 64220 bytes Desc: not available URL: From mr_heller at yahoo.dk Thu Sep 20 09:04:16 2012 From: mr_heller at yahoo.dk (Martin Heller) Date: Thu, 20 Sep 2012 09:04:16 +0200 Subject: [tex4ht] \autoref from hyperref with tex4ht (reborn) In-Reply-To: References: <20120904094350.4995c8d6@wanadoo.fr> <50477C3E.7090502@yahoo.dk> <505AB817.2020900@yahoo.dk> Message-ID: <505ABFF0.104@yahoo.dk> Radhakrishnan CV wrote, on 20-09-2012 08:51: > > > Please take a look at the contents of attached archive, nameref1.zip. > A screenshot of chapter 2 as it was rendered in Firefox is also attached. > As far as I can tell, this works correctly on my system too. Thank you for the fix! From cvr at river-valley.org Thu Sep 20 09:10:55 2012 From: cvr at river-valley.org (Radhakrishnan CV) Date: Thu, 20 Sep 2012 12:40:55 +0530 Subject: [tex4ht] \autoref from hyperref with tex4ht (reborn) In-Reply-To: <505ABFF0.104@yahoo.dk> References: <20120904094350.4995c8d6@wanadoo.fr> <50477C3E.7090502@yahoo.dk> <505AB817.2020900@yahoo.dk> <505ABFF0.104@yahoo.dk> Message-ID: On Thu, Sep 20, 2012 at 12:34 PM, Martin Heller wrote: > Radhakrishnan CV wrote, on 20-09-2012 08:51: > > >> >> Please take a look at the contents of attached archive, nameref1.zip. A >> screenshot of chapter 2 as it was rendered in Firefox is also attached. >> >> > As far as I can tell, this works correctly on my system too. > > Thank you for the fix! > Welcome. Going with commit to SVN. Best regards -- Radhakrishnan -------------- next part -------------- An HTML attachment was scrubbed... URL: From dbitouze at wanadoo.fr Thu Sep 20 16:39:11 2012 From: dbitouze at wanadoo.fr (Denis =?ISO-8859-15?B?Qml0b3V66Q==?=) Date: Thu, 20 Sep 2012 16:39:11 +0200 Subject: [tex4ht] All the compilation options in the .cfg file? Message-ID: <20120920163911.2f6f9cfb@wanadoo.fr> Hello, if I'm right, a command line as follows: htlatex "config-file,xhtml,fn-in,charset=utf-8" " -cunihtf -utf8" may be shortened in: htlatex "config-file" " -cunihtf -utf8" if config-file.cfg contains: \Preamble{xhtml,fn-in,charset=utf-8} My question is about the second set of options, namely: " -cunihtf -utf8" is it possible to also store them in the config-file.cfg file? Thanks. -- Denis From cvr at river-valley.org Fri Sep 21 06:23:26 2012 From: cvr at river-valley.org (Radhakrishnan CV) Date: Fri, 21 Sep 2012 09:53:26 +0530 Subject: [tex4ht] All the compilation options in the .cfg file? In-Reply-To: <20120920163911.2f6f9cfb@wanadoo.fr> References: <20120920163911.2f6f9cfb@wanadoo.fr> Message-ID: On Thu, Sep 20, 2012 at 8:09 PM, Denis Bitouz? wrote: > Hello, > > if I'm right, a command line as follows: > > htlatex "config-file,xhtml,fn-in,charset=utf-8" " -cunihtf -utf8" > > may be shortened in: > > htlatex "config-file" " -cunihtf -utf8" > Yes please. if config-file.cfg contains: > > \Preamble{xhtml,fn-in,charset=utf-8} > Absolutely. > My question is about the second set of options, namely: > > " -cunihtf -utf8" > > is it possible to also store them in the config-file.cfg file? > Not possible. But you can define your own htlatex like custom script (say, foolatex) which when run like foolatex will in effect do what you wanted. Here is a a source file which I use for html5 trials. You might modify to suit your requirements: \def\script{unix} \input mkht.4ht \one{new,html5,fn-in,charset=utf-8} \two{-cunihtf -utf8} \three{#1 -d/tmp/} \make{ht5} \end{document} \script{..} -- argument can be unix or bat \one{...} -- can have all options passed on to LaTeX (in your case, config-file,xhtml,fn-in charset=utf-8) \two{...} -- options passed to tex4ht binary which post-processes dvi (in your case, -cunihtf -utf8) \three{...} -- options passed to t4ht binary which generates css, images and does all other system specific stuff like moving all output to a custom directory, or execution of any shell specific commands. \make{...} -- base name for your scripts. Save the file as cmd.tex (or any name you like) and run LaTeX on cmd.tex which will produce seven script files as shown below: --- Writing file --- ht5latex.unix --- --- Writing file --- ht5tex.unix --- --- Writing file --- ht5texi.unix --- --- Writing file --- ht5context.unix --- --- Writing file --- ht5xetex.unix --- --- Writing file --- ht5xelatex.unix --- --- Writing file --- ht5mex.unix --- The names are self explanatory. Look forward to hear after your experiments. Best regards -- Radhakrishnan -------------- next part -------------- An HTML attachment was scrubbed... URL: From dbitouze at wanadoo.fr Tue Sep 25 16:04:22 2012 From: dbitouze at wanadoo.fr (Denis =?ISO-8859-15?B?Qml0b3V66Q==?=) Date: Tue, 25 Sep 2012 16:04:22 +0200 Subject: [tex4ht] All the compilation options in the .cfg file? In-Reply-To: References: <20120920163911.2f6f9cfb@wanadoo.fr> Message-ID: <20120925160422.2fa3af23@wanadoo.fr> Le vendredi 21/09/12 ? 09h53, Radhakrishnan CV a ?crit : > On Thu, Sep 20, 2012 at 8:09 PM, Denis Bitouz? > wrote: > > > Hello, > > > > if I'm right, a command line as follows: > > > > htlatex "config-file,xhtml,fn-in,charset=utf-8" " -cunihtf -utf8" > > > > may be shortened in: > > > > htlatex "config-file" " -cunihtf -utf8" > > > > Yes please. > > if config-file.cfg contains: > > > > \Preamble{xhtml,fn-in,charset=utf-8} > > > > Absolutely. OK, thanks. > > My question is about the second set of options, namely: > > > > " -cunihtf -utf8" > > > > is it possible to also store them in the config-file.cfg file? > > > > Not possible. But you can define your own htlatex like custom script > (say, foolatex) which when run like > > foolatex > > will in effect do what you wanted. > > [...] OK, many thanks for your answer. Unfortunately, I asked this question for users who I don't know and may not fell very comfortable with such a custom script. What could be nice is to extend the current way TeX4ht is working to provide a default script, say tex4htlatex, which replaces all the successive options with a single option for specifying a config file where the \one, \two, \three commands could be specified. > Look forward to hear after your experiments. I'll inform you about my progresses :) Thank you very much! Best regards. -- Denis From dbitouze at wanadoo.fr Tue Sep 25 19:01:52 2012 From: dbitouze at wanadoo.fr (Denis =?ISO-8859-15?B?Qml0b3V66Q==?=) Date: Tue, 25 Sep 2012 19:01:52 +0200 Subject: [tex4ht] latexmk instead of 3 systematic compilations? In-Reply-To: <20120917203308.19a0353f@wanadoo.fr> References: <20120917164504.2f5c3bfd@wanadoo.fr> <20120917184045.16cdd49e@wanadoo.fr> <20120917203308.19a0353f@wanadoo.fr> Message-ID: <20120925190152.5d1b3629@wanadoo.fr> Le lundi 17/09/12 ? 20h33, Denis Bitouz? a ?crit : > Maybe I could contact John Collins to provide him this information > and to ask him to make Latexmk aware of TeX4Ht Before that, I'll try to investigate a bit. For instance, the htlatex script contains (on my Linux box) 3 times: latex $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expa ndafter\Link\fi}\def\Link#1.a.b.c.{\g at addto@macro\@documentclasshook{\RequirePackage[#1,html]{tex4ht}}\let\HCode\documentstyle\def\documents tyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,html}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\ documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1 followed by: tex4ht -f/$1 -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3 t4ht -f/$1 $4 ## -d~/WWW/temp/ -m644 Because of the '$5', I guess htlatex accepts from 1 to 5 parameters. I was told that, on Windows, the htlatex synopsis is: htlatex [options] file.tex [params1] [params2] [params3] Here I see 5 possible parameters but, the man page of htlatex on Linux is (http://linux.die.net/man/1/tex4ht): htlatex file [options1] [options2] [options3] so I'm not sure what mean all of these $1 to $5 parameters: any help is welcome. Furthermore: $ latex -help Usage: pdftex [OPTION]... [TEXNAME[.tex]] [COMMANDS] or: pdftex [OPTION]... \FIRST-LINE or: pdftex [OPTION]... &FMT ARGS so I'm not sure of what is what in the very long line: latex $5 '\makeatletter... '$2'.a.b.c.\input ' $1 So any extra help is welcome :) Nevertheless, I was a bit successful with the following myhtlatex script: ######################################################### #!/bin/sh latexmk $1 tex4ht -f/$1 -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3 t4ht -f/$1 $4 ## -d~/WWW/temp/ -m644 ######################################################### and the following .latexmkrc file (no breaklines after neither "latex", "\csname" nor ".a.b.c.", but spaces instead): ######################################################### $pdf_mode = 0; $quote_filenames = 0; $latex = q(latex '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g at addto@macro\@documentclasshook{\RequirePackage[#1,html]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,html}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode .a.b.c. \input ' %B); ######################################################### Some remarks about the previous file: 1. I suppose no config file (empty string before ".a.b.c") 2. Because of the already simple and double quotes, I needed to use 'quoting without quotes' q(...) perl notation. I tested this with the following test.tex file: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \documentclass{article} \begin{document} Test. \end{document} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% This is not that bad because after some runs of: ./myhtlatex test only 2 latex compilations instead of 3 are executed :) In fact, only 1 latex compilation should be executed if nothing changed in the .tex file but, when running the previous command: 1. every latex compilation writes in the test.tmp file: \def \Jobname{test} 2. each of tex4ht and t4ht compilations write something in the same test.tmp file (resp. "xx" and "/* css.sty */") So, when ./myhtlatex is run once again, the command: latexmk test is run, so a first latex compilation is executed, and Latexmk sees that test.tmp has changed so it does a rerun of latex :( -- Denis