From 2bf81f9caa70e30a0e3a8eaf792243a9d4a2436b Mon Sep 17 00:00:00 2001 From: ROUVREAU Vincent Date: Tue, 28 Jul 2020 11:55:02 +0200 Subject: Add mechanism to deactivate LaTeX matplotlib rendering --- src/python/doc/persistence_graphical_tools_user.rst | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/python/doc') diff --git a/src/python/doc/persistence_graphical_tools_user.rst b/src/python/doc/persistence_graphical_tools_user.rst index b5a38eb1..5cdc2dca 100644 --- a/src/python/doc/persistence_graphical_tools_user.rst +++ b/src/python/doc/persistence_graphical_tools_user.rst @@ -90,3 +90,17 @@ If you want more information on a specific dimension, for instance: gudhi.plot_persistence_density(persistence=pers_diag, dimension=1, legend=True, axes=axes[1]) plt.show() + +LaTeX support +------------- + +By default, persistence graphical tools are using LaTeX support for matplotlib if available (cf. +`matplotlib text rendering with LaTeX `_). +It also requires `type1cm` LaTeX package (not detected by matplotlib). + +If you are facing issues with LaTeX rendering, you can still deactivate LaTeX rendering by saying: + +.. code-block:: python + + import gudhi + gudhi.persistence_graphical_tools._gudhi_matplotlib_use_tex=False -- cgit v1.2.3 From 9b52376e57c784838d07e15343e2a9194aad84cc Mon Sep 17 00:00:00 2001 From: ROUVREAU Vincent Date: Mon, 3 Aug 2020 10:48:08 +0200 Subject: doc review: specify the error and indicate what to install on Ubuntu --- src/python/doc/persistence_graphical_tools_user.rst | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'src/python/doc') diff --git a/src/python/doc/persistence_graphical_tools_user.rst b/src/python/doc/persistence_graphical_tools_user.rst index 5cdc2dca..9954058d 100644 --- a/src/python/doc/persistence_graphical_tools_user.rst +++ b/src/python/doc/persistence_graphical_tools_user.rst @@ -98,7 +98,21 @@ By default, persistence graphical tools are using LaTeX support for matplotlib i `matplotlib text rendering with LaTeX `_). It also requires `type1cm` LaTeX package (not detected by matplotlib). -If you are facing issues with LaTeX rendering, you can still deactivate LaTeX rendering by saying: +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 -- cgit v1.2.3 From 39aff7e55beb318d1685dac410466414e69190ae Mon Sep 17 00:00:00 2001 From: ROUVREAU Vincent Date: Mon, 3 Aug 2020 16:22:59 +0200 Subject: doc review: Add LaTeX in optional runtime dependencies --- src/python/doc/installation.rst | 29 ++++++++++++++++++++++ .../doc/persistence_graphical_tools_user.rst | 21 ++-------------- 2 files changed, 31 insertions(+), 19 deletions(-) (limited to 'src/python/doc') 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 `_: * :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 `_). +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 `_). -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 `_ rendering, you can still deactivate LaTeX rendering by +saying: .. code-block:: python -- cgit v1.2.3