![使用 Tex 排版密码](https://linux22.com/image/464872/%E4%BD%BF%E7%94%A8%20Tex%20%E6%8E%92%E7%89%88%E5%AF%86%E7%A0%81.png)
答案1
例如,使用 OpTeX,TeX 文件可能如下所示:
\def\cryptogram#1{\def\tmp{#1}\let\cryptotext=\tmp \replstring\tmp{ }{{ }}%
\par\noindent
\ea\foreach\tmp\do{\ea\ifx\space##1\kern1em \else \boxit{##1}{}\fi}%
\par
}
\def\boxit#1#2{\vbox{
\hbox to1em{\hss\frame{\hbox to.6em{\lower.4ex\vbox to1em{}\hss#2\hss}}\hss}
\hbox to1em{\hss #1\hss}
}}
\def\solution#1{\def\tmp{#1}\replstring\tmp{ }{{ }}%
\par\noindent
\ea\foreach\tmp\do{\ea\ifx\space##1\kern1em \else \boxit{\ea\crypto\cryptotext\end}{##1}\fi}%
\par
}
\def\crypto#1#2\end{#1\gdef\cryptotext{#2}}
\cryptogram{TGIAB FZU TGPHVGHPB}
\bigskip
\solution{MAYBE THE SOLUTION.}
\bye
结果如下: