分数的公分母

分数的公分母

我试图接受这种分数的目光在此处输入图片描述

我需要红色的数字,即分数。*它们必须是正常的,而不是手写的。这是我的代码

\documentclass[10pt,oneside,a5paper]{article}
\usepackage{amsmath}
\begin{document}
    $\dfrac{13}{25}, \dfrac{9}{20}, \dfrac{3}{4},
    \dfrac{3}{4}, \dfrac{3}{5}, \dfrac{1}{6};$
\end{document}

答案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}

答案4

那这个呢?

\documentclass[10pt,oneside,a5paper]{article}
\usepackage{amsmath}
\newcommand{\myfrac}[3]{\overset{#1}{\dfrac{#2}{#3}}}

\begin{document}
$\myfrac{12}{13}{25}, \myfrac{15}{9}{20}, \myfrac{75}{3}{4}, \myfrac{60}{3}{5}, \myfrac{50}{1}{6}$
\end{document}

在此处输入图片描述

相关内容