#!/bin/sh

# This is a replacement for htlatex from the TeX4ht package. It allows
# latexmk to be used to do the latex part of the processing.  
# See TeX4ht-latexmkrc in the example-rcfiles directory of the latexmk
# distribution for how to use this.
#
# This is a shell script suitable for UNIX-like operating systems (including
# OS-X and linux, and presumably Cygwin under MS-Windows).

if [[ $# -lt 1  ||  $1 == "--help"  ||  $1 == "-help"  ||  $1 == "-h" ]]; then
   echo "Convert tex file to html.  Simplest usage"
   echo "    myhtlatex2 file"
   exit 1
fi

latexmk $1
tex4ht -f/$1  -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3
t4ht -f/$1 $4 ## -d~/WWW/temp/ -m644 
