Цікаво! Здається, раніше не чув ні про D2, ні про graphiz. Дякую, що поділилися!
digraph G {foo -> bar; ... } or graph G { foo -- bar; ...}To connect all pairs: {foo bar}->{baz bart}To make a chain of links: foo->bar->baz
-L language Set the output graphics language. Valid languages are box, cgm, dxf, epic, eepic, eepicemu, emf, eps, gbx (Gerber beta driver), gif, ibmgl, jpeg, latex, map (HTML image map), mf (MetaFont), mp (MetaPost), pcx, pdf, pdftex, pdf‐ tex_t, pic, pict2e, pictex, png, ppm, ps, pstex, pstex_t, pstricks, ptk (Perl/tk), shape (LaTeX shaped paragraphs), sld (AutoCad slide format), svg, textyl, tiff, ***tikz***, tk (tcl/tk), tpic, xbm and xpm.
The output format is specified with the -Tlang flag on the command line, where lang is one of the following: Command-line parameter Format canon cmap Client-side imagemap dot DOT fig FIG gd gd2 GD/GD2 formats gif GIF hpgl HP-GL/2 imap Server-side imagemap ismap Server-side imagemap (deprecated) jpg jpeg JPEG mif FrameMaker MIF format mp MetaPost pcl PCL pic PIC plain plain-ext Simple text format png Portable Network Graphics format ps PostScript ps2 PostScript for PDF svg svgz Scalable Vector Graphics vrml VRML vtx Visual Thought format wbmp Wireless BitMap format
Мабуть малося на увазі GraphViz, що реалізує "DOT Language" (програма xdot та інші).
А ще є "fig2dev - translates Fig code (xfig) to various graphics languages"
Цитата: BeSiDa від 2025-11-04 14:44:32Мабуть малося на увазі GraphViz, що реалізує "DOT Language" (програма xdot та інші).Може, й GraphViz. Тільки Володимир знає, про що він хотів написати.
SVG ж можна перетворити в EPS і включати як малюнок в TeX.
DOT:digraph test {aa -> bb -> cc; aa [shape=box]; bb [shape=box]; cc [shape=box]}GXL:<?xml version="1.0" encoding="iso-8859-1"?><gxl> <graph id="t1" edgeids="true" edgemode="directed"> <node id="aa"> </node> <edge from="aa" to="bb" isdirected="true" id="aa--bb"> </edge> <node id="bb"> </node> <edge from="bb" to="cc" isdirected="true" id="bb--cc"> </edge> <node id="cc"> </node> </graph></gxl>SVG:<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 184)"><title>test</title><polygon fill="white" stroke="transparent" points="-4,4 -4,-184 58,-184 58,4 -4,4"/><!-- aa --><g id="node1" class="node"><title>aa</title><ellipse fill="none" stroke="black" cx="27" cy="-162" rx="27" ry="18"/><text text-anchor="middle" x="27" y="-158.3" font-family="Times,serif" font-size="14.00">aa</text></g>...TikZ:...% aa \pgfsetstrokecolor{.}\draw (1160,-80)--(80,-80)--(80,-800)--(1160,-800)--cycle;...% aa->bb \draw (620,-806)--(620,-807)--(620,-814)...\filldraw (690,-1318)--(620,-1518)--(550,-1318)--cycle;...