Prev Up Next
Go backward to 10 Controlling Hyperlatex
Go up to Top
Go forward to 12 Upgrading to Hyperlatex 2.0

11 Upgrading from Hyperlatex 1.3

If you have used Hyperlatex 1.3 before, then you may be surprised by this new version of Hyperlatex. A number of things have changed in an incompatible way. In this section we'll go through them to make the transition easier. (See below for an easy way to use your old input files with Hyperlatex 1.4 and 2.0.)

You may wonder why those incompatible changes were made. The reason is that I wrote the first version of Hyperlatex purely for personal use (to write the Ipe manual), and didn't spent much care on some design decisions that were not important for my application. In particular, there were a few ideosyncrasies that stem from Hyperlatex's origin in the Emacs latexinfo package. As there seem to be more and more Hyperlatex users all over the world, I decided that it was time to do things properly. I realize that this is a burden to everyone who is already using Hyperlatex 1.3, but think of the new users who will find Hyperlatex so much more familiar and consistent.

  1. In Hyperlatex 1.4 and up all ten special characters of LaTeX are recognized, and have their usual function. However, Hyperlatex now offers the command \NotSpecial that allows you to turn off a special character, if you use it very often.

    The treatment of special characters was really a historic relict from the latexinfo macros that I used to write Hyperlatex. latexinfo has only three special characters, namely \, {, and }. (latexinfo is mainly used for software documentation, where one often has to use these characters without their special meaning, and since there is no math mode in info files, most of them are useless anyway.)

  2. A line that should be ignored in the DVI output has to be prefixed with \W (instead of \H).

    The old command \H redefined the LaTeX command for the Hungarian accent. This was really an oversight, as this manual even shows an example using that accent!

  3. The old Hyperlatex commands \+, \=, \S, \C, \minus, \sim ... are no longer recognized by Hyperlatex 1.4.

    It feels wrong to deviate from LaTeX without any reason. You can easily define these commands yourself, if you use them (see below).

  4. The \htmlmathitalics command has disappeared (it's now the default)
  5. Within the example environment, only the four characters %, \, {, and } are special.

    In Hyperlatex 1.3, the ~ was special as well, to be more consistent. The new behavior seems more consistent with having ten special characters.

  6. The \set and \clear commands have been removed, and their function has been taken over by \newcommand.
  7. So far we have only been talking about things that may be a burden when migrating to Hyperlatex 1.4. Here are some new features that may compensate you for your troubles:
  8. The starred versions of \link* and \xlink*.
  9. The command \texorhtml.
  10. It was difficult to start an HTML node without a heading, or with a bitmap before the heading. This is now possible in a clean way.
  11. The new math mode support.
  12. Footnotes are implemented.
  13. Support for HTML tables.
  14. You can select the HTML level that you want to generate.
  15. Lots of possibilities for customization.

Most of your files that you used to process with Hyperlatex 1.3 will probably not work with newer versions of Hyperlatex immediately. To make the transition easier, you can include the following declarations in the preamble of your document (or even in your init.hlx file). These declarations make Hyperlatex behave very much like Hyperlatex 1.3--only five special characters, the control sequences \C, \H, and \S, \set and \clear are defined, and so are the small commands that have disappeared. If you need only some features of Hyperlatex 1.3, pick them and copy them into your preamble.


%% In Hyperlatex 1.3, ^ _ & $ # were not special
\NotSpecial{\do\^\do\_\do\&\do\$\do\#}

%% commands that have disappeared
\newcommand{\scap}{\textsc}
\newcommand{\italic}{\textit}
\newcommand{\bold}{\textbf}
\newcommand{\typew}{\texttt}
\newcommand{\dmn}[1]{#1}
\newcommand{\minus}{$-$}
\newcommand{\htmlmathitalics}{}

%% redefinition of Latex \sim, \+, \=
\W\newcommand{\sim}{\~{}}
\let\TexSim=\sim
\T\newcommand{\sim}{\ifmmode\TexSim\else\~{}\fi}
\newcommand{\+}{\verb+}
\renewcommand{\=}{\back{}}

%% \C for comments
\W\newcommand{\C}{%}
\T\newcommand{\C}{\W}

%% \S to separate cells in tabular environment
\newcommand{\S}{\htmltab}

%% \H for Html mode
\T\let\H=\W
\W\newcommand{\H}{}

%% \set and \clear
\W\newcommand{\set}[1]{\renewcommand{\#1}{1}}
\W\newcommand{\clear}[1]{\renewcommand{\#1}{0}}
\T\newcommand{\set}[1]{\expandafter\def\csname#1\endcsname{1}}
\T\newcommand{\clear}[1]{\expandafter\def\csname#1\endcsname{0}}

Otfried Schwarzkopf, September 2, 1997

Prev Up Next