Chapter 17: xy-pic

https://bookdown.org/yihui/rmarkdown-cookbook/install-latex-pkgs.html

tinytex::install_tinytex()

17.1 pure LaTeX equation environment not rendering xy-pic in HTML

the following xymatrix from LaTeX package xy for xy-pic is not shown or rendered in HTML:

$\LaTeX$ can only be used in HTML, not PDF

\[ \require{xy} \xymatrix{U\ar[ddr]_{\psi}\ar[drr]^{\varphi}\ar[dr]|-{(x,y)}\\ & X\times_{Z}Y\ar[d]^{q}\ar[r]_{p} & X\ar[d]_{f}\\ & Y\ar[r]^{g} & Z } \]

17.2 R figure knit with TikZ engine

knitr::opts_chunk$set(fig.pos = "H", out.extra = "")

https://bookdown.org/yihui/rmarkdown-cookbook/html-scroll.html

https://tex.stackexchange.com/questions/669083/how-can-i-draw-the-following-commutative-diagram

xy-pic or xymatrix

Fig. 17.1: xy-pic or xymatrix

tikz-cd

Fig. 17.2: tikz-cd

\xymatrix{
  1 \ar[r] &
  H \ar[r]^{\alpha} \ar[d]_{\mathrm{id}} &
  G \ar[r]^{\beta} \ar[d]_{\theta} &
  K \ar[r] \ar[d]_{\mathrm{id}} &
  1
  \\
  1 \ar[r] &
  H \ar[r] &
  H\times K \ar[r] &
  K \ar[r] &
  1
}

 

xy-pic or xymatrix

Fig. 16.1: xy-pic or xymatrix