2
$\begingroup$

Motivation: Is there some way to bundle notebook-level options such as InputAliases into a stylesheet, so that notebooks styled with it inherit those options?

From quickly testing this, it seems not to be possible, and that you always have to run the command SetOptions[nb, ...] to set any Options for a Notebook.

But maybe there's a workaround that I'm missing?

$\endgroup$
1
  • 1
    $\begingroup$ If you're looking for this sort of thing, I suggest looking in "Core.nb" at how features are implemented $\endgroup$ Commented Mar 27, 2020 at 5:45

1 Answer 1

1
$\begingroup$

Yes, apply them to a style named "Notebook".

Warning: This will override the default InputAliases created by the FE on startup, so you will lose InputAliases such \intt that are tied to that option, unless you extract and embedded into the stylesheet as well. Which means you'll need to periodically update it if you want to keep getting the new aliases.

Finding a way to merge theme is somewhere on our to do list.

$\endgroup$
3
  • $\begingroup$ A richer inheritance mechanism w/r/t stylesheets (e.g. inheriting from multiple sheets) is something I've often wanted. I can imagine more flexible inheritance would help with this too. $\endgroup$ Commented Mar 27, 2020 at 5:45
  • $\begingroup$ About keeping them up to date, maybe something along InputAliases -> {ParentList, customaliases__} would work, can't test now. $\endgroup$ Commented Mar 27, 2020 at 7:13
  • 1
    $\begingroup$ @Kuba, I believe it does. $\endgroup$ Commented Mar 27, 2020 at 12:47

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.