Replies: 1 comment 3 replies
-
In resilient.sile, I achieved something quite similar (using YAML rather than TOML, but that's not an essential point), with further distinctions. Styling there goes beyond fonts and color only:
Every style-aware command can define its own style(s), so lists for instance can be styled, etc. in a similar way. The concept is loosely inspired by CSS, but:
The advantage of a structured property-oriented format over a mere list, in my opinion, is that (1) it is more readable, and (2) it is extensible so other packages can leverage it with new constructs if needed. I haven't proposed this upstream, because (1) I don't think it really belongs to the core distribution to impose a certain styling paradigm over another and (2) it's fairly hard to do right from the start -- on the latter point, typically, now that I am working on making slides, I realize I might want - and even need - to further refine what "sectioning" means and how to style full pages...
As an aside note, SIL (
It should be doable, though, from classes or packages, without having to tinker with I also tend to think that the |
Beta Was this translation helpful? Give feedback.
-
As I mentioned in another discussion,
I'd like to know what you think about adding this. I'll give examples based on what I'm doing in my own extension:
The program parses a configuration file, let's say a
toml
one:After parsed, it'll be added to
SILE.scratch
at the very beginning ofcore/sile.lua
.core/sile.lua
and not otherwise, like a package?My first implementation used to be a dedicated package, but I couldn't call the options in the core files, what is essencial to do something like this:
Then the program will start already applying the settings in the config file.
Other interesting feature SILE could have that I did recently in my module is support to multiple config files, one for the working directory (with the highest priority) and another in home in a folder like
.sile
or.config/sile
.The argument: this would allow the end-user to reuse their favorite settings as many as they want, and moreover this would reduce the amount of commands to write in the
.sil
files, since almost anything can be covered by it, as I'm doing for alignments, main language, paper size, frame set declaration, spacing between lines or paragraphs, etc...Beta Was this translation helpful? Give feedback.
All reactions