tikz-minesweeper
Introduction of Draw a minesweeper board in LaTeX.
Installation
VSCode
Compilation with -
Clone this repository
-
Install
VSCode
andLaTeX Workshop
extension (at leastv8.29.0
) -
Compile
tikz-minesweeper.dtx
inVSCode
with recipeBuild dtx
, and all the steps will be done in one click! -
Move
tikz-minesweeper.sty
toTEXMF-LOCAL/tex/latex/tikz-minesweeper
-
Move
tikz-minesweeper.pdf
toTEXMF-LOCAL/doc/latex/tikz-minesweeper
-
Refresh local database with
texhash
ormktexlsr
(with TeX Live)
l3build
Compilation with -
Clone this repository
-
Run the following commands:
l3build install --full --texmfhome $TEXMF-LOCAL$
- Refresh local database with
texhash
ormktexlsr
(with TeX Live)
sty
releases
Using -
See GitHub Releases page.
-
Download the latest
sty
file, and use it for your projects.
Using prebuilt artifacts
-
See GitHub Actions page
-
Click on the latest successful build and download the artifacts
-
Unzip the
tds
zip and move all things unzipped toTEXMF-LOCAL/
Usage
-
\flag
: draw a flag -
\mine
: draw a mine -
\cellup
: draw an untouched cell -
\celldown
: draw a pressed cell -
\cellnum{num}
: draw a cell with a centered number (0-8) -
\cell{r}{c}{info}
: drawinfo
at (r
,c
), see here for detailed command discussions -
\row{r}{seq: info}
: draw a row with a sequence ofinfo
according to\cell
-
\col{c}{seq: info}
: draw a column with a sequence ofinfo
according to\cell
-
\border[-tlbrx]
: draw a border with edge options -
\board[-tlbrx]{r}{c}
: draw a board with border -
\colorcell{color}{seq: pos}
: fill an area with a certain color
Contribution
-
Issues and PRs are welcomed.
-
LaTeX3
is preferred.
Copyright and License
-
Copyright (C) 2021-2023 by Tian-Yi Pu, Fei-Yu Xiang and Yao-Yu Zhu
-
This file may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version 1.3 of this license or (at your option) any later version.
-
The latest version of this license is at: http://www.latex-project.org/lppl.txt and version 1.3 or later is part of all distributions of LaTeX version 2005/12/01 or later.
Other notes
tikz-minesweeper.pdf
is fully in Chinese, and we don't have the effort to translate it into other languages now.