Re: [l2h] Nesting amsmath constructs align and cases causes infinite loop

2014-08-22 Thread Matthew Saltzman
I can confirm that this patch does seem to take care of the problem.
Thanks very much for your help.

On Tue, 2014-08-19 at 20:12 +0900, Shigeharu TAKENO wrote: 
 shige 08/19 2014
 
 
 | From: Matthew Saltzman m...@clemson.edu
 | To: sh...@iee.niit.ac.jp sh...@iee.niit.ac.jp
 | CC: latex2html@tug.org latex2html@tug.org
 | Subject: Re: [l2h] Nesting amsmath constructs align and cases causes
 |  infinite loop
 =
 |  It may workaround your problem.
 | 
 | It does indeed solve the problem.  Is it the right solution or just a
 | workaround?
 
 I find it may be a bug of versions/math.pl. Please apply the 
 patch below.
 
 - From here (patch for math.pl) -
 --- versions/math.pl.ORG 2004-01-01 15:15:01.0 +0900
 +++ versions/math.pl 2014-08-19 20:02:50.828761000 +0900
 @@ -1432,6 +1432,7 @@
 while ($pre_test =~ s/(($O|$OP)\d+($C|$CP))(.*)\1/$4/) {};
 $use_all = 1 if ($pre_test=~s/($O|$OP)\d+($C|$CP)//);
 if (!$use_all) {
 +   $pre_test = $pre_text;
 while ($pre_test =~ 
 s/\\begin(($O|$OP)\d+($C|$CP))(.*)\\end\1/$4/){};
 $use_all = 1 if 
 ($pre_test=~s/\\(begin|end)($O|$OP)\d+($C|$CP)//);
 };
 - To here (patch for math.pl) -
 
 ++
  Shigeharu TAKENO NIigata Institute of Technology
kashiwazaki,Niigata 945-1195 JAPAN
  sh...@iee.niit.ac.jp   TEL(FAX): +81-257-22-8161
 ++

-- 
Matthew Saltzman
Clemson University Math Sciences
mjs AT clemson DOT edu

___
latex2html mailing list
latex2html@tug.org
http://tug.org/mailman/listinfo/latex2html


Re: [l2h] Nesting amsmath constructs align and cases causes infinite loop

2014-08-18 Thread Matthew Saltzman
On Fri, 2014-08-15 at 19:29 +0900, Shigeharu TAKENO wrote: 
 shige 08/15 2014
 
 
 Matthew Saltzman m...@clemson.edu wrote:
 | Using latex2html-2012-4.fc20.noarch on Fedora 20 Linux with
 | texlive-2013-5.20131226_r32488.fc20.x86_64, the following file compiles
 | with latex (and looks fine as a DVI) or with pdflatex (and looks fine as
 | a PDF), but fails to compile with latex2html.
 =
 | Any suggestions?
 
 Try to use the option -html_version 4.0,math: 
 
  latex2html -html_version 4.0,math file.tex
 
 It may workaround your problem.

It does indeed solve the problem.  Is it the right solution or just a
workaround?

Thanks!

 
 ++
  Shigeharu TAKENO NIigata Institute of Technology
kashiwazaki,Niigata 945-1195 JAPAN
  sh...@iee.niit.ac.jp   TEL(FAX): +81-257-22-8161
 ++

-- 
Matthew Saltzman
Clemson University Math Sciences
mjs AT clemson DOT edu

___
latex2html mailing list
latex2html@tug.org
http://tug.org/mailman/listinfo/latex2html


Re: [l2h] Nesting amsmath constructs align and cases causes infinite loop

2014-08-13 Thread Matthew Saltzman
On Wed, 2014-08-13 at 17:16 -0400, Matthew Saltzman wrote: 
 Using latex2html-2012-4.fc20.noarch on Fedora 20 Linux with
 texlive-2013-5.20131226_r32488.fc20.x86_64, the following file compiles
 with latex (and looks fine as a DVI) or with pdflatex (and looks fine as
 a PDF), but fails to compile with latex2html.
[...]

Also fails when nesting cases in an eqnarray, but works when nesting
cases in an array in an equation (but then I can't number the individual
equations).
-- 
Matthew Saltzman
Clemson University Math Sciences
mjs AT clemson DOT edu

___
latex2html mailing list
latex2html@tug.org
http://tug.org/mailman/listinfo/latex2html


Re: [l2h] Nesting amsmath constructs align and cases causes infinite loop

2014-08-13 Thread Julius Smith
I get the same behavior in my Mac OS environment.  The failure is 
noted in images.log but not in the console printout:


! Undefined control sequence.
\lthtmlindisplaymathZ -\egroup \centerinlinemath
  \lthtmllogmath 
\lthtmlsetm...

l.162 \lthtmlindisplaymathZ


I have no idea how it's happening, but images.tex contains a 
definition only for \centerinlinemathS:


\def\centerinlinemathS{%
  \dimen1=\ifdim\ht\sizebox\dp\sizebox \dp\sizebox\else\ht\sizebox\fi
  \advance\dimen1by.5pt \vrule width0pt height\dimen1 depth\dimen1
 \dp\sizebox=\dimen1\ht\sizebox=\dimen1\relax}

while latex2html clearly wants to emit the desired definition:

\\def\\centerinlinemath{%\n .
  \\dimen1=\\ifdim\\ht\\sizebox\\dp\\sizebox 
\\dp\\sizebox\\else\\ht\\sizebox\\fi\n .
  \\advance\\dimen1by.5pt \\vrule width0pt height\\dimen1 
depth\\dimen1 \n.

 \\dp\\sizebox=\\dimen1\\ht\\sizebox=\\dimen1\\relax}\n\n .

Where is that 'S' coming from?!?

At 02:16 PM 8/13/2014, Matthew Saltzman wrote:

Using latex2html-2012-4.fc20.noarch on Fedora 20 Linux with
texlive-2013-5.20131226_r32488.fc20.x86_64, the following file compiles
with latex (and looks fine as a DVI) or with pdflatex (and looks fine as
a PDF), but fails to compile with latex2html.

\documentclass{article}
\usepackage{amsmath}
\usepackage{html}

\begin{document}

\mbox{}
\begin{align}
  v_j =
  \begin{cases}
1  \text{if this happens} \\
0  \text{otherwise}
  \end{cases}
\end{align}

\end{document}

The tail of the output when it hangs is:

Writing image file ...

This is pdfTeX, Version 3.1415926-2.6-1.40.14 (TeX Live 2014/dev)
 restricted \write18 enabled.
entering extended mode
(./images.tex
LaTeX2e 2011/06/27
Babel 3.9h and hyphenation patterns for 2 languages loaded.

[hangs here consuming 100% of a cpu]

^C! Interruption.
to be read again
   \vfill
l.163 \lthtmlcheckvsize
   \clearpage}

LaTeX2HTML shutting down.

Any suggestions?

TIA.

--
Matthew Saltzman
Clemson University Math Sciences
mjs AT clemson DOT edu

___
latex2html mailing list
latex2html@tug.org
http://tug.org/mailman/listinfo/latex2html



Julius O. Smith III j...@ccrma.stanford.edu
Professor of Music and, by courtesy, Electrical Engineering
CCRMA, Stanford University
http://ccrma.stanford.edu/~jos/  ___
latex2html mailing list
latex2html@tug.org
http://tug.org/mailman/listinfo/latex2html