fix: much better pdf (#2604)

* docs: fix PDF build by adding unicode mappings

* fix: better PDF

* fix: html build issue
This commit is contained in:
Henry Schreiner 2020-10-18 00:21:16 -04:00 committed by GitHub
parent c16da99309
commit 09056717da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 2 deletions

View File

@ -238,12 +238,23 @@ htmlhelp_basename = "pybind11doc"
latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
# 'papersize': 'letterpaper',
#
# The font size ('10pt', '11pt' or '12pt').
# 'pointsize': '10pt',
#
# Additional stuff for the LaTeX preamble.
# remove blank pages (between the title page and the TOC, etc.)
"classoptions": ",openany,oneside",
"preamble": r"""
\usepackage{fontawesome}
\usepackage{textgreek}
\DeclareUnicodeCharacter{00A0}{}
\DeclareUnicodeCharacter{2194}{<->}
\DeclareUnicodeCharacter{2194}{\faArrowsH}
\DeclareUnicodeCharacter{1F382}{\faBirthdayCake}
\DeclareUnicodeCharacter{1F355}{\faAdjust}
\DeclareUnicodeCharacter{0301}{'}
\DeclareUnicodeCharacter{03C0}{\textpi}
""",
# Latex figure (float) alignment
# 'figure_align': 'htbp',

View File

@ -1,6 +1,11 @@
.. only:: latex
Intro
=====
.. include:: ../README.rst
.. only: not latex
.. only:: not latex
Contents: