summaryrefslogtreecommitdiff
path: root/graphics/duotenzor/duotenzormanual.tex
blob: 5d3bc988bab67f9f735822d5c6bc6ab07e5d4f05 (plain)
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
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437


\documentclass[10pt]{article}

\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsfonts}
\usepackage{graphics}
\usepackage{MnSymbol}
\usepackage{array}

\usepackage{duotenzor}

%\setoperationalfont{\mathcal}

%\setduotensorfont{\mathsf}

\title{\bf The duotenzor drawing package}
\author{Lucien Hardy\\
\textit{Perimeter Institute,}\\
\textit{31 Caroline Street North,}\\
\textit{Waterloo, Ontario N2L 2Y5, Canada}}


\begin{document}

\maketitle

\vspace{17mm}

\[
\begin{Diagram}[1.3]{0}{-3.3}
\begin{move}{-2,4}
\Duobox{A}{0,0}
\linkedprep[0.7]{A}{1}{A1}{3}{0}\duosymbol[-3,-6]{\scriptstyle a}
\linkedprep[0.7]{A}{2}{A2}{4.5}{0}\duosymbol[-25,-6]{\scriptstyle c}
\linkedprep[0.7]{A}{3}{A3}{6}{0}\duosymbol[-44,-6]{\scriptstyle a}
\end{move}
\begin{move}{-2.5,15}
\Duobox[2]{B}{0,0}
\linkedeffect[0.7]{B}{1}{1B}{-4.5}{0}\duosymbol[25,-6]{\scriptstyle a}
\linkedeffect[0.7]{B}{2}{2B}{-3}{0}\duosymbol[3,-6]{\scriptstyle a}
\linkedprep[0.7]{B}{1.5}{B15}{3}{0} \duosymbol[-3,-6]{\scriptstyle b}
\end{move}
\begin{move}{6,9}
\Duobox[2]{C}{0,0}
\linkedeffect[0.7]{C}{1}{1C}{-4.5}{0}\duosymbol[25,-6]{\scriptstyle c}
\linkedeffect[0.7]{C}{2}{2C}{-3}{0}\duosymbol[3,-6]{\scriptstyle a}
\linkedprep[0.7]{C}{1}{C1}{3}{0} \duosymbol[-3,-6]{\scriptstyle a}
\linkedprep[0.7]{C}{2}{C2}{4.5}{0} \otherside\duosymbol[-25,3]{\scriptstyle d}
\end{move}
\begin{move}{3,21}
\Duobox[2]{D}{0,0}
\linkedeffect[0.7]{D}{1}{1D}{-4.5}{0}\duosymbol[25,-6]{\scriptstyle b}
\linkedeffect[0.7]{D}{2}{2D}{-3}{0}\otherside\duosymbol[3,3]{\scriptstyle d}
\end{move}
\wire{A1}{1B}{1}{1}\opsymbol{a} \wire{A2}{1C}{1}{1}\opsymbol{c} \wire{A3}{2C}{1}{1}\otherside\opsymbol{a}
\wire{C1}{2B}{1}{1}\opsymbol{a} \wire{C2}{2D}{1}{1}\otherside\opsymbol[4,0]{d} \wire{B15}{1D}{1}{1}\opsymbol{b}
\end{Diagram}
\]

\vspace{14mm}

\noindent Version 1.00.

\vspace{3pt}

\noindent Copyright 2010 by Lucien Hardy.

\vspace{3pt}

\noindent Permission is granted to distribute and/or modify both the documentation and the code under the
conditions of the LaTeX Project Public License, either version 1.3 of this license or (at your option) any
later version.

\newpage


The \verb+duotenzor+ drawing package (spelled with a \verb+z+) is a purpose built package for drawing circuits and duotensor diagrams \cite{Hardyduotensors}.  It consists of about eighty commands (defined using the LaTeX \verb+\newcommand+ command) that call on the TikZ package written by Till Tantau \cite{TikZ}. TikZ is, of course, much much more versatile and it (or some other similar package) should be used to draw more complicated diagrams.  \verb+duotenzor+ has two advantages:  (1) fewer commands are required for circuit and duotensor diagrams than with a more advanced package; (2) producing a drawing is very similar to producing an equation using LaTeX.  The package file, \verb+duotenzor.sty+, can be downloaded from CTAN and, once saved into the appropriate folder (the working folder will suffice), uploaded into the document using the command \verb+\usepackage{duotenzor}+ in the document preamble.  This package calls on the TikZ drawing package \cite{TikZ} and two of its libraries (\verb+calc+ and \verb+arrows+).  It also calls on the \verb+xspace+ package.  All these are included as standard in most LaTeX installations. \verb+duotenzor+ consists of about sixty commands which must be used inside
\verb+\begin{diagram} ... \end{diagram}+ commands.  In addition there are about twenty commands that can be used in regular text or in math mode but not inside the diagram environment.

