Article View: comp.text.tex
Article #12128Re: Q: Can Emacs make LaTeX files more readable?
From: Bill Richter
Date: Mon, 23 Jan 1995 04:24
Date: Mon, 23 Jan 1995 04:24
40 lines
2445 bytes
2445 bytes
>Also, can someone explain to me how the Emacs M-q command works within
>LaTeX mode? Its behavior makes no sense to me (based on my experience
>with it in regular text mode) and the Emacs documentation says nothing
>on the matter.
I think the emacs documentation says something, although I suppose it is
could be more readable. The emacs info node Paragraphs says:
" The precise definition of a paragraph boundary is controlled by the
variables `paragraph-separate' and `paragraph-start'. "
And every major mode has a different value for these regexps. So M-q
will work differently in different major modes.
In Emacs 19.28 in latex mode the regexps are defined by the code in
tex-mode.el, which begins:
;; A line containing just $$ is treated as a paragraph separator.
;; A line starting with $$ starts a paragraph,
;; but does not separate paragraphs if it has more stuff on it.
(setq paragraph-start "^[ \t]*$\\|^[\f%]\\|^[ \t]*\\$\\$\\|\
^\\\\begin\\>\\|^\\\\label\\>\\|^\\\\end\\>\\|^\\\\\\[\\|^\\\\\\]\\|\
^\\\\chapter\\>\\|^\\\\section\\>\\|\
...
So for instance, M-q at any place will not fill the following paragraph:
\begin{Theorem}
\label{important-stuff}
A well know factoid is that
$$
1 + 1 = 2.
$$
This is useful in hypereleptic Quantum $C^*$ crystaline cohomology.
\end{Theorem}
However, M-q will fill the paragraph:
It's clear that $1
\cdot 1 = 1$, and therefore we have the following result.
Formerly M-q would fill any lines that did not begin with a backslash.
The new regexps are supposed to be better suited for actual latex usage.
Technical Details
Message-ID:
<3fvb1l$gie@mozo.cc.purdue.edu>Path:
arc1-ca.pugleaf.net!nntp.gmd.de!newsserver.jvnc.net!howland.reston.ans.net!gatech!rutgers!news.cs.indiana.edu!mozo.cc.purdue.edu!banach.math.purdue.edu!richterReferences:
<3fp413$ld@decaxp.harvard.edu> <3fq07q$2uj@nntp.crl.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f9e16,39bee7ee240bd764 X-Google-Attributes: gidf9e16,public X-Google-Thread: 103b8b,39bee7ee240bd764 X-Google-Attributes: gid103b8b,public X-Google-ArrivalTime: 1995-01-22 20:24:21 PST Path: arc1-ca.pugleaf.net!nntp.gmd.de!newsserver.jvnc.net!howland.reston.ans.net!gatech!rutgers!news.cs.indiana.edu!mozo.cc.purdue.edu!banach.math.purdue.edu!richter From: richter@banach.math.purdue.edu (Bill Richter) Newsgroups: comp.text.tex,gnu.emacs.help Subject: Re: Q: Can Emacs make LaTeX files more readable? Date: 23 Jan 1995 04:24:21 GMT Organization: Purdue University, West Lafayette, Indiana Lines: 45 Distribution: gnu Message-ID: <3fvb1l$gie@mozo.cc.purdue.edu> References: <3fp413$ld@decaxp.harvard.edu> <3fq07q$2uj@nntp.crl.com> NNTP-Posting-Host: banach.math.purdue.edu