auctex
[Top][All Lists]
Advanced

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

Re: Some LaTeX commands, such as \boldsymbol and \hspace, can't be compl


From: Denis Bitouzé
Subject: Re: Some LaTeX commands, such as \boldsymbol and \hspace, can't be completed in AUCTeX.
Date: Wed, 08 Dec 2021 17:51:41 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)

Le 08/12/21 à 17h37, Jean-Jacques Rétorré a écrit :

> Does TXS can easyly provide completion for home made macros ?

Yes: it is enough to have e.g. \newcommand{\dst}{Dostoïevski} in your
document to get completion for `\dst`.

And that works as well for macros with (mandatory or optional)
arguments. E.g. with:

  ┌────
  │ \newcommand{\congru}[2][x]{#1\equiv #2\,\modulo}
  └────

both:

- \congru{arg2}
- \congru[opt. arg1]{arg2}

will be presented as completions and, ice on the cake, `opt. arg1` and
`arg2` are placeholders, i.e.:

- the first one is automatically selected,
- once selected, they can just be replaced (not need to Suppr.),
- you navigate from one to contiguous ones by (by default) C-→ or C-←.
-- 
Denis



reply via email to

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