[l2h] Making a new environemnt that wraps around rawhtml

Travis Spencer travislspencer at gmail.com
Fri Jul 29 21:56:45 CEST 2005

Hey All,

In my quest to associate unique IDs with arbitrary sections of my
LaTeX documents, I think I may have found a solution that will work. 
I read about the `rawhtml' environment, and, with it, I can wrap any
LaTeX command, environment, etc. in a DIV with a specific ID.  Then I
can style that DIV using a CSS ID selector.  Here is an example:

<div id="docTitle">

This produces the HTML `<div id="docTitle">...</div>' witch I can
style using a selector such as `DIV#docTitle'.  This is helpful but
that's a lot of typing.  So, I read about how to create a new, custom
environment in hopes of distilling the above example down do something
like this:


To that end, I hacked up this new environment:

               {\begin{rawhtml}<div id="#1">\end{rawhtml}}

The problem with this is that the nested rawhtml environment doesn't
set the id attribute's value to that of the enclosing environment's
first argument but rather to a literal `#1'.

Does anyone more experienced with LaTeX know a way to pass this value
into the rawhtml environment?




Travis Spencer

More information about the latex2html mailing list