.. _spkg_dot2tex:

dot2tex: Create PGF/TikZ commands from Graphviz output
======================================================

Description
-----------

dot2tex is a Python module, whose purpose is to give graphs generated by
Graphviz a more LaTeX friendly look and feel. This is accomplished by
converting xdot output from Graphviz to a series of PSTricks or PGF/TikZ
commands.

See https://github.com/kjellmf/dot2tex/

License
-------

-  MIT


Upstream Contact
----------------

-  Kjell Magne Fauske, km@fauskes.net

Dependencies
------------

graphviz (www.graphviz.org) should be installed and in the path (for
example via the graphviz spkg).

preview, a LaTeX package for extracting parts of a document.

Self-tests dependencies:

-  graphviz
-  texlive-latex-base
-  texlive-pictures
-  texlive-pstricks

Patches
-------

-  remove_test_semicolon.patch:

   Remove the failing semicolon test for the open dot2tex
   issue #5 - https://github.com/kjellmf/dot2tex/issues/5


Special Update/Build Instructions
---------------------------------

Make sure corresponding optional doctests still pass:

   sage -t --long --optional=dot2tex,graphviz,sage src/


Type
----

standard


Dependencies
------------

- $(PYTHON)
- $(PYTHON_TOOLCHAIN)
- :ref:`spkg_pyparsing`

Version Information
-------------------

package-version.txt::

    2.11.3.p0

version_requirements.txt::

    dot2tex >=2.11.3
    pyparsing <3.3

See https://repology.org/project/dot2tex/versions, https://repology.org/project/python:dot2tex/versions

Installation commands
---------------------

.. tab:: PyPI:

   .. CODE-BLOCK:: bash

       $ pip install dot2tex\>=2.11.3 pyparsing\<3.3

.. tab:: Sage distribution:

   .. CODE-BLOCK:: bash

       $ sage -i dot2tex

.. tab:: Arch Linux:

   .. CODE-BLOCK:: bash

       $ sudo pacman -S dot2tex

.. tab:: conda-forge:

   .. CODE-BLOCK:: bash

       $ conda install dot2tex

.. tab:: Fedora/Redhat/CentOS:

   .. CODE-BLOCK:: bash

       $ sudo dnf install dot2tex

.. tab:: MacPorts:

   .. CODE-BLOCK:: bash

       $ sudo port install dot2tex


If the system package is installed and if the (experimental) option
``--enable-system-site-packages`` is passed to ``./configure``, then 
``./configure`` will check if the system package can be used.
