TeXnical notes: Difference between revisions

From stacky wiki
(Created page with "Sometimes I find a solution to a TeXnical problem, and I think everybody should know about it. Some of these things are totally obvious, but (as far as I know) non-standard. ==B...")
 
Line 16: Line 16:
but that is fairly unsatisfying because you have to calibrate the (.7) by eye. There is another way, which is to use
but that is fairly unsatisfying because you have to calibrate the (.7) by eye. There is another way, which is to use
<pre>\ar[r]^-{f}</pre>
<pre>\ar[r]^-{f}</pre>
which will automatically place the label "f" half-way along the arrow. If you want the label .7 of the way along the arrow, you can do
which will automatically place the label "f" half-way along the arrow. If you want the label .7 of the way ''along the arrow'', you can do
<pre>\ar[r]^-(.7){f}</pre>
<pre>\ar[r]^-(.7){f}</pre>

Revision as of 08:03, 25 September 2011

Sometimes I find a solution to a TeXnical problem, and I think everybody should know about it. Some of these things are totally obvious, but (as far as I know) non-standard.

BibTeX without a separate .bib file

dvi tex

How to draw the Fox-Artin wild arc with pstricks

tex pdf (pdf contains only the resulting image)

Placing labels on arrows in XY-pic

(I learned this trick from Aaron Lauda; I haven't seen it documented anywhere)

\xymatrix{asdfasdf \ar[r]^{f} & a }

produces the label "f" in a stupid place, half-way between the centers of the two entries, instead of where you'd like it to be, half-way along the arrow. One way to handle this is to do something like

\ar[r]^(.7){f}

but that is fairly unsatisfying because you have to calibrate the (.7) by eye. There is another way, which is to use

\ar[r]^-{f}

which will automatically place the label "f" half-way along the arrow. If you want the label .7 of the way along the arrow, you can do

\ar[r]^-(.7){f}