hartwork / xiangqi-book-example

Example of a book featuring print-quality Xiangqi board setup graphics generated on-the-fly using xiangqi-setup; PDF output download at https://github.com/hartwork/xiangqi-book-example/releases/download/1.0.0/book_1_0_0.pdf

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

About

This repository intends to demo creation of a book featuring razor-sharp Xiangqi board setups based on LaTeX, xiangqi-setup, and (a subset of) FEN notation.

For details please see:

Build-time Requirements

  • GNU make
  • Python >=3.6
  • Inkscape
  • LaTeX

How to Build

# make
[..]
# okular book.pdf &

FEN Notation

Example FEN, the default starting position:

rheakaehr/9/1c5c1/p1p1p1p1p/9/9/P1P1P1P1P/1C5C1/9/RHEAKAEHR w

With regard to FEN notation, the syntax rules are:

  • Lowercase letters indicate pieces of the black (or blue) party (with their palace at the top of the board), uppercase letters indicate pieces of the red (or white) party (with their palace at the bottom of the board).

  • The pieces are:

    • a/A — advisor
    • c/C — cannon
    • e/E/b/B — elephant
    • h/H/n/N — horse
    • k/K — king
    • p/P — pawn
    • r/R — rook
  • Digits 1 (one) to 9 (nine) is the number of consecutive empty fields in a row.

  • A / (slash or solidus) starts a new row.

  • Suffix w or b indicates that red (or white) is to move or that black (or blue) is to move, respectively.

This is effectively the first two fields described at http://wxf.ca/xq/computer/fen.pdf plus the alternative letters used at https://www.chessdb.cn/query_en/ .

About

Example of a book featuring print-quality Xiangqi board setup graphics generated on-the-fly using xiangqi-setup; PDF output download at https://github.com/hartwork/xiangqi-book-example/releases/download/1.0.0/book_1_0_0.pdf


Languages

Language:TeX 50.8%Language:Makefile 49.2%