The following code produces the example on the right.

\begin{verbatim}
\begin{diagram}
\Opbox{A}{0,0}
\Opbox{B}{2,4}
\wire{A}{B}{1}{2}
\end{diagram}
\end{verbatim}
\makebox[3cm][l]{
\begin{diagram}
\boundingbox{0,0}{0,0}
\begin{move}{30,5}
\Opbox{A}{0,0}
\Opbox{B}{2,4}
\wire{A}{B}{1}{2}
\end{move}
\end{diagram}
}

\vspace{-13pt}
\noindent
Here \verb+\Opbox{B}{2,4}+ puts a box at coordinate $(2,4)$ with the symbol $\mathsf B$ in it.  An alternative way to do this is to use
\verb+\opbox{B}{2,4}\opsymbol{B}+.  In this case \verb+\opbox{B}{2,4}+ produces an empty box which, in the code, is called \verb+B+ (we cannot have two objects with the same name).  Then the command \verb+\opsymbol{B}+ puts a $\mathsf B$ in the box.  We need to use this more lengthy construction if we want to have two boxes with the same letter inside them.  By default these boxes are of size 3 having room for 3 inputs and 3 outputs.  A box of size 5 is produced by \verb+\Opbox[5]{A}{2,4}+.  We can choose non-integer sizes should we wish.  The \verb+\wire{A}{B}{1}{2}+ command draws a wire from output 1 of box \verb+A+ to input 2 of box \verb+B+.  The inputs and outputs need not be integers.  This is particularly useful if we want to have a different number inputs and outputs.

The command \verb+\opsymbol{s}+ puts the symbol $\mathsf{s}$ (in the \verb+\mathsf+ font) at the appropriate location for the preceeding object.  We can use to put a symbol in a box or on the left of a wire for example. To switch the symbol to the other side of the wire we use the command \verb+\otherside+ immediately before the \verb+\opsymbol+ command.   The command allows optional fine tuning.  For example, \verb+\opsymbol[5,13]{s}+
will move the symbol 5 small units to the left and 13 small units up.  This fine tuning is useful since \verb+duotenzor+ does not always position the labels to ones taste.  Here is an example illustrating these points.
\newpage
\begin{verbatim}
\begin{diagram}
\Opbox{A}{0,0}
\opbox[2]{B}{2,4}\opsymbol{B}
\Opbox[2]{C}{-1,9}
\wire{A}{B}{2}{1}\opsymbol{a}
\wire{A}{B}{3}{2} \otherside \opsymbol{c}
\wire{A}{C}{1}{1}\opsymbol{b}
\wire{B}{C}{1.5}{2} \opsymbol[-2,-5]{d}
\end{diagram}
\end{verbatim}
\makebox[3cm][l]{
\begin{diagram}
\boundingbox{0,0}{0,0}
\begin{move}{38,6.5}
\Opbox{A}{0,0}
\opbox[2]{B}{2,4}\opsymbol{B}
\Opbox[2]{C}{-1,9}
\wire{A}{B}{2}{1}\opsymbol{a}
\wire{A}{B}{3}{2} \otherside \opsymbol{c}
\wire{A}{C}{1}{1}\opsymbol{b}
\wire{B}{C}{1.5}{2} \opsymbol[-2,-5]{d}
\end{move}
\end{diagram}
}

\vspace{-13pt}
\noindent Here is another example illustrating the use of \verb+\inwire+ and \verb+\outwire+
\makebox[3cm][l]{
\begin{diagram}
\boundingbox{0,0}{0,0}
\begin{move}{-4,-9}
\Opbox{D}{0,0}
\inwire[-5]{D}{1} \Opsymbol{a}
\inwire{D}{2} \Opsymbol{b}
\closedinwire[5]{D}{3} \Opsymbol{c}
\outwire[-5]{D}{1.5} \Opsymbol{d}
\closedoutwire[5]{D}{2.5} \Opsymbol{e}
\end{move}
\end{diagram}
}
\begin{verbatim}
\begin{diagram}
\Opbox{D}{0,0}
\inwire[-5]{D}{1} \Opsymbol{a}
\inwire{D}{2} \Opsymbol{b}
\closedinwire[5]{D}{3} \Opsymbol{c}
\outwire[-5]{D}{1.5} \Opsymbol{d}
\closedoutwire[5]{D}{2.5} \Opsymbol{e}
\end{diagram}
\end{verbatim}

