Support SVG in Sphinx Latex building (#220)
* [Doc] Try use image converter instead of svg2pdf which requires more dependencies * [Doc] Add img converter to conf.py * [Doc] Bug fix in importing imgconverter package * [Doc] Try to fix the bug when importing python packages * [Doc] bug fix * [Doc] Try to use imgconverter rather than cairo * [Doc] Add svg to latex config in sphinx configuration file * [Doc] Try cairo svg converter * [Doc] Correct bugs in compiling latexpdf * [Doc] Use latest image in building readthedocs * [Doc] Now use readthedocs docker image in building online documentation * [Doc] Correct typo in readthedocs setting * [Doc] Try to use inkscape converter as imgconverter converted SVG to black images * [Doc] Try RSVG
This commit is contained in:
parent
9f7d03cd05
commit
9020577e80
|
@ -5,6 +5,10 @@
|
|||
# Required configuration file version
|
||||
version: 2
|
||||
|
||||
# Specify docker image for building the doc
|
||||
build:
|
||||
image: latest
|
||||
|
||||
# Build documentation in the docs/ directory with Sphinx
|
||||
sphinx:
|
||||
builder: dirhtml
|
||||
|
@ -16,5 +20,6 @@ formats: all
|
|||
# Optionally set the version of Python and requirements required to build your docs
|
||||
python:
|
||||
version: 3.7
|
||||
system_packages: true
|
||||
install:
|
||||
- requirements: docs/requirements.txt
|
||||
|
|
|
@ -11,7 +11,7 @@ sphinxcontrib-bibtex<2.0.0
|
|||
# Package required to embed youtube video
|
||||
sphinxcontrib-yt
|
||||
|
||||
# Package required to convert svg for pdf builder
|
||||
# Package required to convert SVG for latex building
|
||||
sphinxcontrib-svg2pdfconverter
|
||||
|
||||
#Work-around bug "AttributeError: 'Values' object has no attribute 'character_level_inline_markup'" with docutils 0.13.1
|
||||
|
|
|
@ -23,26 +23,12 @@ import sphinx_rtd_theme
|
|||
#html_theme = "sphinx_rtd_theme"
|
||||
#html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
|
||||
|
||||
# Import sphinxcontrib.bibtex
|
||||
have_sphinxcontrib_bibtex = True
|
||||
try:
|
||||
# For bibtex support
|
||||
import sphinxcontrib.bibtex
|
||||
except ImportError:
|
||||
have_sphinxcontrib_bibtex = False
|
||||
|
||||
# Import sphinxcontrib.yt
|
||||
have_sphinxcontrib_youtube = True
|
||||
try:
|
||||
# For embedded youtube
|
||||
import sphinxcontrib.yt
|
||||
except ImportError:
|
||||
have_sphinxcontrib_youtube = False
|
||||
|
||||
# Import sphinxcontrib.svg2pdfconverter
|
||||
have_sphinxcontrib_svg2pdfconverter = True
|
||||
try:
|
||||
import sphinxcontrib.svg2pdfconverter
|
||||
except ImportError:
|
||||
have_sphinxcontrib_svg2pdfconverter = False
|
||||
# For converting SVG to PNG using rsvg
|
||||
import sphinxcontrib.rsvgconverter
|
||||
|
||||
# -- Project information -----------------------------------------------------
|
||||
|
||||
|
@ -72,6 +58,7 @@ extensions = [
|
|||
'sphinxcontrib.bibtex',
|
||||
'sphinx.ext.autosectionlabel',
|
||||
'sphinxcontrib.yt',
|
||||
'sphinxcontrib.rsvgconverter',
|
||||
]
|
||||
|
||||
# Add any paths that contain templates here, relative to this directory.
|
||||
|
|
|
@ -1160,7 +1160,7 @@ Template
|
|||
|
||||
.. option:: <wire_param model_type="<string>" R="<float>" C="<float>" num_level="<int>"/>
|
||||
|
||||
- ``model_type="pi|T"`` Specify the type of RC models for this wire segement. Currently, OpenFPGA supports the π-type and T-type multi-level RC models.
|
||||
- ``model_type="pi|T"`` Specify the type of RC models for this wire segement. Currently, OpenFPGA supports the :math:`\pi`-type and T-type multi-level RC models.
|
||||
- ``R="<float>"`` Specify the total resistance of the wire
|
||||
- ``C="<float>"`` Specify the total capacitance of the wire.
|
||||
- ``num_level="<int>"`` Specify the number of levels of the RC wire model.
|
||||
|
@ -1193,7 +1193,7 @@ The code describing this wire is:
|
|||
|
||||
This example shows
|
||||
- A routing track wire has 1 input and output
|
||||
- The routing wire will be modelled as a 1-level π-type RC wire model with a total resistance of :math:`103.84\Omega` and a total capacitance of :math:`13.89fF`
|
||||
- The routing wire will be modelled as a 1-level :math:`\pi`-type RC wire model with a total resistance of :math:`103.84\Omega` and a total capacitance of :math:`13.89fF`
|
||||
|
||||
I/O pads
|
||||
~~~~~~~~
|
||||
|
|
Loading…
Reference in New Issue