T0nyX1ang / tikz-minesweeper

Draw a minesweeper board in LaTeX.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Introduction of tikz-minesweeper

Draw a minesweeper board in LaTeX.

Installation

Compilation with VSCode

  • Clone this repository

  • Install VSCode and LaTeX Workshop extension (at least v8.29.0)

  • Compile tikz-minesweeper.dtx in VSCode with recipe Build dtx, and all the steps will be done in one click!

  • Move tikz-minesweeper.sty to TEXMF-LOCAL/tex/latex/tikz-minesweeper

  • Move tikz-minesweeper.pdf to TEXMF-LOCAL/doc/latex/tikz-minesweeper

  • Refresh local database with texhash or mktexlsr (with TeX Live)

Compilation with l3build

  • Clone this repository

  • Run the following commands:

    l3build install --full --texmfhome $TEXMF-LOCAL$
  • Refresh local database with texhash or mktexlsr (with TeX Live)

Using sty releases

  • 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 to TEXMF-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}: draw info at (r, c), see here for detailed command discussions

  • \row{r}{seq: info}: draw a row with a sequence of info according to \cell

  • \col{c}{seq: info}: draw a column with a sequence of info 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.

About

Draw a minesweeper board in LaTeX.

License:LaTeX Project Public License v1.3c


Languages

Language:TeX 85.2%Language:Lua 10.1%Language:Python 3.5%Language:Shell 1.2%