2

How can I get a numbering of my equations like this:

(1)  a. ...
     b. ...

I know that I get

(1a) ...
(1b) ... 

with

\begin{subequations}
\begin{flalign}
    & ...\\
    & ...
\end{flalign}
\end{subequations}

but this is not exactly what I want.

I also want to be able to reference (1) as well as (1a).

1 Answers1

1

You can do it. But don't abuse flalign.

\documentclass[fleqn,leqno]{article}
\usepackage{amsmath}

\usepackage{lipsum} % for context

\makeatletter % from https://tex.stackexchange.com/a/261647/4427 % detach \eqref and \tag making \renewcommand{\eqref}[1]{\textup{\eqreftagform@{\ref{#1}}}} \let\eqreftagform@\tagform@

% specific code for the question % 1. define a new tag form for subequations \newcommand\subtagform@[1]{% \maketag@@@{% \ifx#1\theequation \ifnum\value{equation}=1 (\theparentequation)% \else \phantom{(\theparentequation)}% \fi \ \alph{equation}.% \else \ignorespaces(#1\unskip@@italiccorr)% \fi }% } % 2. tell LaTeX to use the new tag form \AtBeginEnvironment{subequations}{\let\tagform@\subtagform@} \makeatother

% you need bigger left margin \setlength{\mathindent}{4em}

\begin{document}

\begin{subequations}\label{test} \lipsum[1][1-4] \begin{align} 1&=1 \label{test-a}\ 2&=2 \label{test-b} \end{align} \lipsum[1][1-4] \end{subequations}

\eqref{test}, \eqref{test-a}, \eqref{test-b}

Now a standard equation \begin{equation} 3=3 \end{equation}

\end{document}

enter image description here

egreg
  • 1,121,712