Closed Utsira closed 9 years ago
As an experiment, I tried defining a style in the YAML block which inherits from the letter style:
---
style: Letter2
styledef:
Letter2:
parent:
- Letter
latex:
metadata:
toaddress: |
| addressee name
This works. But according to the documentation I can just override the setting I want can't I?
Style settings can be overridden by adding the appropriate field outside a style definition in the document’s metadata block
Have you tried:
---
style: Letter
toaddress: person I'm writing to
...
Let me know if this doesn't work.
More complex overriding behaviour (e.g. having sensitivity to which writer is being used) requires a styledef
and explicit inheritance as you describe.
Wow that works! I thought I'd tried every combination. Thanks for solving this, and thank you for creating Panzer. I've been using the Pandown plugin for Sublime Text 3 which has a similar functionality (storing Pandoc args in a file, JSON in pandown's case), but Panzer is a lot more elegant I think with named styles, inheritance, and the option to use the YAML header (particularly in a case like this, where the addressee is specific to the letter), and keeps things platform independent (in case I move away from Sublime Text 3).
Thanks! I'm glad that you like it! It's always a good idea to be editor neutral!
Hello, I'm trying to override some of my style settings from the markdown document's YAML data block, but it's not working. Here is my style.yaml (this all works as it should):
I am trying to override latex: metadata: toaddress
I have tried various things in the document's YAML block eg:
and also:
Both of them with and without the hyphens. But every time it just gets processed with the settings from the styles.yaml file. What am I doing wrong?
Thanks.