Jannis <[email protected]> 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---
\documentclass{article}
\usepackage{graphicx}
\begin{document}
\end{document}
--8<---------------cut here---------------end--------------->8---
When saving, AUCTeX created a file auto/bar.el with these contents.
--8<---------------cut here---------------start------------->8---
(TeX-add-style-hook
"bar"
(lambda ()
(TeX-run-style-hooks
"latex2e"
"article"
"art10"
"graphicx")))
--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/.
Bye,
Tassilo
_______________________________________________
auctex mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/auctex