No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

sbgntikz is a TikZ library that allows drawing SBGN maps directly into LaTeX using the powerfull TikZ package. All three SBGN languages (PD, AF and ER) are supported.


The directory tikz-sbgn should be copied to a directory where it can be found by the TeX engine:

  • in the directory of your TeX source file
  • in your local texmf directory. This directory is usually /home/<user>/texmf/ under Linux, /Users/Library/texmf/ under MacOS, and C:/Users/<user>/texmf under Windows, but it can depend on your OS version and TeX distribution. Yout texmf directory can be found using the kpsewhich -var-value=TEXMFHOME command.

Getting started

sbgntikz is a TikZ package. Usually, TikZ is installed within your TeX distribution, so it can be imported directly into your LaTeX source file. The two first steps are to import the TikZ package and the sbgntikz library:


SBGN maps can then be straightforwardly drawn using a tikzpicture environment together with the sbgn key:

  % tikz code to draw an SBGN map

Nodes and nodes attributes can be drawn using the TikZ \node command, while arcs can be drawn using the \draw command. The type of glyph to be drawn is specified using a keyword that is the name of the type (e.g macromolecule for the macromolecule glyph, necessary stimulation for the necessary stimulation glyph). Here is a small SBGN PD example:

\usetikzlibrary{positioning} %for relative positioning

    \node[macromolecule] (erk) {ERK};
    \node[sv] at (erk.120) {};
    \node[generic process, connectors = horizontal, right = of erk] (p) {};
    \node[macromolecule, right = of p] (perk) {ERK};
    \node[sv] at (perk.120) {P};
    \node[simple chemical, below left = of p] (atp) {ATP};
    \node[simple chemical, below right = of p] (adp) {ADP};
    \node[macromolecule, above = 2cm of p] (pmek) {MEK};
    \node[sv] at (pmek.120) {P};
    \draw[consumption] (erk) -- (p.west);
    \draw[consumption] (atp) to [bend left=40] (p.west);
    \draw[production] (p.east) -- (perk);
    \draw[production] (p.east) to [bend left=40] (adp);
    \draw[catalysis] (pmek) -- (p);

Here is the rendering:

alt text

Going further

To go further, a complete documentation and some examples are available.

sbgntikz also includes an SBGN-ML to TikZ converter. Basic usage is as follows: [options] INPUT

All options can be listed using using the following: --help