At 6:31 PM +1000 12/10/98, Peter W. Draper wrote:
>On Fri, 9 Oct 1998, Michael L. Hall wrote:
>
>>
>
>playing around with section commands isn't necessarily a good thing. But
>in this case just change things to:
>
>\newcommand{\ressection}[1]{\section{#1}}
>
>\begin{document}
> ...
> ...
>And it should work OK. Newcommands should really be defined in the
>document preamble. If you define them in the document body they behave
>quiet differently.
Yes. Within LaTeX2HTML there is a slightly stricter emphasis on the distinction
between preamble and body than is traditionally the case with LaTeX and TeX.
For most \newcommand definitions outside the preamble, the results should
be as expected...
...however Michael's problem is due to a juxtaposition with a 2nd concept
treated differently within LaTeX2HTML than in LaTeX.
The \newcommand definition outside the preamble is converted to
\newedcommand{ressection}[1]{\section{#1}}
which will make the appropriate definition when it is encountered
later during the detailed translation phase.
Well, it would do, if not for that \section in the expansion.
LaTeX2HTML divides up the input source following the \begin{document}
into chunks delimited at such sectioning commands.
Thus one chunk will get: \newedcommand{ressection}[1]{\section
with the next chunk getting: {#1}}
This should help explain the error messages that were displayed,
involving missing braces.
Note that it is important to leave the
\newedcommand{ressection}[1]{....}
marker in place, so that the appropriate \newcommand can be written
into the images.tex file, in case it is needed for later images.
So the lesson is to stick the \necommand s into the preamble,
unless there is an *extremely good reason* not to do so.
Certainly any alteration to large-scale sectioning,
as with Michael's \ressection , should *definitely* go into the preamble.
Hope this helps,
Ross Moore
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ross Moore email: [EMAIL PROTECTED]
Mathematics Department phone: +612 9850 8955
Macquarie University fax: +612 9850 8114
Sydney, NSW 2109 office: E7A-419
Australia WWW: http://www-math.mpce.mq.edu.au/~ross/
***************************
for the best in (La)TeX-nical typesetting and Web page production
join the TeX Users Group (TUG) --- browse at http://www.tug.org
<[EMAIL PROTECTED]>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~