I am using a KOMAscript class (namely scrbook) and want thus to use the \addpart{} commands in order create a non-numbered part (similar to \part*{}, but creating a ToC-entry for this part and more KOMA-script compliant).

Issue: However, \addpart{} is considered by TeXstudio as a "normal command" (i.e. macro of "type" normal) and not as a macro of "type" sectioning (cf. figure below).

This cause a disruption in the Structure tree (cf. left column), as well as a bad coloring regarding other sectioning commands.

enter image description here

Question: Is there a way to change the "type" of \addpart{} from normal to sectioning?

  • 1
    offtopic: nice window style. how did you do that? – naphaneal Mar 22 '16 at 16:07
  • @Naphaneal: mainly using this color sheme + personal tuning – ebosi Mar 22 '16 at 16:12
  • Ok @ebo, but how did you do to change the color of the Structure window? – jotagah Mar 22 '16 at 20:27
  • @jotagah as I found out: the widgets are getting their background color from the operating system. so if you change the appearance from the OS, it effects the editor as well – naphaneal Mar 22 '16 at 21:20
  • @ebo I dug a little into texstudio: have you tried setting a custom highlight? – naphaneal Mar 22 '16 at 21:21

As of TeXstudio 2.10.8 it's not possible to override this behavior for predefined commands (which is the case for all KOMAscript commands), to be more precise for commands in built-in cwls.

Future releases of TXS will have that possibility (for details see FAQ: What are cwl files good for and how do they work?).

I've just added the KOMAscript commands so that they will be recognized automatically. If you can build TXS yourself, you can just checkout the repo and build and use.

| improve this answer | |
  • Thx for this extra-quick feature adding! Since I don't really feel easy by compiling a software out of a repo by myself, I'll wait for an "general public release". What is the difference between the "Development versions" update level (in TXS/Options/Configure/General/Update), and the mot up-to-date version in sourceforge? – ebosi Mar 25 '16 at 9:26
  • 1
    See the tooltip: - Stable Releases: Choose this if stability is most important to you. - Release Candidates: Are close to a future release in terms of features and stability. Choose this to get previews of future releases and help us by testing the version before it's been published as an official release. (Stable releases are notifed as well) - Development Versions: Contain the latest features, but might be unstable. They are just very recent and not well tested. – Tim Hoffmann Mar 25 '16 at 13:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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