How to place single comma after two equations so it's placed between two strings
You can use aligned
to generate an align
-like block, and then place the conditions after it. I don't particularly like the placement of ,
, so suggest that you remove it since it makes sense without it. Alternatively one can use an rcases
environment (from mathtools
), perhaps.
\documentclass{article}
\usepackage{mathtools}
\begin{document}
\[
\begin{aligned}
f(x) &= \sin(x) \\
g(x) &= \cos(x)
\end{aligned}, \qquad x \in [0, 1]
\]
\[
\begin{rcases}
f(x) = \sin(x) \\
g(x) = \cos(x)
\end{rcases} \quad x \in [0, 1]
\]
\end{document}
Another possibility using the empheq
package
\documentclass{article}
\usepackage{empheq}
\begin{document}
\begin{empheq}[right={\empheqrbrace, \qquad x \in [0, 1]}]{align*}
f(x) &= \sin(x) \\
g(x) &= \cos(x)
\end{empheq}
\begin{empheq}[right={, \qquad x \in [0, 1]}]{align*}
f(x) &= \sin(x) \\
g(x) &= \cos(x)
\end{empheq}
\end{document}
A last solution with the \ArrowBetweenLines
command from mathtools
:
\documentclass{article}
\usepackage{mathtools}
\begin{document}
\begin{alignat*}{2}
f(x) &= \sin(x) & & \\
\ArrowBetweenLines*[,\enspace \forall x\in {[0,1]}]
g(x) &= \cos(x) & &
\end{alignat*}
\end{document}