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'
|
||||
|
||||
# The full version, including alpha/beta/rc tags
|
||||
release = '0.2'
|
||||
release = '0.2.1-dev'
|
||||
version = release
|
||||
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
\makeatletter
|
||||
|
||||
% Typographic improvements
|
||||
\usepackage{microtype}
|
||||
|
||||
@ -9,6 +11,14 @@
|
||||
\def\sphinxstyleindexentry#1{#1} % no monospaced index entries
|
||||
\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
|
||||
\setmainfont{EB Garamond}
|
||||
%\setsansfont{IBM Plex Sans}[BoldFont={* Medium},BoldItalicFont={* Medium Italic}]
|
||||
@ -32,14 +42,12 @@
|
||||
\setlength{\footnotemargin}{0.4cm}
|
||||
|
||||
% Header/footer style
|
||||
\makeatletter
|
||||
\fancypagestyle{normal}{
|
||||
\fancyhead[RO,LE]{}
|
||||
\fancyfoot[RO]{{\footnotesize\py@HeaderFamily\nouppercase{\leftmark} | \thepage}}
|
||||
\fancyfoot[LE]{{\footnotesize\py@HeaderFamily\thepage}}
|
||||
%\renewcommand{\headrulewidth}{0.4pt}
|
||||
}
|
||||
\makeatother
|
||||
|
||||
% Back of title page content
|
||||
\newcommand{\sphinxbackoftitlepage}{
|
||||
@ -75,7 +83,6 @@
|
||||
|
||||
% Override Sphinx title page
|
||||
\usepackage[iso]{isodate}
|
||||
\makeatletter
|
||||
\renewcommand{\sphinxmaketitle}{%
|
||||
\let\sphinxrestorepageanchorsetting\relax
|
||||
\ifHy@pageanchor\def\sphinxrestorepageanchorsetting{\Hy@pageanchortrue}\fi
|
||||
@ -117,4 +124,5 @@
|
||||
\if@openright\cleardoublepage\else\clearpage\fi
|
||||
\sphinxrestorepageanchorsetting
|
||||
}
|
||||
|
||||
\makeatother
|
||||
|
Loading…
Reference in New Issue
Block a user