[l2h] Requesting sample code used in a .tex file for including animated figures, presently as .gif files, in output .pdf and/or .html files/file, et cetera

Pat Somerville l_pat_s at hotmail.com
Wed Oct 31 23:37:42 CET 2012


Thanks, Nasser M. Abbasi, for kindly taking the time to promptly send me 
your advice!
Your advice was basically good for me! I found that in my .tex file I could
put a set of
commands of the form

\begin{htmlonly}
\includegraphics[scale=0.5]{file.gif}
\end{htmlonly}

within a LaTeX figure environment that includes the early command
\begin{figure} and the later command \end{figure}.  I adjusted [scale=1.0]
some with values of "scale" less than one for the .gif figures I was using.
A simplification in my case was that I was able to use the animated .gif
files available to me as the final, single, .gif files in each case.  I
think at least one of them may have contained tens of frames, based on what
I saw in the Gnu's Not Unix (GNU) Image Manipulation Program (GIMP).

The remaining challenge for me in having the output file made was that in
the
output, .html file produced via latex .... and latex2html .... commands on
my .tex file that the animations either sometimes or nearly always did not
have time to be completed before they were automatically restarted.  The
animations appear to have been set to continually be run and rerun as long
as the .html file containing them was open in my Konqueror-4.8.5, release-2,
Web browser; and
no clicking by me was necessary to start either of those two animations.
This problem did not occur, however, in the Mozilla Firefox-16.0.1 Web
browser.  From http://bugs.kde.org/show_bug.cgi?id=237330 on the Internet as
of February 23, 2012 this was a problem in Konqueror and/or the K Desktop
Environment (KDE) versions 4.6.2, 4.6.5, and 4.7.00.   There a route to the
trouble was reported as: "The problem is that whenever an image has a
width/height definition which is different from the image's original size,
the animation is not done," with me slightly editing the punctuation edits
in that quotation.  But in my case I could report that the animation was
partly completed after having made a size change on a .gif figure. Via
Konqueror 4.8.5, release-2's "Settings, Configure Konqueror, General,
Default Web browser engine" I discovered that I was already using the WebKit
Web-browser engine in Konqueor 4.8.5, release 2; yet the problem with .gif
animations not being completed existed.  So from the quoted advice I forced
LaTeX and LaTeX2HTML to work with versions of the .gif files in which their
physical sizes had not been changed; to me that meant including [scale=1.0]
in my .tex file, just as you wrote me.  Gratefully the result was good doing
that in the output, .html file when viewed in Konqueror!  Apparently some
default resizing of one or two of .gif files was accomplished by latex or
latex2html because the size of one of those .gif files in the Konqueror Web
browser on my computer screen was certainly less than the 25-inch width
"reported" for it by GIMP.  So thanks, Nasser M. Abbasi.  Your advice was
simple and excellent concerning the production of a .html file containing
animated .gif files!

Next,  how should I produce animations in .gif files in a  Portable Document
Format (.pdf) output file, starting from a .tex file?  I discovered that I
probably have pdftex and pdflatex in my installation of TeX Live in an
openSUSE-12.2, Linux operating system.  So I tried entering commands of the
form "pdftex MyFile.tex" and "pdflatex MyFile.tex" on my .tex file.  The
result with pdftex was an "objection" to at least the LaTeX command
\documentstyle[a4paper,12pt]{article}.  The result using pdflatex was that a
.pdf output file with a name of the form MyFile.pdf was produced, in
addition to some conversions of some figure files which apparently occurred.
On viewing the output, .pdf file in I think each of the programs Okular and
Adobe Reader 9.5.1, the animated figures could not be found in it.  So
please inform me how to arrange my .tex file referencing animated .gif (or
perhaps .png)  files so that by executing pdftex or pdflatex or some other
program on it an output, .pdf file containing animated figures can be
produced.

Pat

--------------------------------------------------
From: "Nasser M. Abbasi" <nma at 12000.org>
Sent: Wednesday, October 31, 2012 9:13 AM
To: <latex2html at tug.org>
Subject: Re: [l2h] Requesting sample code used in a .tex file for including
animated figures, presently as .gif files, in output .pdf and/or .html
files/file, et cetera

> On 10/31/2012 2:59 AM, Pat Somerville wrote:
>
> Pat;
>
> This is how I add animated gif files to my Latex document for
> use with l2h. I do the conversion on windows, but the resulting
> animated gif file can of course be used on windows on Linux with
> l2h
>
> 1) Tool needed on windows (free)
>    - UNFreeze to convert the GIF files to animated gif.
> 2) Use the above program to convert the set of gif file to one
> animated gif file, say animation.gif
>
> in Latex, do the line
>
> -----------------------------
> \documentclass[12pt]{article}
> \usepackage{graphicx}
> \usepackage{html}
>
> \begin{document}
> \begin{htmlonly}
> \includegraphics[scale=1]{animation.gif}
> \end{htmlonly}
> \end{document}
> --------------------------------------
>
> If the files are .png files, then first convert them to
> gif files and then do the above. To covert set of png files
> to set of gif files, I use free program call EazyGraphics
> converter to convert PNG to GIF.
>
> --Nasser
>
>
>
> _______________________________________________
> latex2html mailing list
> latex2html at tug.org
> http://tug.org/mailman/listinfo/latex2html
> 


More information about the latex2html mailing list