General\newenvironment errors

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
ajnabi
Posts: 10
Joined: Mon Jan 29, 2007 1:09 am

\newenvironment errors

Post by ajnabi »

I am trying to define a \newenvironment in a class I am designing.

The environment has to print only in the HTML output and be ignored by LaTeX otherwise. However, I am getting an error:

Code: Select all

(/usr/share/texmf/tex/latex/hyperref/nameref.sty))
Runaway argument?

! File ended while scanning use of \@gobble@nv.
<inserted text>
                \par
This is the definition:

Code: Select all

 \newenvironment{banner}
{
  \begin{rawhtml}
    \@print{<h5 id="banner">}
}
{
  \@print{</h5>}
    \end{rawhtml}
}
Usage:

Code: Select all

\begin{banner}
This is the banner
\end{banner}
The following command does the trick but I want to turn it into an environment.

Code: Select all

\begin{rawhtml}<h5 id="banner">
The banner goes here.
</h5>
\end{rawhtml}
Any help would be greatly appreciated.

I've attached a test file. It is generated with LyX but I used LaTeX and dvips on the tex file to get the error message.

Thanks,
Frank
Attachments
forum.tex
(1.23 KiB) Downloaded 184 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Post Reply