2014-12-01
SVG and xypic

This page is a demonstration of SVG embedding and of the use of a MathJax extension called XyJax. This content was exported from Scape via the Export as Markdown command, and then hand-edited to look nicer in this blog.

$$ \begin{xy} \xymatrix { {\mathscr{C}} & a \ar[r]^f \ar[dr]_{g \circ f} & b \ar[d]^g & \ar@{~>}[r]^F & & Fa \ar[r]^{Ff} \ar[dr]_*[l]{\scriptstyle F(g\circ f) = Fg\circ Ff} & Fb \ar[d]^{Fg} & {\mathscr{D}} \\ && c & \ar@{~>}[r]^F &&& Fc } \end{xy} $$

SVG Example

Hex grid Layer 1 0,0 0,1 0,2 0,3 0,4 0,5 1,0 1,1 1,2 1,3 1,4 1,5 2,0 2,1 2,2 2,3 2,4 2,5 3,0 3,1 3,2 3,3 3,4 3,5 4,0 4,1 4,2 4,3 4,4 4,5 5,0 5,1 5,2 5,3 5,4 5,5 6,0 6,1 6,2 6,3 6,4 6,5 7,0 7,1 7,2 7,3 7,4 7,5 8,0 8,1 8,2 8,3 8,4 8,5 9,0 9,1 9,2 9,3 9,4 9,5 Layer 2

Another SVG Example

Hex grid Layer 1 0,0 0,1 0,2 0,3 0,4 0,5 1,0 1,1 1,2 1,3 1,4 1,5 2,0 2,1 2,2 2,3 2,4 2,5 3,0 3,1 3,2 3,3 3,4 3,5 4,0 4,1 4,2 4,3 4,4 4,5 5,0 5,1 5,2 5,3 5,4 5,5 6,0 6,1 6,2 6,3 6,4 6,5 7,0 7,1 7,2 7,3 7,4 7,5 8,0 8,1 8,2 8,3 8,4 8,5 9,0 9,1 9,2 9,3 9,4 9,5 Layer 2

Examples from XyJax site

XyJax

Example

$$ \begin{xy} \xymatrix { U \ar@/_/[ddr]_y \ar@{.>}[dr]|{\langle x,y \rangle} \ar@/^/[drr]^x \\ & X \times_Z Y \ar[d]^q \ar[r]_p & X \ar[d]_f \\ & Y \ar[r]^g & Z } \end{xy} $$

Example

$$ \begin{xy} \xymatrix { *\txt{start} \ar[r] & *++[o][F-]{0} \ar@(r,u)[]^b \ar[r]_a & *++[o][F-]{1} \ar[r]^b \ar@(r,d)[]_a & *++[o][F-]{2} \ar[r]^b \ar `dr_l[l] `_ur[l] _(.2)a[l] & *++[o][F=]{3} \ar `ur^l[lll] `^dr[lll]^b [lll] \ar `dr_l[ll] `_ur[ll] [ll] } \end{xy} $$
$$ \begin{xy} \xymatrix { {\mathscr{C}} & a \ar[r]^f \ar[dr]_{g \circ f} & b \ar[d]^g & \ar@{~>}[r]^F & & Fa \ar[r]^{Ff} \ar[dr]_*[l]{\scriptstyle F(g\circ f) = Fg\circ Ff} & Fb \ar[d]^{Fg} & {\mathscr{D}} \\ && c & \ar@{~>}[r]^F &&& Fc } \end{xy} $$

Example

$$ \begin{xy} 0;<0.8pc,0pc>: (0,0)="o", "o"*!/rd 1em/{O}, "o"+/l 3pc/="xs";"o"+/r 13pc/="xe" **@{-} ?>*@{>} ?>*!/u 1em/{x}, "o"+/d 3pc/="ys";"o"+/u 8pc/="ye" **@{-} ?>*@{>} ?>*!/r 1em/{y}, (13,10)*{y=f(x)}, (13,-3)*{x_{n+1} = x_n - \frac{f(x_n)}{f'(x_n)}}, (13.5,0)="x0" *!/u 1em/{x_0}, (-3,-4)="A", (15,9)="B", (1.5,5)="C", (10,-2.5)="D", "A";"B" **\crv{"C"&"D"}, ?!{"x0"+/d 3pc/;"x0"+/u 10pc/}="fx0" +/3pc/="L1e" -/12pc/="L1s";"L1e" **\dir{--}, ?!{"xs";"xe"}="x1" *!/u 1em/{x_1}, "fx0";"fx0"+/l 20pc/ **@{} ?!{"ys";"ye"}="y0" *!/r 1em/{f(x_0)}, "fx0";"y0" **@{.}, "x0";"fx0" **@{.}, "L1e" *!/l 5em/{y=f(x_0)+f'(x_0)(x-x_0)}, "A";"B" **\crv{~**@{} "C"&"D"}, ?!{"x1"+/d 3pc/;"x1"+/u 10pc/}="fx1" +/5pc/="L2e" -/15pc/="L2s";"L2e" **\dir{--}, ?!{"xs";"xe"}="x2" *!/u 1em/{x_2}, "fx1";"fx1"+/l 20pc/ **@{} ?!{"ys";"ye"}="y1" *!/r 1em/{f(x_1)}, "fx1";"y1" **@{.}, "x1";"fx1" **@{.}, "L2e" *!/l 5em/{y=f(x_1)+f'(x_1)(x-x_1)}, \end{xy} $$