[Omake] Re: Hevea 1.08: \@style{CODE}...\@clearstyle forgets closing quote in text mode.

Aleksey Nogin nogin at metaprl.org
Thu Feb 15 10:59:51 PST 2007


On 15.02.2007 09:53, Luc Maranget wrote:

> If I understand right you are producing a documentation
> in three formats
> 1. DVI (I mean you use latex in a standard fashion)
> 2. html.
> 3. text.

Right, and "4. info", but there the issue is exactly the same as with 
the text files.

> For output 1. you are happy with \textttt
> For output 2, you want <CODE>...</CODE>
> For output 3, you want quotes.
> 
> Let me suggest that you write two style files
> code.sty
> \newcommand{\code}[1]{\texttt{#1}}
> 
> code.hva
> \ifhtml
> \newcommand{\code}[1]{{\@clearstyle\@style{CODE}#1}}
> \else
> \newcommand{\code}[1]{'#1'}
> \fi

That works, thanks a lot! The only thing is that I had to change the 
\@clearstyle\@style{CODE}#1 to \@style{CODE}#1\@clearstyle - otherwise 
the </CODE> closing tag may appear too late at times.

Aleksey

P.S. If you want, one extra entry for your 
http://para.inria.fr/~maranget/hevea/examples/index.html - OMake manual 
- http://omake.metaprl.org/omake.html


More information about the OMake-Devel mailing list