# Help on typesetting an equation with fraction in numerator and denominator

I have the following equation:

\documentclass{report}
\begin{document}
$$T_e=\frac{T_{disch}\cdot e^{\frac{T_{ahe}-T_{disch}}{LMTD}}-T_{ahe}}{e^{\frac{T_{ahe}-T_{disch}}{LMTD}}-1}$$
\end{document}


I think it looks really bad, mostly because of the elevated fractions in numerator and denominator. How should an equation like this one be coded?

How are the rules on italic/roman text? Shouldn't the Ts be roman?

When setting a fraction, I would ditch the power and use \exp.

\documentclass{report}
\def\LMTD{\mathrm{LMTD}}
\def\disch{\mathrm{disch}}
\def\ahe{\mathrm{ahe}}
\begin{document}
$$T_e=\frac{T_{\disch}\cdot \exp\big(\frac{T_{\ahe}-T_{\disch}}{\LMTD}\big)-T_{\ahe}}% {\exp\big(\frac{T_{\ahe}-T_{\disch}}{\LMTD}\big)-1}$$
\end{document}


If you wanted it in \displaystyle...

\documentclass{report}
\def\LMTD{\mathrm{LMTD}}
\def\disch{\mathrm{disch}}
\def\ahe{\mathrm{ahe}}
\def\mydfrac{\displaystyle\frac}
\begin{document}
$$T_e=\frac{T_{\disch}\cdot \exp\bigg(\mydfrac{T_{\ahe}-T_{\disch}}{\LMTD}\bigg)-T_{\ahe}}% {\exp\bigg(\mydfrac{T_{\ahe}-T_{\disch}}{\LMTD}\bigg)-1}$$
\end{document}


It is not very clear from your post, what you would like to have. Why should T be upright? Does it have a special meaning? In general you should type text as such (\text{}).

You should wrap often used terms in new commands. Like this, you are able to change later on, if you do not like your first decision. E.g. I thought that LMTD is some acronym and set it as text. If it is not, or if you like to change some kerning or alike, you can just adapt this in my command \LMTD.

If you think, your formula looks bad or hard to read, you should re-write it. I proposed something for that in my second part of the MWE.

% arara: pdflatex

\documentclass{report}
\usepackage{mathtools}
\newcommand*{\e}{\mathrm{e}} % supposing, this is the number e
\newcommand*{\di}{\text{disch}} % if you use these often. supposing these three are words or acronyms
\newcommand*{\ah}{\text{ahe}}
\newcommand*{\LMTD}{\mathrm{LMTD}}

\begin{document}
$$T_\e=\frac{T_{\di}\cdot \e^{\frac{T_{\ah}-T_{\di}}{\LMTD}}-T_{\ah}}{\e^{\frac{T_{\ah}-T_{\di}}{\LMTD}}-1}$$
\begin{align}
T_\e&=\frac{T_{\di}\cdot \e^{Z}-T_{\ah}}{\e^{Z}-1}
\shortintertext{where}
Z&=\frac{T_{\ah}-T_{\di}}{\LMTD}
\end{align}
\end{document}


Your question is hard to answer to since "it looks really bad" is a very personal matter.

However, in case you don't know it or didn't tried, may I suggest the nicefrac package.

\documentclass{report}
\usepackage{nicefrac}
\begin{document}
$$T_e=\frac{T_{disch}\cdot exp(\nicefrac{(T_{ahe}-T_{disch})}{LMTD})-T_{ahe}}{exp(\nicefrac{(T_{ahe}-T_{disch})}{LMTD})-1}$$
\end{document}


• The way the package (nicefrac) illustrates the equation makes me misinterpret. The fractions goes from (T_ahe-T_disch)/LMTD to (T_ahe-T_disch/LMTD). – ROLF Apr 21 '15 at 13:03
• Welcome to TeX.SX and thanks for answering and contributing to this site. If possible, insert a screen-shot to your answer in order to show your result. Note that exp will be read as e times x times p. I formatted your answer. Four spaces in front of code will set it nicely coloured. – LaRiFaRi Apr 21 '15 at 13:03
• Sorry , i dropped a pair of parenthesis, will edit it. – DRi Apr 21 '15 at 13:09