答案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
结果如下: