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

Include manpage #38

Open
sandrotosi opened this issue Feb 25, 2015 · 3 comments
Open

Include manpage #38

sandrotosi opened this issue Feb 25, 2015 · 3 comments
Labels

Comments

@sandrotosi
Copy link

Hi,
for the debian packaging, a manpage was written, but it makes sense to be included upstream (eventually needs updating)

@sandrotosi
Copy link
Author

.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 <[email protected]>
.PP
This manual page was written by Peter Collingbourne <[email protected]>,
for the Debian project (but may be used by others).

@kjellmf kjellmf added the docs label Feb 25, 2015
@kjellmf
Copy link
Collaborator

kjellmf commented Feb 25, 2015

Thanks for the heads up. Where should I put the manpage?

@sandrotosi
Copy link
Author

mh I guess in the basedir?

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

No branches or pull requests

2 participants