如何在两个分数之间画一条弧?

如何在两个分数之间画一条弧?

我想用弧线标记一个我缩短的分数。有人知道怎么开始吗?我希望它看起来像图片中的文字。有办法吗?

结果应该是这样的。

答案1

像这样:

在此处输入图片描述

代码:

\documentclass{article}
\usepackage{tikz}

\begin{document}
    \begin{tikzpicture}
        \node at (0,0) {\bfseries \Huge $\frac{8}{12}$ \;=\; $\frac{2}{3}$};
        \draw[->,line width=2pt] (-.8,1) arc (120:60:2) node[pos=.5,above] () {\bfseries \huge :4};
        \draw[->,line width=2pt] (-.8,-1) arc (-120:-60:2) node[pos=.5,below] () {\bfseries \huge :4};
    \end{tikzpicture}
\end{document}

添加:不过也许这张图片更好:

在此处输入图片描述

您需要更改最后一行代码:

\draw[<-,line width=2pt] (-.8,-1) arc (-120:-60:2) node[pos=.5,below] () {\bfseries \huge $\times$4};

编辑:当然,在文本模式下更难,我不知道该怎么做。tikz您还可以在同一行上添加更多示例,如下所示:

在此处输入图片描述

上图是通过这段代码完成的:

\documentclass{article}
\usepackage{tikz}

\begin{document}
    \begin{tikzpicture}
        \node at (0,0) {\bfseries \Huge $\frac{8}{12}$ \;=\; $\frac{2}{3}$};
        \draw[->,line width=2pt] (-.8,1) arc (120:60:2) node[pos=.5,above] () {\bfseries \huge :4};
        \draw[<-,line width=2pt] (-.8,-1) arc (-120:-60:2) node[pos=.5,below] () {\bfseries \huge $\times$4};
    \end{tikzpicture}\qquad
    \begin{tikzpicture}
        \node at (0,0) {\bfseries \Huge $\frac{12}{16}$ \;=\; $\frac{3}{4}$};
        \draw[->,line width=2pt] (-.8,1) arc (120:60:2) node[pos=.5,above] () {\bfseries \huge :4};
        \draw[<-,line width=2pt] (-.8,-1) arc (-120:-60:2) node[pos=.5,below] () {\bfseries \huge $\times$4};
    \end{tikzpicture}\qquad
    \begin{tikzpicture}
        \node at (0,0) {\bfseries \Huge $\frac{9}{24}$ \;=\; $\frac{3}{8}$};
        \draw[->,line width=2pt] (-.8,1) arc (120:60:2) node[pos=.5,above] () {\bfseries \huge :3};
        \draw[<-,line width=2pt] (-.8,-1) arc (-120:-60:2) node[pos=.5,below] () {\bfseries \huge $\times$3};
    \end{tikzpicture}
\end{document}

最后更新: 事实上,如果你想要对很多分数进行归约,你可以定义一个eReduce带有 5 个参数的新命令,并为每个要归约的分数调用此命令。需要归约四个分数的完整代码如下:

\documentclass{article}
\usepackage{tikz}
\usepackage[margin=1cm]{geometry}
\newcommand*{\eReduce}[5]{%
    \begin{tikzpicture}
        \node at (0,0) {\bfseries \Huge $\frac{#1}{#2}$ \;=\; $\frac{#3}{#4}$};
        \draw[->,line width=2pt] (-.8,1) arc (120:60:2) node[pos=.5,above] () {\bfseries \huge :#5};
        \draw[<-,line width=2pt] (-.8,-1) arc (-120:-60:2) node[pos=.5,below] () {\bfseries \huge $\times$#5};
        \draw[line width=2pt] (-2,-2) rectangle (2,2);
    \end{tikzpicture}%
}
\begin{document}
    \noindent
    \eReduce{8}{12}{2}{3}{4}\qquad
    \eReduce{12}{16}{3}{4}{4}\qquad
    \eReduce{9}{24}{3}{8}{3}\qquad
    \eReduce{75}{125}{3}{5}{25}
\end{document}

输出:

在此处输入图片描述

相关内容