mirror of
https://github.com/pybind/pybind11.git
synced 2026-03-14 20:27:47 +00:00
docs: fix pdf build, simpler start page (#2736)
This commit is contained in:
@@ -239,6 +239,8 @@ htmlhelp_basename = "pybind11doc"
|
||||
|
||||
# -- Options for LaTeX output ---------------------------------------------
|
||||
|
||||
latex_engine = "pdflatex"
|
||||
|
||||
latex_elements = {
|
||||
# The paper size ('letterpaper' or 'a4paper').
|
||||
# 'papersize': 'letterpaper',
|
||||
@@ -353,8 +355,11 @@ def prepare(app):
|
||||
with open(DIR.parent / "README.rst") as f:
|
||||
contents = f.read()
|
||||
|
||||
# Filter out section titles for index.rst for LaTeX
|
||||
if app.builder.name == "latex":
|
||||
# Remove badges and stuff from start
|
||||
contents = contents[contents.find(r".. start") :]
|
||||
|
||||
# Filter out section titles for index.rst for LaTeX
|
||||
contents = re.sub(r"^(.*)\n[-~]{3,}$", r"**\1**", contents, flags=re.MULTILINE)
|
||||
|
||||
with open(DIR / "readme.rst", "w") as f:
|
||||
|
||||
Reference in New Issue
Block a user