File: dot2tex.1

package info (click to toggle)
dot2tex 2.8.7%2Brepack-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze, wheezy
  • size: 1,304 kB
  • ctags: 370
  • sloc: python: 3,495; makefile: 12
file content (213 lines) | stat: -rw-r--r-- 6,436 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
.TH DOT2TEX 1 "November 11, 2006"
.SH NAME
dot2tex \- Graphviz to LaTeX converter
.SH SYNOPSIS
.B dot2tex
.RB [ \-\-prog
.IR graphviz-command ]
.RI [ options ]
.I dot-file
>
.I tex-file
.br
.B dot2tex
.RI [ options ]
.I xdot-file
>
.I tex-file
.br
.I graphviz-command
.B -txdot
.I dot-file
|
.B dot2tex
.RI [ options ]
>
.I tex-file
.SH DESCRIPTION
This manual page documents briefly the
.B dot2tex
command.
.PP
\fBdot2tex\fP is a tool for converting graphs generated by Graphviz to formats suitable for use with LaTeX. Currently \fBdot2tex\fP generates code for PSTricks and PGF/TikZ.

The purpose of \fBdot2tex\fP is to give graphs a more LaTeX look and feel. This is accomplished by:
.RS 4
.IP "*" 4
Typesetting labels with LaTeX, allowing mathematical notation.
.IP "*" 4
Using native PSTricks and PGF/TikZ commands for drawing arrows, edges
and nodes.
.IP "*" 4
Using backend specific styles to customize the output.
.RE
.SH USAGE
Input data is read from standard input if no inputfile is specified. Output is written to standard output unless a destination file is set with the \fB-o\fP option. 

\fBdot2tex\fP relies on the \fIxdot format\fP generated by Graphviz. \fBdot2tex\fP will automatically run
.BR dot (1)
on the input data if it is in the plain dot format. If you want to use other layout tools like
.BR neato (1)
and
.BR circo (1),
use the \fB\-\-prog\fP option.
.SH OPTIONS
A summary of options is included below.
.TP
.B \-h\fP, \fB\-\-help
Display help message.
.TP
.B \-f \fIfmt\fP, \fB\-\-format \fIfmt
Set output format. The following values of \fIfmt\fP are supported:
.PD 0
.RS 10
.IP "\fBpgf"
PGF/TikZ. Default.
.IP "\fBpstricks\fP or \fBpst"
Use PSTricks.
.IP "\fBtikz"
TikZ format.
.RE
.PD 1
.TP
.B \-t \fImode\fP, \fB\-\-texmode \fImode
Text mode. Specify how text is converted.
.PD 0
.RS 10
.IP "\fBverbatim"
Text is displayed with all special TeX chars escaped (default).
.IP "\fBmath"
Output all text in math mode $$.
.IP "\fBraw"
Output text without any processing. 
.RE
.PD 1

.RS 7
Note that you can locally override the text mode by assigning a special \fBtexlbl\fP attribute to a graph element, or by using the \fBtexmode\fP attribute.
.RE
.TP
.B \-s\fP, \fB\-\-straightedges
Draw edges using straight lines. Graphviz uses bezier curves to draw straight edges. Use this option to force the use of line to operations instead of curves. Does not work in \fBduplicate\fP mode.  
.TP
.B \-o \fIfilename\fP, \fB\-\-output \fIfilename
Write output to file.
.TP
.B \-d\fP, \fB\-\-duplicate
Duplicate the xdot output. Uses the drawing information embedded in the xdot output to draw nodes and edges. 
.TP
.B \-\-template \fIfilename
Use template from file. See the HTML documentation for more details. 
.TP
.B \-V\fP, \fB\-\-version
Print version information and exit. 
.TP
.B \-w\fP, \fB\-\-switchdraworder
Switch drawing order of nodes and edges. By default edges are drawn before nodes. 
.TP
.B \-c\fP, \fB\-\-crop
Use preview.sty to crop the graph. Currently only implemented for the PGF/TikZ backend.  
.TP
.B \-\-figonly
Output the graph without a document preamble. Useful if the graph is to be included in a master document.
.TP
.B \-\-codeonly
Output only the drawing commands, without wrapping it in a \fBtikzpicture\fP or \fBpspicture\fP environment. Useful when used with the dot2texi package.
.TP
.B \-\-preproc
Preprocess the graph through LaTeX using the \fBpreview\fP package. Will generate a new dot file where the height and widths of nodes and edge labels are set based on the results from \fBpreview\fP.
.TP
.B \-\-cache
Enables output caching.  dot2tex will check if the input graph has been processed before. If it has not changed the graph will not be converted.
.TP
.B \-\-autosize
Preprocess the graph and run Graphviz on the output. Equivalent to:

