Closed halloleo closed 6 years ago
Thanks for this. I need to think more carefully about it, and the best way for users to activate this option. Let me think on this.
How about something like:
Base:
all:
metadata:
numbersections: true
commandline:
smart: true
standalone: true
filter:
- run: smallcaps.py
markdown:
- on: multiline_tables
- off: table_captions
Firstly, thanks for taking this on. One of my objectives is not to end up with a fork.
Secondly to your suggestion: I can see my simple proposal to make the read
option settable has severe disadvantages. So introducing new yaml fields might be the way to go.
To the naming of the new yaml field: are extensions in pandoc exclusive to markdown? Couldn't we have a general extensions
field, which would be added to all applicable --read=<format>
options, not only to --read=markdown
? Just a thought...
More thoughts: It might be harder to implement, but using true
/false
would be mor concicten with other fields than using on
/off
. I.e.:
Base:
all:
metadata:
numbersections: true
commandline:
smart: true
standalone: true
filter:
- run: smallcaps.py
markdown:
multiline_tables: true
table_captions: false
Ok, I think that this syntax is the best option.
No extensions exist for other formats, so it's only relevant to the markdown reader.
Or how about:
Base:
all:
metadata:
numbersections: true
commandline:
smart: true
standalone: true
filter:
- run: smallcaps.py
extension:
markdown:
multiline_tables: true
table_captions: false
Ok, currently going with this syntax:
Notes:
all:
read:
markdown:
multiline_tables: true
table_captions: false
latex:
auto_identifiers: true
I think the hierarchical subdivision in extensions and markdown is good! - I'm not so sure about the naming read
: After all read
is the keyword for the pandoc option. - I think another name like extension
avoids confusing
I'll think on about it. I'm not keen on extension
as it does not say whether the extension applies to the reader or writer. That can look confusing in a style definition. This field only applies to the reader.
Just to say that I'm going to implement this feature, but it is non-trivial and I want to get it right. It won't appear for a while yet.
Hi again, I have created a first version where the
read
option can be set in the style files. It works with an style entry like:It doesn't have protection against use in none-markdown source files yet, but it's a start.