I'm trying to build a way to have an arbitrary number of equations (typically two, but sometimes three, and if they're particularly short definitions even four) on a single line, but tagged only once on the right, individually.
I've been trying with minipages, as answered many times previously (like here and here).
I have two problems (EDIT: The first was solved in the comments):
1) The minipages add a small amount of whitespace, so their combined
widths is larger than \linewidth
:
Here's a MWE to show that some space is added. So the label (2) is to the right of label (3).
\documentclass[10pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{cleveref}
\newenvironment{splits}[1][0.5]{
\noindent\minipage{#1\linewidth}\align}
{\endalign\endminipage}
\begin{document}
\begin{splits}
x=0
\end{splits}
\begin{splits}
y=1
\end{splits}
\begin{align}
z=2
\end{align}
\end{document}
2) I cannot achieve the labelling only on the right-hand side. Labelling each equation is cluttered and out of place, but doing a \notag
means I can't later do a \ref
. What I would like, is something like (in the document above):
\begin{splits}[.25] \notag\label{1}
x=0
\end{splits}
\begin{splits}[.25] \notag\label{2}
y=1
\end{splits}
\begin{splits}[.25] \notag\label{3}
z=2
\end{splits}
\begin{splits}[.25]
\tag*{\cref{1,2,3}}
\end{splits}
With the idea being output that has looks like:
x=1 y=2 z=3 (1-3)
x_1=1 x_2=2 z_3=3 (1 a-c)
The exact content of the label isn't so important, so it could be (1a-1c)
or something similar.
%
at the end of the line\newenvironment{splits}[1][0.5]{
, in order to not add a little bit of white space. – Steven B. Segletes Jan 17 '17 at 14:56