Skip to content

Commit

Permalink
temp
Browse files Browse the repository at this point in the history
  • Loading branch information
jfbu committed Nov 15, 2023
1 parent bb74aec commit 732584b
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 4 deletions.
9 changes: 6 additions & 3 deletions sphinx/builders/latex/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,15 +215,18 @@ def init_multilingual(self) -> None:
if self.context['latex_engine'] == 'pdflatex':
if not self.babel.uses_cyrillic():
if 'X2' in self.context['fontenc']:
self.context['substitutefont'] = '\\usepackage{substitutefont}'
self.context['substitutefont'] = ('\\usepackage'
'{sphinxpackagesubstitutefont}')
self.context['textcyrillic'] = ('\\usepackage[Xtwo]'
'{sphinxpackagecyrillic}')
elif 'T2A' in self.context['fontenc']:
self.context['substitutefont'] = '\\usepackage{substitutefont}'
self.context['substitutefont'] = ('\\usepackage'
'{sphinxpackagesubstitutefont}')
self.context['textcyrillic'] = ('\\usepackage[TtwoA]'
'{sphinxpackagecyrillic}')
if 'LGR' in self.context['fontenc']:
self.context['substitutefont'] = '\\usepackage{substitutefont}'
self.context['substitutefont'] = ('\\usepackage'
'{sphinxpackagesubstitutefont}')
else:
self.context['textgreek'] = ''
if self.context['substitutefont'] == '':
Expand Down
1 change: 0 additions & 1 deletion sphinx/texinputs/sphinx.sty
Original file line number Diff line number Diff line change
Expand Up @@ -867,7 +867,6 @@ will be set to white}%
% Support hlist directive
\RequirePackage{multicol}


%% GRAPHICS
%
% It will always be needed, so let's load it here
Expand Down
21 changes: 21 additions & 0 deletions sphinx/texinputs/sphinxpackagesubstitutefont.sty
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
%% a stub for obsoleted LaTeX package substitutefont
% The package substitutefont stopped being distributed with TeXLive
% around August 2023 and was moved to "obsolete" section.
% cf https://ctan.org/pkg/substitutefont
% Trying to load it raises a LaTeX build error since.

% The \substitutefont has a LaTeX kernel replacement
% \DeclareFontFamilySubstitution
% which was added to LaTeX 2020-02-02
% The aim of this stub is to do that replacement silently.

% change this info string if making any custom modification
\ProvidesPackage{sphinxpackagesubstitutefont}[2023/15/11 v7.3.0 advanced colored boxes]

\ifdefined\DeclareFontFamilySubstitution
\def\substitutefont{\DeclareFontFamilySubstitution}
\else
\usepackage{substitutefont}
\fi

\endinput

0 comments on commit 732584b

Please sign in to comment.