mystmd
mystmd copied to clipboard
Doc: How to use LaTeX -> myst
Proposal
There were some mentions of LaTeX -> myst and there is the equivalent package, but it is unclear how one would use it. Is it supposed to be an equivalent source like an .md file? Some documentation would be helpful
Any latex source files that are in the project will be picked up and transformed. There is a blog post here and some examples in this repository that we use for Physiome.
Docs would be wonderful for this portion of the workflow and happy for contributions to start it! (I think that the structure of the docs may need to be adapted, but probably just a new page that talks about this a bit would be a great addition, and we can organize later).
The first cut at this is here: https://mystmd.org/guide/writing-in-latex
Happy for feedback!
From what I read there, there is no frontmatter section for LaTeX?
Maybe some other undocumented limitations would be splitting the document in multiple files? That would be a limitation for book projects.
I will take another pass on documenting how the frontmatter is dealt with (i.e. everything before \begin{document}), which is parsed, but there are some limitations / quirks.
It is also possible to use snippets of latex (e.g. a latex table):
https://mystmd.org/guide/embed#docs-include
You can split up files and use include in latex as well, but you might have a different thing in mind for book projects?
You can split up files and use
includein latex as well, but you might have a different thing in mind for book projects?
Would mystmd try to parse any .tex file and create a page for it or only those that have \begin{document}? If the former, that would create a problem for book projects where the content of included chapters do no have \begin{document}. That is the main problem I was thinking of
By default, every parsable file is included. At the moment, you can change what is included in the table of contents using the myst init --write-toc and removing what is not relevant. The way that web is presented is often different, for example, in my thesis, each chapter is a page online, but there is only one \begin{document}.
The way that web is presented is often different, for example, in my thesis, each chapter is a page online, but there is only one
\begin{document}.
Just to clarify that is independent of the file separation and it's governed by the frontmatter right?
Correct, the configuration is in the _toc.yml at the moment (docs) and does not depend on the file separation choices.