Skip to content

Commit

Permalink
Add sphinx.ext.imgconverter extension to make SVGs build in LateX (#240)
Browse files Browse the repository at this point in the history
* Add sphinx.ext.imgconverter extension to make SVGs build in LateX

* Suppress epub unknown files warning

* Add documentation on testing LateX and epub docs versions
  • Loading branch information
clelange authored Nov 15, 2023
1 parent a58dcae commit 7f7a07c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ def __getattr__(cls, name):
extensions = [
'sphinx.ext.githubpages',
'sphinx_mdinclude',
'sphinx.ext.autodoc'
'sphinx.ext.autodoc',
'sphinx.ext.imgconverter',
]

# Add any paths that contain templates here, relative to this directory.
Expand All @@ -83,6 +84,9 @@ def __getattr__(cls, name):
# This pattern also affects html_static_path and html_extra_path .
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']

# Suppress warnings for unknown epub files (.nojekyll)
suppress_warnings = ['epub.unknown_project_files']

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'

Expand Down
1 change: 1 addition & 0 deletions docs/dev.rst
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ After installing the ``hepdata_lib`` package, move into the ``hepdata_lib/docs``
pip install -r requirements.txt

Then you can build the documentation locally with Sphinx using ``make html`` and view the output by opening a web browser at ``_build/html/index.html``.
In addition, please also test whether building the LateX (``make latexpdf``) and epub (``make epub``) versions works.


Analysing the code
Expand Down

0 comments on commit 7f7a07c

Please sign in to comment.