A community curated collection of MyST Markdown compatible templates.
These templates allow myst to export markdown files as typeset, formatted documents using PDF, LaTeX, Typst, or Word.
Templates can expose data-driven options for customization ensuring the final documents comply with author submission guidelines provided by a particular journal, conference organizer or university.
This repository:
- holds issues for new and general information for improving existing templates
- downloads each template listed in the data folder
- implements a lightweight API that serves an index of template metadata
- deploys that API to https://api.mystmd.org
- automatically updates the organization readme
To add a new LaTeX template, fork this repo, and modify tex.yml, the new template should be added as a new entry in the listing:
templates:
- organization: myst
name: agu2019
source: https://github.com/myst-templates/agu2019
latest: mainOnce you've made your change, open a PR.
Docx templating currently requires a dynamic rendering function using docx passed directly to mystmd.
However, data-driven options specified by a template.yml are still passed to this renderer. These may be added at docx.yml, similar to LaTeX template.
Fork this repo, make your change and open a PR.
To add, remove or update a template in the index, you need to build and run the CLI tool.
- Install the mini CLI tool using
npm install - Run
npm run build:cli - Run
npm run link
After you have made your changes to a specific index file(s), call myst-templates-api index data/tex.yml from the main folder, which will create an index file and update the organization Readme.
./cli: CLI for generating JSON data files fromdata/x.ymland template clone../src: Server for JSON data files.
To run the API server locally for development and testing:
-
npm install -
git clone [email protected]:myst-templates/.github.git readme
The tool wants to populate a README with a list of templates. Provide it with an example.
npm run build
- Build CLI into
./dist. - Build API server into
./api.
node dist/myst-templates-api.cjs index data/*.yml
Combine JSON data files in data/*.yml with template information,
obtained from cloned template repos.
npm run copy:data
Copy JSON data into src/data.
node server.js
Serve data on https://localhost:10000.