File tree Expand file tree Collapse file tree 5 files changed +30
-5
lines changed Expand file tree Collapse file tree 5 files changed +30
-5
lines changed Original file line number Diff line number Diff line change @@ -117,6 +117,9 @@ jobs:
117
117
sphinx-design
118
118
sphinx-gallery
119
119
sphinx_rtd_theme<3.0
120
+ cairosvg
121
+ sphinxcontrib-svg2pdfconverter
122
+ tectonic
120
123
121
124
# Download cached remote files (artifacts) from GitHub
122
125
- name : Download remote data from GitHub
@@ -135,9 +138,11 @@ jobs:
135
138
python -m build --sdist
136
139
python -m pip install dist/*
137
140
138
- # Build the documentation
139
- - name : Build the documentation
140
- run : make -C doc clean all
141
+ - name : Build the HTML documentation
142
+ run : make -C doc clean html
143
+
144
+ - name : Build the PDF documentation
145
+ run : make -C doc pdf
141
146
142
147
- name : Checkout the gh-pages branch
143
148
Original file line number Diff line number Diff line change @@ -32,3 +32,6 @@ dependencies:
32
32
- sphinx-design
33
33
- sphinx-gallery
34
34
- sphinx_rtd_theme<3.0
35
+ # Dev dependencies (building PDF documentation)
36
+ # 'sphinxcontrib-svg2pdfconverter' is required since it's added to `extensions`.
37
+ - sphinxcontrib-svg2pdfconverter
Original file line number Diff line number Diff line change 15
15
@echo " api generate rst source files of API documentation"
16
16
@echo " html build the HTML files from the existing rst sources"
17
17
@echo " html-noplot build the HTML files without running any examples"
18
+ @echo " pdf build the PDF documentation"
18
19
@echo " server make a local HTTP server for previewing the built documentation"
19
20
@echo " clean clean up built and generated files"
20
21
@@ -43,6 +44,14 @@ html-noplot: api
43
44
@echo
44
45
@echo " Build finished. The HTML pages are in $( BUILDDIR) /html."
45
46
47
+ pdf : latex
48
+ @echo
49
+ @echo " Building PDF via Tectonic."
50
+ @echo
51
+ tectonic -X compile $(BUILDDIR ) /latex/pygmt.tex
52
+ @echo
53
+ @echo " PDF build finished. The PDF file is in $( BUILDDIR) /latex/pygmt.pdf."
54
+
46
55
server :
47
56
@echo
48
57
@echo " Running a server on port 8009."
Original file line number Diff line number Diff line change 28
28
"sphinx.ext.autodoc" ,
29
29
"sphinx.ext.autosummary" ,
30
30
"sphinx.ext.coverage" ,
31
- "sphinx.ext.mathjax" ,
32
31
"sphinx.ext.doctest" ,
33
- "sphinx.ext.viewcode" ,
34
32
"sphinx.ext.extlinks" ,
35
33
"sphinx.ext.intersphinx" ,
34
+ "sphinx.ext.mathjax" ,
36
35
"sphinx.ext.napoleon" ,
36
+ "sphinx.ext.viewcode" ,
37
37
"sphinx_autodoc_typehints" ,
38
38
"sphinx_copybutton" ,
39
39
"sphinx_design" ,
40
40
"sphinx_gallery.gen_gallery" ,
41
+ "sphinxcontrib.cairosvgconverter" ,
41
42
]
42
43
43
44
# Suppress warnings
248
249
"github_version" : "main" ,
249
250
"commit" : commit_link ,
250
251
}
252
+
253
+ # Configurations for LaTeX
254
+ latex_engine = "xelatex"
Original file line number Diff line number Diff line change @@ -44,6 +44,10 @@ dependencies:
44
44
- sphinx-design
45
45
- sphinx-gallery>=0.17.0
46
46
- sphinx_rtd_theme<3.0
47
+ # Dev dependencies (building PDF documentation)
48
+ - cairosvg
49
+ - sphinxcontrib-svg2pdfconverter
50
+ - tectonic
47
51
# Dev dependencies (type hints)
48
52
- mypy
49
53
- pandas-stubs
You can’t perform that action at this time.
0 commit comments