sphinxmaketitle variable from config.py

101 views
Skip to first unread message

Angel Diaz

unread,
Jan 6, 2020, 12:57:44 PM1/6/20
to sphinx-users
I've overridden the custom class with my own class and am having issues with variables,
is it possible to pull in a custom variable defined config.py?

config.py
my_custom_variable='foobar'

my_custom_class.cls (trimmed down)
\newcommand{\sphinxmaketitle}{%
   
{\Huge \@my_custom_varaible} \par} %<- I need something like this...
}

Thanks in advance,
-Angel

Komiya Takeshi

unread,
Jan 7, 2020, 11:18:55 AM1/7/20
to sphinx...@googlegroups.com
Hi Angel,

How about using latex_elements['preamble'] ? It is inserted into
preamble part of the document. So you can build \sphinxmaketitle macro
dynamically.
https://www.sphinx-doc.org/en/master/latex.html

Thanks,
Takeshi KOMIYA

2020年1月7日(火) 2:57 Angel Diaz <ajco0...@gmail.com>:
> --
> 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 sphinx-users...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sphinx-users/029bd2d0-d6a7-403f-a6c7-ad4e18af3107%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages