# How to get a horizontal line that is aligned at the bottom of a fraction?

 $\frac{18e-12}{10}=\rule{5cm}{1pt}$


gives

How do I get something that likes this

Thanks.

-

Measure the expression and use \mathpalette in order to get the rule at the correct height.

\documentclass{article}
\usepackage{amsmath}

\newcommand{\exprrule}[2]{%
}

\sbox0{$#1#2$}%
\rule[-\dimexpr\dp0+1pt]{5cm}{1pt}%
}

\begin{document}

$\exprrule{\frac{18e-12}{10}}{=}$
\begin{align*}
\exprrule{\frac{18e-12}{10}}{&=}
\\[1ex]
\exprrule{\frac{\dfrac{1}{5\mathstrut}}{\sqrt{\dfrac{1}{25}}}}{&=}
\\[1ex]
\exprrule{a+a}{&=}
\end{align*}

\end{document}


-

\documentclass{article}

\begin{document}

$\frac{18e-12}{10}=\rule{5cm}{1pt}$

$\frac{18e-12}{10}=\rule[-4pt]{5cm}{1pt}$

\end{document}

-