• Tidak ada hasil yang ditemukan

XY-pic Reference Manual - Index of /

N/A
N/A
Nguyễn Gia Hào

Academic year: 2023

Membagikan "XY-pic Reference Manual - Index of /"

Copied!
82
0
0

Teks penuh

Implementation details are not covered here, but in the full TEXnical documentation [17]. This section briefly discusses various aspects of the current XY-pic kernel implementation that the user should be familiar with.

Loading XY-pic

Rosehkrisrose@tug.orgi After reviewing the XY-pic environment in §1, this section documents the basic concepts of XY-pic construction in §2, including maintenance. The following sections give the exact syntax rules of the main XY-pic constructs:. positional language in §3, object constructions in §4 and pictorial "decorations" in §5.

Logo, version, and messages

If you use LATEX, then this file makes it possible to load XY-pic as a "package" using the LATEX command 2ε[9]\usepackage:. where thehoptionis shall be construed as passing to. These will automatically call any backend plugins required to best mimic LATEX 2ε behavior.

Fonts

The only exceptions to this are the options that have the same name as the Part IV driver package options, which appear incf. or the LATEX 2ε graphics bundle. The file also works as a LATEX 2.09 [8] 'style option' although you must then load options using the \xyoption mechanism described in §7.

Allocations

All positions can be written , where X is the TEX dimension distance to the right and Y the distance up from the zero position 0 on the XY image (0 of course has coordinates <0mm,0mm>). When an XY image is entered in inmath mode, the reference point becomes "vcenter" instead, i.e. we use the point .

Objects

We explain the language components in general terms in this§ and in more detail in the following§§. The zero position does not have to be in the image, but Xmin≤Xmax∧Ymin≤Ymax always applies.

Connections

Decorations

The XY-pic state

The exact details of the connection depend on the actual object and are described generally in §4. Thus, the first interpretation has c set to the bottom element of the stack and the last hash set tos0.

Figure 1: h pos i itions.
Figure 1: h pos i itions.

Circle segments

The set of simple vertices contains basic objects that are useful as markers and arrowheads that create connections, so each is shown at the end of a dot connection of the appropriate type. These tips are combinations of simple tips provided for convenience (and optimized for efficiency).

Text

