summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/chinesechess/chinesechess.tex
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/chinesechess/chinesechess.tex')
-rw-r--r--macros/latex/contrib/chinesechess/chinesechess.tex887
1 files changed, 887 insertions, 0 deletions
diff --git a/macros/latex/contrib/chinesechess/chinesechess.tex b/macros/latex/contrib/chinesechess/chinesechess.tex
new file mode 100644
index 0000000000..9220174cc8
--- /dev/null
+++ b/macros/latex/contrib/chinesechess/chinesechess.tex
@@ -0,0 +1,887 @@
+\documentclass[full]{l3doc}
+\usepackage[scheme=chinese]{ctex}
+\usepackage{enumitem}
+\usepackage{indentfirst}
+\usepackage{titling}
+\usepackage{geometry}
+\usepackage{graphicx}
+\usepackage{fontawesome5}
+\usepackage{fancyvrb-ex}
+\usepackage{chinesechess}
+\cchessset{piecechar={C}{炮}}
+
+\IndexPrologue
+ {
+ \section*{Index}
+ \markboth{Index}{Index}
+ \addcontentsline{toc}{section}{Index}
+ The~italic~numbers~denote~the~pages~where~the~
+ corresponding~entry~is~described,~
+ numbers~underlined~point~to~the~definition,~
+ all~others~indicate~the~places~where~it~is~used.
+ }
+
+\newcommand\tikzmark[1]{\tikz \coordinate[overlay, remember picture] (#1);}
+
+\geometry{
+ left=4.5cm,
+ right=2cm,
+ top=2cm,
+ bottom=2cm,
+}
+\hypersetup {
+ CJKbookmarks,
+ bookmarksopen,
+ bookmarksopenlevel=3,
+ pdfstartview=FitH,
+ pdfinfo = {
+ Title = 中国象棋排版宏包 ,
+ Subject = A LaTeX3 package ,
+ Author = 耿楠
+ }
+}
+
+\DoNotIndex{\begin, \end}
+\setlength{\parskip}{\medskipamount}
+\DeclareDocumentEnvironment { noteen } { +b } {
+ \par\textbf{\textsf{NOTE:~}}#1\par
+} {}
+\DeclareDocumentEnvironment { notezh } { +b } {
+ \par\textbf{\textsf{注意:~}}#1\par
+} {}
+
+\AtEndDocument{
+ \newgeometry{
+ left=2cm,
+ right=2cm,
+ top=2cm,
+ bottom=2cm
+ }
+ \PrintIndex
+}
+
+\ExplSyntaxOn
+\dim_new:N \l__my_syntax_dim
+\box_new:N \g__my_syntax_box
+\NewDocumentEnvironment { Syntax } { s }
+ {
+ \dim_set:Nn \l__my_syntax_dim
+ { \textwidth }
+ \hbox_gset:Nw \g__my_syntax_box
+ \small \ttfamily
+ \begin{minipage}[t]{\l__my_syntax_dim}
+ \raggedright\obeyspaces\obeylines
+ }
+ {
+ \end{minipage}
+ \hbox_gset_end:
+ \IfValueF { #1 } { \smallskip }
+ \box_use_drop:N \g__my_syntax_box
+ \smallskip
+ }
+
+\DeclareDocumentEnvironment { Description } { o +b } {
+ \hbox_set:Nn \l_tmpa_box { #1 }
+ \dim_set:Nn \l_tmpa_dim { \box_wd:N \l_tmpa_box }
+ \begin{itemize}[labelwidth=\l_tmpa_dim, align=left]
+ #2
+ \end{itemize}
+} { }
+
+\keys_define:nn { cchess/doc } {
+ opt .tl_set:N = \l_opt_tl,
+ desc .tl_set:N = \l_desc_tl,
+ init .tl_set:N = \l_init_tl,
+ init .initial:n = init-none,
+}
+
+\box_new:N \l__option_box
+\NewDocumentEnvironment { option } { m +b } {
+ \keys_set:nn { cchess/doc } { #1 }
+ \hbox_set:Nw \l__option_box
+ \small \ttfamily
+ \begin{minipage}[t]{\textwidth}
+ \obeyspaces\obeylines
+ \textcolor{red}{
+ \l_opt_tl
+ \exp_args:Nx\SpecialOptionIndex{\l_opt_tl}
+ }
+ {~}\l_desc_tl
+ \hfill(
+ \tl_if_eq:NnTF \l_init_tl { init-none } { no~value }
+ { 初始值:~\texttt{\l_init_tl} }
+ )
+ \end{minipage}
+ \hbox_gset_end:
+ \box_use_drop:N \l__option_box
+ #2
+ % \vspace*{-4ex}
+ \medskip
+} { }
+
+\DeclareDocumentCommand \opt { O{} m }
+ { \__codedoc_cmd:no {#1} { #2 } }
+\ExplSyntaxOff
+
+\def\vers{\texttt{v1.0.0} }
+
+\begin{document}
+\title{
+ 中国象棋棋谱排版\\\pkg{chinesechess} 宏包
+ % \rlap{\makebox[4cm][r]{
+ % \normalsize $\Longrightarrow$ \color{red}
+ % \protect\hyperlink{en}{English Version}
+ % \protect\hypertarget{zh}{}
+ % }}
+}
+\author{\textit{耿楠} \texttt{<nangeng@nwafu.edu.cn>}}
+\date{\the\year 年\the\month 月\the\day 日\qquad \vers
+% \thanks{\url{https://github.com/registor/chinesechess}}
+\thanks{\url{https://gitee.com/nwafu_nan/chinesechess}}
+}
+\maketitle
+
+{\small
+\tableofcontents
+}
+\newpage
+
+\begin{documentation}
+
+\section{引言}
+
+\pkg{chinesechess}是一个基于\pkg{l3draw}用\pkg{Expl3}开发的
+中国象棋排版宏包。它提供了\tn{cchessboard} 全棋盘、
+\tn{cchessbord*}空白棋盘和\tn{cchessman}棋谱排版命令。同时,
+该宏包还提供了用于打谱的排版环境\env{setcchessman},在该环境
+中,可以通过环境专用命令\tn{init}初始化棋谱状态,\tn{set}在
+指定位置布置棋子,\tn{del}删除指定位置的棋子,\tn{mov}实现
+棋子的移动,从而实现打谱操作,并在环境结束后以最终状态排版棋谱。
+另外,也可以通过星号环境\env{setcchessman*}实现棋谱的文本描述
+输出。
+
+棋子、棋盘、背景等外观可以通过命令、环境选项或\tn{cchessset}%
+命令进行设置。
+
+\section{用户接口}
+
+\subsection{\tn{cchessboard}棋盘排版命令}
+
+\begin{function}{\cchessboard}
+ \begin{syntax}
+ \cs{cchessboard} \oarg{外观选项}
+ \cs{cchessboard*} \oarg{外观选项}
+ \end{syntax}
+\end{function}
+
+ 按设置的\oarg{外观选项}输出带有32个红黑棋子,并布置于初始位置
+ 的棋盘。
+
+ 在\oarg{外观选项}中可以通过key-value的方式设置棋子、棋盘的颜色、
+ 字体、字号、线宽等外观。
+
+ 通过\oarg{外观选项}设置的外观参数仅对当前命令局部有效,
+
+ 其星号版本命令用于无棋子棋盘。
+
+\begin{SideBySideExample}[frame=single,numbers=left,
+ xrightmargin=.68\linewidth,gobble=2]
+ \centering
+ % 为便排版,进行缩放
+ \cchessset{resize=real,
+ height=4.8cm}
+ \cchessboard\quad
+ \cchessboard*
+\end{SideBySideExample}
+
+\subsection{\tn{cchessman}棋谱排版命令}\label{subsec-cchessman}
+
+\begin{function}{\cchessman}
+ \begin{syntax}
+ \cs{cchessman} \oarg{外观选项} \marg{棋子列表}
+ \end{syntax}
+\end{function}
+
+ 按设置的\oarg{外观选项},将在\marg{棋子列表}中指定棋子排版于棋盘的
+ 指定位置。
+
+ \marg{棋子列表}中各个棋子用大括号分组后用英文逗号进行分隔,每个棋子
+ 由用大括号括起来的棋子位置与棋子编码组成。
+
+ 棋子位置由英文逗号分隔的纵横坐标确定,其中,纵向坐标用英文小写字母
+ a--j或阿拉伯数字0--9分别表示棋盘纵向10个交点;横向坐标用英文小写字母
+ a--i或阿拉伯数字0--8分别表示棋盘横向的9个交点。
+
+ \textbf{\textsf{注意: }}可以混合使用棋子坐标表示方法,但强烈建议使用
+ 单一字母法或数字表示棋子坐标。
+
+ 棋子编码采用大写字母表示红棋,小写字母表示黑棋,具体如表%
+ \ref{tab-piececode}所示。
+
+ \begin{table}[!htbp]
+ \centering
+ \caption{棋子编码规则}\label{tab-piececode}
+ \begin{tabular}{cc||cc}
+ \hline
+ 编码 & 红棋 & 编码 & 黑棋\\\hline
+ K & 帥 & k & 將 \\
+ A & 仕 & a & 士 \\
+ E & 相 & e & 象 \\
+ H & 马 & h & 馬 \\
+ R & 车 & r & 車 \\
+ C & 炮 & c & 炮 \\
+ P & 兵 & p & 卒 \\\hline
+ \end{tabular}
+ \end{table}
+
+ 例如,一个完整的\marg{棋子列表}为:
+
+ |{{4,0}{K}}, {{2,2}{p}}, {{1,7}{C}}, {{4,9}{k}}|
+
+ 在\oarg{外观选项}中可以通过key-value的方式设置棋子、棋盘的颜色、
+ 字体、字号、线宽等外观。
+
+ 通过\oarg{外观选项}设置的外观参数仅对当前命令局部有效,
+
+\begin{SideBySideExample}[frame=single,numbers=left,
+ xrightmargin=.50\linewidth,gobble=2]
+ \centering
+ % 为便排版,进行缩放
+ \cchessset{resize=real,
+ width=.90\linewidth}
+ \cchessman{ {{4,0}{K}}, {{2,2}{p}},
+ {{1,7}{C}}, {{4,9}{k}}
+ }
+\end{SideBySideExample}
+
+\subsection{\env{setcchessman}打谱排版环境}
+
+\begin{function}{setcchessman}
+ \begin{syntax}
+ \tn{begin}|{setcchessman}|\oarg{外观选项}
+ .....
+ \tn{end}|{setcchessman}|
+ \tn{begin}|{setcchessman*}|\oarg{外观选项}
+ .....
+ \tn{end}|{setcchessman*}|
+ \end{syntax}
+\end{function}
+
+ 按设置的\oarg{外观选项}对打谱结果进行排版。
+
+ 在打谱排版环境\env{setcchessman}中,可以通过专用命令\tn{init}%
+ 初始化棋谱状态(残局),\tn{set}在指定位置布置棋子,\tn{del}删除
+ 指定位置的棋子,\tn{mov}实现棋子的移动,从而实现打谱操作。
+ 在环境结束后以最终打谱状态排版棋谱。
+
+ 星号环境\env{setcchessman*}会同时排版棋谱的文本描述(如:车一进二等)。
+
+ 在\oarg{外观选项}中可以通过key-value的方式设置棋子、棋盘的颜色、
+ 字体、字号、线宽等外观。
+
+ 通过\oarg{外观选项}设置的外观参数仅对当前命令局部有效,
+
+\begin{SideBySideExample}[frame=single,numbers=left,
+ xrightmargin=.48\linewidth,gobble=2]
+ \centering
+ % 为便排版,进行缩放
+ \cchessset{resize=real,
+ width=.90\linewidth}
+ \begin{setcchessman}
+ % 残局初始化
+ \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}
+\end{SideBySideExample}
+
+\begin{SideBySideExample}[frame=single,numbers=left,
+ xrightmargin=.45\linewidth,gobble=2]
+ \centering
+ % 为便排版,进行缩放
+ \cchessset{resize=real,
+ width=.30\linewidth}
+ \begin{setcchessman*}
+ % 残局初始化
+ \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*}
+\end{SideBySideExample}
+
+\subsection{打谱专用命令}
+
+\subsubsection{\tn{init}棋谱初始化命令}
+
+\begin{function}{\init}
+ \begin{syntax}
+ \cs{init} \marg{棋子列表}
+ \end{syntax}
+\end{function}
+
+ 用于将在\marg{棋子列表}中指定的所有棋子布置于棋盘的指定位置。
+
+ \marg{棋子列表}中的棋子表示方法与第\ref{subsec-cchessman}小节
+ 中的说明相同。
+
+ \textbf{\textsf{注意: }}该命令只能用于\env{setcchessman}环境中。
+
+\subsubsection{\tn{set}棋子布置命令}
+
+\begin{function}{\set}
+ \begin{syntax}
+ \cs{set} \marg{棋子}
+ \end{syntax}
+\end{function}
+
+ 用于将在\marg{棋子}中指定的棋子布置于棋盘的指定位置。
+
+ \marg{棋子}中的棋子表示方法与第\ref{subsec-cchessman}小节
+ 中的说明相同。
+
+ \textbf{\textsf{注意: }}该命令只能用于\env{setcchessman}环境中。
+
+\subsubsection{\tn{del}棋子删除命令}
+
+\begin{function}{\del}
+ \begin{syntax}
+ \cs{del} \marg{棋盘坐标}
+ \end{syntax}
+\end{function}
+
+ 用于删除\marg{棋盘坐标}中指定坐标处的棋子。
+
+ \marg{棋盘坐标}中的表示方法与第\ref{subsec-cchessman}小节
+ 中的说明相同。
+
+ \textbf{\textsf{注意: }}该命令只能用于\env{setcchessman}环境中。
+
+\subsubsection{\tn{mov}棋子移动命令}
+
+\begin{function}{\mov}
+ \begin{syntax}
+ \cs{mov} \marg{棋子编码}\marg{原棋盘坐标}\marg{新棋盘坐标}
+ \end{syntax}
+\end{function}
+
+ 用于将\marg{棋子编码}中指定的棋子从\marg{原棋盘坐标}移动到%
+ \marg{新棋盘坐标}。
+
+ \marg{棋子编码}、\marg{原棋盘坐标}和\marg{新棋盘坐标}中采用
+ 棋子与棋盘坐标表示方法与第\ref{subsec-cchessman}小节中的说明相同。
+
+ \textbf{\textsf{注意: }}该命令只能用于\env{setcchessman}环境中。
+
+\subsection{\tn{resetpiece}棋子字符复位命令}
+
+\begin{function}{\resetpiece}
+ \begin{syntax}
+ \cs{resetpiece}
+ \end{syntax}
+\end{function}
+
+ 将棋子字符复位到默认字符。
+
+\subsection{\tn{cchessset}外观设置命令}
+
+\begin{function}{\cchessset}
+ \begin{syntax}
+ \cs{cchessset} \marg{外观选项}
+ \end{syntax}
+\end{function}
+
+ 通过\marg{外观选项}中的key-value方式设置棋子、棋盘的文字、
+ 字体、颜色、线宽、背景等排版外观。
+
+ 通过\cs{cchessset}\marg{外观选项}设置的外观参数对后续所有
+ 棋谱排版命令有效,
+
+\section{外观选项}
+
+在\pkg{chinesechess}宏包中,棋子与棋盘的文本、字体、颜色、背景等
+外观可以通过不同\oarg{外观选项}进行设置。\oarg{外观选项}可以在
+命令或环境的可选项中进行局部设置,也可以通过\cs{cchessset}命令
+进行全局设置。
+
+\subsection{棋盘}
+
+\subsubsection{单元格尺寸}
+
+\begin{option}{ opt = gridsize, desc = {= \meta{棋盘格尺寸}}, init=10mm }
+ 设置棋盘单元格尺寸。
+\end{option}
+
+\begin{SideBySideExample}[frame=single,numbers=left,
+ xrightmargin=.60\linewidth,gobble=2]
+ \centering
+ % 为便排版,进行缩放
+ \cchessset{resize=real,
+ width=.90\linewidth}
+ \cchessboard[gridsize=15mm]
+\end{SideBySideExample}
+
+\bigskip
+
+\subsubsection{棋盘类型}
+
+\begin{option}{ opt = boardtype, desc = {= \meta{棋盘类型}}, init=x+tn }
+ 设置棋盘类型,目前支持:
+\end{option}
+
+ \begin{Description}[a]
+ \item |x|---有九宫对角线,无兵炮位置标志。
+ \item |x+|---有九宫对角线和兵炮位置标志。
+ \item |x+t|---有九宫对角线、兵炮位置标志和楚河汉界。
+ \item |x+tn|---有九宫对角线、兵炮位置标志、楚河汉界和纵线标位数字。
+ \item |x+Xtn|---有九宫对角线、兵炮位置标志、楚河汉界、纵线标位数字和象位虚线。
+ \end{Description}
+
+\begin{SideBySideExample}[frame=single,numbers=left,
+ xrightmargin=.54\linewidth,gobble=2]
+ \centering
+ % 为便排版,进行缩放
+ \cchessset{resize=real,
+ width=.35\linewidth}
+ \cchessboard*[boardtype=x]\quad
+ \cchessboard*[boardtype=x+]\\
+ \cchessboard*[boardtype=x+t]\quad
+ \cchessboard*[boardtype=x+tn]\\
+ \cchessboard*[boardtype=x+Xtn]
+\end{SideBySideExample}
+
+\bigskip
+
+\subsubsection{棋盘线线宽}
+
+\begin{option}{ opt = boardlinewd, desc = {= \meta{棋盘线宽}}, init=0.4pt }
+ 设置棋盘线线宽。
+\end{option}
+
+\begin{SideBySideExample}[frame=single,numbers=left,
+ xrightmargin=.56\linewidth,gobble=2]
+ \centering
+ % 为便排版,进行缩放
+ \cchessset{resize=real,
+ width=.90\linewidth}
+ \cchessboard*[boardlinewd=1.0pt]
+\end{SideBySideExample}
+
+\bigskip
+
+\subsubsection{棋盘线颜色}
+
+\begin{option}{ opt = boardlinecolor, desc = {= \meta{棋盘线颜色}}, init=black }
+ 设置棋盘线颜色。
+\end{option}
+
+\begin{SideBySideExample}[frame=single,numbers=left,
+ xrightmargin=.55\linewidth,gobble=2]
+ \centering
+ % 为便排版,进行缩放
+ \cchessset{resize=real,
+ width=.90\linewidth}
+ \cchessboard*[boardlinecolor=red]
+\end{SideBySideExample}
+
+\bigskip
+
+\subsubsection{棋盘背景}
+
+\begin{option}{ opt = boardbg, desc = {= \meta{棋盘背景}}, init=init-none }
+ 设置棋盘背景图的插图文件路径及文件名。
+\end{option}
+
+ \textbf{\textsf{注意: }}使用该选项时,需要在导言区添加|\usepackage{grpahicx}|命令。
+
+\begin{SideBySideExample}[frame=single,numbers=left,
+ xrightmargin=.55\linewidth,gobble=2]
+ \centering
+ % 为便排版,进行缩放
+ \cchessset{resize=real,
+ width=.35\linewidth}
+ \cchessboard*[boardbg=bg01]\quad
+ \cchessboard*[boardbg=bg02]
+\end{SideBySideExample}
+
+\bigskip
+
+\subsection{棋谱缩放}
+
+\subsubsection{缩放方式}
+
+\begin{option}{ opt = resize, desc = {= \meta{棋谱缩放方式}}, init=none }
+ 设置最终棋谱输出时的整体缩放方式,目前支持:
+\end{option}
+
+ \begin{Description}[a]
+ \item |none|---无缩放。
+ \item |real|---按指定的width、height、xscale或yscale进行缩放。
+ \end{Description}
+
+\bigskip
+
+\subsubsection{横向缩放因子}
+
+\begin{option}{ opt = xscale, desc = {= \meta{x方向缩放系数}}, init=1 }
+ 设置x方向缩放系数,需要配合|resize|缩放方式参数一起使用。
+\end{option}
+
+\begin{SideBySideExample}[frame=single,numbers=left,
+ xrightmargin=.48\linewidth,gobble=2]
+ \centering
+ \cchessboard[resize=real, xscale=0.5]
+\end{SideBySideExample}
+
+
+\bigskip
+
+\subsubsection{纵向缩放因子}
+
+\begin{option}{ opt = yscale, desc = {= \meta{y方向缩放系数}}, init=1 }
+ 设置y方向缩放系数,需要配合|resize|缩放方式参数一起使用。
+\end{option}
+
+\begin{SideBySideExample}[frame=single,numbers=left,
+ xrightmargin=.70\linewidth,gobble=2]
+ \centering
+ \cchessboard[%
+ resize=real,
+ yscale=0.5]
+\end{SideBySideExample}
+
+\bigskip
+
+\subsubsection{横向尺寸}
+
+\begin{option}{ opt = width, desc = {= \meta{宽度}}, init=init-none }
+ 设置输出宽度,需要配合|resize|缩放方式参数一起使用。
+\end{option}
+
+\begin{SideBySideExample}[frame=single,numbers=left,
+ xrightmargin=.65\linewidth,gobble=2]
+ \centering
+ \cchessboard[resize=real,
+ width=7cm]
+\end{SideBySideExample}
+
+\bigskip
+
+\subsubsection{纵向尺寸}
+
+\begin{option}{ opt = height, desc = {= \meta{高度}}, init=init-none }
+ 设置输出高度,需要配合|resize|缩放方式参数一起使用。
+\end{option}
+
+\begin{SideBySideExample}[frame=single,numbers=left,
+ xrightmargin=.65\linewidth,gobble=2]
+ \centering
+ \cchessboard[resize=real,
+ height=6cm]
+\end{SideBySideExample}
+
+ \textbf{\textsf{说明: }}缩放纵/横参数可以混合使用。
+
+\bigskip
+
+\subsection{棋子}
+
+\subsubsection{字符}
+
+\begin{option}{ opt = piecechar, desc = {= \meta{棋子字符}},
+ init=\{K\}\{帥\} }
+ 设置棋子字符,用两组大括号分别指定棋子编码和棋子字符。
+ 其中,棋子编码见表\ref{tab-piececode}。
+\end{option}
+
+ \textbf{\textsf{注意: }}使用该选项时,在能需要在导言区添加字体,
+ 如|\usepackage{fontawesome5}|命令。
+
+\begin{SideBySideExample}[frame=single,numbers=left,
+ xrightmargin=.55\linewidth,gobble=2]
+ %\usepackage{fontawesome5}
+ \centering
+ % 为便排版,进行缩放
+ \cchessset{resize=real,
+ % gridsize=10mm,
+ width=.90\linewidth}
+ \cchessboard[%
+ piecechar={K}{\faChessKing},
+ piecechar={A}{\faShield*},
+ piecechar={E}{\faChessBishop},
+ piecechar={H}{\faChessKnight},
+ piecechar={R}{\faChessRook},
+ piecechar={C}{\faBomb},
+ piecechar={P}{\faChessPawn},
+ piecechar={k}{\faChessQueen},
+ piecechar={a}{\faShield*},
+ piecechar={e}{\faChessBishop},
+ piecechar={h}{\faChessKnight},
+ piecechar={r}{\faChessRook},
+ piecechar={c}{\faBomb},
+ piecechar={p}{\faChessPawn},
+ boardlinecolor=red]
+\end{SideBySideExample}
+
+\bigskip
+
+\resetpiece
+\cchessset{piecechar={C}{炮}}
+
+\subsubsection{颜色}
+
+\begin{option}{ opt = piecefont, desc = {= \meta{棋子字符字体}}, init=\cs{kaishu} }
+ 设置棋子字符字体。
+\end{option}
+
+\begin{SideBySideExample}[frame=single,numbers=left,
+ xrightmargin=.55\linewidth,gobble=2]
+ \centering
+ % 为便排版,进行缩放
+ \cchessset{resize=real,
+ width=.90\linewidth}
+ \cchessboard[piecefont=\sffamily]
+\end{SideBySideExample}
+
+\bigskip
+
+\subsubsection{边框类型}
+
+\begin{option}{ opt = piecetype, desc = {= \meta{棋子边框类型}}, init=|ooo| }
+ 设置棋子外框类型,目前支持:
+\end{option}
+
+ \begin{Description}[a]
+ \item |o|---实心填充圆(小写英文字母``|o|'')。
+ \item |oo|---双同心实心圆。
+ \item |ooo|---双同心实心圆叠加阴影错位圆。
+ \end{Description}
+
+\begin{SideBySideExample}[frame=single,numbers=left,
+ xrightmargin=.55\linewidth,gobble=2]
+ \centering
+ % 为便排版,进行缩放
+ \cchessset{resize=real,
+ width=.40\linewidth}
+ \cchessboard[piecetype=o]\quad
+ \cchessboard[piecetype=oo]\\
+ \cchessboard[piecetype=ooo]
+\end{SideBySideExample}
+
+\bigskip
+
+\subsubsection{边框线宽}
+
+\begin{option}{ opt = boxlinewd, desc = {= \meta{棋子外框线宽度}}, init=0.4pt }
+ 设置棋子外框线线宽。
+\end{option}
+
+\begin{SideBySideExample}[frame=single,numbers=left,
+ xrightmargin=.60\linewidth,gobble=2]
+ \centering
+ % 为便排版,进行缩放
+ \cchessset{resize=real,
+ width=.95\linewidth}
+ \cchessboard[boxlinewd=0.8pt]
+\end{SideBySideExample}
+
+\bigskip
+
+\subsubsection{边框颜色}
+
+\begin{option}{ opt = boxcolor, desc = {= \meta{棋子外框线颜色}}, init=black }
+ 设置棋子外框线颜色。
+\end{option}
+
+\begin{SideBySideExample}[frame=single,numbers=left,
+ xrightmargin=.60\linewidth,gobble=2]
+ \centering
+ % 为便排版,进行缩放
+ \cchessset{resize=real,
+ width=.95\linewidth}
+ \cchessboard[boxcolor=white]
+\end{SideBySideExample}
+
+\bigskip
+
+\subsubsection{红棋颜色}
+
+\begin{option}{ opt = redpiece, desc = {= \meta{红棋棋子字符颜色}}, init=red }
+ 设置红棋棋子字符颜色。
+\end{option}
+
+\begin{SideBySideExample}[frame=single,numbers=left,
+ xrightmargin=.60\linewidth,gobble=2]
+ \centering
+ % 为便排版,进行缩放
+ \cchessset{resize=real,
+ width=.95\linewidth}
+ \cchessboard[redpiece=white]
+\end{SideBySideExample}
+
+\bigskip
+
+\subsubsection{黑棋颜色}
+
+\begin{option}{ opt = blkpiece, desc = {= \meta{黑棋棋子字符颜色}}, init=black }
+ 设置黑棋棋子字符颜色。
+\end{option}
+
+\begin{SideBySideExample}[frame=single,numbers=left,
+ xrightmargin=.60\linewidth,gobble=2]
+ \centering
+ % 为便排版,进行缩放
+ \cchessset{resize=real,
+ width=.95\linewidth}
+ \cchessboard[blkpiece=white]
+\end{SideBySideExample}
+
+\bigskip
+
+\subsubsection{背景圆填充色}
+
+\begin{option}{ opt = lower, desc = {= \meta{棋子背景圆填充色}}, init=init-none }
+ 设置棋子背景圆填充色。
+\end{option}
+
+\begin{SideBySideExample}[frame=single,numbers=left,
+ xrightmargin=.60\linewidth,gobble=2]
+ \centering
+ % 为便排版,进行缩放
+ \cchessset{resize=real,
+ width=.95\linewidth}
+ \cchessboard[lower=black]
+\end{SideBySideExample}
+
+\bigskip
+
+\subsubsection{表面圆环填充色}
+
+\begin{option}{ opt = donut, desc = {= \meta{棋子表面圆环填充色}}, init=init-none }
+ 设置棋子表面圆环填充色。
+\end{option}
+
+\begin{SideBySideExample}[frame=single,numbers=left,
+ xrightmargin=.60\linewidth,gobble=2]
+ \centering
+ % 为便排版,进行缩放
+ \cchessset{resize=real,
+ width=.95\linewidth}
+ \cchessboard[donut=red]
+\end{SideBySideExample}
+
+\bigskip
+
+\subsubsection{红棋表面圆填充色}
+
+\begin{option}{ opt = redupper, desc = {= \meta{红棋棋子表面圆填充色}}, init=init-none }
+ 设置红棋棋子表面圆填充色。
+\end{option}
+
+\begin{SideBySideExample}[frame=single,numbers=left,
+ xrightmargin=.60\linewidth,gobble=2]
+ \centering
+ % 为便排版,进行缩放
+ \cchessset{resize=real,
+ width=.95\linewidth}
+ \cchessboard[redupper=red,
+ redpiece=white]
+\end{SideBySideExample}
+
+\bigskip
+
+\subsubsection{黑棋表面圆填充色}
+
+\begin{option}{ opt = blkupper, desc = {= \meta{黑棋棋子表面圆填充色}}, init=init-none }
+ 设置黑棋棋子表面圆填充色。
+\end{option}
+
+\begin{SideBySideExample}[frame=single,numbers=left,
+ xrightmargin=.60\linewidth,gobble=2]
+ \centering
+ % 为便排版,进行缩放
+ \cchessset{resize=real,
+ width=.95\linewidth}
+ \cchessboard[blkupper=black,
+ blkpiece=white]
+\end{SideBySideExample}
+
+\bigskip
+
+\subsubsection{阴影错位圆填充色}
+
+\begin{option}{ opt = shadow, desc = {= \meta{棋子阴影错位圆填充色}}, init=init-none }
+ 设置棋子阴影错位圆填充色。
+\end{option}
+
+\begin{SideBySideExample}[frame=single,numbers=left,
+ xrightmargin=.60\linewidth,gobble=2]
+ \centering
+ % 为便排版,进行缩放
+ \cchessset{resize=real,
+ width=.95\linewidth}
+ \cchessboard[shadow=red!80]
+\end{SideBySideExample}
+
+\bigskip
+
+\subsubsection{笔划}
+
+\begin{option}{ opt = scharstroke, desc = {= \meta{棋子字符笔划类型}}, init=bold }
+ 设置棋子字符笔划类型。
+\end{option}
+
+ \begin{Description}[a]
+ \item |none|---原字体默认笔划。
+ \item |solid|---实线笔划轮廓,笔划内部透明,颜色使用字符颜色。
+ \item |white|---实线白色笔划轮廓,笔划内部用白色填充。
+ \item |bold|---加粗笔划,颜色使用字符颜色。
+ \item |invisible|---隐藏笔划。
+ \end{Description}
+
+\begin{SideBySideExample}[frame=single,numbers=left,
+ xrightmargin=.58\linewidth,gobble=2]
+ \centering
+ % 为便排版,进行缩放
+ \cchessset{resize=real,
+ width=.95\linewidth}
+ \cchessboard[charstroke=white,
+ redupper=red,blkupper=black]
+\end{SideBySideExample}
+
+% \bigskip
+
+% \title{
+% \pkg{chinesechess} package for writing Chinese chess
+% \rlap{\makebox[4cm][r]{
+% \normalsize $\Longrightarrow$ \color{red}
+% \protect\hyperlink{zh}{中文版本}
+% \protect\hypertarget{en}{}
+% }}
+% }
+% \author{Nan Geng \texttt{<nangeng@nwafu.edu.cn>}}
+% \date{\today\qquad \vers}
+% \maketitle
+%
+% \section{Introduction}
+%
+% \section{Interface}
+%
+% \section{options}
+
+\end{documentation}
+
+\end{document}