dot2tex \-\-preproc \fIdot-file\fP | dot2tex

.TP
.B \-\-prog \fIprogram
Set graph layout program to use when the input is in plain dot format. Allowed values: dot (default), neato, circo, fdp, twopi.
.TP
.B \-\-usepdflatex
Use
.BR pdflatex (1)
instead of
.BR latex (1)
for preprocessing the graph.
.TP
.B \-\-nominsize
Ignore minimum node sizes during preprocessing.
.TP
.B \-\-valignmode \fImode
Vertical alignment of node labels, where \fImode\fP can have the values:
.PD 0
.RS 10
.IP "\fBcenter"
Labels are placed in the middle of the node (default).
.IP "\fBdot"
Use the coordinate given by the xdot output from Graphviz.
.RE
.PD 1
.TP
.B \-\-alignstr \fIstr
Used to pass a default alignment string to the PSTricks \fI\\rput\fP command:

\\rput[alignstr] ...

Only works for the PSTricks format. PGF/TikZ users can instead pass an \fBanchor=...\fP style using the \fBgraphstyle\fP option.
.TP
.B \-\-tikzedgelabels
Bypass Graphviz' edge label placement and use PGF/TikZ instead (tikz and pgf formats only).
.TP
.B \-\-styleonly
Use TikZ only styles when drawing nodes. No draw or shape option is added (tikz format only).
.TP
.B \-\-nodeoptions \fItikzoptions
Wrap node code in a scope environment with \fItikzoptions\fP as parameter (tikz format only).
.TP
.B \-\-edgeoptions \fItikzoptions
Wrap edge code in a scope environment with \fItikzoptions\fP as parameter (tikz format only).
.TP
.B \-\-debug
Write detailed debug information to the file dot2tex.log in the current directory.
.TP
.B \-\-pgf118
Generate code compatible with PGF 1.18 and earlier.
.RS 0

The following options are used by the output templates.
.RE
.TP
.B \-e \fIencoding\fP, \fB\-\-encoding \fIencoding
Set text encoding. Supported encodings are \fButf8\fP and \fBlatin1\fP.
.TP
.B \-\-docpreamble \fITeXcode
Insert TeX code in the document preamble. 
.TP
.B \-\-figpreamble \fITeXcode
Insert TeX code in the figure preamble. 
.TP
.B \-\-figpostamble \fITeXcode
Insert TeX code in the figure postamble.
.TP
.B \-\-graphstyle \fIstyle
Sets the \fB<<graphstyle>>\fP tag. 
.TP
.B \-\-margin \fImargin
Set margin around the graph when using \fBpreview.sty\fP. \fImargin\fP must be a valid TeX unit. By default \fImargin\fP is set to 0pt.
.SH SEE ALSO
.BR dot (1),
.BR latex (1).

.TP
.I /usr/share/doc/dot2tex/usage.html
Full documentation for \fBdot2tex\fP
.TP
.I /usr/share/doc/dot2tex/examples
Example Graphviz dot files for use with \fBdot2tex\fP
.SH AUTHOR
\fBdot2tex\fP was written by Kjell Magne Fauske <kjellmf@gmail.com>
.PP
This manual page was written by Peter Collingbourne <peter@pcc.me.uk>,
for the Debian project (but may be used by others).