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. In what follows, a temporary directory
    named tmp is assumed.

    Download tex4ht.tar.gz to the tmp directory, and uncompress the file. This
    will create:

    tmp/tex4ht-[VERSION DATE]       example: tmp/tex4ht-1.0.2009_06_11_1038

 3. [Configuration files] Move all the files from

    tmp/tex4ht-1.0.2009_06_11_1038/texmf/tex/generic/tex4ht/*

    to

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

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

        Note. If you are on a system that requires ’sudo’, use it here.
        Example. sudo mv tmp/tex4ht-1.0.2009_06_11_1038/texmf/tex/generic/
        tex4ht/* /usr/share/texmf/tex/generic/tex4ht/.

      □ The messages ‘htlatex test’ issued 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.

        Example: ‘which tex4ht’ → /usr/bin/tex4ht
                 ‘which t4ht’   → /usr/bin/t4ht

        Below, use ‘/usr/bin/’ (without quotes) — or whatever you got as the
        path when you executed ‘which’ — as ‘executable-dir/’

      □ Create backups of the existing versions by, say, renaming them to
        tex4ht.old and t4ht.old.

      □ Move the new versions to the location of the files you just renamed.

          ☆ On 32-bits Linux platforms, copy or move the new executable files

            tmp/tex4ht-1.0.2009_06_11_1038/bin/linux/tex4ht
            tmp/tex4ht-1.0.2009_06_11_1038/bin/linux/t4ht

            to the location of the old ones.

            Example: mv tmp/tex4ht-1.0.2009_06_11_1038/bin/linux/tex4ht
                     executable-dir/.
                     mv tmp/tex4ht-1.0.2009_06_11_1038/bin/linux/t4ht
                     executable-dir/.

          ☆ On non 32-bits Linux platforms, new executables should be compiled
            for the replacements. The index entries tex4ht.c and t4ht.c of the
            home page provide pointers to compilation instructions.

            If new executables are not easy to produce, try staying with the
            old ones.

 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
    htf.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.

    tmp/tex4ht-1.0.2009_06_11_1038/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

    tmp/tex4ht-1.0.2009_06_11_1038/bin/unix/

    for a replacement. (Variants of the above scripts are available at tmp/
    tex4ht-1.0.2009_06_11_1038/bin/ht/unix/.)

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

    tmp/tex4ht-1.0.2009_06_11_1038/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

    tmp/tex4ht-1.0.2009_06_11_1038/texmf/tex4ht/bin
    tmp/tex4ht-1.0.2009_06_11_1038/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

