3

I would like to create something similar to this in my document. I have tried using nicematrix so far but cannot get it to work. Thanks in advance:) enter image description here

3 Answers 3

4

No package needed (well, except for the blackboard bold)

\documentclass{article}

\usepackage{amsfonts}

\begin{document}

\[
P = \left\{
h \colon D(h) \subset E \to \mathbb{R} \;
\middle|
\begin{tabular}{ @{\;} l @{\;} }
$D(h)$ is a linear subspace of $E$ \\
$h$ is linear, $G\subset D(h)$ \\
$h$ extends $g$, and $h(x)\leq p(x)$ $\forall x \in D(h)$
\end{tabular}
\right\}
\]

\end{document}

enter image description here

2
  • @campa you need to add extra white space on the new image update. I think there is a comment in meta complaining about this minimum size.
    – daleif
    Apr 16 at 12:55
  • @daleif Thx. I was away for two weeks and missed this new "feature"...
    – campa
    Apr 16 at 13:39
3

You can do this with nicematrix using two mono-cell blocks.

enter image description here

If you want to increase the vertical spacing for the right-side text you can add [<length>] after \\ in the code. For example: h\textup{ is linear}, G\subset D(h),\\[1ex].

\documentclass{article}

\usepackage{nicematrix, amsfonts}

\begin{document}

\[
P=\begin{BNiceArray}{c|l}
\Block{1-1}{h\colon D(h)\subset E\to\mathbb{R}}&
\Block[l]{1-1}{D(h)\textup{ is a linear subspace of }E,\\
    h\textup{ is linear}, G\subset D(h),\\
    h\textup{ extends }g,\textup{ and }h(x)\leq p(x)\quad\forall x\in D(h)}
\end{BNiceArray}.
\]

\end{document}
1

Here is a solution just using array, amsmath, and amsfonts for the blackboard bold R:

\documentclass{article}
\usepackage{amsfonts, amsmath}

\begin{document}
\[
P = \left\{
\begin{array}{c|l}
                                 & D(h) \text{ is a linear subspace of }E,\\
h: D(h) \subset E \to \mathbb{R} & h \text{ is linear, } G \subset D(h),\\
                                 &h \text{ extends }g, \text{ and } h(x) \le p(x) \; \forall x \in D(h)
\end{array}
\right\}
\]
\end{document}

A render of the LaTeX code made with quicklatex.com

You must log in to answer this question.

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