Path: utzoo!attcan!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!cs.utexas.edu!uwm.edu!ux1.cso.uiuc.edu!csrd.uiuc.edu!s41.csrd.uiuc.edu!eijkhout From: eijkhout@s41.csrd.uiuc.edu (Victor Eijkhout) Newsgroups: comp.text.tex Subject: Re: Is this a bug in enumerate or the ifthen.sty file? Message-ID: <1990Oct14.171725.18224@csrd.uiuc.edu> Date: 14 Oct 90 17:17:25 GMT References: <9010140557.AA09467@june.cs.washington.edu> Sender: news@csrd.uiuc.edu (news) Organization: UIUC Center for Supercomputing Research and Development Lines: 40 TeXhax@cs.washington.edu writes: >Is this a bug in enumerate or the ifthen.sty file? Neither. >\documentstyle[ifthen]{article} >\def\S{\boldsub{S}} >\def\boldvar#1{{\hbox{\bf #1}}} >\def\boldsub#1#2% > $\ifthenelse{\equal{#2}{}}% > {\boldvar{#1}} > $\ifthenelse{\equal{#2}{'}}% > $\ifmmode\boldvar{#1}'\else{\boldvar{#1}'{\fi}} > $\ifmmode\boldvar{#1}_{#2}\else{\boldvar{#1}_{#2}{\fi}}} So essentially you \boldsup is a box. >This puts the S in the wrong place: >\begin{enumerate} > \item \S{} is primative\dots > \item \S{} is complicated\dots >\end{enumerate} Let me guess: after \item you are still in vertical mode, and as a box is allowed in vertical mode TeX starts the paragraph only at the text 'is primative' or 'is complicated'. The error is really deep down in LaTeX, but you can repair it by \def\boldvar#1{{\leavevmode\hbox{\bf #1}}} The \leavevmode forces TeX to start the paragraph. >This does the right thing: >\beginenumerate} > \item \mbox{} \S{} is primative\dots > \item \mbox{} \S{} is complicated\dots >\end{enumerate} It figures. This is the definition of \mbox: \def\mbox#1{\leavevmode\hbox{#1}} Victor.