I want to mark a fraction, which I shorten, with an arc. Haver anybody an idea how to start? I wish that it looks like the text in the picture. Is there a way to do it?
1 Answer
Like this:
Code:
\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}
ADD: But perhaps is better this picture:
You need to change the last line of code:
\draw[<-,line width=2pt] (-.8,-1) arc (-120:-60:2) node[pos=.5,below] () {\bfseries \huge $\times$4};
EDIT: Surely in text mode is more difficult and I dont know how to make this. With tikz You can also have more examples on the same line, like this:
The above picture is done by this code:
\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}
LAST UPDATE: In fact, if You want to make reduction for a lot of fraction, You can define a new command eReduce with 5 parameters and call this command for each fraction to reduce. The complete code with four fractions to reduce:
\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}
The output:
-
Thank you, that looks really nice. But there is no way to do it without tikz? Just with simple text?montarenbici– montarenbici2023-10-29 18:35:45 +00:00Commented Oct 29, 2023 at 18:35
-
1@montarenbici See EDIT, in my answer.Raffaele Santoro– Raffaele Santoro2023-10-29 18:51:02 +00:00Commented Oct 29, 2023 at 18:51
-
Thanks, that looks really nice. But I guess it is kind of difficult to add three TikZ next to each other? Especially if you want to adapt a fraction? Like the numerator gets bigger, than everything will be shifted to right?montarenbici– montarenbici2023-10-30 22:30:42 +00:00Commented Oct 30, 2023 at 22:30
-
1@montarenbici See my last edit to view the code of the last picture.Raffaele Santoro– Raffaele Santoro2023-10-30 22:52:17 +00:00Commented Oct 30, 2023 at 22:52




