mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
LaTeX: let bookmarks use high default depth
Add bookmarksdepth key to latex_elements['sphinxsetup']
This commit is contained in:
parent
faa71ee26d
commit
ddef4950ee
1
CHANGES
1
CHANGES
@ -75,6 +75,7 @@ Bugs fixed
|
||||
change) with late TeXLive 2019
|
||||
* #8253: LaTeX: Figures with no size defined get overscaled (compared to images
|
||||
with size explicitly set in pixels) (fixed for ``'pdflatex'/'lualatex'`` only)
|
||||
* #8881: LaTeX: The depth of bookmarks panel in PDF is not enough for navigation
|
||||
|
||||
Testing
|
||||
--------
|
||||
|
@ -10,7 +10,6 @@ Changelog
|
||||
|
||||
.. raw:: latex
|
||||
|
||||
\hypersetup{bookmarksdepth=1}% pdf bookmarks
|
||||
\addtocontents{toc}{\protect\setcounter{tocdepth}{1}}%
|
||||
|
||||
.. include:: ../CHANGES
|
||||
|
@ -61,11 +61,10 @@ latex_elements = {
|
||||
'fontenc': r'\usepackage[LGR,X2,T1]{fontenc}',
|
||||
'passoptionstopackages': r'''
|
||||
\PassOptionsToPackage{svgnames}{xcolor}
|
||||
\PassOptionsToPackage{bookmarksdepth=3}{hyperref}% depth of pdf bookmarks
|
||||
''',
|
||||
'preamble': r'''
|
||||
\DeclareUnicodeCharacter{229E}{\ensuremath{\boxplus}}
|
||||
\setcounter{tocdepth}{3}% depth of what is kept from toc file
|
||||
\setcounter{tocdepth}{3}% depth of what main TOC shows (3=subsubsection)
|
||||
\setcounter{secnumdepth}{1}% depth of section numbering
|
||||
''',
|
||||
# fix missing index entry due to RTD doing only once pdflatex after makeindex
|
||||
|
@ -578,6 +578,17 @@ e.g ``'sphinxsetup': "verbatimwrapslines=false"``. If setting the
|
||||
boolean key to ``true``, ``=true`` is optional.
|
||||
Spaces around the commas and equal signs are ignored, spaces inside LaTeX
|
||||
macros may be significant.
|
||||
Do not use quotes to enclose values, whether numerical or strings.
|
||||
|
||||
``bookmarksdepth``
|
||||
Controls the depth of the collapsable bookmarks panel in the PDF.
|
||||
May be either a number (e.g. ``3``) or a LaTeX sectioning name (e.g.
|
||||
``subsubsection``, i.e. without backslash).
|
||||
For details, refer to the ``hyperref`` LaTeX docs.
|
||||
|
||||
Default: ``5``
|
||||
|
||||
.. versionadded:: 4.0.0
|
||||
|
||||
.. _latexsphinxsetuphmargin:
|
||||
|
||||
|
@ -16,6 +16,8 @@
|
||||
\ifdefined\pdfimageresolution
|
||||
\pdfimageresolution= \numexpr \dimexpr1in\relax/\sphinxpxdimen\relax
|
||||
\fi
|
||||
%% let collapsable pdf bookmarks panel have high depth per default
|
||||
\PassOptionsToPackage{bookmarksdepth=5}{hyperref}
|
||||
<% if use_xindy -%>
|
||||
%% turn off hyperref patch of \index as sphinx.xdy xindy module takes care of
|
||||
%% suitable \hyperpage mark-up, working around hyperref-xindy incompatibility
|
||||
|
@ -65,6 +65,8 @@
|
||||
\DeclareStringOption[-1]{numfigreset}
|
||||
\DeclareBoolOption[false]{nonumfigreset}
|
||||
\DeclareBoolOption[false]{mathnumfig}
|
||||
\define@key{sphinx}{bookmarksdepth}{\AtBeginDocument{\hypersetup{bookmarksdepth=#1}}}
|
||||
\AtBeginDocument{\define@key{sphinx}{bookmarksdepth}{\hypersetup{bookmarksdepth=#1}}}
|
||||
% \DeclareBoolOption[false]{usespart}% not used
|
||||
% dimensions, we declare the \dimen registers here.
|
||||
\newdimen\sphinxverbatimsep
|
||||
|
Loading…
Reference in New Issue
Block a user