mystmd icon indicating copy to clipboard operation
mystmd copied to clipboard

Support setting at least the template, possibly other options, from the CLI

Open fperez opened this issue 9 months ago • 2 comments
trafficstars

For me, two use cases motivate this proposal:

  1. Easy experimentation with different templates without having to edit the source md/ipynb files. This is particularly useful in the case of using myst to generate output PDF from single source file. I have been very successfully using it to replace LaTeX lately, and I think easy experimentation at the CLI is part of making such a workflow as fluid a possible.
  2. Batch conversion of (potentially many) md/ipynb files into PDF. Concretely, at Berkeley we have use cases where we want to have easy ways for student work done in notebooks that they can get as a PDF very easily, and without having to learn much about myst/yaml/etc, as that's not the point of most courses. We want

Proposal

I suggest supporting a --template option at the CLI that lets the template be specified at the CLI.

It could also be useful to allow for --template-options to take a string with additional options, but at that point the complexity may not be worth it, and it may be best to keep it at just the basic template choice, with further customization being done via frontmatter or myst.yml file. So I'm less sure about this addition, but pretty convinced the basic ``--template` would be valuable.

Additional notes

Original discussion on discord

fperez avatar Jan 25 '25 23:01 fperez