[l2h] simple abbreviation style macro's

Ross Moore ross@ics.mq.edu.au
Wed, 9 Oct 2002 10:53:14 +1000 (EST)

> Hello all.
> One thing that I tend to do a lot of is define simple abbreviation
> type macros, such as 
> \newcommand{\cs}{Computer Science\xspace}. 
> I do this because I use a lot of resources which require certain
> capitalisation, or hyphenation, and I keep getting it wrong. No to
> avoid duplication I still all of these into a style file, so that I
> can share them among documents. 
> The problem is that latex2html doesn't like this, although if you put
> the commands directly into preamble then all is fine. So clearly
> latex2html can parse this stuff. Now I realise I could just write a
> latex2html style, but I'd have to update this with new abbreviations
> as they come, which I don't really want to do. 

LaTeX2HTML *can* read files of simple definitions; however it does *not* 
automatically read files with suffix .sty  since these normally contain
very complicated macro definitions that have nothing to do with creating
an HTML view of the document.

If your file, called  mymacros.sty  say, contains just simple definitions,
then you can either:

  1.  make a 2nd copy of it, called  mymacros.tex  
  2.  make a symbolic link to it, called  mymacros.tex
  3.  or edit the $DO_INCLUDE  Perl variable, to say to load  mymacros.sty
      as a special case of .sty files that *are* to be read.

Doing any one of 1., 2, or 3. should cause your macro definitions
to be loaded, in response to  \usepackage{mymacros} .

Another solution is to use a conditional input:

 \input mymacros.tex

assuming you are using  \usepackage{html}  as normal with LaTeX2HTML.

> Is it possible, to define a style file as "boring", and have
> latex2html operate directly on it, by parsing its contents. I realise

Yes; that's what the above suggestions do.

> that if the style files get complex its not going to work, but just
> for abbreviation type files it should work well. 

Hope this helps,

	Ross Moore

> Cheers
> Phil
> _______________________________________________
> latex2html mailing list
> latex2html@tug.org
> http://tug.org/mailman/listinfo/latex2html