我该如何创建这个身份?有没有办法不用 tikz 来输入它?谢谢(我最大的问题是如何输入连接的框)
答案1
当然,这个图很简单,用 LaTeX 的picture
环境就可以画出来,不需要任何额外的包:
\documentclass{article}
\begin{document}
\begin{picture}(250, 60)(0, -30)
\put(0, 0){\line(1, 0){30}}
\put(15, 2){\makebox(0, 0)[b]{$x(n)$}}
\put(30, -20){\line(0, 1){40}}
\put(30, -20){\line(1, 0){20}}
\put(30, 20){\line(1, 0){20}}
\put(50, -30){\framebox(30, 20){$h_2$}}
\put(50, 10){\framebox(30, 20){$h_1$}}
\put(80, -20){\line(1, 0){20}}
\put(80, 20){\line(1, 0){20}}
\put(100, -20){\line(0, 1){40}}
\put(100, 0){\line(1, 0){30}}
\put(115, 2){\makebox(0, 0)[b]{$y(n)$}}
\put(145, 0){\makebox(0, 0){$\equiv$}}
\put(160, 0){\line(1, 0){30}}
\put(175, 2){\makebox(0, 0)[b]{$x(n)$}}
\put(190, -10){\framebox(30, 20){$h(n)$}}
\put(220, 0){\line(1, 0){30}}
\put(235, 2){\makebox(0, 0)[b]{$y(n)$}}
\end{picture}
\end{document}
为了好玩,一个适用于纯 TeX 的版本(也可以在 LaTeX 中使用),它仅限于基本框和\kern
命令:
\hbox{%
\raise1ex\hbox to 30pt{\hss$x(n)$\hss}%
\kern-30pt
\vrule height.2pt depth.2pt width30pt
\kern-.2pt
\vrule depth20.2pt height20.2pt width.4pt
\kern-.4pt
\vrule depth20.2pt height-19.8pt width20.8pt
\kern-20.8pt
\vrule depth-19.8pt height20.2pt width20.8pt
\kern-.4pt
\vrule depth30.2pt height-9.8pt width.4pt
\kern-.4pt
\vrule depth-9.8pt height30.2pt width.4pt
\kern-.4pt
\vrule depth30.2pt height-29.8pt width30.8pt
\kern-30.8pt
\vrule depth10.2pt height-9.8pt width30.8pt
\kern-30.8pt
\vrule depth-9.8pt height10.2pt width30.8pt
\kern-30.8pt
\vrule depth-29.8pt height30.2pt width30.8pt
\kern-30.8pt
\lower20pt\vbox to 0pt{\vss\hbox to 30.8pt{\hss$h_2$\hss}\vss}%
\kern-30.8pt
\raise20pt\vbox to 0pt{\vss\hbox to 30.8pt{\hss$h_1$\hss}\vss}%
\kern-.4pt
\vrule depth30.2pt height-9.8pt width.4pt
\kern-.4pt
\vrule depth-9.8pt height30.2pt width.4pt
\kern-.4pt
\vrule depth20.2pt height-19.8pt width20.8pt
\kern-20.8pt
\vrule depth-19.8pt height20.2pt width20.8pt
\kern-.4pt
\vrule depth20.2pt height20.2pt width.4pt
\raise1ex\hbox to 30pt{\hss$y(n)$\hss}%
\kern-30pt
\vrule height.2pt depth.2pt width30pt
\kern1em
\vbox to 0pt{\vss\hbox{$\equiv$}\vss}%
\kern1em
\raise1ex\hbox to 30pt{\hss$x(n)$\hss}%
\kern-30pt
\vrule height.2pt depth.2pt width30pt
\kern-.2pt
\vrule depth10pt height10pt width.4pt
\kern-.4pt
\vrule depth10.2pt height-9.8pt width30.8pt
\kern-30.8pt
\vrule depth-9.8pt height 10.2pt width30.8pt
\kern-30.6pt
\vbox to 0pt{\vss\hbox to 30pt{\hss$h(n)$\hss}\vss}%
\kern-.2pt
\vrule depth10pt height10pt width.4pt
\kern-.2pt
\raise1ex\hbox to 30pt{\hss$y(n)$\hss}%
\kern-30pt
\vrule height.2pt depth.2pt width30pt
}
\bye