msprev / panzer

pandoc + styles
BSD 3-Clause "New" or "Revised" License
159 stars 15 forks source link

Default style #19

Closed halloleo closed 9 years ago

halloleo commented 9 years ago

Is there a name for a default style which (if it is defined in the styles.yaml file) is used when the document contains no style definition?

msprev commented 9 years ago

No, this was a deliberate design decision. If no style field is provided, then panzer does not attempt to apply a style definition.

You can easily define your own 'default' that you can assign explicitly. A natural arrangement is to have the default be the parent of any other style. I use a style called 'Base' as my default style; all my other styles derive from it.

halloleo commented 9 years ago

Mmmmhhhh, can my own ‘default style' get used by documents which have no style definition. That would be so great!

On 10 Sep 2015, at 18:05, Mark Sprevak notifications@github.com wrote:

No, this was a deliberate design decision. If no style field is provided, then panzer does not attempt to apply a style definition.

You can easily define your own 'default' that you can assign explicitly. A natural arrangement is to have the default be the parent of any other style. I use a style called 'Base' as my default style; all my other styles derive from it.

— Reply to this email directly or view it on GitHub https://github.com/msprev/panzer/issues/19#issuecomment-139159293.

msprev commented 9 years ago

A workaround is that you can invoke panzer with panzer source.md --metadata=style:Base?

The right default, if the style field is missing, is for there to be no style!

halloleo commented 9 years ago

Unfortunately that is not at all a work around: Because when you set --metadata=style:default on the command line the document cannot override this anymore. :-( A default style should be overridable by any given style, don’t you think so?

On 10 Sep 2015, at 20:54, Mark Sprevak notifications@github.com wrote:

A workaround is that you can invoke panzer with panzer source.md --metadata=style:Base?

The right default, if the style field is missing, is for there to be no style!

— Reply to this email directly or view it on GitHub https://github.com/msprev/panzer/issues/19#issuecomment-139203108.

msprev commented 9 years ago

You got me there. I still think that no style should be applied unless one is specified...