unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Eric Ludlam <eludlam@mathworks.com>
Subject: Re: expand/collapse latex section under speedbar ?
Date: Mon, 28 Jun 2004 10:03:46 -0400	[thread overview]
Message-ID: <kowu1rsrst.fsf@garritylinux.dhcp.mathworks.com> (raw)
In-Reply-To: 87wu1vvf5t.fsf@info.unicaen.fr

For LaTeX, it is unlikely you would want to write a full parser.  You
probably want to do the same thing as the texinfo parser, which is to
use regular expressions to search for the sections you want, and then
sort them into a hierarchy.

Because it would be a free-form parser, there are few rules.  I
recommend starting with the version of semantic in the latest cedet
beta for best future compatibility, and copy the texinfo parser into a
latex parser, then change the regular expressions.  That was how I
made the html parser in only an hour or two.  This would give you the
advantage of having all the logic and boiler plate for hooking things
together complete before you start writing the regular expressions.

Eric

>>> Samir Saidani <saidani@info.unicaen.fr> seems to think that:
>Hi Eric,
>
>Yes I already checked the CEDET project, and would like to know if I
>can quite easily and quickly add the feature I want in semantic
>framework. I tried to find a tutorial or HOWTO, because despite
>reading the documentation, I really don't know how to start ! Do I
>have only to create a BNF file for latex file or do I to create a
>semantic-latex.el file or both ? And how to test quickly all this
>stuff ?
>
>Thanks at all !
>
>Samir
>
>>>>>> "Eric" == Eric Ludlam <eludlam@mathworks.com> writes:
>
>    Eric>   You could also add support for LaTeX/TeX into semantic (a
>    Eric> part of my CEDET project.)
>
>    Eric>   http://cedet.sf.net/semantic.shtml
>
>    Eric>   In this case, the resulting improved tag structure would
>    Eric> be usable in imenu, speedbar, and other areas, plus you get
>    Eric> the benefit of beginning-of-defun working in LaTeX, plus (if
>    Eric> it is useful to you) foreign tag insertion.
>
>    Eric>   Lastly, support of speedbar would let you use ECB for
>    Eric> LaTex, which would be pretty nifty too.
>
>    Eric> Eric

-- 
Eric Ludlam                     The MathWorks x 7556 eludlam@mathworks.com
http://www.siege-engine.com                          http://www.mathworks.com

      reply	other threads:[~2004-06-28 14:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-23 14:36 expand/collapse latex section under speedbar ? Samir Saidani
2004-06-23 18:30 ` Matthias
2004-06-24 17:48   ` Samir Saidani
2004-06-25 12:46     ` Eric Ludlam
2004-06-25 15:19       ` Samir Saidani
2004-06-28 14:03         ` Eric Ludlam [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=kowu1rsrst.fsf@garritylinux.dhcp.mathworks.com \
    --to=eludlam@mathworks.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).