msprev / panzer

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

Suggestion: allow compact style field #35

Closed dnebauer closed 6 years ago

dnebauer commented 6 years ago

One of the excellent effects of using panzer has been that it massively streamlines my document metadata block by moving its contents to the style file. It is not uncommon for metadata block to now look something like:

title:  "My Doc"
author: Me
date:   Now
style:
  - Standard
  - Latex12pt
  - PaginateSections

Over half the lines are due to the style field. If style values were parsed as comma- and/or space-delimited lists in themselves, this could be written as:

title:  "My Doc"
author: Me
date:   Now
style:  Standard, Latex12pt, PaginateSections

This is intuitive, more compact (displaying more document content when I open a file) and perhaps even elegant

Assuming style names have never been able to contain spaces or commas, such a change would be universally backwards-compatible. Is there any technical reason this could not be implemented?

msprev commented 6 years ago

Thanks for the kind words about panzer! This is actually already supported (it's part of yaml list syntax). What you need in your metadata block is:

style:  [Standard, Latex12pt, PaginateSections]
dnebauer commented 6 years ago

Thanks very much. That was the missing piece!