[l2h] "variable" commands in latex2html
andiw@uk2.net
andiw@uk2.net
Sun, 26 May 2002 19:09:13 GMT
Hello Ross,
I'm not sure that you received my mail sent on April 23 and May 6, so I'll just
send it again. I didn't send it to the list because your reply wasn't on the
list either, but now I suspect that mailing to you directly doesn't work, so I
try it once again on the list.
Greetings,
Andi
====
thank you for your quick reply. Unfortunately I still didn't get it to work. I
tried it in three different ways (in order of descending flexibility and thus
descending degree of preferation):
1. use a command inside the \htmlimage that yields text depending on the
current state of a counter so that I could use \htmlimage{\alternatingtext}.
This doesn't work because the argument to \htmlimage (seems to me) is not
really executed. If it is a command defined with \newcommand{}, it is simply
replaced by its definition which in turn isn't executed; if it is not defined
with \newcommand{} (but in a .perl extension file), simply the command name an
some brackets are stripped and what remains are the parameters. (when used in
normal text, the \alternatingtext command produces the expected output)
2. use a command inside the figure environment that "calls" \htmlimage with the
respective parameter. Doesn't work because \htmlimage (as seems to me) isn't
really a command (the sub do_cmd_htmlimage just prints that it should only be
used in figure environments) but is explicitly scanned for in the latex2html
main script. So I can't call it from my command.
3. use a command that produces the complete figure environment. I don't know
exactly how to do this. I tried to write a sub, say
do_cmd_alternatinghtmlimage, which should create a figure. Since I can't use
latex in the perl script, I guessed I'd have to call do_env_figure directly, so
I captured the parameters of do_env_figure from a standard call and found it
was something like "\n\n\\htmlimage<<25>>blabla<<25>>\n\\includegraphics[bla]
<<26>>blabla<<26>>\n". But if I just call do_env_figure with this string as
parameter, the produced images.tex file contains "\begin{}" instead of "\begin
{figure}".
So I think maybe I have to call some "higher level" function than
do_env_figure, but can you tell me which one? Or am I completely wrong? But can
it be so hard to do this (for one having but a vague idea of how latex2html
really processes a document :-) )?
> Use LaTeX commands to advance the counter
> at each figure that needs to be aligned.
> (Presumably you do something like this anyway, in LaTeX;
> or do you use boolean \if.... \...true \...false macros?)
In the LaTeX (print) version I don't need alternating images since it contains
only few of the images. If you'd like to see the documents, they're available
on www.andreaswitzel.de via the first two links (unfortunately in German...).
On some HTML pages there are many fotographs at the bottom of the page (and
there are more to come) which would fit into the text if they were placed
alternatingly...
I'd be really happy if you could help me further!
Best regards,
Andi
----------------------------------------------------------
This message was sent using http://uk2.net
NEWS - CHEAPEST DEDICATED SERVERS IN THE WORLD - 25/month
FREE UK DIAL 0845 609 1370 - username uk2: - password: uk2
UK's FREE Domains, FREE Dialup, FREE Webdesign, FREE email