答案1
为什么要冒计算错误的风险?
\documentclass{article}
\usepackage{amsmath}
\usepackage{xintgcd}
\newsavebox\mybox
\newcommand{\fractionswithlcm}[1]{%
\sbox\mybox{\gdef\simeondenominators{}%
\def\fracm##1##2{\xdef\simeondenominators{\simeondenominators{##2}}}%
$#1$}%
\edef\simeonlcm{\xintLCMof{\simeondenominators}}%
{\underbrace{#1}_{\displaystyle\simeonlcm}}%
}
\newcommand{\fracm}[2]{%
\overset{\xintiiQuo{\simeonlcm}{#2}}%
{\overset{\displaystyle\smile}{\frac{#1}{#2}}}%
}
\begin{document}
\[
\fractionswithlcm{
\fracm{13}{25},
\fracm{9}{20},
\fracm{3}{4},
\fracm{3}{5},
\fracm{1}{6}
}
\]
\end{document}
根据 OP 在评论中的请求,这里只有顶部的数字,而不再有大的下支撑。
\documentclass{article}
\usepackage{amsmath}
\usepackage{xintgcd}
\newsavebox\mybox
\newcommand{\fractionswithlcm}[1]{%
\sbox\mybox{\gdef\simeondenominators{}%
\def\fracm##1##2{\xdef\simeondenominators{\simeondenominators{##2}}}%
$#1$}%
\edef\simeonlcm{\xintLCMof{\simeondenominators}}%
#1%
}
\newcommand{\fracm}[2]{%
\overset{\xintiiQuo{\simeonlcm}{#2}}%
{\overset{\displaystyle\smile}{\frac{#1}{#2}}}%
}
\begin{document}
\[
\fractionswithlcm{
\fracm{13}{25},
\fracm{9}{20},
\fracm{3}{4},
\fracm{3}{5},
\fracm{1}{6}
}
\]
\end{document}
答案2
对于弯曲的符号,您可以使用\smile
:
\documentclass{article}
\usepackage{amsmath}
\newcommand{\fractionswithlcm}[2]{%
{\underbrace{#1}_{\displaystyle#2}}%
}
\newcommand{\fracm}[3]{%
\overset{#1}{\overset{\displaystyle\smile}{\frac{#2}{#3}}}%
}
\begin{document}
\[
\fractionswithlcm{
\fracm{12}{13}{25},
\fracm{15}{9}{20},
\fracm{75}{3}{4},
\fracm{60}{3}{5},
\fracm{50}{1}{6}
}{300}
\]
\end{document}
答案3
用\widehat
曲线代替:
\documentclass{article}
\usepackage{amsmath}
\begin{document}
$\overset{\underbrace{
\underset{\widehat{\dfrac{13}{25},}}{12}
\underset{\widehat{\dfrac{9}{20}},}{15}
\underset{\widehat{\dfrac{3}{4}},\ }{75}
\underset{\widehat{\dfrac{1}{6}},\ }{60}
\underset{\widehat{\dfrac{3}{5}}\ }{50}
}}{300}$
\end{document}
编辑:好的,有曲线
\documentclass{article}
\usepackage{amsmath}
% https://tex.stackexchange.com/a/191042/11604
\makeatletter
\def\widebreve#1{\mathop{\vbox{\m@th\ialign{##\crcr\noalign{\kern3\p@}%
\brevefill\crcr\noalign{\kern3\p@\nointerlineskip}%
$\hfil\displaystyle{#1}\hfil$\crcr}}}\limits}
\def\brevefill{$\m@th \setbox\z@\hbox{$\braceld$}%
\bracelu\leaders\vrule \@height\ht\z@ \@depth\z@\hfill\braceru$}
\makeatletter
\begin{document}
$\overset{\underbrace{
\underset{\widebreve{\dfrac{13}{\makebox[1em]{25}}},}{12}
\underset{\widebreve{\dfrac{9}{\makebox[1em]{20}}},}{15}
\underset{\widebreve{\dfrac{3}{\makebox[1em]{4}}},}{75}
\underset{\widebreve{\dfrac{1}{\makebox[1em]{6}}},}{60}
\underset{\widebreve{\dfrac{3}{\makebox[1em]{5}}}}{50}
}}{300}$
\end{document}