tbook: User Element View | [DTD Element View] |
[Home] [Elements] [Entities] | [Prev] [Next] |
(#PCDATA|em|visual|verb|m|math|ch|latex|url|hspace|unit|relax| wrap|cite|pageref|ref|vref|mathref|footnote|ix|idx|indexsee| graphics)*
Name | Type | Default Value |
---|---|---|
style | CDATA | None |
contrast | Enumeration: boxed inverse | None |
class | CDATA | None |
align | Enumeration: ccenter center left right | "left" |
xml:lang | NMTOKEN | None |
id | ID | None |
interval | CDATA | None |
tag | CDATA | Required |
relsize | Enumeration: large normal small | "normal" |
number | Enumeration: false true | None |
The tag is searched in the surrounding vector graphics and the contents of the <psfrag> is substituted for it:
<psfrag tag="x-axis">x -axis</psfrag>
For this I use of course the fantastic Psfrag package. Is <psfrag> empty, tag is substituted for itself, which means that only font and size is adjusted to the main document:
<psfrag tag="Diagram"/>
If you want to erase something from an image, you have to replace it with white-space:
<psfrag tag="was dull"> </psfrag>
align determines alignment relatively to the replaced tag:
number is "true" by default, if tag is obviously a number, or if interval is given, else "false".
constrast="boxed" sets the substitution on a white rectangle. constrast="inverse" shows the substitution in white colour. One of both may be necessary for too dark/chaotic backgrounds.
relsize should be clear.
interval consists, if given, of three semicolon separated numbers: start, end and step. Thus interval="0;10;1" yields automatically Psfrag substitutions for all numbers between 0 and 10. This is very convenient for EPS files with a labeled axis. By the way, tag plays in this case the role of a pattern for the numbers in the EPS file. This works somehow accoring to the DecimalFormat routine of Java 1.1, if anybody knows this.
Some examples:
<psfrag tag="#" interval="1;10;2"/>
replaces 1, 3, 5, 7 und 9 by itself (i.e., it changes the font only). Now for something more complicated:
<psfrag tag="#.0" interval="-4.5;-6;-0.5">#,0</psfrag>
replaces -4.5, -5.0, -5.5 and -6.0 by the same numbers, but with a comma instead of a point (for our non-English friends). Additionally,
<psfrag tag="#.0" interval="-4.5;-6;-0.5">#,#</psfrag>
does the same, but in the output post-comma digits (and the comma) are omitted where they are zero anyway. Last example:
<psfrag tag="0.0" interval="-1.5;1;0.5">#,#</psfrag>
does the following substitutions: -1.5 → −1,5, -1.0 → −1, -0.5 → −0,5, 0.0 → 0, 0.5 → 0,5 and 1.0 → 1.
Besides, it doesn't do any harm if you declare too many replacements, so you can use the same <psfrag> for all your diagrams, for example.
ch, cite, em, footnote, graphics, hspace, idx, indexsee, ix, latex, m, math, mathref, pageref, ref, relax, unit, url, verb, visual, vref, wrap