[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to alphabetasize sections?

From: Thorsten Jolitz
Subject: Re: How to alphabetasize sections?
Date: Sat, 13 Sep 2014 02:58:03 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Emanuel Berg <address@hidden> writes:

> Robert Thorpe <address@hidden> writes:
>>> One way is to add (or augment) the local variables
>>> block in the file to read: % Local variables: %
>>> paragraph-separate: "\\section" % End: then save,
>>> then revert, then mark the region around all the
>>> \section (and text), and type ‘M-x sort-paragraphs
>>> RET’.
>> Another way is to do search and replace (M-%):
>> \\section with ^L \\section
>> Then use sort-pages. Finally M-% again to get rid of
>> the ^Ls.
> That's very creative, both of you, but isn't the best
> way to move all the sections to separate files and then
> put one-line references in the "motherfile", and simply
> sort those with `sort-lines'?

With the trunk branch of outshine.el (and outshine and navi-mode
properly installed, and outline-minor-mode activated) you can just do:

,----[ C-h f outshine-latex-insert-headers-in-buffer RET ]
| outshine-latex-insert-headers-in-buffer is an interactive Lisp
| function in `outshine.el'.
| (outshine-latex-insert-headers-in-buffer &optional BUF-OR-NAME
| Insert outshine-headers for all sections in latex-mode buffer.
| Use current-buffer, unless BUF-OR-NAME is given. Add a 1st-level
| preamble header unless NO-PREAMBLE-P is non-nil.

to automatically insert meaningful outshine headers for all latex
sections in current buffer, call navi-mode and type e.g. '3' or '4'
(show headers up to level 3 or 4), and then kill and yank the subtrees
with 'k' and 'y'.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]