Up Next
Go up to 7 Carrying on
Go forward to 7.2 Changing type size

7.1 Changing the type style

Hyperlatex understands the following physical font specifications of LaTeX2e:
  • \textbf for bold
  • \textit for italic
  • \textsc for SMALL CAPS
  • \texttt for typewriter
  • \underline for underline
  • In LaTeX2e font changes are cumulative--\textbf{\textit{BoldItalic}} typesets the text in a bold italic font. Different HTML browsers will display different things.

    The following old-style commands are also supported:

  • \bf for bold
  • \it for italic
  • \tt for typewriter
  • So you can write
      {\it italic text}
    
    but also
      \textit{italic text}
    
    You can use \/ to separate slanted and non-slanted fonts (it will be ignored in the HTML-version).

    Hyperlatex complains about any other LaTeX commands for font changes, in accordance with its general philosophy. If you do believe that, say, \sf should simply be ignored, you can easily ask for that in the preamble by defining:

      \W\newcommand{\sf}{}
    

    Both LaTeX and HTML encourage you to express yourself in terms of logical concepts instead of visual concepts. (Otherwise, you wouldn't be using Hyperlatex but some WYSIWYG editor to create HTML.) In fact, HTML defines tags for logical markup, whose rendering is completely left to the user agent (HTML client).

    The Hyperlatex package defines a standard representation for these logical tags in LaTeX--you can easily redefine them if you don't like the standard setting.

    The logical font specifications are:

  • \cit for citations.
  • \code for code.
  • \dfn for defining a term.
  • \em and \emph for emphasized text.
  • \file for file.names.
  • \kbd for keyboard input.
  • \samp for sample input.
  • \strong for strong emphasis.
  • \var for variables.

  • Otfried Schwarzkopf, September 2, 1997

    Up Next