Next  |  Prev  |  Top  |  JOS Index  |  JOS Pubs  |  JOS Home  |  Search

More About .latex2html-init

As summarized above in §4 (and in the file webpubdemo/INSTALL), the file webpubdemo/dot-latex2html-init should be copied into your login directory, renamed to .latex2html-init, and edited to install your name, user name, address, and the like.

This init file adds the following features to latex2html:

In addition, various latex2html defaults are overridden. All overrides are merely my preferences except for $TRANSPARENT_FIGURES=0, which is explained further below.

When editing .latex2html-init, keep in mind that it is a Perl script executed by latex2html after its own initialization. As a result, since latex2html is just a Perl script itself, your .latex2html-init can be used to override any variables or functions in latex2html. Also note that the .l2h file in each document directory can further override settings on a document by document basis. See, for example, webpubdemo/mybook/mybook.l2h for the sorts of things expected in the .l2h file. For your reading convenience, that file is listed below:

        # Perl script webpubdemo/mybook/mybook.l2h
        $MYNAMEDOCDIR = "mybook";
        $MYNAMEDOCTITLE = "My Book Title";
        $MYNAMEDOCAUTHORS = $MYNAME;
        $MYNAMEDOCPUBINFO = "Bibliographic citation goes here";
        $NOHARDCOPIES = 1; # Reasonable choice for books in print
        $ADDRESS = &make_myname_address;
        1;      # This must be the last line
Note the $NOHARDCOPIES variable which is used to suppress the PDF link in the HTML. Read the .l2h files in the other examples for more suggestions like this.

As enumerated in §4, customization of .latex2html-init usually goes as follows:

  1. Edit $MYNAMEHOME to point to your Web home page, under which all your publications will reside. For example, mine is
        $JOSHOME = "http://ccrma.stanford.edu/~jos";
    

  2. Edit $MYNAMEEMAIL to hold your email address, if desired. I have a URL to a web form for this.

  3. Change ``My Full Name'' to your name. This affects one line. Mine looks like
        $JOS = "<A href=\"" . \$JOSHOME . "/\">Julius O. Smith III</A>";
    
    Note that double-quote must be quoted with a backslash (\") in a Perl string.

  4. Change all occurrences of ``MYNAME'' and ``myname'' to your initials, or whatever. (This is the variable-name and subroutine prefix string.) I use ``JOS'', so my .l2h files look as follows:
        # Perl script webpubdemo/mybook/mybook.l2h
        $JOSDOCDIR = "mybookdirectory";
        $JOSDOCTITLE = "My Book Title";
        $JOSDOCAUTHORS = $JOS;
        $JOSDOCPUBINFO = "Bibliographic citation goes here";
        $ADDRESS = &make_jos_address; # Call the subroutine in the init file
        1;      # This must be the last line (return true for success)
    



Subsections
Next  |  Prev  |  Top  |  JOS Index  |  JOS Pubs  |  JOS Home  |  Search

Download webpub.pdf
[Comment on this page via email]

``Tools for Publishing LaTeX Documents on the Web'', by Julius O. Smith III.
Copyright © 2017-06-24 by Julius O. Smith III
Center for Computer Research in Music and Acoustics (CCRMA),   Stanford University
CCRMA