\noindent The optional argument in square brackets on \verb+\inwire+ and \verb+\outwire+ allows the inwire and outwire to be bent which can be visually more appealing.  We use \verb+\Opsymbol+ rather than \verb+\opsymbol+ for putting symbols at the end of wires to get the symbols aligned (\verb+\opsymbol+ can be used but produces messy results).  The commands \verb+\closedinwire+ and \verb+\closedoutwire+ produce closed inputs and outputs as shown.

Similar commands produce duotensor diagrams.  Here is an example
\makebox[3cm][l]{
\begin{diagram}
\boundingbox{0,0}{0,0}
\begin{move}{-9,-11}
\Duobox[2]{A}{0,0}
\duobox[2]{B}{6,3} \duosymbol{B}
\link{A}{B}{1}{1.5}\duosymbol{a}
\inblack[-5]{A}{1} \Duosymbol{a}
\inwhite[5]{A}{2} \Duosymbol{b}
\outblack[5]{A}{2} \duosymbol{d}
\outwhite[-5]{B}{1}\Duosymbol{a}
\outblack[5]{B}{2}\Duosymbol{c}
\end{move}
\end{diagram}
}
\begin{verbatim}
\begin{diagram}
\Duobox[2]{A}{0,0}
\duobox[2]{B}{6,3} \duosymbol{B}
\link{A}{B}{1}{1.5}\duosymbol{a}
\inblack[-5]{A}{1} \Duosymbol{a}
\inwhite[5]{A}{2} \Duosymbol{b}
\outblack[5]{A}{2} \duosymbol{d}
\outwhite[-5]{B}{1}\Duosymbol{a}
\outblack[5]{B}{2}\Duosymbol{c}
\end{diagram}
\end{verbatim}

The command \verb+\otherside+ can be used to put a label below (rather than above) a link.

\newpage

Often it is necessary to put black and white dots on the links themselves.  This is illustrated by
\makebox[3cm][l]{
\begin{diagram}
\boundingbox{0,0}{0,0}
\begin{move}{17,-11}
\Duobox[12]{A}{0,0}
\Duobox[12]{B}{12,4}
\linkbw{A}{B}{2}{2}
\linkwb{A}{B}{4}{4}
\linkwbbw{A}{B}{6}{6}
\linkbwwb{A}{B}{8}{8}
\linkwbwb{A}{B}{10}{10}
\linkbwbw{A}{B}{12}{12}
\end{move}
\end{diagram}
}
\begin{verbatim}
\begin{diagram}
\Duobox[12]{A}{0,0}
\Duobox[12]{B}{12,4}
\linkbw{A}{B}{2}{2}
\linkwb{A}{B}{4}{4}
\linkwbbw{A}{B}{6}{6}
\linkbwwb{A}{B}{8}{8}
\linkwbwb{A}{B}{10}{10}
\linkbwbw{A}{B}{12}{12}
\end{diagram}
\end{verbatim}

\noindent Both \verb+\wire+ and \verb+\link+ (along with all the related commands in the above example) also take an optional argument in square brackets which increases the curviness of the line.  The value 0 produces a straight line.  The default value is 1.

