Mailing List Archive

Support open source code!


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

Re: tlug: [Q] Emacs Outline mode for LaTeX doc (fwd)



>>>>> "Craig" == Craig Oda <craig@example.com> writes:

    Craig> On Wed, 24 Dec 1997, Stephen J. Turnbull wrote:
    >> >>>>> "Oda" == Tokyo Linux Users Group <tlug@example.com> writes:
    >> 
    Oda> Hi, is there an easy way for me to place a LaTeX document in
    Oda> emacs outline mode where I can collapse and expand headings
    Oda> based on \section, \subsection, and \subsubsection
    Oda> seperators.
    >> Yes.  You just put it in outline minor mode and set the header
    >> regexp to "\\\(sub\)*section".  I forget where that regexp
    >> lives, look in the docs for the outline minor mode.  Gotta
    >> run....

    Craig> Thanks.

    Craig> I getting

    Craig>  Invalid regexp: "Unmatched ( or \\("

    Craig> errors.

As well you should.  I gave you the interactive form (eg, for use with 
`search-forward-regexp').  In a lisp string you need yet another level 
of escaping, and the regexp becomes

		       "\\\\\\(sub\\)*section"

The Lisp reader converts each of the doubled backslashes to a single
one, producing the expression I originally gave as a string in
internal representation.  Then the regexp compiler/interpreter
converts the leading "\\" to a literal backslash (to match the TeX
macro operator), and the "\(" and "\)" to regexp grouping/matching
constructs.

Whew!
---------------------------------------------------------------
Next TLUG Nomikai: 14 January 1998 19:15  Tokyo station
Yaesu Chuo ticket gate.  Or go directly to Tengu TokyoEkiMae 19:30
Chuo-ku, Kyobashi 1-1-6, EchiZenYa Bld. B1/B2 03-3275-3691
Next Saturday Meeting: 14 February 1998 12:30 Tokyo Station
Yaesu Chuo ticket gate.
---------------------------------------------------------------
a word from the sponsor:
TWICS - Japan's First Public-Access Internet System
www.twics.com  info@example.com  Tel:03-3351-5977  Fax:03-3353-6096



Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links