Release 0.2026.10.13 2026/10/13
pgf-go is a package for diagramming and commenting on Go games. It is currently not a definitive version, but the syntax will remain consistent.
This package may be modified and distributed under the terms and conditions of the LaTeX Project Public License, version 1.3 or greater.
The package compiles with UTF-8, LaTeX and LuaLaTeX. The following dependencies are required, but they are loaded automatically:
With LuaLaTeX, the package also captures stones, reads SGF games (in UTF-8, Latin-1, GBK, Big5, Shift_JIS, EUC-JP or EUC-KR) and finds the territory. \sgfanimation needs the animate package.
You can use the pgf-go package by placing all of the
distribution files (pgf-go.sty, the pgf-go-*.sty modules, pgf-go.lua, pgf-go-charsets.lua and the images img/pgfgo-* of the profiles shell and yunzi) in the directory containing your current tex file.
To use the package pgf-go, place the following lines in the preamble of
your LaTeX document:
\usepackage{pgf-go}
\begin{document}
\begin{goban}
\end{goban}
You can find examples in the doc/examples directory:
example-0toexample-4andexample-6: stones, marks, sequences, moves, territory marks, profiles andname/resume.example-5: the styles of the coordinates on the edge (western, Japanese and Chinese, with kanji) and the direction in which they are counted.example-7: a collection of games in one SGF file (game), each with its own board size.example-8: an SGF game with\sgf: marks of the file, variations as letters and a variation.example-9: a commented game with\sgfdiagrams: comments, annotations, result and score.example-10: an animated game in the PDF with\sgfanimation(needsanimate).example-11: a game in abeamerpresentation, one move per slide, and withanimate.example-12: a problem (tsumego) with\sgfproblem.example-13: the commented game in Spanish (babeland translated texts).example-14: the commented game in Japanese (luatexja, kanji coordinates).example-15: captures, a ko, "7 at 1" notes and prisoners.example-16: territory found by\territory{auto}, a dead stone and the score.example-17: arrows, lines, a dimmed stone and labels.example-18: the commented game in Chinese (ctex), read from a GB2312 file.example-19: the commented game in Korean (luatexko), read from an EUC-KR file.example-20: a sheet of problems from a collection (\sgfproblemwithgame), with theshellprofile.example-21: a lesson inbeamer: the opening move by move, the game in diagrams, and a problem and its solution.example-22: a professional game of 1940 in diagrams, with theyunziprofile.example-23: a page of a book: diagrams side by side withpgfgolayout, and parts of them in the text with\pgfgoview.example-24: a style of your own: a profile defined with\pgfgodefineprofileand marks defined with\pgfgodefinemark.example-25: the variations of an SGF file as diagrams of their own, with their comments.
The last page of each example shows its code. The SGF examples need LuaLaTeX.
- version 0.2026.10.13 : Lua compute kernel, captures, SGF games (
\sgf,\sgfanimation,\sgfdiagrams), star points, arrows and lines, "3 at 1" notes, territory and score. Both manuals are complete. - version 0.2025.10.13 : bug fixes.
remember/resumenow restore moves with their original colors and numbers,forgetclears the memory, andadd to rememberis available. Everygobanstarts at move 1 with black.\mark/\marksonly exist insidegoban. Fixed then(neutral) alias,use i = falsewith\stone,A:Branges on non-square partial boards, andsequence = false. - version 0.2025.03.10 : added features to system coordinates and rounded corners.
- version 0.2025.03.07 : partial realease.
Jonatán Perren, jonatan (dot) perren (at) gmail (dot) com