Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am using Texmaker and am trying to define a new command that takes some mandatory arguments. But I want it in this way: when user just typed the first few letters of the new command, it will be auto completed with all the {}'s that have big dots in it that prompt the user to enter the argument, and the user just need to hit Tab to jump to the next {} to fill in the argument. i.e. just like the \frac{}{} command. Below is what I have, but it does not have the nice feature of autocomplete and jumping to the next argument on Tab:

\NewDocumentCommand{\clause}{mmm}{\ensuremath{(#1 \vee #2 \vee #3 )}} 
share|improve this question
You're asking for an editor feature; this can't be implemented in TeX alone. –  Matthew Leingang Dec 12 '12 at 3:51
Do you mean TexMaker (which I have never used) is supposed to automagically recognize the arbitrary parameters of every user-defined command and 'jump' appropriately (simply by parsing the commands defined in the document)? or just this specific one? If TexMaker can be made to do the former, I might be inclined to give it emacs+auctex's crown for the best *TeX editor. –  jon Dec 12 '12 at 3:56
FYI, TeXStudio, the texmaker fork, will automatically recognize every user-defined command. –  hpesoj626 Dec 12 '12 at 3:58
@hpesoj626 -- what do you mean by 'recognize'? Do you mean you can make it 'recognize' a command? I'd have thought most editors could do that. –  jon Dec 12 '12 at 6:06
@jon Sorry. I am wrong about \NewDocumentCommand but every user-defined commands and environments through \newcommand and \newenvironment will automatically have auto-completions like that being sought by OP and there is no more need to do user customizations about these. And of course you are right about most editors having this feature. –  hpesoj626 Dec 12 '12 at 6:10
show 1 more comment

1 Answer

Once you have defined your command as usual in your .tex file, click

User > Customize Completion

then type


then click Add.

Texmaker will convert the @ into a dot.

enter image description here

share|improve this answer
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.