代码

代码

正如标题所述,我想知道如何在 LaTeX 中创建填字游戏。有什么想法吗?

答案1

我建议你使用cwpuzzle包裹。

几周前我用过这个包来排版一个小的填字游戏,效果很好。

填字游戏的内容取自abcteach.com。我只是对它进行了修改,使其适合与包装一起使用cwpuzzle

代码

\documentclass{article}

\usepackage[unboxed]{cwpuzzle}
\begin{document}

\begin{Puzzle}{16}{12}
|{}   |[1]O |[2]P |E  |R     |A  |T     |I  |O    |N  |{}    |{}   |[3]B |{} |{} |{} |.
|{}   |{}   |L    |{} |{}    |{} |{}    |{} |{}   |{} |{}    |[4]R |A    |N  |G  |E  |.
|[5]E |{}   |A    |{} |[6]M  |{} |{}    |{} |{}   |{} |{}    |{}   |R    |{} |{} |{} |.
|S    |{}   |[7]C |O  |O     |R  |D     |I  |N    |A  |T     |E    |G    |R  |I  |D  |.
|T    |{}   |E    |{} |D     |{} |{}    |{} |{}   |{} |{}    |{}   |R    |{} |{} |{} |.
|I    |{}   |V    |{} |E     |{} |{}    |{} |[8]V |A  |R     |I    |A    |B  |L  |E  |.
|[9]M |E    |A    |N  |{}    |{} |{}    |{} |{}   |{} |{}    |{}   |P    |{} |{} |{} |.
|A    |{}   |L    |{} |[10]L |I  |N     |E  |G    |R  |[11]A |P    |H    |{} |{} |{} |.
|T    |{}   |U    |{} |{}    |{} |{}    |{} |{}   |{} |X     |{}   |{}   |{} |{} |{} |.
|I    |{}   |E    |{} |{}    |{} |[12]S |C  |A    |L  |E     |M    |O    |D  |E  |L  |.
|O    |{}   |{}   |{} |{}    |{} |{}    |{} |{}   |{} |S     |{}   |{}   |{} |{} |{} |.
|N    |{}   |{}   |{} |{}    |{} |{}    |{} |{}   |{} |{}    |{}   |{}   |{} |{} |{} |.
\end{Puzzle}

\begin{PuzzleClues}{\textbf{Across}}
\Clue{1}{OPERATION}{Any mathematical process}
\Clue{4}{RANGE}{The lowest value in a set of numbers through the highest value in the set}
\Clue{7}{COORDINATEGRID}{A network of lines used for locating points}
\Clue{8}{VARIABLE}{Any symbol that could represent a number}
\Clue{9}{MEAN}{Average}
\Clue{10}{LINEGRAPH}{Graph that displays data using line segments}
\Clue{12}{SCALEMODEL}{A model or drawing based on a ratio}
\end{PuzzleClues}

\begin{PuzzleClues}{\textbf{Down}}
\Clue{2}{PLACEVALUE}{the positions of a single digit in the whole number}
\Clue{3}{BARGRAPH}{A graph that uses bars to display data}
\Clue{5}{ESTIMATION}{The use of rounding to determine a reasonable answer}
\Clue{6}{MODE}{The number found most often}
\Clue{11}{AXES}{The horizontal and vertical number lines used in a graph}
\end{PuzzleClues}

\end{document}

结果

在此处输入图片描述

或者如果您喜欢黑色背景:

\documentclass{article}

\usepackage[unboxed]{cwpuzzle}
\begin{document}

\begin{Puzzle}{16}{12}
|*    |[1]O |[2]P |E  |R     |A  |T     |I  |O    |N  |*     |*    |[3]B |*  |*  |*  |.
|*    |*    |L    |*  |*     |*  |*     |*  |*    |*  |*     |[4]R |A    |N  |G  |E  |.
|[5]E |*    |A    |*  |[6]M  |*  |*     |*  |*    |*  |*     |*    |R    |*  |*  |*  |.
|S    |*    |[7]C |O  |O     |R  |D     |I  |N    |A  |T     |E    |G    |R  |I  |D  |.
|T    |*    |E    |*  |D     |*  |*     |*  |*    |*  |*     |*    |R    |*  |*  |*  |.
|I    |*    |V    |*  |E     |*  |*     |*  |[8]V |A  |R     |I    |A    |B  |L  |E  |.
|[9]M |E    |A    |N  |*     |*  |*     |*  |*    |*  |*     |*    |P    |*  |*  |*  |.
|A    |*    |L    |*  |[10]L |I  |N     |E  |G    |R  |[11]A |P    |H    |*  |*  |*  |.
|T    |*    |U    |*  |*     |*  |*     |*  |*    |*  |X     |*    |*    |*  |*  |*  |.
|I    |*    |E    |*  |*     |*  |[12]S |C  |A    |L  |E     |M    |O    |D  |E  |L  |.
|O    |*    |*    |*  |*     |*  |*     |*  |*    |*  |S     |*    |*    |*  |*  |*  |.
|N    |*    |*    |*  |*     |*  |*     |*  |*    |*  |*     |*    |*    |*  |*  |*  |.
\end{Puzzle}

\begin{PuzzleClues}{\textbf{Across}}
\Clue{1}{OPERATION}{Any mathematical process}
\Clue{4}{RANGE}{The lowest value in a set of numbers through the highest value in the set}
\Clue{7}{COORDINATEGRID}{A network of lines used for locating points}
\Clue{8}{VARIABLE}{Any symbol that could represent a number}
\Clue{9}{MEAN}{Average}
\Clue{10}{LINEGRAPH}{Graph that displays data using line segments}
\Clue{12}{SCALEMODEL}{A model or drawing based on a ratio}
\end{PuzzleClues}

\begin{PuzzleClues}{\textbf{Down}}
\Clue{2}{PLACEVALUE}{the positions of a single digit in the whole number}
\Clue{3}{BARGRAPH}{A graph that uses bars to display data}
\Clue{5}{ESTIMATION}{The use of rounding to determine a reasonable answer}
\Clue{6}{MODE}{The number found most often}
\Clue{11}{AXES}{The horizontal and vertical number lines used in a graph}
\end{PuzzleClues}

\end{document}

在此处输入图片描述

要显示解决方案,您只需使用\PuzzleSolution给出以下结果的命令:

在此处输入图片描述

答案2

一个用于填字游戏的软件包是由 brian {hamilton kelly} 在拖船11.此包在 ctan 上为crosswd以及 tex live。在ctan 搜索. 谜题的风格各不相同,因此个人喜好可能会影响您的选择。

相关内容