2

MWE

\documentclass[a4paper,12pt]{book} 

\usepackage[T1]{fontenc} 
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage[svgnames]{xcolor}
\usepackage{empheq}

\definecolor{formula}{RGB}{255,255,170}
\newcommand*\mybox[1]{%
\colorbox{formula}{\hspace{1em}#1\hspace{1em}}}
\newcommand{\denklem}[1]{\begin{empheq}[box=\mybox]{align}{#1}\end{empheq}}

\begin{document}
\denklem{\frac{V}{\left(\dfrac{20}{9}\right)}=\frac{140-V}{20}}
\end{document}

enter image description here

The space above the left and right denominator is not equal. How can we equalize?

Note: I found a solution as follows. Is that right? So is this always done?

\denklem{\frac{V}{\raisebox{-1.5ex}{$\left(\dfrac{20}{9}\right)$}}=\frac{140-V}{20}}

1 Answer 1

1

I would like to suggest that you (a) change \left( and \right) to \Bigl( and Bigr, respectively, and (b) add a ^{\mathstrut} directive in the numerator of the \dfrac expression. (The "strut" will push the entire \dfrac term down a bit.)

enter image description here

\documentclass[a4paper,12pt]{book} 
\usepackage{amsmath,lmodern}

\begin{document}
\[
\frac{V}{\Bigl(\dfrac{20^{\mathstrut}}{9}\Bigr)}
=\frac{140-V}{20}
\]
\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .