Tuesday, August 28, 2007

Notes on installation and configuration of latex2html with MiKTeX

"Installing LATEX2HTML with MiKTEX" and "Tools for Publishing LaTeX Documents on the Web" are two good reference for dealing with latex2html. The following are a list of notes I wrote down when installing and configuring latex2html with MiKTeX.

  1. It is important to install MiKTeX, Ghostscript, and latex2html in a path with no space in between, the default place under "Program Files" will introduce problems.

  2. If you install NetPbm for Windows using the Binaries release, do not forget to drag the Dependencies as well. So you will not get error messages about missing dll's.

  3. Change the location where Ghostscript, NetPbm, and latex2html are installed in prefs.pm. The line numbers are not exact the same as in Installing LATEX2HTML with MiKTEX due to versioning.

  4. Change the $TMP in l2hconf.pm to a path with no space in between as well.

  5. While most configurations are done by updating l2hconf.pm in Installing LATEX2HTML with MiKTEX, I suggest use $INIT_FILE_NAME to do the customizations that you like. You need to change $INIT_FILE_NAME to a file name that Windows system can recognize like 'dot.latex2html-init'. The default '.latex2html-init' is not accepted by Windows.

  6. Jos has a latex2html-init file that fixed several bugs in the original one coming with latex2html distribution. I found it is very helpful. I reused all the perl functions in that file, but did not use his style part.

  7. In order to get white background of the images, I set

    @IMAGE_TYPES = qw(png gif);

    which means use png format.
    And in the latex2html-init file, I set

    $TRANSPARENT_FIGURES = 0; # default = 1
    $LOAD_LATEX_COLOR = "\\usepackage[dvips]{color}";
    $LATEX_COLOR = "\\pagecolor[gray]{1}"; # 1 means white and 0 means black

  8. In order to change the personal information in the $ADDRESS and "About this document", I set

    $DONGHOME = "http://homepage.usask.ca/~dol142";
    $DONG = "<A href=\"$DONGHOME\"> Dong Liu</A>";
    $address_data[0] = $DONG; # My real name
    $ADDRESS = "Copyright &#169; <I>$address_data[1]</I> <I>$DONG</I>"; # rewrite $ADDRESS

Thursday, August 9, 2007

Grammar check of documents generated by LaTeX

LaTeX is good for formatting academic papers and thesis with provided style files. Spelling check of LaTeX documents is never an issue by using a tool like Aspell or with the support of your text editor. However, grammar check still looks like an impossible task. For Windows users, this may be the most strong excuse to say Word is still better for everyday writing. Yes ... and why not use Word to do that task for LaTex documents? Word does not interpret LaTex, but how about RTF or HTML?

I have tried several applications converting pdf files to RTF including Acrobat professional. The generated files are messy. So I tried tools generating HTML. The one that I am using now is latex2html. Open the generated HTML files and let Word to spelling and grammar check them (F7), and then you can modify the tex file correspondingly.