[Top][All Lists]

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

Re: [AUCTeX] autocomplete only for Latex commands/keywords?

From: Tassilo Horn
Subject: Re: [AUCTeX] autocomplete only for Latex commands/keywords?
Date: Mon, 27 May 2013 15:07:09 +0200
User-agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3.50 (gnu/linux)

Jannis <address@hidden> writes:

>>>> There is indeed no autocompletion for "\linespread", but I don't know
>>>> any "\includefigure" macro.  Did you mean "\includegraphics"?
>>> Indeed I did. Is there any way to include such (or all) available
>>> macros into this autocompletion?
>> This should happen automatically.  If you have \usepackage{graphicx} in
>> your document, AUCTeX will load auctex/style/graphicx.el, and that adds
>> the macros and environments provided by the graphicx package (including
>> \includegraphics) to the completion machinery.  For this to work, you
>> need the customizations Mosè mentioned previously.
> My settings are exactly as Mosé suggested and there is still no completion for
> \includegraphics and others but only for some standard Latex commands.
> Any ideas?

I've just written this minimal sample file bar.tex and saved it.

--8<---------------cut here---------------start------------->8---


--8<---------------cut here---------------end--------------->8---

When saving, AUCTeX created a file auto/bar.el with these contents.

--8<---------------cut here---------------start------------->8---
 (lambda ()
--8<---------------cut here---------------end--------------->8---

The (TeX-run-style-hooks ... "graphicx") will add the macros provided by
the graphicx package to the completions.  When I hit C-c RET now, I can
complete \includegraphics.

What AUCTeX version are you using?  Is the corresponding style file
graphicx.el installed somewhere (maybe as compiled graphicx.elc)?  It
should be somewhere below /usr/share/emacs/site-lisp/auctex/.


reply via email to

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