1

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?

ebosi
  • 11,692
  • 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
  • @Naphaneal : indeed, "personal tuning" means OS global color-sheme tuning. However, under "Options/Config./General", you have the "Appearence" block in which you can define if TeXstudio should e.g. Ignore Most System Colors (that is overriding OS color-sheme). Some config file where default color are stored should thus exist... and you might fiddle with, once found. – ebosi Mar 23 '16 at 08:05
  • PS: to access the "Appearance" block, you need to tick "Show Advanced options" – ebosi Mar 23 '16 at 08:22

1 Answers1

4

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.

Tim Hoffmann
  • 11,159
  • 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 09: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