1%% INDEX, BIBLIOGRAPHY, APPENDIX, TABLE OF CONTENTS
2%
3% change this info string if making any custom modification
4\ProvidesFile{sphinxlatexindbibtoc.sty}[2021/01/27 index, bib., toc]
5
6% Provides support for this output mark-up from Sphinx latex writer:
7%
8% - environments: (backup defaults or get redefined)
9%
10%   - sphinxtheindex (direct mark-up or via python.ist or sphinx.xdy)
11%   - sphinxthebibliography
12%
13% - macros: (defines defaults)
14%
15%   - \sphinxmaketitle
16%   - \sphinxtableofcontents
17%   - \sphinxnonalphabeticalgroupname
18%   - \sphinxsymbolsname
19%   - \sphinxnumbersname
20%   - \sphinxcite
21%
22% Requires:
23\RequirePackage{makeidx}
24
25% fix the double index and bibliography on the table of contents
26% in jsclasses (Japanese standard document classes)
27\ifx\@jsc@uplatextrue\@undefined\else
28  \renewenvironment{sphinxtheindex}
29    {\cleardoublepage\phantomsection
30     \begin{theindex}}
31    {\end{theindex}}
32
33  \renewenvironment{sphinxthebibliography}[1]
34    {\cleardoublepage% \phantomsection % not needed here since TeXLive 2010's hyperref
35     \begin{thebibliography}{#1}}
36    {\end{thebibliography}}
37\fi
38
39% disable \@chappos in Appendix in pTeX
40\ifx\kanjiskip\@undefined\else
41  \let\py@OldAppendix=\appendix
42  \renewcommand{\appendix}{
43    \py@OldAppendix
44    \gdef\@chappos{}
45  }
46\fi
47
48% make commands known to non-Sphinx document classes
49\providecommand*{\sphinxmaketitle}{\maketitle}
50\providecommand*{\sphinxtableofcontents}{\tableofcontents}
51\ltx@ifundefined{sphinxthebibliography}
52 {\newenvironment
53  {sphinxthebibliography}{\begin{thebibliography}}{\end{thebibliography}}%
54 }
55 {}% else clause of \ltx@ifundefined
56\ltx@ifundefined{sphinxtheindex}
57 {\newenvironment{sphinxtheindex}{\begin{theindex}}{\end{theindex}}}%
58 {}% else clause of \ltx@ifundefined
59
60% for usage with xindy: this string gets internationalized in preamble
61\newcommand*{\sphinxnonalphabeticalgroupname}{}
62% redefined in preamble, headings for makeindex produced index
63\newcommand*{\sphinxsymbolsname}{}
64\newcommand*{\sphinxnumbersname}{}
65
66\protected\def\sphinxcite{\cite}
67
68
69\endinput
70