[l2h] simple abbreviation style macro's

Phillip Lord p.lord@russet.org.uk
Wed, 9 Oct 2002 11:43:14 +0100


>>>>> "Ross" == Ross Moore <ross@ics.mq.edu.au> writes:

  >>
  >>
  >> 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.

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

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

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

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

  Ross> Another solution is to use a conditional input:

  Ross> \begin{htmlonly}
  Ross>  \input mymacros.tex
  Ross> \end{htmlonly}

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


I can't get either of the first two to work I'm afraid. This may be
because I am using an old version of latex2html....

LaTeX2HTML Version 2K.1beta (1.47)
by Nikos Drakos, Computer Based Learning Unit, University of Leeds.

which is the version on my machine (I presume this is standard for
redhat7).

I tried symlinking, and copying. 

I'm not sure about the latter option. Where is DO_INCLUDE defined?


Cheers

Phil