Hi, AFAIK, there are no proper way to do that via configurations. I think you need to create your own Sphinx extension and modify LaTeX macros from it. Both custom variable in conf.py and `-D` argument for sphinx-build command are need to add new config value. And then you'll modify latex_maketitle configuration on config-inited event (it is happened after initialization of configurations).
As a first step, please read the document for extension developers: https://www.sphinx-doc.org/en/master/extdev/index.html Thanks, Takeshi KOMIYA 2019年6月21日(金) 18:06 Pieter Claeys <[email protected]>: > > I would need to extend / modify the default latex generated document with a > few extra variable fields (reason: I need to easily generate a few variations > of a document with different title pages). > > I already figured out to use latex_maketitle where I can define some custom > latex code. > > However, if I would want a 'favoritecolor' variable somewhere in the conf.py > file; and use that in the latex code to display 'favoritecolor' on the title > screen: How should I do that? I am newbie in latex code. > > > As an extra bonus, I would even like to set 'favoritecolor' at command-line > and pass that to sphinx . But I seems you can only override a specific number > of sphinx parameters (like project, release) using the -D argument. Any other > ways to achieve my usecase? > > -- > You received this message because you are subscribed to the Google Groups > "sphinx-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at https://groups.google.com/group/sphinx-users. > To view this discussion on the web visit > https://groups.google.com/d/msgid/sphinx-users/5ce3ef94-c568-4c39-9100-b7fa9c815d67%40googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "sphinx-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/sphinx-users. To view this discussion on the web visit https://groups.google.com/d/msgid/sphinx-users/CAFmkQANirVwdwkeK_JhJ54Ks-7U-Cq2hCBXxa%3DzWKuCengW0%3DQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
