Replies: 3 comments 8 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.
-
Switch tongue-in-cheek on, with a grain of salt. So as mentioned many months ago already, re·sil·ient has a style system of the kind mentioned here, which went through the fire for now 3+ years, with 3 published books to its credit at this point, all available online for free, to check their achievements. Question 1 is: Why would you want a different system in the core distribution? (I.e. what is this discussion here supposed to be?) If this discussion was a "question", I'd say it was answered. Switch tongue-in-cheek off, it's all about salt and pepper. |
Beta Was this translation helpful? Give feedback.
-
I've just suggested that SILE should have a built-in way to handle configuration files, it doesn't need to be this or that one.
Absolutely nothing, I just realized that your module is way better than whatever I was about to create and I'm switching to it BTW. |
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