答案1
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\draw[rounded corners=0.4cm] (0, 0) rectangle (1, 5);
\fill[fill=white] (0.3, -0.1) rectangle (0.7, 0.1);
\fill[fill=white] (0.3, 4.9) rectangle (0.7, 5.1);
\node at (0.5, 4) {\(P_1\)};
\node at (0.5, 3) {\(P_2\)};
\node at (0.5, 2) {\(\vdots\)};
\node at (0.5, 1) {\(P_p\)};
\node[text width=2.5cm] at (1, -1) {Process\\characteristics};
\begin{scope}[xshift=3cm]
\draw[rounded corners=0.4cm] (0, 0) rectangle (1, 5);
\fill[fill=white] (0.3, -0.1) rectangle (0.7, 0.1);
\fill[fill=white] (0.3, 4.9) rectangle (0.7, 5.1);
\node at (0.5, 4) {\(T_1\)};
\node at (0.5, 3) {\(T_2\)};
\node at (0.5, 2) {\(\vdots\)};
\node at (0.5, 1) {\(T_t\)};
\node[text width=2.5cm] at (1, -1) {Technical\\characteristics};
\end{scope}
\node at (2, 2.5) {\(\longleftrightarrow\)};
\begin{scope}[xshift=6cm]
\draw[rounded corners=0.4cm] (0, 0) rectangle (1, 5);
\fill[fill=white] (0.3, -0.1) rectangle (0.7, 0.1);
\fill[fill=white] (0.3, 4.9) rectangle (0.7, 5.1);
\node at (0.5, 4) {\(S_1\)};
\node at (0.5, 3) {\(S_2\)};
\node at (0.5, 2) {\(\vdots\)};
\node at (0.5, 1) {\(S_p\)};
\node[text width=2.5cm] at (1, -1) {Service\\characteristics};
\end{scope}
\node at (5, 2.5) {\(\longleftrightarrow\)};
\node at (7, -2) {(Quality/Price)};
\end{tikzpicture}
\end{document}
这是在 中执行此操作的一种方法tikz
。由于这只是重复相同的内容,因此我使用示波器将副本移至正确的位置。请注意,在这种情况下,括号实际上是圆角矩形,顶部和底部覆盖着白色。因此,如果您想在白色以外的任何背景下查看此内容,则必须更改覆盖矩形的颜色。
答案2
还有一个解决方案,使用arrows.meta
和positioning
Ti钾Z 库,用于节点 writenf 的数学环境包内容amsmath
:matrix
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{arrows.meta,
positioning}
\usepackage{amsmath}
\begin{document}
\begin{tikzpicture}[
node distance = 0mm and 22mm,
> = Straight Barb,
every edge/.style = {draw, semithick, <->,
shorten < = 1.5em, shorten > = 1.5em},
every label/.style = {label distance=1em, text width=7em, align=center},
N/.style = {inner sep=1em, align=center,
append after command={\pgfextra{\let\LN\tikzlastnode
\draw[rounded corners=1.5ex, semithick]
([xshift=-1em] \LN.north) -| (\LN.west) |-
([xshift=-1em] \LN.south)
([xshift=+1em] \LN.north) -| (\LN.east) |-
([xshift=+1em] \LN.south);
}}}
]
\renewcommand\arraystretch{2}
\node (n1) [N, label=below:Process Characteristic]
{$\begin{matrix}
P_1\\ P_2\\ \vdots\\ P_p
\end{matrix}$};
\node (n2) [N, right=of n1,
label=below:Technical Characteristic ]
{$\begin{matrix}
T_1\\ T_2\\ \vdots\\ T_p
\end{matrix}$};
\node (n3) [N, right=of n2,
label=below:{Service Characteristic (Quality/Price)} ]
{$\begin{matrix}
S_1\\ S_2\\ \vdots\\ S_p
\end{matrix}$};
\path (n1) edge (n2)
(n2) edge (n3);
\end{tikzpicture}
\end{document}
答案3
我认为没有理由使用 Ti钾是
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\[
\newcommand{\underlabel}[2]{%
\underset{\text{\footnotesize\begin{tabular}[t]{@{}c@{}}\\#1\end{tabular}}}{#2}%
}
\newcommand{\widepmatrix}[1]{%
\left(
\renewcommand{\arraystretch}{2}%
\begin{array}{c} #1 \end{array}
\right)
}
\underlabel{Process \\ characteristics}
{\widepmatrix{P_1 \\ P_2 \\ \vdots \\ P_p}}
\longleftrightarrow
\underlabel{Technical \\ characteristics}
{\widepmatrix{T_1 \\ T_2 \\ \vdots \\ T_t}}
\longleftrightarrow
\underlabel{Service \\ characteristics \\ (Quality/price)}
{\widepmatrix{S_1 \\ S_2 \\ \vdots \\ S_s}}
\]
\end{document}
辅助命令仅在显示中定义,但如果您有类似文档中的其他对象,则可以移动序言中的定义。