3

I am creating my own custom .cwl file for TeXstudio. What command should I put in my .cwl file to get the following completion:

\begin{lemma}
    content...
\end{lemma}

with content... specified as a placeholder?

1

1 Answer 1

3

The .cwl file should look like:

\begin{lemma}%\    %<content...%>%\\end{lemma}

and should be saved in C:\Users\[UserName]\AppData\Roaming\texstudio\completion\user for Windows or /.config/texstudio/completion/user on Linus/macOS. Then go into Options -> Configure TeXstudio -> Completion and tick the box next to your .cwl file name.

3
  • sorry for bothering, but I have a similar issue trying to make TeXstudio recognize my own packages in the completion list inside the command \usepackage. Do you have any suggestion? This is my question about completion list of my own packages.
    – FHZ
    Sep 30, 2020 at 20:48
  • @FHZ - I just spent the last 30min on it but no luck. I tried recreating your problem and got the same results as you. To be honest the TeXStudio completion seems pretty buggy to me. Other people have also complained about this. It appears that the #u classification does not work properly.
    – James
    Oct 1, 2020 at 5:30
  • Thank you very much, at least now I know it is not a local problem nor a catchy secret method I could not understand from the manual reading.
    – FHZ
    Oct 1, 2020 at 21:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .