..image:: picture.jpeg
:height: 100px
:width: 200 px
:scale: 50 %
:alt: alternate text
:align: right
..image:: images/the_great_sphinx_david_roberts.jpg
:width: 350
:alt: The Great Sphinx and Pyramids of Gizeh (Giza) by David Roberts
:align: center
A substitution
is an element definition that lets you reuse that element. Some of
the parameters apply to the substitution as to the inline directives.
..|substitution-name|image:: path/filename.png
..|David Roberts: The Great Sphinx|image:: images/the_great_sphinx_david_roberts.jpg
:alt: The Great Sphinx and Pyramids of Gizeh (Giza) by David Roberts
:width: 200
Below is the famous The Great Sphinx and Pyramids of Gizeh (Giza),
17 July 1839, by David Roberts (Public domain Wikimedia Commons).
|David Roberts: The Great Sphinx|
Below is the famous The Great Sphinx and Pyramids of Gizeh (Giza),
17 July 1839, by David Roberts (Public domain Wikimedia Commons).
..figure:: path/filename.png
..figure:: images/the_great_sphinx_david_roberts.jpg
:alt: The Great Sphinx and Pyramids of Gizeh (Giza) by David Roberts
:width: 300
:align: center
The Great Sphinx and Pyramids of Gizeh (Giza) by David Roberts
Public domain from https://commons.wikimedia.org/
We can configure Sphinx to *auto-build* the output when it detects
a change, or we can initiate a manual build.
The command to generate output is ``make <output>``. Sphinx can convert RST
to various formats. You can run the ``make command`` without any args to
view the possible output types.
root@26f88a20b58c:/opt/sphinx# make
Sphinx v2.3.1
Please use `make target` where target is one of
html to make standalone HTML files
dirhtml to make HTML files named index.html in directories
singlehtml to make a single large HTML file
pickle to make pickle files
json to make JSON files
htmlhelp to make HTML files and an HTML help project
qthelp to make HTML files and a qthelp project
devhelp to make HTML files and a Devhelp project
epub to make an epub
latex to make LaTeX files, you can setPAPER=a4 or PAPER=letter
latexpdf to make LaTeX and PDF files (default pdflatex)
latexpdfja to make LaTeX files and run them through platex/dvipdfmx
text to make text files
man to make manual pages
texinfo to make Texinfo files
info to make Texinfo files and run them through makeinfo
gettext to make PO message catalogs
changes to make an overview of all changed/added/deprecated items
xml to make Docutils-native XML files
pseudoxml to make pseudoxml-XML files for display purposes
linkcheck to check all external links for integrity
doctest to run all doctests embedded in the documentation (if enabled)
coverage to run coverage check of the documentation (if enabled)
Our desired output is HTML.
1. Build the HTML by executing command ``make html``
root@1a40c1841674:/opt/sphinx# make html
Running Sphinx v2.3.1
making output directory... done
building [mo]: targets for0 po files that are out of date
building [html]: targets for1source files that are out of date
updating environment: [new config]1 added, 0 changed, 0 removed
reading sources... [100%] index
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] index
generating indices... genindexdone
writing additional pages... searchdone
copying static files... ... done
copying extra files... done
dumping search index in English (code: en)... done
dumping object inventory... done
build succeeded.
2. Navigate to the URL of the Sphinx instance to view rendered HTML.
|image-substitution|