There are a few commands that are useful for drawing hybrid diagrams.  The command \verb+\Opduobox{hsize}{vsize}{A}{2,5}+ produces a box of horizontal size \verb+hsize+ and vertical size \verb+vsize+ labeled with $\mathsf A$ at coordinate $(2,5)$.  Both links and wires can be attached to this box.  The command \verb+\opduobox+ is the same except it does not have a symbol in it (a symbol can be placed in it using \verb+\opsymbol+ or \verb+\duosymbol+).  We also have \verb+\fideffect[scale]{F}{2,7}+ and \verb+\fidprep[scale]{G}{2,7}+ which produce triangles representing fiducial effects and preparations scaled by the optional \verb+scale+ argument.  They can be both linked to and wired to.  Here is an example
\makebox[3cm][l]{
\begin{diagram}
\boundingbox{0,0}{0,0}
\begin{move}{7,-12}
\Opduobox{4}{3}{A}{0,0}
\Opbox{B}{1,6}
\fideffect[2]{F}{-5,-2}\opsymbol{F}
\fidprep{G}{5,2}
\link{A}{G}{2}{1}
\link{F}{A}{1}{3}
\wire{A}{B}{4}{1}
\wire{G}{B}{1}{3}
\end{move}
\end{diagram}
}
\begin{verbatim}
\begin{diagram}
\Opduobox{4}{3}{A}{0,0}
\Opbox{B}{1,6}
\fideffect[2]{F}{-5,-2}\opsymbol{F}
\fidprep{G}{5,2}
\link{A}{G}{2}{1}
\link{F}{A}{1}{3}
\wire{A}{B}{4}{1}
\wire{G}{B}{1}{3}
\end{diagram}
\end{verbatim}

\noindent It is difficult to align the fiducial effects and fiducial preparations with the duobox they are linked to using the above commands. To help with this, the additional commands \verb+\linkedeffect+ and \verb+\linkedprep+ are supplied.  The command \verb+\linkedeffect[scale]{A}{3}{F}{x}{Dy}+ draws a fiducial element named \verb+F+ with $x$-coordinate \verb+x+ and a $y$-coordinate at a height \verb+Dy+ above the 3 port of duobox \verb+A+ (usually \verb+Dy+ is set to 0 since we are trying to align these objects).  Further, it draws in the link.  Here is an example
\newpage
\makebox[3cm][l]{
\begin{diagram}
\boundingbox{0,0}{0,0}
\begin{move}{35,-6}
\Duobox[2]{C}{0,0}
\linkedeffect[0.7]{C}{1}{1C}{-4.5}{0}
\linkedeffect[0.7]{C}{2}{2C}{-3}{0}
\linkedprep[0.7]{C}{1}{C1}{3}{0}
\linkedprep[0.7]{C}{2}{C2}{4.5}{0}
\end{move}
\end{diagram}
}
\begin{verbatim}
\begin{diagram}
\Duobox[2]{C}{0,0}
\linkedeffect[0.7]{C}{1}{1C}{-4.5}{0}
\linkedeffect[0.7]{C}{2}{2C}{-3}{0}
\linkedprep[0.7]{C}{1}{C1}{3}{0}
\linkedprep[0.7]{C}{2}{C2}{4.5}{0}
\end{diagram}
\end{verbatim}

\noindent We can connect wires to these fiducial elements using the names they are given (e.g.\ \verb+1C+ for the first one).

The following objects can be linked to (like duoboxes) and have symbols placed above (or below) them
\makebox[3cm][l]{
\begin{diagram}
\boundingbox{0,0}{0,0}
\begin{move}{23,-3.5}
\bbmetric{A}{0,0}
\bwmetric{B}{0,-2}
\wbmetric{C}{0,-4}
\wwmetric{D}{0,-6}\otherside \duosymbol{d}
\end{move}
\end{diagram}
}
\begin{verbatim}
\begin{diagram}
\bbmetric{A}{0,0}
\bwmetric{B}{0,-2}
\wbmetric{C}{0,-4}
\wwmetric{D}{0,-6}\otherside \duosymbol{d}
\end{diagram}
\end{verbatim}

%\noindent We have also shown how to put a symbol below one of these objects.

