按條形分隔矩陣中的列

按條形分隔矩陣中的列

我想在我的文檔中創建類似的內容。到目前為止我已經嘗試過使用 Nicematrix 但無法讓它運作。提前致謝:) 在此輸入影像描述

答案1

不需要包包(好吧,除了黑板粗體)

\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}

在此輸入影像描述

答案2

您可以nicematrix使用兩個單電池塊來實現此目的。

在此輸入影像描述

如果您想增加右側文字的垂直間距,可以在程式碼中[<length>]新增。\\例如: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}

答案3

這是一個僅使用arrayamsmath、 和amsfonts來表示黑板粗體 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}

使用 Quicklatex.com 製作的 LaTeX 程式碼的渲染

相關內容