![创建信道编码问题图](https://linux22.com/image/445301/%E5%88%9B%E5%BB%BA%E4%BF%A1%E9%81%93%E7%BC%96%E7%A0%81%E9%97%AE%E9%A2%98%E5%9B%BE.png)
答案1
和tikz
:
编辑: 好的,添加了红色闪电: 还有一个编辑: 现在闪电中添加了文本。由于此文本未知,因此正确的文本留给您...
\documentclass[tikz, border=3mm]{standalone}
\usepackage{marvosym}
\usetikzlibrary{arrows.meta,
chains, % new
positioning,
quotes,
}
\begin{document}
\begin{tikzpicture}[
node distance = 7mm and 18mm, % <---
start chain = going right,
box/.style = {draw, thick,
minimum height=9mm, minimum width =18mm,
on chain},
every edge/.style = {draw, -Straight Barb, semithick},
every edge quotes/.append style = {font=\footnotesize, align=center},
]
\coordinate[on chain] (in);
\node (n1) [box] {Encoder};
\node (n2) [box,
label={[font=\Huge, text=red]:\Lightning}] {Channel};
\node[above=of n2, font=\footnotesize] {To je strela!}; % <---
\node (n3) [box] {Decoder};
\coordinate[on chain] (out);
%
\path (in) edge ["Message\\ $\mathcal{K}$"] (n1)
(n1) edge ["Codeword\\ $X_{\mathcal{K}}$"] (n2)
(n2) edge ["Output\\ $Y$"] (n3)
(n3) edge ["Estimate\\ $\widehat{\mathcal{K}}$"] (out);
\end{tikzpicture}
\end{document}
答案2
我建议使用基本工具(amsmath、eqparbox 和 stackengine 包)来实现此解决方案:
\documentclass{article}
\usepackage{eqparbox}
\usepackage[usestackEOL]{stackengine}
\usepackage{amsmath}
\usepackage{geometry}
\begin{document}
\[ \xrightarrow{\eqparbox{L}{\bfseries\boldmath\Centerstack{Message \\ $\mathcal{K}$}}} \eqframebox[C]{\enspace Encoder\enspace }
\xrightarrow{\eqparbox{L}{\bfseries\boldmath \Centerstack{Codeword \\$\textsf{X}_\mathcal{K}$}}}\eqframebox[C]{Channel}
\xrightarrow{\eqparbox{L}{\bfseries\boldmath \Centerstack{Output \\ Y}}}\eqframebox[C]{Decoder}
\xrightarrow{\eqparbox{L}{\bfseries\boldmath \Centerstack{Estimate \\$\hat{\mathcal{K}}$}}}\]%
\end{document}