Closed FranzFelberer closed 6 years ago
txs uses the cwl files to determine the meaning of the arguments. Automatically scanned packages don‘t have that information and hence all arguments are considered to be non-text arguments. To change that you need to change the cwl file, see wiki and manual http://texstudio.sourceforge.net/manual/current/usermanual_en.html#CWLDESCRIPTION
Thanks, unfortunately I can't figure out how to use it, I have 2 problems: 1. I created a moderncv.cwl file in ~/.config/texstudio/completion/user
it is not used as completion as txs shows the following auto-completion: \cventry{year--year}{degree or job title}{institution or employer}{city}{grade}{description}
even I set \cventry{%<year_start%>--%<year%>}{%<degree or job title%>}{%<institution or employer%>}{%<city%>}{%<grade%>}{%<description%>}#n in my moderncv.cwl file.
I don‘t understand your first issue. It completes with the command which you want ?
2) the argument needs to be „text“ or „title“
sorry for the confusion. I didn't make myself very clear:
my moderncv.cwl file is ignored by txs. Any idea why?
so the arguments should like below in order to spellcheck the second argument and use the text between % % for auto-completion?
\cventry{%<year%>--%<year%>}{text%<degree or job title%>}
it is „degree....%text“ , no need to use %<%> all the time.
you can activate a cwl manually in the options. Apart from that txs uses the documentclass and usepackage to determine whoch cwls to use, see wiki
Doing what you mentioned solves the problem that the "manuell" spell checker checks this text, I was referring to the on-type spell checker that indicates mistakes while writing by a red unline-ripple. It shows this behavior if in the same argument the text has a property like \testbf. See image: It indicates no error for the first "wrongwriten" but for the second which is in a \textbf environment.
\cventry{year-year}{degree or job title%text}{institution or employer%text}{city}{grade}{description%text}#n
works fine here
Thank you, I got it working, but I experience some other strange behavior.
I defined a command in my tex file:
% switch between languages
\newcommand{\multilang}[3]{#1} % #1 en, #2 fr, #3 de
In ~/.config/texstudio/completion/usercommands.cwl I add the line:
\multilang{en%text}{fr%text}{de%text}#n
But completion results in:
\multilang{arg1}{arg2}{arg3}
Strange is, that it was working and now it doesn't anymore.
define the command in a sty file, and it should work
thanks for your help. that doesn't solve the problem. the strange thing is:
The class-moderncv.cwl
looks like this issue should be fixed.
But I still have the problem that TeXStudio doesn't do spellchecking in my \cventry
commands. What's the problem?
do you have the latest version of txs ?
Yes, version 2.12.14
Here's a screenshot:
Here is mine:
you need to use a development build to make use of the fix
So this is a bug, which is not yet fixed in the current version 2.12.14?
looks like it
Environment
Expected behavior
Spell check every meaningful text, that is shown in the output file
Actual behavior
ignoring text entries for \cventry arguments that are displayed
How to reproduce
open moderncv example from github https://github.com/xdanaux/moderncv