Allow line breaks in URLs in PDFs
This commit is contained in:
parent
3c8da64ecd
commit
b54fa9e1f0
2
conf.py
2
conf.py
@ -22,7 +22,7 @@ copyright = '2021 Lee Yingtong Li'
|
|||||||
author = 'Lee Yingtong Li'
|
author = 'Lee Yingtong Li'
|
||||||
|
|
||||||
# The full version, including alpha/beta/rc tags
|
# The full version, including alpha/beta/rc tags
|
||||||
release = '0.2'
|
release = '0.2.1-dev'
|
||||||
version = release
|
version = release
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
\makeatletter
|
||||||
|
|
||||||
% Typographic improvements
|
% Typographic improvements
|
||||||
\usepackage{microtype}
|
\usepackage{microtype}
|
||||||
|
|
||||||
@ -9,6 +11,14 @@
|
|||||||
\def\sphinxstyleindexentry#1{#1} % no monospaced index entries
|
\def\sphinxstyleindexentry#1{#1} % no monospaced index entries
|
||||||
\def\sphinxstyleindexextra#1{ (#1)} % no italics
|
\def\sphinxstyleindexextra#1{ (#1)} % no italics
|
||||||
|
|
||||||
|
% Allow line breaks in URLs
|
||||||
|
\usepackage{seqsplit}
|
||||||
|
\protected\def\sphinxurl#1{{%
|
||||||
|
\sphinxunactivateextrasandspace %
|
||||||
|
\endlinechar\m@ne\everyeof{}%
|
||||||
|
\scantokens{\href{#1}{\seqsplit{#1}}}%
|
||||||
|
}}
|
||||||
|
|
||||||
% Fonts
|
% Fonts
|
||||||
\setmainfont{EB Garamond}
|
\setmainfont{EB Garamond}
|
||||||
%\setsansfont{IBM Plex Sans}[BoldFont={* Medium},BoldItalicFont={* Medium Italic}]
|
%\setsansfont{IBM Plex Sans}[BoldFont={* Medium},BoldItalicFont={* Medium Italic}]
|
||||||
@ -32,14 +42,12 @@
|
|||||||
\setlength{\footnotemargin}{0.4cm}
|
\setlength{\footnotemargin}{0.4cm}
|
||||||
|
|
||||||
% Header/footer style
|
% Header/footer style
|
||||||
\makeatletter
|
|
||||||
\fancypagestyle{normal}{
|
\fancypagestyle{normal}{
|
||||||
\fancyhead[RO,LE]{}
|
\fancyhead[RO,LE]{}
|
||||||
\fancyfoot[RO]{{\footnotesize\py@HeaderFamily\nouppercase{\leftmark} | \thepage}}
|
\fancyfoot[RO]{{\footnotesize\py@HeaderFamily\nouppercase{\leftmark} | \thepage}}
|
||||||
\fancyfoot[LE]{{\footnotesize\py@HeaderFamily\thepage}}
|
\fancyfoot[LE]{{\footnotesize\py@HeaderFamily\thepage}}
|
||||||
%\renewcommand{\headrulewidth}{0.4pt}
|
%\renewcommand{\headrulewidth}{0.4pt}
|
||||||
}
|
}
|
||||||
\makeatother
|
|
||||||
|
|
||||||
% Back of title page content
|
% Back of title page content
|
||||||
\newcommand{\sphinxbackoftitlepage}{
|
\newcommand{\sphinxbackoftitlepage}{
|
||||||
@ -75,7 +83,6 @@
|
|||||||
|
|
||||||
% Override Sphinx title page
|
% Override Sphinx title page
|
||||||
\usepackage[iso]{isodate}
|
\usepackage[iso]{isodate}
|
||||||
\makeatletter
|
|
||||||
\renewcommand{\sphinxmaketitle}{%
|
\renewcommand{\sphinxmaketitle}{%
|
||||||
\let\sphinxrestorepageanchorsetting\relax
|
\let\sphinxrestorepageanchorsetting\relax
|
||||||
\ifHy@pageanchor\def\sphinxrestorepageanchorsetting{\Hy@pageanchortrue}\fi
|
\ifHy@pageanchor\def\sphinxrestorepageanchorsetting{\Hy@pageanchortrue}\fi
|
||||||
@ -117,4 +124,5 @@
|
|||||||
\if@openright\cleardoublepage\else\clearpage\fi
|
\if@openright\cleardoublepage\else\clearpage\fi
|
||||||
\sphinxrestorepageanchorsetting
|
\sphinxrestorepageanchorsetting
|
||||||
}
|
}
|
||||||
|
|
||||||
\makeatother
|
\makeatother
|
||||||
|
Loading…
Reference in New Issue
Block a user