\usepackage[all,knot]{xy}In the following I assume, your document contains at least these lines (the
poly
options is needed later):
\documentclass{article} \usepackage[all,knot,poly]{xy} \begin{document} % -- put the examples here --- \end{document}The example's code is put somewhere between
\begin{document}
and \end{document}
.
|
typesets |
|
The line !{0;/r2.0pc/:}
scales the picture, use different
values instead of 2.0pc
to get different sizes.
In the Reference Manual [RM99] there are
two tables showing every crossing, uncrossing and join. In the
joins-table you can see that \vcap
produces a half circle.
(I have included copies of these tables, see figure
2 and 3.)
\vcap-
is a shorthand for \vcap[-1]
, which simply
rotates the knot piece 180 degrees. Upper and lower half-circle
made up the complete circle. If [n]
is used with a positive number
n
the piece is scaled, [-n]
scales and rotates.
Notice the use of !{...}
, every XY-pic drawing command needs to be
enclosed like this.
But in general one has to change the current cursor pos
manually. The position is controlled by the
[u],[d],[l],[r]
commands. They change the position up,
down, left, and right. Consider the next examples:
|
|
|
|
(Due to the [l]
in the first example, it is possible to
distinguish the two halfcircles.)
The !{\vunder}
changes the position in the right way, for the next
!{\vunder-}
, but the !{\hcap[2]}
- the ``)'' shaped
piece - is misplaced. In the second example the position is moved
up two times and right once ([uur]). The two up movements are required
because of the !{\vunder}
!{\vunder-}
combination. At last, the ``(`` shaped piece is placed after a jump
to the left ([l]).
Notice the fact, that !{\hcap[2]}
, which is a double
sized piece, is exactly as high, as the !{\vunder}
!{\vunder-}
combination.
The tables in the Reference-Manual provide enough information, so that there is no need guessing where the position moves, while drawing a knot piece. But I don't understand enough of that, so I can't explain it here.
When typesetting a new knot diagram I use this approach (trial and error):
You need a fast computer, since the latex-run is time consuming. For typesetting a new knot diagramm, I use a separate empty document. After everything is perfect, I copy the lines in the real document.
[c(f)]
construct, where f
is a real number like 0.5
or 2.3
and c
a character
|
|
|
|
[u(0.5)]
moves the
current position up a half step. After that the knot piece is
drawn.
\xcaph
which is curved, but it is possible to control the
curvature. This is shown in the next example:
|
|
Sometimes knots and links are oriented. XY-pic supports orientation with the following notations after a knot piece, consider the next examples and figure 1:
|
|
>
,<
or |
and the text enclosed with
curly braces, after your knot piece. Consider the next example and
figure 1:
|
|