TransWikia.com

Adding suggestions for arguments to the chemnum-package

TeX - LaTeX Asked by skyter on January 14, 2021

I am writing my thesis in chemistry and use the chemnum-package to number my compounds. Because it is gotten quite a few compounds now, I would like to get suggestions from texstudio, which tags for compounds I already used, like it is the case for the ref– or the cite-command.

Because texstudio doesn’t recognise the commands of chemnum, I made myself a chemnum_user.cwl file in .AppDataRoamingTeXstudiocompletionuser with the content:

initcmpd{tag}#n
cmpd{tag}#n
cmpd+{tag}#n
replacecmpd{tag}#n

Is there a way, that texstudio shows me all the tags, that are used in one of the commands before, if I type cmpd{ ?

Minimal working example:

documentclass{scrreprt}    
usepackage{chemnum}
begin{document}

This is the first time, I call the chemical 1: cmpd{chemical1}.

If I call it a second time, I would like texstudio, to suggest "chemical1" as argument of verb|cmpd{}|

end{document}

One Answer

You should define it with #r classifier (see docs). Like:

cmpd{tag}#r

I don't have TexStudio now, so can't check if it works.

Answered by Denys Potapov on January 14, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP