3

I have downloaded clrscode3e.sty file and put it at the corresponding place, it works now. But TeXstudio auto completion fails. How does TeXstudio achieve auto completion? What can I do to enable auto completion for clrscode3e?

2 Answers 2

2

You need a cwl-file which doesn't exist for clrscode3e.sty in current TeXstudio. See Options->Configure TeXstudio->Auto completion. You have to create an own one.

8
  • so how can I find cwl files for clrscode3e?How can I create my own one?
    – youkaichao
    Commented Jul 24, 2018 at 11:58
  • On Ubuntu they are in ~/.config/texstudio/ and the own one in ~/.config/texstudio/complition/user/
    – user2478
    Commented Jul 24, 2018 at 12:06
  • I have found the cwl generated by tex studio automatically, but it still can't do auto completion. I have seen the line \proc{arg1}#S at clrscode3e.cwl, but when I include clrscode3e package and type \pro, I can't see proc at the command list to be selected.
    – youkaichao
    Commented Jul 24, 2018 at 12:06
  • I have surprizingly found out that if I change the line \proc{arg1}#S to \proc{arg1} (namely, delete the #S) or change it to \proc{arg1}#, tex studio will do the auto completion now. Is it a bug of tex studio that it auto generates wrong cwl files?
    – youkaichao
    Commented Jul 24, 2018 at 12:13
  • @游凯超 Read “classification format” in the user manual.
    – Troy
    Commented Jul 24, 2018 at 12:15
1

after trying for some while, I have worked out the way.

according to user manual, go to the TeXstudio config directory: This directory is placed in ~/.config/texstudio under linux and usually "c:\Documents and Settings/User/AppData/Roaming/texstudio" under windows then go to sub directory completion\autogenerated, you can see lots of cwl files. open one with text editor. If you see some lines end with #S, this is the cause. If you are using linux, then a single line of sed -i 's/#S$/#/g' *.cwl should do the trick. If you are using windows, maybe you can checkout cmd scripts to find out how to do it.

according to my experience, either replacing #S with # or removing #S does the trick.

^_^

You must log in to answer this question.

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