XY-pic is provided with a growing number of options that support specialized drawing tasks as well as exotic output devices with special graphics functions. Finally, it is possible to declare hcodei as some commands to be executed before each actual execution of \xywithoption{hoptioni}{.

Option file format

These must all be loaded using this uniform interface to ensure that the XY-pic environment is set up properly while reading the option. Sometimes some declarations from an option or header file or whatever only make sense after a specific other option is loaded.

Driver options

Specifying a larger size for the "drop" object is a way to get a dotted curve (see the example in the next note). If there is more than one, the one that appears earliest on the curve is found.

Figure 7: Syntax for curves.
Figure 7: Syntax for curves.

Circles and Ellipses

Quadratic Splines

Circles made with \frm{o} have radius as (R+ L)/2 and with \frm{o} have radius as hdimeni; \frm{oo} makes a double circle, with the outermost circle being the same as \frm{o}. Do: Allow hframe versions such as those used for routing ie. \frm2{-}should be the same as.

Figure 8: Plain h frame i s.
Figure 8: Plain h frame i s.

Brackets

Thehframeis\frm{-}and\frm{=}allows an optional corner radius that rounds the corners of the frame with quarter circles of the specified radius. Without special support for rendering the ellipses, either via ahdriverior using the arc attribute, the ellipse will be drawn as a circle with radius approximately the average of the major and minor axes.

Filled regions

The box \of{,} puts a shadow, made up of lines, in the image below the (supposedly rectangular) object, creating the illusion of.

Framing as object modifier

Using curves for frames

Also the shape of the 'caps' at each end of the poly line can be changed. It is applied to the entire current subject, whether it is text, an XY pic line, curve or arrowhead, or a composite object such as an array or the entire image. MovieSetup{width=width,height=height,. that . . specify the other arguments required by the movie class but ignored by the XY-pic movie extension).

Figure 10: Rotations, scalings, and flips Scaling and Scaled Text The h shape i modifier
Figure 10: Rotations, scalings, and flips Scaling and Scaled Text The h shape i modifier

Why use PostScript

Eberhard Matte's em-TEX implementation provides a series\special commands to facilitate drawing lines, both on screen and with various printing devices. Better results can be obtained with the PostScript back-end and dvipshdriveri, as a version of dvips is available for em-TEX. Once loaded with \xyoption{emtex}, with a suitable hdriveri also specified or later specified, the following commands are available to disable/enable the em-TEX backend.

Polygon shapes

This is useful for drawing connections with a 'center marker' especially with arrows, so the 'mapsto' example explained below can be changed to a 'breakto' example: typing. Firstpis is set to the ending object of the previous segment (for the first segment, this is c just before the path command) and cis is set to the hposition that starts the hsegmenti, and the currenthslide is applied. To shift a segment means to move each of the p, cobjects in the direction perpendicular to the current direction at each.

Figure 14: h path i s Note, however, that what goes into ~+{. . . } is
Figure 14: h path i s Note, however, that what goes into ~+{. . . } is

Arrows

See curve alignment described in §8 for how control points are used; when the list of checkpoints is analyzed pi the source and c the target of the arrow. As in the second example above, only the upper or lower curved arrow can be set using the \.uppertwocell and \.lowertwocell shape control sequences. Otherwise, if the first character in the label is * then the label is set as an XY-pichobject, as with \dropor.

Figure 15: h arrow i s.
Figure 15: h arrow i s.

Standard Options

These are entirely optional with the following tag or grouping, giving the contents of the tag. Normally, the label is balanced text, set in TEX math mode, with \twocellstyle setting the style. As above, if the first character is *, then the label is set as an XY-pichobject, the current direction is along the Arrow.

Nudging

Additionally, a new directional \dir{=>} can be used to place the "arrow" anywhere on the image after the direction has been properly specified. Any effect that can be achieved with the XY-pic core language can be set inside \xybox and used as a label. The movement is in the usual directions of the XY-pics above and below, so that the positive shock is always outside the triangle formed by the arrows and the linepc.

Extra Options

When used with <\omit>push, such excursions allow a labeled arrow to be placed anywhere within an XY-pic diagram; Furthermore, the Arrow can be oriented in any direction. Actually with a \.double cell different objects can be used with upper and lower curves by specifying. Matrices are often quite slow to compile, so for convenience all matrices can be set to compile (and not) automatically with statements.

Figure 17: h twocell i s
Figure 17: h twocell i s

New coordinate formats

Matrices can be individually compiled or not, using the explicit commands \xymatrixcompile and .

Spacing and rotation

Entries

In the following example, the inner polygon is placed using ~<> to easily adjust its orientation to the outside of the spoke. The following macros can be useful in determining what to do at each grid point. Finally, there are several ways to determine the desired radius relative to other parts of the image being built, as in the following example.

Figure 18 summarises the syntax of a h graph i with notes below. A h graph i can appear either in an  XY-picture (as h decor i ) or “stand-alone”
Figure 18 summarises the syntax of a h graph i with notes below. A h graph i can appear either in an XY-picture (as h decor i ) or “stand-alone”

Ellipses

Note that if the actual base is not a square, then the last variant, namely \ellipse(hnumi), will write an ellipse rather than a circle. In future versions there will be a hobject called \elliptical shape archiving, via\circleEdge with possibly uneven extents. It will also be possible to \bind\arc, which will set the current binding so that every place in the full ellipse, not just the visible sector, is accessible using an extension of the usual place mechanism.

Circular and Elliptical Arcs

Specifying anhorientiof^or_will force the orientation, even if it means traveling the 'long way' around the ellipse. Tip: When exploring to find the best location for the "checkpoint" (eg "x" in the example above), then use the \xycompileas shown, changing the location outside of the compilation. Other values ​​can be used with interesting results—the parameter defines the location of the control points for a cubic B'ezier curve.

Figure 20 displays the orientation on all the crossings, grouping them into subfamilies  con-sisting of right-handed, left-handed and  non-crossings
Figure 20 displays the orientation on all the crossings, grouping them into subfamilies con-sisting of right-handed, left-handed and non-crossings

DVIPS driver

This part describes 'drivers' that adjust the parts of the DVI file generated from XY images to exploit special capabilities of specific DVI driver programs through TEX's\special command. This makes the DVI files non-portable, but is necessary for full support of some of the XY-pic extensions (described in part II). Other implementations not specifically mentioned here may work with one of the namedhdriveris, although perhaps not all features will actually be supported.

DVITOPS driver

OzTeX driver

However, with OzTEX version 1.8 and later, there is the alternative of using dvips hdriveri, which supports all the PostScript effects available in XY-pic. In particular a 'Big-TEX' is needed, along with an increase in the pool_size parameter.

OzTeX v1.7 driver

Textures driver

Textures v1.6 driver

XDVI driver

PDF driver

However, it is acceptable to have a control string name here, which extends to more complex PostScript code. The hshapei modifiers described in the previous section also use this mechanism and so should work correctly with all drivers. To help with this, the special modifier [psxy] is provided to fix the location where the reference point of the current hobjecti will be placed.

Frames

This file is loaded and its effects are automatically activated when \xyoption{color} is requested and the current driver supports colors with PostScript. If it is necessary to switch off this support, the following commands are available; they obey regular TEX groupings. If it is necessary to switch off this support, the following commands are available; they obey regular TEX groupings.

Line-styles

Without PostScript support, ellipses may appear as circles and all filled areas may appear as black rectangles.

Rotations and scaling

Patterns and tiles

Answer to exercise 32 (p.51): Modifiers are used to round all inputs with a frame - the general shape is used to ensure that the sequence is well defined. How to put nice chart arrows with TEX—design decisions used in XY-pic. Spivak.The Joy of TEX—A Gourmet Guide to Typesetting with the AMS-TEX Macro Package.

Obsolete kernel features

The following things are added to the core by this option and described here: idioms, deprecated positions, deprecated compounds, and deprecated objects. Some idioms from AMS-TEX are no longer used by XY-pic: the definition commands \define and \redefine, and the size commands \dsize,. In version 2, many things were done using individual hdecori control sequences that are now done with hposioperators.

Obsolete extensions & features

Obsolete loading

Compiling v2-diagrams

Gambar

Figure 1: h pos i itions.
Figure 2: Example h place i s 3m. The vector /Z/, where Z is a h dimen i sion, is the
Figure 3: h object i s.
Figure 5 shows all the h dir i ectionals defined by the kernel with notes below; each h main i type has a line showing the available h variant i s
+7

Referensi

Dokumen terkait

These findings are consistent with the literature from other field-based training such as clinical settings where priority is placed on supervisor reassurance, role modelling, empathy