Puzzles and brain teasers
Number Puzzles
Sudoku has been popular for about 15 years, on paper as well as on computers. Available options include sudoku [9], KSudoku [10], and gnome-sudoku [11] (Figure 7). More puzzles and the means to create games can be found in the program Hitori (Figure 8) [12] [13] and Simon Tatham's portable puzzle collection (sgt-puzzles package) [14].
Solution Helpers
To help find the right answers and words to the puzzle questions, you have various resources at your disposal. On one hand, the online dictionaries already presented in the Free Thesauri article [15] and web resources such as OneAcross [16], Crossword Solver [17], Crossword Nexus [18], and Wordplays.com [19] are useful, as well as websites for synonyms and antonyms [20] [21]. These sites significantly simplify a search based on a puzzle question or term.
Incorporating Puzzles
As mentioned before, Qxw, CrossFire, and Klest-crossword can export your puzzles as PDFs or image files and allow you to incorporate them into other documents. The extensions crossword
, crosswrd
, cwpuzzle
, and sudoku
are available in the comprehensive TeX archive network (CTAN) for typesetting with LaTeX. Debian and Ubuntu users can find all extensions in texlive-games
[22].
Listing 1 shows a snippet of how you can set up a puzzle with the help of cwpuzzle
. First, import both color
and cwpuzzle
in lines 2 and 3, and then set a gray-shaded, borderless square in lines 7-14.
Listing 1
Constructing a Puzzle in LaTeX
In lines 16 and 17, you decide whether to output the empty puzzle or its solution – the empty puzzle is chosen here. Define the grid and the contents of the squares based on the environment puzzle in lines 19-25. Individual squares are separated using the pipe character, |
; curly brackets, {}
, indicate blank squares; and indices for a puzzle word are in square brackets, [<no>]
. If you add the detail [c]
, the color
definition in line 2 becomes important, and the corresponding square is highlighted in gray. Each line ends with a period.
Lines 27-32 and 34-36 set the puzzle questions. Each question consists of a brief description that helps the puzzler find the solution. Figure 9 shows the puzzles created by LaTeX. For further information – including how to create number puzzles – read the detailed documentation included with the package.
« Previous 1 2 3 4 Next »
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
So Long Neofetch and Thanks for the Info
Today is a day that every Linux user who enjoys bragging about their system(s) will mourn, as Neofetch has come to an end.
-
Ubuntu 24.04 Comes with a “Flaw"
If you're thinking you might want to upgrade from your current Ubuntu release to the latest, there's something you might want to consider before doing so.
-
Canonical Releases Ubuntu 24.04
After a brief pause because of the XZ vulnerability, Ubuntu 24.04 is now available for install.
-
Linux Servers Targeted by Akira Ransomware
A group of bad actors who have already extorted $42 million have their sights set on the Linux platform.
-
TUXEDO Computers Unveils Linux Laptop Featuring AMD Ryzen CPU
This latest release is the first laptop to include the new CPU from Ryzen and Linux preinstalled.
-
XZ Gets the All-Clear
The back door xz vulnerability has been officially reverted for Fedora 40 and versions 38 and 39 were never affected.
-
Canonical Collaborates with Qualcomm on New Venture
This new joint effort is geared toward bringing Ubuntu and Ubuntu Core to Qualcomm-powered devices.
-
Kodi 21.0 Open-Source Entertainment Hub Released
After a year of development, the award-winning Kodi cross-platform, media center software is now available with many new additions and improvements.
-
Linux Usage Increases in Two Key Areas
If market share is your thing, you'll be happy to know that Linux is on the rise in two areas that, if they keep climbing, could have serious meaning for Linux's future.
-
Vulnerability Discovered in xz Libraries
An urgent alert for Fedora 40 has been posted and users should pay attention.