[tex-live] TeX4ht does not work properly with default TeXLive Windows install

George N. White III gnwiii at gmail.com
Wed Aug 25 17:56:51 CEST 2010


On Wed, Aug 25, 2010 at 4:00 AM, Beuthe, Thomas <beuthet at aecl.ca> wrote:

> UNRESTRICTED | ILLIMITÉ
>
> Since I am sending this to both the TeX4ht and the TeXLive lists, I will summarize.
>
> On installation of TeXLive, I did a "hello world" test of TeX4ht,
> which did not work properly when executing htlatex test.

It needs to made clear when parts of TeX Live are not "ready-to-run" without
additional configuration.   Maybe there could be dummy packages that serve
to highlight the configuration steps needed to use ConTeXt MkIV and tex4ht.


> The all files were generated properly EXCEPT the .png files.
> After some deliberation on the TeX4ht mailing and some helpful
> hints from various participants, I found out that what was
> missing was the presence of ImageMagic and Ghostscript, as outline below...
>
> As suggested, I downloaded and installed ImageMagick,
> and made sure the install is in the path using the suggested installation test.
>
> Re-running with the original tex4ht.env, or even modifying it as suggested
> did not produce the required png files.
>
> Then I noticed that ImageMagick uses ghostscript.
> I had ghostscript installed, but it was not in the path by default in Windows,
> so I added it, and also made sure that I had the latest version of ghostscript loaded,
> since my relatively old version was not able to produce png files,
> and re-ran, and lo and behold, there were the required .png files,
> just a pretty as can be.  Everything now displayed as expected.

You can set the path for gsXX.exe in tex4ht.env, but that won't help
ImageMagick's "convert" find gs.

> The conclusion: TeX4ht requires the installation of ImageMagic, which in turn
> requires the installation of ghostscript, both of which are not available
> by default on a Windows machine, and which are not installed by default
> when TeXLive is installed.  Both are required to be on the path, which may
> require some manual tweaking of the path for ghostscript.
>
> The upshot is that, TeX4ht does not work properly by default when TeXLive is installed
> on a windows system.  I assume that virtually all *nix systems have both
> ImageMagic and ghostscript/ghostview installed by default, so there never was a problem
> on this class of system, but I have trouble believing that I am the first or only person
> to try using TeX4ht on a windows system.  Were there never any complaints about this?
>
> Is there any way around this?

If the tools were configured to use 'tlgs' then dummy packages could install
trivial wrappers of the form:

$ cat /usr/bin/texlive/2020/bin/<arch>/tlgs

#! /bin/sh
# tlgs -- wrapper to notify users that they need to install gs or
# edit this script to set "realgs" as required
realgs=$(which gs)
if [ "${realgs}X" == "X" ] ; then
  echo 'Please install ghostscript or edit the tlgs script to set the
value of realgs.'
  exit 1
else
  exec "$realgs" "$@"
fi



> I'm not sure, but the maintainers of TeXLive and TeX4ht might want to discuss...

There have been discussions in the past, and ghostscript has been
included in some
windows distros, including MiKTeX, where you see people encountering problems
because they have a .ps or .pdf file that works with a current gs but
not the older
version provided in a perhaps old MiKTeX.

MacTeX does provide ghostscript, and calls it 'mgs'.

There is nothing to prevent repackaging CTAN TeXLive for Windows to include
ghostscript and ImageMagick.

Cygwin or a VM running linux allow Windows machines to run TeX Live with
3rd party tools.

> In any case, I'm just as happy as can be that I know what the problem is
> and can go off in a corner and play around with TeX4ht!
>
> Thanks for your help everyone!
>
> Thomas
>
>
> CONFIDENTIAL AND PRIVILEGED INFORMATION NOTICE
>
> This e-mail, and any attachments, may contain information that
> is confidential, subject to copyright, or exempt from disclosure.
> Any unauthorized review, disclosure, retransmission,
> dissemination or other use of or reliance on this information
> may be unlawful and is strictly prohibited.
>
> AVIS D'INFORMATION CONFIDENTIELLE ET PRIVILÉGIÉE
>
> Le présent courriel, et toute pièce jointe, peut contenir de
> l'information qui est confidentielle, régie par les droits
> d'auteur, ou interdite de divulgation. Tout examen,
> divulgation, retransmission, diffusion ou autres utilisations
> non autorisées de l'information ou dépendance non autorisée
> envers celle-ci peut être illégale et est strictement interdite.
>
>
>



-- 
George N. White III <aa056 at chebucto.ns.ca>
Head of St. Margarets Bay, Nova Scotia



More information about the tex-live mailing list