Chinese chess manual writing package based on l3draw ======= `chinesechess` is a LaTeX3 package developed based on l3draw, which provides macros and environment for Chinese chess manual writing. You can read the manual (in Chinese) for more details and examples. Contributing ------------ 1. github repository: 1. repository: [chinesechess](https://github.com/registor/chinesechess) 2. Issues and pull requests are welcome. [issue](https://github.com/registor/chinesechess/issues) or [pull request](https://github.com/registor/chinesechess/pulls). 2. gitee repository: 1. repository: [chinesechess](https://gitee.com/nwafu_nan/chinesechess) 2. Issues and pull requests are welcome. [issue](https://gitee.com/nwafu_nan/chinesechess/issues) or [pull request](https://gitee.com/nwafu_nan/chinesechess/pulls). 基于l3drawçš„ä¸å›½è±¡æ£‹æ£‹è°±æŽ’版å®åŒ… ======= `chinesechess`是一个基于l3draw用LaTeX3å¼€å‘çš„ä¸å›½è±¡æ£‹æ£‹è°±æŽ’版å®åŒ…,它æä¾›äº†ç”¨äºŽæŽ’版ä¸å›½è±¡æ£‹æ£‹è°±çš„命令和环境。 å¯ä»¥é€šè¿‡é˜…读å®åŒ…手册以了解该å®åŒ…æ›´å¤šçš„ä½¿ç”¨ç»†èŠ‚å’Œä½¿ç”¨æ ·ä¾‹ã€‚ ## 排版示例 ```latex % 由于fandolå—ä½“æ— çº¢æ£‹çš„ç ²å—ï¼Œå› æ¤è¯·é€‰ç”¨åˆé€‚çš„å—体 % K=帅,A=仕,E=相,R=车,C=ç ²,H=马,P=å…µ, k=å°†,a=士,e=象,r=車,c=ç‚®,h=馬,p=å’ % 水平定ä½: a(0),b(1),c(2),d(3),e(4),f(5),g(6),h(7),i(8) % 垂直定ä½: a(0),b(1),c(2),d(3),e(4),f(5),g(6),h(7),i(8),j(9) % 棋åå®šä½æ—¶ï¼Œå¯ä»¥æ··åˆä½¿ç”¨å—æ¯å’Œæ•°å—,以下示例使用混åˆè¾“å…¥ % 强烈建议在实际使用ä¸ä½¿ç”¨çº¯å—æ¯æˆ–纯数å—å®šä½ % 输出带所有棋å的棋盘命令 \cchessboard % 若仅需è¦è¾“出ä¸å¸¦æ£‹å的棋盘,请使用带星命令 \cchessboard* % 排版棋谱命令 \cchessman{ {{4,0}{K}}, {{2,2}{p}}, {{1,7}{C}}, {{4,9}{k}} } % 排版打谱过程的环境 \begin{setcchessman}[boardtype=x+tn] % 残局åˆå§‹åŒ– \init{ {{4,0}{K}}, {{2,2}{p}}, {{1,7}{C}}, {{4,9}{k}} } % æ·»åŠ æ£‹å \set{e,d}{P} \set{8,g}{h} % åˆ é™¤æ£‹å \del{4,3} % 移动棋å \mov{C}{b,h}{b,b} \mov{p}{2,2}{3,2} \end{setcchessman} % å¯ä»¥ä½¿ç”¨å¸¦æ˜Ÿå·çš„æ‰“谱环境, % æ¤æ—¶å¯ä»¥ç”¨labelæ ‡ç¾æ ‡è®°è¯¥æ‰“谱环境。 % ç„¶åŽåœ¨éœ€è¦çš„ä½ç½®ç”¨`\printman{label}`输出打谱结果 \begin{setcchessman*}[boardtype=x+tn, label=test] % 残局åˆå§‹åŒ– \init{ {{4,0}{K}}, {{2,2}{p}}, {{1,7}{C}}, {{4,9}{k}} } % æ·»åŠ æ£‹å \set{e,d}{P} \set{8,g}{h} % åˆ é™¤æ£‹å \del{4,3} % 移动棋å \mov{C}{b,h}{b,b} \mov{p}{2,2}{3,2} \mov{K}{4,0}{4,1} \mov{h}{8,6}{6,7} \mov{K}{4,1}{3,1} \mov{h}{6,7}{5,5} \end{setcchessman*} \printman{test} ``` ## 使用方法 å®åŒ…ä¸å¯ä»¥è®¾ç½®æ£‹è°±å¤–观。 ```tex \cchessset{ boardtype = x+tn } ``` å®åŒ…å¯ç”¨é€‰é¡¹æœ‰ï¼š - `gridsize` 棋盘å•å…ƒæ ¼å°ºå¯¸(需有长度å•ä½) - `boardtype` 棋盘类型,å¯ä»¥æœ‰x--简约型,x+--带兵ã€ç‚®ä½æ ‡è®°å’Œä¹å®«çº¿ï¼Œx+t--带兵ã€ç‚®ä½å’Œä¹å®«çº¿åŠæ¥šæ²³æ±‰ç•Œï¼Œx+tn--带兵ã€ç‚®ä½ã€ä¹å®«çº¿ã€æ¥šæ²³æ±‰ç•ŒåŠæ•°å—线ä½ï¼Œx+Xtn--带兵ã€ç‚®ä½ã€ä¹å®«çº¿ã€è±¡ä½çº¿åŠæ¥šæ²³æ±‰ç•Œ - `boardlinewd` 棋盘线æ¡å®½åº¦ - `boardlinecolor` 棋盘线æ¡é¢œè‰² - `boardbg` æ£‹ç›˜èƒŒæ™¯å›¾ç‰‡è·¯å¾„åŠæ–‡ä»¶å - `resize` 缩放类型,å¯ä»¥æœ‰none(默认)--æ— ç¼©æ”¾ï¼Œreal--按指定实际尺寸或比例缩放(需è¦åŒæ—¶æŒ‡å®šwidth/height/xscale/yscale傿•°å€¼) - `piecechar` 棋åå—符 - `piecefont` 棋åå—符å—体 - `piecetype` 棋å类型,å¯ä»¥æœ‰o--简约型,oo--带åŒçº¿è¾¹æ¡†æ— 阴影型,ooo--立体型 - `boxlinewd` 棋å边框线线宽 - `boxcolor` 棋å边框颜色 - `redpiece` 红棋文å—颜色 - `blkpiece` 黑棋文å—颜色 - `lower` 棋å背景颜色 - `donut` 棋å环带颜色 - `redupper` 红棋棋å颜色 - `blkupper` 黑棋棋å颜色 - `shadow` 棋å阴影颜色 - `charstroke` æ£‹åæ–‡å—笔划类型,å¯ä»¥æœ‰none,solid--实线轮廓,whide--白色填充,bold--åŠ ç²—é€‰æ‹©(默认),invisible-—éšè—笔划。 注æ„:`\init`ã€`\set`ã€`\del`å’Œ`\mov`这四个命令åªèƒ½ç”¨äºŽ`setcchessman`环境åŠå…¶æ˜Ÿå·çŽ¯å¢ƒä¸ã€‚ ## å‚与贡献 --------------------- 1. github仓库: (1). 仓库地å€: [chinesechess](https://github.com/registor/chinesechess) (2). Issueså’ŒPR: [issue](https://github.com/registor/chinesechess/issues) or [pull request](https://github.com/registor/chinesechess/pulls). 2. gitee仓库: (1). 仓库地å€: [chinesechess](https://gitee.com/nwafu_nan/chinesechess) (2). Issues and PR: [issue](https://gitee.com/nwafu_nan/chinesechess/issues) or [pull request](https://gitee.com/nwafu_nan/chinesechess/pulls). Copyright and Licence --------------------- Copyright (C) 2020-2022 by Nan Geng <nangeng@nwafu.edu.cn> ---------------------------------------------------------------------- This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version 1.3c of this license or (at your option) any later version. This version of this license is in http://www.latex-project.org/lppl/lppl-1-3c.txt and the latest version of this license is in 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. This work has the LPPL maintenance status "maintained". The Current Maintainer of this work is Nan Geng. This package consists of chinesechess.sty, chinesechess.tex and README.md(this file), and the derived files chinesechess.pdf.