Hi Ross and Nasser and community,
Thanks first of all for your help!
@Ross - the idea with the symbolic links would be fine, but the
generated files are not on the web, but should be machine independent
and be accessible on any machine independent of the web, which is why
all paths have to be relative.
I have effectively the same problem as addressed by the following 2 threads:
http://www.mail-archive.com/[email protected]/msg01914.html
http://www.mail-archive.com/[email protected]/msg01915.html
The second answer with modifying $COPY_GRAPHICS=1 in graphicx.perl has
helped me a lot. The files are now copied to the html output directory
and are referenced relatively :-) . This only works, however, if the
path to the images are entered directly in the includegrpahics command:
\includegraphics{./mypics/install_lic_webfront_mypics}
If I try and access the files via either the $TEXINPUTS (which
previously worked with my eps files) or with the
\graphicspath{{./mypics/}} then the translator tries to convert the
pictures and the converted picture (conversion is not necessary; it's
only needs to be copied) is a corrupted png :(((((
If I could just get the $TEXINPUTS or \graphicspath to work then things
would be great. Do you have any other ideas? Or has anyone else had this
problem?
Thanks loads in advance,
Mark
Hi All,
I have managed to generate html files using the png files as input, but
only when the png files were located in the same directory as the tex
files.
The way I include my png files is as follows
\usepackage{graphicx}
\begin{document}
\includegraphics[]{file.png}
So, if the file.png is NOT in the same folder as the tex file, you could
change the above to
\includegraphics[]{full_path_name_of_file.png}
You should be able to use either relative file path or absolute file path in
the above.
I want to access my png files by adding the respective directories via the
$TEXINPUTS variable.
I do not think $TEXINPUTS is meant to be used to locate where the images
are. I think it is used by the latex engine to help it find where the latex
packages are if they can't be found in the standard locations.
$TEXINPUTS might also used to locate latex input files which are included
using \input{file} in the main latex document. But I am not sure about that.
The point is, I do not think it is used to tell \includegraphics[] where the
images are.
The other question I had is to do with the paths to the images. When the
png files are parallel to tex files then the translator works fine with
the exception that the paths to the images which are included are
absolute, e.g in the generated html the pictures are referenced as
follows:
node2.html:
SRC="/scratch/simdoc_build/pdflatex_8904/develop/extern/install/all_in_one//install_lic_install_configure_ini_tab.png"
Is it possible somehow to tell the translator that the paths should be
relative?
Relative should work. may be try this:
\usepackage{graphicx}
\begin{document}
\includegraphics[]{..\..\file.png}
The best solution for me would be if the translator copied the png files
directly into the directory where the html is generated and they were
given the names img1.png, img2.png etc.
This is what it does in my case. it copies all the images to one folder
where the final .html is. This is the command I use:
latex2html -no_reuse -subdir -local_icons foo.tex
--Nasser
_______________________________________________
latex2html mailing list
[email protected]
http://tug.org/mailman/listinfo/latex2html
.
--- Begin Message ---
Hello Mark,
On 21/01/2010, at 6:27 AM, Mark Duke wrote:
> Hi All,
>
> I use pdflatex and latex2html to convert my tex files into pdf and
> html . My goal is to use exactly the same tex files for both
> programs and to keep the use of the environments {latexonly} and
> {htmlonly} to a minimum. I use a lot of screenshots which are in
> png (fine for pdflatex) format to avoid having to convert them
> during the latexh2mtl run. I previously used eps files, but the
> conversion quality was not great and seeing as I have them in png
> format then there is no need to convert them during a latex2html
> run. I have managed to generate html files using the png files as
> input, but only when the png files were located in the same
> directory as the tex files. I want to access my png files by adding
> the respective directories via the $TEXINPUTS variable.
Have you thought about using symbolic links to your images?
Do a 1st run of LaTeX2HTML, using the -no_images switch so that
it creates the target directory, but does not generate any images.
Then go into that directory and create symbolic links to all of
your PNG graphics.
Now your \htmladdimg commands can use relative links to the images,
without worrying about whether they will be accessible on the web.
> If the files are accessed in this way, i.e. not in the same
> directory as the tex files, then latex2html tries to convert them
> and fails. Does anyone know why it tries to convert them? With eps
> files they were converted to png's with names such as img1.png,
> img2.png etc. Is it possible to access png files via the $TEXINPUTS
> or do they have to be placed into the directory where the tex files
> are located?
>
> The other question I had is to do with the paths to the images.
> When the png files are parallel to tex files then the translator
> works fine with the exception that the paths to the images which
> are included are absolute, e.g in the generated html the pictures
> are referenced as follows:
> node2.html: SRC="/scratch/simdoc_build/pdflatex_8904/develop/extern/
> install/all_in_one//install_lic_install_configure_ini_tab.png"
>
> Is it possible somehow to tell the translator that the paths should
> be relative? Is there a latex2html option which I haven't seen? The
> icons (relative path in the variable $ICONSERVER) and converted
> equations are accessed how I want them via relative paths, e.g.:
> node2.html: SRC="../icons/crossref.png"></A>.
> node2.html: SRC="img1.png"
>
> The best solution for me would be if the translator copied the png
> files directly into the directory where the html is generated
Using symbolic links achieves the same thing, without making 2nd
copies of the files.
> and they were given the names img1.png, img2.png etc. This would be
> similar to how the translator behaves with eps files, but obviously
> without having to convert them from eps to png using the tool
> 'pstoimg'. Do you know if this is possible? The translator I am
> using is not the newest, 'This is LaTeX2HTML Version 2K.1beta
> (1.62)'. Maybe a newer translator has this functionality?
>
> Thank you very much for your help.
>
> Best regards,
>
> Mark
Hope this helps,
Ross
------------------------------------------------------------------------
Ross Moore [email protected]
Mathematics Department office: E7A-419
Macquarie University tel: +61 (0)2 9850 8955
Sydney, Australia 2109 fax: +61 (0)2 9850 8114
------------------------------------------------------------------------
.
--- End Message ---
_______________________________________________
latex2html mailing list
[email protected]
http://tug.org/mailman/listinfo/latex2html