Skip to content

Newlines in labels #100

Description

@kubajal

Hi,
is there a way to have a two-line label on a node?

I have the following DOT graph:

# graph.dot
digraph G {
  node_0 -> node_1;
  node_0 [label="aaa \\\\ bbb"];
}

Executing

dot -Txdot graph.dot | dot2tex -ftikz > graph.tex
latex -output-format pdf graph.tex

produces the following image

image

I.e. it doesn't put 'bbb' on the 2nd line. Is there a way to fix that?

Version info:

(venv) kubajal@kubajal:~$ dot --version
dot - graphviz version 7.1.0 (20230121.1956)
(venv) kubajal@kubajal:~$ dot2tex --version
Dot2tex version 2.11.3
(venv) kubajal@kubajal:~$ latex --version
pdfTeX 3.141592653-2.6-1.40.22 (TeX Live 2022/dev/Debian)
kpathsea version 6.3.4/dev
Copyright 2021 Han The Thanh (pdfTeX) et al.
There is NO warranty.  Redistribution of this software is
covered by the terms of both the pdfTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the pdfTeX source.
Primary author of pdfTeX: Han The Thanh (pdfTeX) et al.
Compiled with libpng 1.6.37; using libpng 1.6.37
Compiled with zlib 1.2.11; using zlib 1.2.11
Compiled with xpdf version 4.03

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions