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