From 09056717da753df8cc375b557640c3ae4c6e6f2d Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Sun, 18 Oct 2020 00:21:16 -0400 Subject: [PATCH] fix: much better pdf (#2604) * docs: fix PDF build by adding unicode mappings * fix: better PDF * fix: html build issue --- docs/conf.py | 13 ++++++++++++- docs/index.rst | 7 ++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index dca362e2..7c303984 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -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', diff --git a/docs/index.rst b/docs/index.rst index bf79108f..2d96936e 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,6 +1,11 @@ +.. only:: latex + + Intro + ===== + .. include:: ../README.rst -.. only: not latex +.. only:: not latex Contents: