3

What if I have a multi-variable equation and I want to put two 'given that' conditions? For example, say an equation contains two variables 'x' and 'y' and I want to state its values after the pipe, usually 'y' = 1,2,3,... below the values of 'x' = 1,2,3,...

1
  • 2
    Is this a (La)TeX related question?
    – user31729
    Dec 20, 2015 at 17:38

4 Answers 4

5

Perhaps the OP means something like this.

\documentclass{article}
\usepackage{stackengine}
\stackMath
\begin{document}
\[
\setstackgap{S}{1pt}% gap between stacked items
z = \left. \frac{3x + 2y}{2y}
  \right\vert_{\Shortunderstack[l]{\scriptstyle x=1,2,3 
  \scriptstyle y=2,3,4}}
\]
\end{document}

enter image description here

And here is slightly different vertical placement:

\documentclass{article}
\usepackage{stackengine}
\stackMath
\begin{document}
\[
\setstackgap{L}{.6\baselineskip}% gap between stacked baselines
z = \left. \frac{3x + 2y}{2y}
  \right\vert_{\Centerstack[l]{\scriptstyle x=1,2,3 
  \scriptstyle y=2,3,4}}
\]
\end{document}

enter image description here

3

i'd take advantage of the \genfrac command in amsmath, with an intermediate definition (especially if this is to be used more than once in your document):

\documentclass{article}
\usepackage{amsmath}
\newcommand{\qualify}[2]{\genfrac{}{}{0pt}{1}{#1}{#2}}
\begin{document}
\[
z = \left. \frac{3x + 2y}{2y}
  \right\vert_{\qualify{x=1,2,3}{y=1,2,3}}
\]
\end{document}

output of example code

this command is described in section 4.11.3 of the amsmath user's guide (texdoc amsmath). you'll probably want to change the name of the intermediate command, but i couldn't think of anything better offhand.

2

Probably something like this:

\documentclass{article}
\usepackage{amsmath}

\begin{document}
\[
z = \frac{3x + 2y}{2y}
  \biggr|_{\begin{subarray}{l} x=1,2,3\\ y=1,2,3\end{subarray}}
\]
\end{document}

enter image description here

1
\usepackage{mathtools}
...
\[
  A = Bx + Cy \qquad \begin{aligned} x &= 1, 2, 3, \dotsc \\ y &= 1, 2, 3, \dotsc \end{aligned}
\]

You must log in to answer this question.

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