From 74e9aab7f89c14d3a00e097e294da28583f28371 Mon Sep 17 00:00:00 2001 From: Tremain Knight <2108488+tkknight@users.noreply.github.com> Date: Thu, 30 Jul 2020 11:06:55 +0100 Subject: [PATCH 1/2] enabled pdf creation --- .readthedocs.yml | 1 + docs/iris/Makefile | 20 ++++++++-------- docs/iris/src/conf.py | 55 ++----------------------------------------- 3 files changed, 13 insertions(+), 63 deletions(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index 1306c3fc2c..55c24eaddc 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -17,3 +17,4 @@ python: formats: - htmlzip + - pdf diff --git a/docs/iris/Makefile b/docs/iris/Makefile index a220502028..823903c762 100644 --- a/docs/iris/Makefile +++ b/docs/iris/Makefile @@ -7,16 +7,16 @@ html: pdf: @for i in $(SUBDIRS); do\ - echo "make latex in $$i.."; \ - (cd $$i; $(MAKE) $(MFLAGS) $(MYMAKEFLAGS) latex); done - echo "\def\sphinxdocclass{MO_report}" > build/latex/docs.tex - echo "\documentclass[letterpaper,10pt,english]{MO_report}" >> build/latex/docs.tex - tail -n +4 build/latex/Iris.tex >> build/latex/docs.tex - sed 's/\\tableofcontents/\\tableofcontents\n\\pagenumbering\{arabic\}/' build/latex/docs.tex > build/latex/docs2.tex - sed 's/subsection{/section{/' build/latex/docs2.tex > build/latex/documentation.tex - (cd build/latex; pdflatex -interaction=scrollmode documentation.tex) - # call latex again to get page numbers right... - (cd build/latex; pdflatex -interaction=scrollmode documentation.tex); + echo "make latex in $$i.."; \ + (cd $$i; $(MAKE) $(MFLAGS) $(MYMAKEFLAGS) latex); done + echo "\def\sphinxdocclass{MO_report}" > build/latex/docs.tex + echo "\documentclass[letterpaper,10pt,english]{MO_report}" >> build/latex/docs.tex + tail -n +4 build/latex/Iris.tex >> build/latex/docs.tex + sed 's/\\tableofcontents/\\tableofcontents\n\\pagenumbering\{arabic\}/' build/latex/docs.tex > build/latex/docs2.tex + sed 's/subsection{/section{/' build/latex/docs2.tex > build/latex/documentation.tex + (cd build/latex; pdflatex -interaction=scrollmode documentation.tex) + # call latex again to get page numbers right... + (cd build/latex; pdflatex -interaction=scrollmode documentation.tex); all: @for i in $(SUBDIRS); do \ diff --git a/docs/iris/src/conf.py b/docs/iris/src/conf.py index 2308c065ba..9b0b094c33 100644 --- a/docs/iris/src/conf.py +++ b/docs/iris/src/conf.py @@ -62,8 +62,8 @@ def autolog(message): # define the copyright information for latex builds. Note, for html builds, # the copyright exists directly inside "_templates/layout.html" upper_copy_year = datetime.datetime.now().year -copyright = "Iris contributors" -_authors = "Iris developers" +copyright = "Iris Contributors" +author = "Iris Developers" # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the @@ -242,54 +242,3 @@ def autolog(message): message="Matplotlib is currently using agg, which is a" " non-GUI backend, so cannot show the figure.", ) - -# -- Options for LaTeX output -------------------------------------------------- - -# The paper size ('letter' or 'a4'). -# latex_paper_size = 'letter' - -# The font size ('10pt', '11pt' or '12pt'). -# latex_font_size = '10pt' - -# Grouping the document tree into LaTeX files. List of tuples -# (source start file, target name, title, author, documentclass [howto/manual]). -# latex_documents = [ -# ( -# "contents", -# "Iris.tex", -# "Iris Documentation", -# " \\and ".join(_authors), -# "manual", -# ), -# ] - -# The name of an image file (relative to this directory) to place at the top of -# the title page. -# latex_logo = None - -# For "manual" documents, if this is true, then toplevel headings are parts, -# not chapters. -# latex_use_parts = False - -# If true, show page references after internal links. -# latex_show_pagerefs = False - -# If true, show URL addresses after external links. -# latex_show_urls = False - -# Additional stuff for the LaTeX preamble. -# latex_preamble = '' - -# Documents to append as an appendix to all manuals. -# latex_appendices = [] - -# If false, no module index is generated. -# latex_domain_indices = True -# latex_elements = {} -# latex_elements["docclass"] = "MO_report" - -# -- Options for manual page output -------------------------------------------- - -# One entry per manual page. List of tuples -# (source start file, name, description, authors, manual section). -# man_pages = [("index", "iris", "Iris Documentation", _authors, 1)] From e786eba69af7568964797dafaea5e99da0c0391d Mon Sep 17 00:00:00 2001 From: Tremain Knight <2108488+tkknight@users.noreply.github.com> Date: Fri, 31 Jul 2020 13:15:46 +0100 Subject: [PATCH 2/2] removed pdf target as it is replaced by Read The Docs service feature --- docs/iris/Makefile | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/docs/iris/Makefile b/docs/iris/Makefile index 823903c762..411f3fd553 100644 --- a/docs/iris/Makefile +++ b/docs/iris/Makefile @@ -5,19 +5,6 @@ html: echo "make html in $$i..."; \ (cd $$i; $(MAKE) $(MFLAGS) $(MYMAKEFLAGS) html); done -pdf: - @for i in $(SUBDIRS); do\ - echo "make latex in $$i.."; \ - (cd $$i; $(MAKE) $(MFLAGS) $(MYMAKEFLAGS) latex); done - echo "\def\sphinxdocclass{MO_report}" > build/latex/docs.tex - echo "\documentclass[letterpaper,10pt,english]{MO_report}" >> build/latex/docs.tex - tail -n +4 build/latex/Iris.tex >> build/latex/docs.tex - sed 's/\\tableofcontents/\\tableofcontents\n\\pagenumbering\{arabic\}/' build/latex/docs.tex > build/latex/docs2.tex - sed 's/subsection{/section{/' build/latex/docs2.tex > build/latex/documentation.tex - (cd build/latex; pdflatex -interaction=scrollmode documentation.tex) - # call latex again to get page numbers right... - (cd build/latex; pdflatex -interaction=scrollmode documentation.tex); - all: @for i in $(SUBDIRS); do \ echo "make all in $$i..."; \