LaTex 中对称群的循环图

LaTex 中对称群的循环图

我有这些排列

在此处输入图片描述

我想要用 LaTex 画一些类似这样的内容: 在此处输入图片描述 这是第二个:在此处输入图片描述 我怎样才能做到这一点?

答案1

这个怎么样?

在此处输入图片描述

这是通过元帖子包裹在内luamplib,因此您需要用 来编译它lualatex

\documentclass[border=5mm]{standalone}
\usepackage{luamplib}
\begin{document}
\mplibtextextlabel{enable}
\begin{mplibcode}
vardef pentacycle(text t) =
    save n; numeric n; n = 0;
    save p; numeric p[];
    for $ = t:
        p[incr n] = $;
    endfor
    save w, z;
    image(
        for a = 1 upto n:
            pair z, w; 
            z = 20 up rotated ((1-a) / n * 360);
            w = 20 up rotated ((1-p[a]) / n * 360);
            label(decimal a, z);
            if abs (z-w) < eps:
                drawarrow subpath (1, -5) of fullcircle 
                    scaled 10 shifted z shifted 5 down;
            else:
                drawarrow z {w-z rotated 30} .. w
                    cutbefore fullcircle scaled 10 shifted z
                    cutafter  fullcircle scaled 10 shifted w;
            fi
        endfor
    )
enddef;

beginfig(1);
    interim ahangle := 30;
    draw pentacycle(2,3,1,4,5);
    draw pentacycle(2,3,1,5,4) shifted 60 right;
    draw pentacycle(2,3,4,5,1) shifted 120 right;
    draw pentacycle(3,4,5,1,2) shifted 180 right;
endfig;
\end{mplibcode}
\end{document}

相关内容