New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Separate math macros file #336
Comments
Thanks for opening your first issue here! Engagement like this is essential for open source projects! 🤗 |
Thanks @alanlujan91! This is really cool, and can mean that these are shared between projects pretty easily as well. The LaTeX writing as well as the HTML only pulls in the macros that you use, which I quite like -- meaning if you submit the source to arXiv or something, you get a concise set of macros at the top of the LaTeX file of only the macros that you used. @fwkoch I think that we could do this if the math macros is a string (and exists on disk or remotely)? I think the one thing that we need to look out for is that we don't make |
@rowanc1 this might be where you're thinking already, but maybe this can be a project-like property? That way, per-file properties are defined externally, and per-file macros are defined in the particular file frontmatter. |
Yes, totally! I think this probably would make the most sense on the project. The way that citations work is that you can define on the project, and then layer in per-file bibliographies. I think that makes sense for this feature as well. You might want to use your lab-groups macros in general, but add a few extra ones for a specific file. I think that also might mean that this could be a list of strings/files/urls well. e.g. math: my_lab_group_macros.yml
# or
math:
- my_lab_group_macros.yml
- my_custom_macros.yml
# or
math:
'\dobs': '\mathbf{d}_\text{obs}' I think in all cases these resolve to a single dictionary, and also warn if there are things that get over-written. When we are changing this we should also think about #280, which allows for optional arguments in the macros. |
Should we do this in a non-
|
I really like that idea, and we do already do this with site/project/page frontmatter, it is just adding a few new ways of bringing that in (I think we will also have to tweak the math side a bit). The potential for reuse and some standardization of these components is pretty high. |
Which area is this feature request for?
MyST Markdown Syntax
Describe the feature you'd like to request
I have a huge list of latex macros defined on my myst.yml file under
math:
. I would like to be able to define these on a separate file, such asmath_macros.yml
that I could reference in my myst.yml config file instead of having the list in it.This could also allow me to organize my macros better by adding comments and some separation between different types of macros.
Describe the solution you'd like
No response
Describe alternatives you've considered
No response
The text was updated successfully, but these errors were encountered: