[tex4ht] All the compilation options in the .cfg file?

Radhakrishnan CV cvr at river-valley.org
Fri Sep 21 06:23:26 CEST 2012


On Thu, Sep 20, 2012 at 8:09 PM, Denis Bitouzé <dbitouze at wanadoo.fr> wrote:

> Hello,
>
> if I'm right, a command line as follows:
>
>   htlatex "config-file,xhtml,fn-in,charset=utf-8" " -cunihtf -utf8"
>
> may be shortened in:
>
>   htlatex "config-file" " -cunihtf -utf8"
>

Yes please.

if config-file.cfg contains:
>
>   \Preamble{xhtml,fn-in,charset=utf-8}
>

Absolutely.


> My question is about the second set of options, namely:
>
>   " -cunihtf -utf8"
>
> is it possible to also store them in the config-file.cfg file?
>

Not possible. But you can define your own htlatex like custom script (say,
foolatex) which when run like

  foolatex <your file>

will in effect do what you wanted.

Here is a a source file which I use for html5 trials. You might modify to
suit your requirements:

  \def\script{unix}
  \input mkht.4ht
  \one{new,html5,fn-in,charset=utf-8}
  \two{-cunihtf  -utf8}
  \three{#1 -d/tmp/}
  \make{ht5}
  \end{document}

\script{..} -- argument can be unix or bat

\one{...} -- can have all options passed on to LaTeX
                (in your case, config-file,xhtml,fn-in charset=utf-8)

\two{...} -- options passed to tex4ht binary which post-processes dvi
                (in your case,  -cunihtf -utf8)

\three{...} -- options passed to t4ht binary which generates css, images
and does all other system specific stuff like moving all output to a custom
directory, or execution of any shell specific commands.

\make{...} -- base name for your scripts.

Save the file as cmd.tex (or any name you like) and run LaTeX on cmd.tex
which will produce seven script files as shown below:

--- Writing file --- ht5latex.unix ---
--- Writing file --- ht5tex.unix ---
--- Writing file --- ht5texi.unix ---
--- Writing file --- ht5context.unix ---
--- Writing file --- ht5xetex.unix ---
--- Writing file --- ht5xelatex.unix ---
--- Writing file --- ht5mex.unix ---

The names are self explanatory.

Look forward to hear after your experiments.

Best regards
-- 
Radhakrishnan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/tex4ht/attachments/20120921/84176f4f/attachment.html>


More information about the tex4ht mailing list