To foliate a circuit we use the \verb+foliation+ environment.  This contains an argument saying what $x$-coordinate on the left the foliation lines start, and what $x$-coordinate on the right the foliation lines end.  Foliation lines are drawn using \verb+\startfoliate+, \verb+\continuefoliate+, and \verb+\finishfoliate+ commands.  The \verb+\Startfoliate+, \verb+\Continuefoliate+, and \verb+\Finishfoliate+ commands take an extra argument which allow the intersection point of foliation line with a given wire to be moved away from the centre of the wire by a fraction of the wires length.
\makebox[3cm][l]{
\begin{diagram}[1.5]
\boundingbox{0,0}{0,0}
\begin{move}{18,-15}
\Opbox{A}{0,0}
\Opbox[2]{B}{2,4}
\Opbox[2]{C}{-1,9}
\wire{A}{B}{2}{1}
\wire{A}{B}{3}{2}
\wire{A}{C}{1}{1}
\wire{B}{C}{1.5}{2}
\begin{foliation}{-5}{6}
\Startfoliate{A}{C}{1}{1}{-0.25}
\continuefoliate{A}{B}{2}{1}
\finishfoliate{A}{B}{3}{2}
\putlatex{\ensuremath{t_1}}
%
\Startfoliate{A}{C}{1}{1}{0.25}
\finishfoliate{B}{C}{1.5}{2}
\otherside\putlatex{\ensuremath{t_1}}
\end{foliation}
\end{move}
\end{diagram}
}
\begin{verbatim}
\begin{diagram}[1.5]
\Opbox{A}{0,0}
\Opbox[2]{B}{2,4}
\Opbox[2]{C}{-1,9}
\wire{A}{B}{2}{1}
\wire{A}{B}{3}{2}
\wire{A}{C}{1}{1}
\wire{B}{C}{1.5}{2}
\begin{foliation}{-5}{6}
  \Startfoliate{A}{C}{1}{1}{-0.25}
  \continuefoliate{A}{B}{2}{1}
  \finishfoliate{A}{B}{3}{2}
  \putlatex{\ensuremath{t_1}}
  \Startfoliate{A}{C}{1}{1}{0.25}
  \finishfoliate{B}{C}{1.5}{2}
  \otherside\putlatex{\ensuremath{t_1}}
\end{foliation}
\end{diagram}
\end{verbatim}

\noindent We have illustrated a few more features in this example.  The \verb+diagram+ environment takes an optional argument that scales the diagram (in this example we have set this to 1.5, the default is 1).  Scaling does not effect the font size.  We have also used the \verb+\putlatex+ command.  This works like \verb+\opsymbol+ and \verb+\duosymbol+. It places the symbol inside the argument at the appropriate location (in this case on the left of the foliation line, or on the right if the \verb+\otherside+ command is used).  We have used the standard LaTeX command \verb+\ensuremath+ rather than \verb+$...$+  since then the diagram can be put inside the equation environment without causing an error.  The command \verb+\placelatex{x,y}{LaTeX}+ can also be used to put some standard LaTex in the diagram.  In this case, it places it at the position $(x,y)$.  Both \verb+\putlatex+ and \verb+\placelatex+ admit an optional fine tuning argument.

The command \verb+\thispoint[dx,dy]{A}{x,y}+ produces an abstract point named \verb+A+ which we can connect wires to, links to, and place symbols at using the various commands above.  This can be useful if we want a wire or link to end at a location at which there is no box.

We can use \verb+\begin{Diagram}[scale]{X}{y} ... \end{Diagram}+ instead of using the \verb+diagram+ environment.  This has additional arguments.  \verb+X+ moves the whole diagram to the left by this distance.  \verb+y+ changes the baseline LaTeX associated with the diagram which has the effect of moving the diagram up by this distance in some cases (this is useful in the equation environment).   With in a diagram we can group together different parts of the diagram within the \verb+move+ environment.  Thus, the part of the diagram whose commands appear inside \verb+\begin{move}[scale]{X,Y} ... \end{move}+ will be scaled by a factor \verb+scale+ and moved distance \verb+X+ in the $x$-direction and \verb+Y+ in the $y$-direction relative to other parts of the diagram.   This is useful in managing complex diagrams.
The \verb+\boundingbox{x1,y1}{x2,y2}+ command causes LaTeX to think that the diagram is inside the bounding box with bottom left corner at \verb+(x1,y1)+ and top right corner \verb+(x2,y2)+.  This is useful in managing the white space around a diagram.

\verb+duotenzor+ provides a number of stand alone commands.  These can be used in regular text, in math mode, and in the equation environment but not in the \verb+diagram+ environment.  These commands are

\newpage

\hspace{2.2cm}\makebox[\textwidth][l]{Stand alone commands in duotenzor}

\begin{center}
\begin{tabular}{l l c l l}
\bbdots & \verb+\bbdots+ & \hspace{3cm} & \bndots & \verb+\bndots+  \\
\bwdots & \verb+\bwdots+ & & \wndots & \verb+\wndots+  \\
\wbdots & \verb+\wbdots+ & & \nbdots & \verb+\nbdots+  \\
\wwdots & \verb+\wwdots+ & & \nwdots & \verb+\nwdots+  \\
\nndots & \verb+\nndots+ & \vspace{5pt} & \nndotslong & \verb+\nndotslong+ \\
\bbleftjump & \verb+\bbleftjump+ & \vspace{6pt} & \bbrightjump & \verb+\bbrightjump+  \\
\bwleftjump & \verb+\bwleftjump+ & \vspace{6pt} & \bwrightjump & \verb+\bwrightjump+ \\
\wbleftjump & \verb+\wbleftjump+ & \vspace{6pt} & \wbrightjump & \verb+\wbrightjump+ \\
\wwleftjump & \verb+\wwleftjump+ & \vspace{6pt} & \wwrightjump & \verb+\wwrightjump+ \\
\end{tabular}
\end{center}

