[comp.text.tex] \raggedright bug in LaTeX

djb@babypuss.mitre.org (David J. Braunegg) (01/15/91)

Based on a response that I received, I was not clear in my last
message about the \raggedright bug.

The bug occurs in *LaTeX*.  I want to get unfilled text with indented
paragraphs.  \raggedright sets the \parindent to 0.0pt, thus
preventing paragraph indentation.  However, from the definition of
\raggedright in lplain, I don't know why:

\def\raggedright{\rightskip\z@ plus2em \spaceskip.3333em \xspaceskip.5em\relax}


The following transcript shows that \parindent gets set to 0.0pt.  You
can also test it with text.

djb@babypuss>\latex
This is TeX, C Version 3.0
LaTeX Version 2.09 <7 Dec 1989>

*\relax

*\documentstyle{article}
(/usr/local/lib/tex/inputs/article.sty
Document Style `article' <16 Mar 88>.
(/usr/local/lib/tex/inputs/art10.sty))
*\begin{document}
No file texput.aux.

*\showthe\parindent
> 15.0pt.
<*> \showthe\parindent
                      
? 

*\raggedright

*\showthe\parindent
> 0.0pt.
<*> \showthe\parindent
                      
? 

*\end{document}
(texput.aux)
No pages of output.
Transcript written on texput.log.




Trying the same thing in TeX, there is no problem:

djb@babypuss>\tex
This is TeX, C Version 3.0

*\relax

*\showthe\parindent
> 20.0pt.
<*> \showthe\parindent
                      
? 

*\raggedright

*\showthe\parindent
> 20.0pt.
<*> \showthe\parindent
                      
? 

*\bye
No pages of output.
Transcript written on texput.log.

aryeh@eddie.mit.edu (Aryeh M. Weiss) (01/17/91)

In article <127738@linus.mitre.org> djb@babypuss.mitre.org (David J. Braunegg) writes:
...
>The bug occurs in *LaTeX*.  I want to get unfilled text with indented
>paragraphs.  \raggedright sets the \parindent to 0.0pt, thus
>preventing paragraph indentation.  However, from the definition of
>\raggedright in lplain, I don't know why:
>
>\def\raggedright{\rightskip\z@ plus2em \spaceskip.3333em \xspaceskip.5em\relax}

The definition of \raggedright in lplain.tex certainly does not set \parindent!
		Therefore this is the WRONG definition.
\raggedright is REDEFINED in latex.tex, overriding the (l)plain definition!
Look in latex.tex and you will find a \raggedright macro that certainly zeroes
out \parindent.  I'm afraid latex has played another cruel hoax on you.
You can define your own raggedright macro or set parindent after using 
raggedright or both.