2
\documentclass{article}
\usepackage{amsmath}
\usepackage{mathtools}
\begin{document}
\begin{equation}
A=\frac{\splitfrac{a+b+5}{c+d}}{e}
\end{equation}
\end{document}

How can I align the numerator so that 'c' starts from 'a'?

1
  • 1
    Welcome to TeX.SE! (I have edited your question (also made the example complete). Please check that I did not mess it up.)
    – mickep
    Mar 29 at 6:01

1 Answer 1

2

Here's a solution that defines a macro called \leftfrac, which acts similarly to \splitfrac except that it left-aligns the rows.

enter image description here

\documentclass{article}% or some other suitable document class
%\usepackage{amsmath}  % 'amsmath' is loaded automatically by 'mathtools'
\usepackage{mathtools} % for '\splitfrac' macro
\newcommand\leftfrac[2]{%
   \begingroup\renewcommand\arraystretch{0.72}
   \begin{array}{@{}l@{}} #1\\#2 \end{array}\endgroup}

\begin{document}
\begin{equation}
A=\frac{\splitfrac{a+b+5}{c+d}}{e}
 =\frac{ \leftfrac{a+b+5}{c+d}}{e}
\end{equation}
\end{document}

You must log in to answer this question.

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