[Top][All Lists]

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

[AUCTeX] Re: A little suggestion about AucteX

From: Ralf Angeli
Subject: [AUCTeX] Re: A little suggestion about AucteX
Date: Mon, 27 Jun 2005 18:29:57 +0200
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

* David Kastrup (2005-06-27) writes:

> Ralf Angeli <address@hidden> writes:
>> M-x customize-variable RET LaTeX-top-caption-list RET
> Uh, ok.  Can we modify this automatically (buffer-locally, I guess)
> according to the above cases?  Would probably need to be done in
> style/caption.el (currently I only see captcont.el), and in
> scrbase.el?
> Worth the trouble?

It would be nice if AUCTeX did the right thing if it recognizes that
captions should be placed above certain floats.

Regarding the `tablecaptionabove' option of KOMA-Script classes this
will probably not be that difficult to implement.  We'll just make
`LaTeX-top-caption-list' buffer-local (as you already suggested) and
add "table" to it if it is not included yet.  This should be pretty

But adding support for caption.sty will be difficult.  First, we don't
know which version of the package will be used during the LaTeX run
and the interface changed quite a bit in version 3.  Second, the
interface in version 3 uses a key=value syntax.  (For table captions
the option would be "\usepackage[tableposition=top]{caption}".)[1]
Thus, we'd have to make the document parser aware of this syntax and
implement something for doing the right thing with a value if a
certain key is encountered.

Not exactly the problem, but related: The current parser is throwing
all the information away about where a style (i.e. what is stored in
`TeX-active-styles') comes from (e.g. if it is a class option or an
option of a certain package).  That's e.g. why, when we see an "a4"
style, we cannot say if it is from (an obsolete) "\usepackage{a4}",
"\usepackage[a4]{foo}", or "\input{a4}".

A revamped parser would store styles in a more complex data structure
which makes it possible to identify the type of command and the
associated mandatory and optional arguments.

I am not sure if it makes much sense to add support for key=value
parsing to the current parser without solving the problem of
associating these style entries with the packages they belong to.

So, long story short, recognizing "tableposition=top" and
automatically adapting `LaTeX-top-caption-list' to it will likely not
happen soon.

Mail-Followup-To: address@hidden (I hope this works.)

[1] There is another possibility with
"\captionsetup[table]{position=top}" which the parser wouldn't even


reply via email to

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