[l2h] \caption vs. \newfont?

Chris Jepeway jepeway@blasted-heath.com
Mon, 29 Jul 2002 15:05:10 -0400


Hi:

I'm using a macro to switch fonts inside a \caption.
The font-switching macro is defined differently based on
whether HTML is being produced.  Here's how I load the
new font:

    \newfont{\ct}{cmtcsc10}	% fancy-looking small caps

Here's how I declare the font-switching macro

    % tart up a PDU type name
    \latexhtml{\newcommand{\tartm}[1]{{\ct #1}}}
	      {\newcommand{\tartm}[1]{{\sc #1}}}

And, here's how I use it:


    \begin{document}
    Here's a message type of \tartm{init}.


    And here's a figure with a caption using a message type.
    \begin{figure}
    \includegraphics{model.ps}
    \caption{Transaction started by \tartm{init} msg}
    \end{figure}

    \end{document}

When run through l2h, I see errors like these for such figures:

    No number for "Transactionstartedby<SMALL>INIT</SMALL>msg"

Indeed, when viewed in a browser there's no number for these figure
If such a fig is \label'ed, \ref's to it don't work, either.

Finally, at the end of the run, I get a:

    Unknown commands: ct

How can I fix this?  If I just use \sc directly, as in

    \caption{blah {\sc dullsville}}

the HTML turns out just fine.  I'd like to keep the \tartm macro,
though, if that's at all possible.

Any suggestions?

Chris <jepeway@blasted-heath.com>.