Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!BBN.COM!gildea From: gildea@BBN.COM (Stephen Gildea) Newsgroups: gnu.emacs Subject: Re: Fill-paragraph with TeX. Message-ID: <8902221933.AA23116@prep.ai.mit.edu> Date: 22 Feb 89 19:46:30 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 47 Date: 22 Feb 89 08:18:16 GMT From: Kevin Thompson I do a lot of editing within tex-mode and LaTeX mode, and often have words that begin with a "\" in my paragraphs. If such words are at the beginning of lines, emacs seems not to respond properly to fill-paragraph; ... This behavior is intentional. In the usual case where backslashes appear at the beginning of a line, they are not part of the paragraph and should not be filled into it. Often the backslash is part of a command that separates two paragraphs. Two examples: \subsection{Focal Mechanism of the Main Shocks} The focal mechanism of the second main shock ($m_b = 6.0$), shown in Figure 3, was determined from long-period arrivals at World-Wide Standard Seismographic network stations. Both {\em S\/} and {\em P\/} wave first motions were used; however, the solution is more strongly constrained by the {\em S\/} wave polarizations. The results are shown in Table 1.\marginboxed{Table 1} \item Design and implementation of software for real-time data acquisition. \item Device driver writing. \item Graphics library implementation. Since Emacs cannot easily decide whether a particular backslash is part of the paragraph text or not, it must treat them all the same. Since it is much more common for a "word" beginning with a backslash to *not* be text, Emacs assumes that is always the case. Looking at the first example above, we see that all uses of backslash that are within the paragraph do not start words (that is, are not preceded by whitespace). Of course, if the normal behavior of TeX mode isn't right for you, it is easy to change. Try the following in your .emacs file: (setq TeX-mode-hook '(lambda () (setq paragraph-start "^[ \t]*$\\|^[\f%]" ;don't look at backslash paragraph-separate paragraph-start))) < Stephen