summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorROUVREAU Vincent <vincent.rouvreau@inria.fr>2020-08-03 16:22:59 +0200
committerROUVREAU Vincent <vincent.rouvreau@inria.fr>2020-08-03 16:22:59 +0200
commit39aff7e55beb318d1685dac410466414e69190ae (patch)
tree99ceaa7106b3b0d8abf15e8a9e237cea32a786f5
parent9b52376e57c784838d07e15343e2a9194aad84cc (diff)
doc review: Add LaTeX in optional runtime dependencies
-rw-r--r--src/python/doc/installation.rst29
-rw-r--r--src/python/doc/persistence_graphical_tools_user.rst21
2 files changed, 31 insertions, 19 deletions
diff --git a/src/python/doc/installation.rst b/src/python/doc/installation.rst
index 525ca84e..78e1af73 100644
--- a/src/python/doc/installation.rst
+++ b/src/python/doc/installation.rst
@@ -323,6 +323,35 @@ The following examples require the `Matplotlib <http://matplotlib.org>`_:
* :download:`euclidean_strong_witness_complex_diagram_persistence_from_off_file_example.py <../example/euclidean_strong_witness_complex_diagram_persistence_from_off_file_example.py>`
* :download:`euclidean_witness_complex_diagram_persistence_from_off_file_example.py <../example/euclidean_witness_complex_diagram_persistence_from_off_file_example.py>`
+LaTeX
+~~~~~
+
+If a sufficiently complete LaTeX toolchain is available (including dvipng and ghostscript), the LaTeX option of
+matplotlib is enabled for prettier captions (cf.
+`matplotlib text rendering with LaTeX <https://matplotlib.org/3.3.0/tutorials/text/usetex.html>`_).
+It also requires `type1cm` LaTeX package (not detected by matplotlib).
+
+If you are facing issues with LaTeX rendering, like this one:
+
+.. code-block:: none
+
+ Traceback (most recent call last):
+ File "/usr/lib/python3/dist-packages/matplotlib/texmanager.py", line 302, in _run_checked_subprocess
+ report = subprocess.check_output(command,
+ ...
+ ! LaTeX Error: File `type1cm.sty' not found.
+ ...
+
+This is because the LaTeX package is not installed on your system. On Ubuntu systems you can install texlive-full
+(for all LaTeX packages), or more specific packages like texlive-latex-extra, cm-super.
+
+You can still deactivate LaTeX rendering by saying:
+
+.. code-block:: python
+
+ import gudhi
+ gudhi.persistence_graphical_tools._gudhi_matplotlib_use_tex=False
+
PyKeOps
-------
diff --git a/src/python/doc/persistence_graphical_tools_user.rst b/src/python/doc/persistence_graphical_tools_user.rst
index 9954058d..d95b9d2b 100644
--- a/src/python/doc/persistence_graphical_tools_user.rst
+++ b/src/python/doc/persistence_graphical_tools_user.rst
@@ -94,25 +94,8 @@ If you want more information on a specific dimension, for instance:
LaTeX support
-------------
-By default, persistence graphical tools are using LaTeX support for matplotlib if available (cf.
-`matplotlib text rendering with LaTeX <https://matplotlib.org/3.3.0/tutorials/text/usetex.html>`_).
-It also requires `type1cm` LaTeX package (not detected by matplotlib).
-
-If you are facing issues with LaTeX rendering, like this one:
-
-.. code-block:: none
-
- Traceback (most recent call last):
- File "/usr/lib/python3/dist-packages/matplotlib/texmanager.py", line 302, in _run_checked_subprocess
- report = subprocess.check_output(command,
- ...
- ! LaTeX Error: File `type1cm.sty' not found.
- ...
-
-This is because the LaTeX package is not installed on your system. On Ubuntu systems you can install texlive-full
-(for all LaTeX packages), or more specific packages like texlive-latex-extra, cm-super.
-
-You can still deactivate LaTeX rendering by saying:
+If you are facing issues with `LaTeX <installation.html#latex>`_ rendering, you can still deactivate LaTeX rendering by
+saying:
.. code-block:: python