One more stand alone command is \verb+\ultrathickdash+ which produces \ultrathickdash.
Finally, for reference, here is a complete list of all commands (in addition to those in the above table) most of which have been discussed above.  They are grouped with other commands (after \lq\lq also") which take similar arguments.  The argument in square brackets is always optional.  For \verb+step+, \verb+scale+, \verb+size+, and \verb+curviness+  the default value is 1.  For \verb+bend+ the default value is 0. For the fine tuning parameters \verb+dx,dy+ the default value is 0,0. The \verb+\setoperatinalfont+ command can be used to change the operational font (and similarly for \verb+\setduotensorfont+). It is set, by default to \verb+\mathsf+. The \verb+\constructiongrid+ command can be used to aid drawing (and removed from the finished product). Its arguments indicate the lower left and upper right coordinates.

\begin{verbatim}
Fonts:     \setoperationalfont{\newfontchoice},
                also \setduotensorfont{\newfontchoice},
Environ-:  \begin{diagram}[scale],
ments      \begin{Diagram}[scale]{xshift}{voffset},
           \begin{move}[scale]{dX,dY},
Grid:      \constructiongrid[step]{x1,y1}{x2,y2}
Boxes:     \Opbox[size]{A}{x,y},
                also \opbox, \Duobox, \duobox,
           \Opduobox{hsize}{vsize}{A}{x,y}
                also \opduobox
Fiducials: \fidprep[size]{F}{x,y},
                also \fideffect
           \linkedprep[size]{A}{3}{X}{x}{Dy},
                also \linkedeffect
Wires:     \wire[curviness]{A}{B}{1}{3},
                also \doublewire, \thickwire, \thinwire
           \outwire[bend]{A}{2},
                also \inwire, \closedinwire, \closedoutwire
Links:     \link[curviness]{A}{B}{1}{3},
                also \doublelink, \thicklink, \thinlink, \linkbw,
                     \linkwb, \linkww, \linkbb, \blink, \linkb,
                     \wlink, \linkw, \linkwbbw, \linkbwwb,
                     \linkwbwb, \linkbwbw, \blink, \wlink, \linkb
                     \linkw, \blinkb, \blinkw, \wlinkb, \wlinkw
           \outblack[bend]{A}{3},
                also \outwhite, \inblack, \inwhite
Symbols:   \opsymbol[dx,dy]{a},
                also \duosymbol, \Opsymbol, \Duosymbol, \putlatex
           \otherside
           \placelatex[dx,dy]{x,y}{LaTeX stuff here}
Metric:    \bbmetric[size]{g}{x,y}
                also \wwmetric, \wbmetric, \bwmetric
                     \bbinsert, \wbinsert, \bwinsert, \wwinsert
Foliation: \begin{foliation}{X}{Y}  ...  \end{foliation}
           \startfoliate{A}{B}{1}{3}
                also \continuefoliate, \finishfoliate
           \Startfoliate{A}{B}{1}{3}{Dy}
                also \Continuefoliate, \Finishfoliate
Abstract:  \thispoint[dx,dy]{A}{x,y}
           \boundingbox{coord1}{coord2}
\end{verbatim}


\vspace{7mm}

\section*{Acknowledgements}
Research at Perimeter Institute for Theoretical Physics is supported in part by
the Government of Canada through NSERC and by the Province of Ontario
through MRI.  I am grateful to staff at the Casa Mia deli and cafe where much of this work was done.  

\begin{thebibliography}{00}
\bibitem{Hardyduotensors} L.\ Hardy, {\it A formalism-local framework for general probabilistic theories including quantum theory}, arXiv:1005.5164 at http://arxiv.org/abs/1005.5164 (2010).
\bibitem{TikZ} T.\ Tantau, {\it TikZ and PGF: Manual for version 2.00}, at http://sourceforge.net/projects/pgf/, (2007).
\end{thebibliography}
\end{document}