MacDownApp / macdown

Open source Markdown editor for macOS.
https://macdown.uranusjr.com/
9.43k stars 1.09k forks source link

Per-document style-sheet #494

Open Jmuccigr opened 8 years ago

Jmuccigr commented 8 years ago

I've now set up a few different stylesheets that I use with different kinds of documents. For example, notes I'm writing for lectures are more tightly formatted, with a smaller font, than something I'm doing as an article. It's bit of a hassle to have to go into the prefs to switch from one to the other, so I'm requesting either:

  1. documents can have their own stylesheets; i.e., they can be set to over-ride the current default. This could be done by allowing the stylesheet to be set in the YAML header, for example, as pandoc does.
  2. Easy access to the stylesheets in the menu, instead of going into the preferences. Something like File>Stylesheet>[list of stylesheets]. Or this would be great in the toolbar.

The two are not mutually exclusive of course.

uranusjr commented 8 years ago

I have been thinking about 1. for a while now. And more things need to be configurable per-document-wise, not just the stylesheet. And I agree the YAML header is probably the right way to go. Point 2. would be nice, too, but if both this and the YAML config are implemented, which one should we use when the user changes the stylesheet in the menu?

Jmuccigr commented 8 years ago

Well, setting the style via YAML is definitely not Mac-like, so this is indeed an issue. How about this:

PS Stylesheet handling in the prefs is a little broken now. See #333.

Jmuccigr commented 8 years ago

Any more thought on this? I'm really using MacDown as a front end for pandoc most of the time, so anything that makes this work better is high on my list.

In that context, see also pandoc-related stuff in #526, #329, #308, #259, #255.