Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Newlines in labels #100

Open
kubajal opened this issue Feb 6, 2023 · 1 comment
Open

Newlines in labels #100

kubajal opened this issue Feb 6, 2023 · 1 comment

Comments

@kubajal
Copy link

kubajal commented Feb 6, 2023

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
@rlaugier
Copy link

I think this is a very important missing feature.
It is very easy to do in the normal label with \n, it should also be doable in texlbl.
I noticed that in the source code, \n splits the node into two \draw commands. Any reason why the same approach cannot be used here in the ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants