summaryrefslogtreecommitdiffstats
path: root/sphinx/texinputs/sphinxlatexcontainers.sty
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 17:25:40 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 17:25:40 +0000
commitcf7da1843c45a4c2df7a749f7886a2d2ba0ee92a (patch)
tree18dcde1a8d1f5570a77cd0c361de3b490d02c789 /sphinx/texinputs/sphinxlatexcontainers.sty
parentInitial commit. (diff)
downloadsphinx-cf7da1843c45a4c2df7a749f7886a2d2ba0ee92a.tar.xz
sphinx-cf7da1843c45a4c2df7a749f7886a2d2ba0ee92a.zip
Adding upstream version 7.2.6.upstream/7.2.6upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'sphinx/texinputs/sphinxlatexcontainers.sty')
-rw-r--r--sphinx/texinputs/sphinxlatexcontainers.sty22
1 files changed, 22 insertions, 0 deletions
diff --git a/sphinx/texinputs/sphinxlatexcontainers.sty b/sphinx/texinputs/sphinxlatexcontainers.sty
new file mode 100644
index 0000000..93b2c8c
--- /dev/null
+++ b/sphinx/texinputs/sphinxlatexcontainers.sty
@@ -0,0 +1,22 @@
+%% CONTAINER DIRECTIVES
+%
+% change this info string if making any custom modification
+\ProvidesFile{sphinxlatexcontainers.sty}[2021/05/03 containers]
+
+% The purpose of this file is to provide a dummy environment sphinxclass which
+% will be inserted for each class in each container directive. The class name
+% will be passed as the argument to the environment.
+%
+% For a class foo, the user can define customised handling of that class by
+% defining the sphinxclassfoo LaTeX environment.
+
+\newenvironment{sphinxuseclass}[1]{%
+ \def\sphinxClassFunctionName{sphinxclass#1}%
+ \ltx@ifundefined{\sphinxClassFunctionName}%
+ {}% undefined so do nothing
+ {\expandafter\begin\expandafter{\sphinxClassFunctionName}}%
+}{%
+ \ltx@ifundefined{\sphinxClassFunctionName}%
+ {}% we did nothing so we keep doing nothing
+ {\expandafter\end\expandafter{\sphinxClassFunctionName}}%
+}%