Skip to content
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

Enable overriding of in-document metadata variables by command-line metadata variables #6

Open
maelvls opened this issue May 15, 2017 · 0 comments

Comments

@maelvls
Copy link

maelvls commented May 15, 2017

Hi,

First, I want to thank you for your excellent work. Madoko is great!

For now, it is not possible to override an in-document metadata variable using a command-line argument. I think it would be a good thing if we could do so. Here two use-cases to outline this feature idea:

  1. I want to include a version number (git describe --tags) to my document. To do so, I use the argument -mversion:$(git describe --tags) so that the variable &version; becomes available in the document. But I would also like to be able to set Version: N/A in the header so that if I am processing the document without the -mversion argument, I get a default version number. Because the in-document metadata variables are "shadowing" the -mkey:value arguments, it doesn't work.

  2. When I'm writting/editing with madoko-local, I don't want to bother with the installation of the full texlive distribution. Instead, I prefer turning on Math Mode: mathjax. But when compiling the final distributed PDF (this is done by a continuous integration service), I'd like to get the latex-rendered, and thus I would like the 'math-mode' variable to be overridden in some way by Math Mode: static. I first though about using -mmath-mode:static. But command-line arguments are "shadowed" by in-document header metadata flags.

I went through some of the koka code and found out that the command-line -m arguments must be parsed first because they are needed for processing the document (e.g., -mmath-latex:cmd).

I would be pleased to submit a pull request, but I can't find the right place to start hacking (optionsMeta.kk?)

Thank you again for your awesome work!

Maël

@maelvls maelvls changed the title Command-line metadata overriding in-document metadata Enable overriding of in-document metadata variables by command-line metadata variables May 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant