\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'?
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It only takes a minute to sign up.
Sign up to join this community\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'?
Here's a solution that defines a macro called \leftfrac
, which acts similarly to \splitfrac
except that it left-aligns the rows.
\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}