3

I just noticed that when I compile a tex file into an html document, I actually don't have to run the equivalant sequence I am used to

xelatex
For all bibunits generated bu*.aux bibtex
For all glossaries being compiled makeindex
xelatex
xelatex

I don't even have to run htlatex multiple times.

In particular for bibunits and glossaries, how does tex4ht manage to find all the files?

I have a pretty complicated file hierarchy/structure that makes certain files available to multiple projects so I want to make sure that I can indeed simplify my compile structure and safely generate all the required tmp files. Does tex4ht automatically iterate the compile sequence until all dynamic references stop updating?

5

htlatex is just a shell script which runs LaTeX with special parameters to include needed .4ht files three times and then it run tex4ht and t4ht on resulting .dvi file to get output xml and image files. it can't run any other commands, so you have to run makeindex and bibtex by hand.

in your example, glossary and bibliography files generated by your normal build sequence are probably used, it shouldn't be a problem (although I am not sure whether glossaries does use the same file format for tex4ht and normal LaTeX).

if you want to be sure that everything is OK, you should use this build sequence:

htlatex
For all bibunits generated bu*.aux bibtex
For all glossaries being compiled makeindex
htlatex 

as htlatex run LaTeX three times, it isn't really necessary to run it for second time. another alternative is to use make4ht, it is a build system for tex4ht and it allow you to run custom commands.

  • I am trying to track down where these extra files may be. My .tex src directories are clean, my output folder is clean, my build sequence manually deletes the tmp folder and all my aux files and a list of about 20 other extensions that tex packages create. The only thing I haven't checked would be an application program folder somewhere in the tex installation pr program data level. Is there any chance it is reading files far away on different hard drives? – EngBIRD Jan 18 '15 at 21:24
  • Actually, another possibility. Is it necessary to run the make index programs if all that is being shown is the in-text citations? I am not including my glossary in the html file, just the expansions and subsequent abbreviations. This is strange though because bibunits and putbib shows a wierdly indented bibliography, without running bibtex at all, and no files are even on the memory stick being compiled from. – EngBIRD Jan 18 '15 at 21:27
  • @EngBIRD files from the current directory and from TEXMF tree can be accessed. you don't have to run makeglossaries if you just want to expand acronyms in text, but bibliography can be created only with bibtex – michal.h21 Jan 18 '15 at 21:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.