[l2h] Re: General HTML generation questions
jo_latex2html@schlossers.org
jo_latex2html@schlossers.org
5 Jun 2002 11:27:26 -0000
First of all thanks a lot for the quick and valuable answers!
>> 1. [... TARGET=_blank only with frame option, which procudes color
background... ]
>> - either could define the target frame without generating frames.
>> Maybe redefine [...] to \htmladdnormallink[target]{caption}{url}
>> - or have the option of no background color generated in frame
mode.
> Please send an example of the coding that you are using.
> This could be quite delicate.
Sure. Consider a document
\documentclass{article}
\usepackage{html}
\HTMLset{target}{\_blank}
\begin{document}
An put a \htmladdnormallink{Link here}{http://foo.com/bar.html}
\end{document}
The HTMLset only works when calling e.g.
latex2html -html_version 4.0,frame mydoc.tex
This produces in the content file (mydoc_ct.html):
<BODY bgcolor="#ffffff" text="#000000" link="#9944EE" vlink="#0000ff"
alink="#00ff00">
This arises the issue that it will be very difficult to change colors to
something different or even omit specifying the colors. It would then be
better to have a <body class="contentframe"> in each of the frames' HTML
files and define the appropriate styles in the CSS file. Remember that
bgcolor is rated as "deprecated", so it should not be used for HTML
4.0.
But for the original problem, the link target, the ideal solution would
look like:
\documentclass{article}
\usepackage{html}
\begin{document}
An put a \htmladdnormallink[_blank]{Link
here}{http://foo.com/bar.html}
\end{document}
or
An put a \htmladdnormallink[target=_blank]{Link
here}{http://foo.com/bar.html}
Of course, I am aware that the response to the second possibility will
be that I shoud use the HTMLcode command. :-)
Anyhow, these are only suggestions...
>> 2. [-noaddress to include <hr> control=]
> Worth a look.
> THe final <hr> could be made dependent upon an existing Perl
variable.
Agree. Thanks for this.
>> 3. Paragraphs have only <P> but not </P>, [...]
> [...]
> The best solution is to post-process your documents with HTMLtidy.
> You can make this automatic by setting an appropriate system command
> within the &post_postprocess subroutine, or with the
> $HTML_VALIDATOR variable.
> Please experiment and report your results.
I did it with HTMLtidy, which works well, thanks for the advice. So
there is no need to do anything to l2h here.
So I recommend everyone to have 'tidy -m' in his HTML_VALIDATOR
variable.
>> 4. [\nameref-kind of links?]
> Use \htmlref or \hyperref for this.
Thanks a lot. I do not know why I oversaw this in the manual. Sorry.
> > 5. Version 1.68 does not produce graphics under my Win2k, while
1.67
> > does perfectly.
> Example please.
> If only imported graphics (\includegraphics or \epsfig... )
> are affected, then try *removing* the -E option from calls to
dvips.
> Look at the $DVIPS and $DVIPSOPT variables.
Only imported graphics are affected, correct. Leaving away -E makes no
difference. I played around a little more and found the following, with
myfig.eps being a EPS file.
\documentclass{article}
\usepackage{graphicx}
\usepackage{calc}
\begin{document}
$\rightarrow$
\includegraphics[width=\linewidth,keepaspectratio=true]{myfig}
\end{document}
With 1.67, produces everything as expected.
With 1.68 it logs:
*** processing 2 images ***
Generating postscript images using dvips ...
This is dvips(k) 5.86 Copyright 1999 Radical Eye Software
(www.radicaleye.com)
' TeX output 2002.06.05:1306' -> C:\TEMP\l2h566\image
(-> C:\TEMP\l2h566\image001)
<tex.pro><alt-rule.pro><texc.pro><texps.pro>
<special.pro><color.pro><cmsy10.pfb>[1]
Converting image #2
pstoimg.bat: Error: Cannot find file "C:\TEMP\l2h566\image002.ps": No
such file
or directory
Error while converting image
Error: Cannot read 'img2.gif': No such file or directory
Converting image #1
Doing section links .....
Copying navigation icons ...
*********** WARNINGS ***********
No implementation found for style `calc'
Failed to convert image C:\TEMP\l2h566\image002.ps
And now the crazy thing: If I remove the \usepackage{calc}, ver1.68
converts the image, but with this image shows a box on the left side of
the real content, and in the box there is the text
keepaspectratiokeepaspectratio.
I put all examples on the web. Prefix is
http://www.fh-augsburg.de/~kids/
See test_167.html, test_168.html, test_168_wo_calc.html. The sources are
test_graph.tex and something.eps. The complete package is in
test_graph.tgz
Finally, if I have \usepackage{calc} in and remove the $\rightarrow$,
ver1.68 says
*** LaTeX produced no output ***
*** no new images can be created
*** Examine the images.log file.
and even shows no error besides not creating the image.
Again, this is Win2k with netpbm-9.25, dvips(k) 5.86 Copyright 1999
Radical Eye Software, gs 7.05.
Thanks a lot for any advice
Joachim