License · CC0 1.0 · Peerpedia collaboration terms
← Peerpedia demo — a template for your first note Paper detailsSnapshot 261020.482cb0378e6f
Peerpedia demo — a template for your first note
Accepted 20 Oct 2026, 08:28 UTC
Publish a reusable CC0 demo with chapters, rendered examples, diagrams, references, and collaboration instructions.
- Submission hash
482cb0378e6f51568432c10dfd52e491c25deb21bde6f210220ac128ad0dcc8d
View Markdown changes
Drawings and commutative diagrams
--- Base version+++ Proposed version@@ -0,0 +1,81 @@+## Draw a mathematical picture {#sec:diagrams}++A fenced `tikzpicture` block compiles into a drawing. The example below contains five rows of dots. Their lengths are $1,2,3,4,5$, so the picture has fifteen dots, matching @eq:sum with $n=5$.++The surrounding figure block supplies a caption and a reference label.++````markdown+::: figure Five rows contain fifteen dots {#fig:triangle}+```tikzpicture+\begin{tikzpicture}[scale=0.65]+\foreach \row in {1,...,5} {+ \foreach \col in {1,...,\row} {+ \fill (\col,-\row) circle (2pt);+ }+}+\end{tikzpicture}+```+:::+````++::: figure Five rows contain fifteen dots {#fig:triangle}+```tikzpicture+\begin{tikzpicture}[scale=0.65]+\foreach \row in {1,...,5} {+ \foreach \col in {1,...,\row} {+ \fill (\col,-\row) circle (2pt);+ }+}+\end{tikzpicture}+```+:::++You can link directly to @fig:triangle from another chapter. A new drawing may take a moment to compile. Once it is ready, readers receive the saved result.++## Show two routes with the same result {#sec:commutative}++A commutative diagram says that two paths give the same answer. In this example every corner is the integers. Going across multiplies an integer by two. Going down multiplies it by three. Either route from the upper left to the lower right multiplies it by six.++Use a `tikzcd` fence for arrows and their labels.++````markdown+```tikzcd+\begin{tikzcd}+\mathbb{Z} \arrow[r, "2"] \arrow[d, "3"'] &+\mathbb{Z} \arrow[d, "3"] \\+\mathbb{Z} \arrow[r, "2"'] & \mathbb{Z}+\end{tikzcd}+```+````++```tikzcd+\begin{tikzcd}+\mathbb{Z} \arrow[r, "2"] \arrow[d, "3"'] &+\mathbb{Z} \arrow[d, "3"] \\+\mathbb{Z} \arrow[r, "2"'] & \mathbb{Z}+\end{tikzcd}+```++### A simpler diagram with CD++For a small rectangular diagram, `CD` works inside a math display. Here $A,B,C,D$ stand for sets and the letters on the arrows stand for maps. The diagram expresses $h\circ f=k\circ g$.++```latex+$$+\begin{CD}+A @>f>> B \\+@VgVV @VVhV \\+C @>k>> D+\end{CD}+$$+```++$$+\begin{CD}+A @>f>> B \\+@VgVV @VVhV \\+C @>k>> D+\end{CD}+$$++Keep diagrams self-contained. These blocks do not provide a full LaTeX project or load files from your computer.
Accepted by ChenqiMeng on 20 Oct 2026, 08:28 UTC. The submitted snapshot is preserved.
Conversation
0 commentsNo comments yet. Discuss the proposed change here.
Sign in to join the conversation.