diff options
Diffstat (limited to 'Documentation/conf.py')
-rw-r--r-- | Documentation/conf.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/Documentation/conf.py b/Documentation/conf.py index 2ccfe4442acc..f219a7a41f48 100644 --- a/Documentation/conf.py +++ b/Documentation/conf.py @@ -341,6 +341,9 @@ latex_elements = { verbatimhintsturnover=false, ''', + # For CJK One-half spacing, need to be in front of hyperref + 'extrapackages': r'\usepackage{setspace}', + # Additional stuff for the LaTeX preamble. 'preamble': ''' % Prevent column squeezing of tabulary. @@ -404,9 +407,12 @@ latex_elements['preamble'] += ''' } \\newCJKfontfamily[JPsans]\\jpsans{Noto Sans CJK JP} \\newCJKfontfamily[JPmono]\\jpmono{Noto Sans Mono CJK JP} + % Dummy commands for Sphinx < 2.3 (no 'extrapackages' support) + \\providecommand{\\onehalfspacing}{} + \\providecommand{\\singlespacing}{} % Define custom macros to on/off CJK - \\newcommand{\\kerneldocCJKon}{\\makexeCJKactive} - \\newcommand{\\kerneldocCJKoff}{\\makexeCJKinactive} + \\newcommand{\\kerneldocCJKon}{\\makexeCJKactive\\onehalfspacing} + \\newcommand{\\kerneldocCJKoff}{\\makexeCJKinactive\\singlespacing} \\newcommand{\\kerneldocBeginSC}{% \\begingroup% \\scmain% @@ -437,6 +443,8 @@ latex_elements['preamble'] += ''' \\renewcommand{\\CJKttdefault}{JPmono}% } \\newcommand{\\kerneldocEndJP}{\\endgroup} + % Single spacing in literal blocks + \\fvset{baselinestretch=1} % To customize \\sphinxtableofcontents \\usepackage{etoolbox} % Inactivate CJK after tableofcontents |