[comp.text] Bug in LaTeX

daved@cbnewsl.ATT.COM (david.dougherty) (06/22/89)

Consider the following LaTeX input file:

	\documentstyle{article}
	
	% Some examples taken from the "LaTeX Book."
	%
	\newcommand{\good}[3]{{#1}$({#2}:{#3})$}
	\newcommand{\stillgood}[3]{{#1}$(#2:#3)$}
	\newcommand{\notgood}[3]{#1$(#2:#3)$}
	
	\begin{document}
	\section{A Test of Some Math-Mode Stuff \ldots}
	Typing the following:
	
	\begin{verbatim}
	\newcommand{\good}[3]{{#1}$({#2}:{#3})$}
	\newcommand{\stillgood}[3]{{#1}$(#2:#3)$}
	\newcommand{\notgood}[3]{#1$(#2:#3)$}
	
	We note that \good{\em gnus\/}{x}{54} is fine,
	\stillgood{\em gnus\/}{x}{54},
	we see is fine, but \notgood{\em gnus\/}{x}{54}
	messes up any text that
	follows it.
	\end{verbatim}
	
	\noindent produces the following:
	
	
-->	\noindent We note that \good{\em gnus\/}{x}{54} is fine,
	\stillgood{\em gnus\/}{x}{54},
	we see is fine, but \notgood{\em gnus\/}{x}{54} messes up any text that
	follows it.
	\end{document}

My question is:  Why doesn't LaTeX generate a new paragraph where the arrow is?

Output:
	.
	.
	.
	produces the following:
	We note...
	.
	.
	.

I though a blank line begins a new paragraph.  Is this a bug, or am I doing
something wrong?  Thanks for the help.

--
David W. Dougherty
AT&T Bell Laboratories
UUCP:  ...!att!attunix!dwd
ARPA:  dwd@attunix.att.com
TELE:  201/5226241

grunwald@flute.cs.uiuc.edu (Dirk Grunwald) (06/22/89)

because you explicitly told it to *not* produce a new paragraph
by using \noindent.

remove the \noindent and it'll work.
--
Dirk Grunwald -- Univ. of Illinois 		  (grunwald@flute.cs.uiuc.edu)

leichter@CS.YALE.EDU (Jerry Leichter) (06/23/89)

In article <879@cbnewsl.ATT.COM>, daved@cbnewsl.ATT.COM (david.dougherty) writes...
> 
>Consider the following LaTeX input file:
> 
>	\documentstyle{article}
	...
>	
>	\noindent produces the following:
>	
>	
>-->	\noindent We note that \good{\em gnus\/}{x}{54} is fine,
>	\stillgood{\em gnus\/}{x}{54},
>	we see is fine, but \notgood{\em gnus\/}{x}{54} messes up any text that
>	follows it.
>	\end{document}
> 
>My question is:  Why doesn't LaTeX generate a new paragraph where the arrow is?
> 
>Output:
>	produces the following:
>	We note...
>I though a blank line begins a new paragraph.  Is this a bug, or am I doing
>something wrong?  Thanks for the help.

One person has already given the wrong answer (that the \noindent says "don't
start a paragraph").  On the contrary, LaTeX IS starting a paragraph at the
indicated point.  It's just not providing any paragraph INDENTATION, because
you've explictly told it not to.  Since the article style provides no extra
spacing between paragraphs, there is nothing left, once you've suppressed the
indentation, to show you what happened.  (Actually, that's not quite true.
The article style really inserts one point of extra "stretch" between para-
graphs, so that if you had set this page flushbottom, you would see just a bit
more space between paragraphs than within them.)

To prove to yourself that there really is a paragraph there, try adding the
following line just after \begin{document}:

	\parskip 10pt

This will insert 10 points of vertical space between paragraphs.

(In many styles, paragraphs are not indented, but extra space is used above
them.  In fact, all the standard LaTeX styles use that convention within
lists and, if I remember right, inside of miniboxes.)

							-- Jerry