exit upgrade

TeX4ht Upgrading

The following instructions describe how TeX4ht can be upgraded employing Unix conventions. Apply only the steps that pertain for the outdated parts of the TeX4ht environment.

Note. The target directory paths in the following instructions might differ from those in your platform. If that is the case, adjust the paths in the instructions to match the ones in your machine.

1. Create a file test.tex in a work directory:
   \documentclass{article}
   \begin{document}
   Hello \(alpha\)
   \end{document}

2. Create a new temporary directory, download tex4ht.zip to that directory, and uncompress the file.

3. [Configuration files] Move the files from
   texmf/tex/generic/tex4ht/*

   to

   /usr/share/texmf/tex/generic/tex4ht/.

   - A super user access mode might be required for the updating.

   - The relative paths here and below are with respect to the temporary directory where tex4ht.tar.gz got uncompressed.

   - The messages ‘htlatex test’ issues during a compilation can be consulted to find out whether a path alternative to /usr/share/texmf/tex/generic/tex4ht/ should be used.

4. Refresh the latex registry. Probably one of the following commands would do the job.
   texhash, mktexlsr, initexmf -u

5. Issue the ‘htlatex test’ command. If the compilation fails, fix the problem encountered before proceeding.

6. [Postprocessors tex4ht.c, t4ht.c] Find where the executables tex4ht and t4ht reside (e.g., with the commands ‘which tex4ht’ and ‘which t4ht’)

   Temporarily save the files, say, by renaming them to tex4ht.old and t4ht.old.

   On Linux platforms, set the following executable files

   bin/linux/tex4ht
   bin/linux/t4ht

   as replacement to the ones renamed.

   On non-Linux platforms, new executables should be compiled for the replacements.

7. Issue the ‘htlatex test’ command. If the compilation fails, fix the problem encountered before proceeding.

8. [Fonts] Remove the subdirectory
   /usr/share/texmf/tex4ht/ht-fonts

   and introduce there instead the subtree ‘ht-fonts’ obtained from the zip file.

   The messages ‘htlatex test’ issues during a compilation can be consulted to find out whether a path alternative to /usr/share/texmf/tex4ht/ht-fonts should be used.

9. Refresh the latex registry.
   texhash, mktexlsr, initexmf -u

10. Issue the ‘htlatex test’ command. If the compilation fails, fix the problem encountered before proceeding.

11. [Environment File] Determine the location of tex4ht.env from the messages issued during the compilation invoked by ‘htlatex test’

12. Temporarily save the tex4ht.env file (under a different name?) and set the following file as a replacement
    texmf/tex4ht/base/unix/tex4ht.env

13. Replace the substrings
    %%~/texmf-dist

    with the substrings

    /usr/share/texmf

    within the records of tex4ht.env that invoke Java.

14. [Invocation Scripts] Find where htlatex resides (e.g., ‘which htlatex’). Save the files htlatex, httex, httexi, and htcontext elsewhere and get new scripts from
    bin/unix/

    for a replacement.

15. Issue the ‘htlatex test’ command. If the compilation fails, fix the problem encountered before proceeding.

16. Find where mk4ht resides (e.g., ‘which mk4ht’). Save the file elsewhere and set the file
    bin/unix/mk4ht

    for a replacement.

17. Issue the command ‘mk4ht htlatex test’. Check that the outcome is the same way as from the ‘htlatex test’ command.

18. [Backend Filters] If they exist, delete the subdirectories
    /usr/share/texmf/tex4ht/bin
    /usr/share/texmf/tex4ht/xtpipes

19. Add the subtrees
    texmf/tex4ht/bin
    texmf/tex4ht/xtpipes

    to

    /usr/share/texmf/tex4ht/

20. The platform should have Java installed, with version no earlier than 1.5

21. Issue the ‘htlatex test’ command. If the compilation fails, fix the problem encountered before proceeding.

Contributed instructions:

- OpenSuSE 10.2