[texhax] puzzling conversion to html

Thomas Schneider schneidt at mail.nih.gov
Fri Jun 28 01:38:44 CEST 2013



I'm trying to use htlatex (ie TeX4ht) to convert one of my papers to
html and have run into a very weird effect on Mac OS X 10.7.5.

I make a very simple LaTeX file and can convert it just fine UNLESS it
is named 'primer'.  In that case it fails.  The failure is that it
thinks the primer file is LaTeX 2.09 and it does:

          Entering LaTeX 2.09 COMPATIBILITY MODE
    !!WARNING!!    !!WARNING!!    !!WARNING!!    !!WARNING!!

I am getting this text from the primer.log file.  In the log file this
is eventually followed by a crash:

 l.22 --- TeX4ht warning --- \Link{tk-1}? ---
! TeX capacity exceeded, sorry [grouping levels=255].

The web page produced, primer.html, is blank (it contains characters but
shows up as an empty web page when opened in a SeaMonkey browser).

Using EXACTLY the same file but either named 'a.tex' or 'c.tex' ... it
works fine does not go into LaTeX 2.09 Compatibility mode and the web
page shows up the text as it should.

So for some reason the word 'primer' is special.  The weird part is that
the <title> of the blank primer.html page is:

   <head><title>Information Theory Primer</title>

I do have a paper with that title but it is NOT in the same directory.
Those characters are not in my environment (env) nor in my alias list.
Yet somehow htlatex is finding it and (also) putting it into the
primer.xref file:

\:CrossWord{TITLE+}{Information Theory Primer}{1}%

How and how do I prevent htlatex from finding this in my environment?

Here's a simple script that demonstrates the effects:

#!/bin/tcsh -f
#(ie run the tshell on this but don't read the .cshrc or .tcshrc)

echo version = 1.00 of mkph 2013 Jun 27
# 2013 Jun 27, 1.00: origin 

cat > a.tex << EOF
tiny example

cp a.tex c.tex
cp a.tex primer.tex

foreach paper (a primer c)
   htlatex ${paper}.tex "html,2,info"
   open ${paper}.html
   grep WARNING ${paper}.log
   sleep 2

and here's one to clean up the files generated:

#!/bin/tcsh -f
#(ie run the tshell on this but don't read the .cshrc or .tcshrc)

echo version = 1.00 of cleanit 2013 Jun 27
# 2013 Jun 27, 1.00: origin 

foreach name (a c primer)

rm -f ${name}.4ct
rm -f ${name}.4tc
rm -f ${name}.aux
rm -f ${name}.css
rm -f ${name}.dvi
rm -f ${name}.html
rm -f ${name}.idv
rm -f ${name}.lg
rm -f ${name}.log
rm -f ${name}.tex
rm -f ${name}.tmp
rm -f ${name}.xref




  Thomas D. Schneider, Ph.D.
  Senior Investigator
  National Institutes of Health
  National Cancer Institute
  Center for Cancer Research
  Gene Regulation and Chromosome Biology Laboratory
  Molecular Information Theory Group
  Frederick, Maryland  21702-1201
  schneidt at mail.nih.gov
  http://schneider.ncifcrf.gov/(current link)
  http://alum.mit.edu/www/toms (permanent link)

More information about the texhax mailing list