<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">\documentclass[full]{l3doc}
\usepackage[scheme=chinese]{ctex}
\usepackage{geometry}
\usepackage{fancyvrb-ex}
\usepackage{ninecolors}
\usepackage{suanpan-l3}

\IndexPrologue
  {
    % \section*{ç´¢å¼•}
    % \markboth{ç´¢å¼•}{ç´¢å¼•}
    % \addcontentsline{toc}{section}{ç´¢å¼•}
    % æ–œä½“æ•°å­—è¯´æ˜Žäº†å¯¹åº”ç´¢å¼•å†…å®¹å‡ºçŽ°çš„é¡µç&nbsp;ï¼Œ
    % å¸¦æœ‰ä¸‹åˆ’çº¿çš„æ•°æ®ç»™å‡ºäº†ç´¢å¼•å†…å®¹çš„å®šä¹‰ï¼Œ
    % å…¶å®ƒçš„æ•°å­—ç»™å‡ºäº†ç´¢å¼•å†…å®¹å¼•ç”¨çš„ä½ç½®ã€‚
    \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 = ä¸­å›½ä¼&nbsp;ç»Ÿ7ç&nbsp;åœ†ç&nbsp;ç®—ç›˜æŽ’ç‰ˆå®åŒ… ,
   Subject = A LaTeX3 package ,
   Author = è€¿æ¥&nbsp;
 }
}

\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
  }
  \PrintChanges
  \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 { suanpan/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 { suanpan/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 }
        { init: ~\texttt{\l_init_tl} }
      )
    \end{minipage}
  \hbox_gset_end:
  \box_use_drop:N \l__option_box
  #2
  \medskip
} {  }

\DeclareDocumentCommand \opt { O{} m }
  { \__codedoc_cmd:no {#1} { #2 } }
\ExplSyntaxOff

\def\vers{\texttt{v1.2.4} }

\changes{v1.0.0}{2024/08/20}{first version.}
\changes{v1.2.4}{2024/10/13}{remove tikz patch.}

\begin{document}
\title{
  \pkg{suanpan-l3}---ç®—ç›˜(Abacus)æŽ’ç‰ˆå®åŒ…
  \rlap{\makebox[4cm][r]{
    \normalsize $\Longrightarrow$ \color{red}
    \protect\hyperlink{en}{English Version}
    \protect\hypertarget{zh}{}
  }}
}
\author{\textit{è€¿æ¥&nbsp;} \texttt{&lt;nangeng@nwafu.edu.cn&gt;}}
\date{\the\year å¹´\the\month æœˆ\the\day æ—¥\qquad \vers
\thanks{\url{https://gitee.com/nwafu_nan/suan-pan}}
}

\maketitle

\begin{abstract}
  \pkg{suanpan-l3}æ˜¯ä¸€ä¸ªåŸºäºŽ\pkg{l3draw}å’Œ\pkg{TikZ}ç»˜å›¾å®åŒ…ï¼Œç”¨\pkg{Expl3}%
  å¼€å‘çš„ä¸­å›½ä¼&nbsp;ç»Ÿ7ç&nbsp;åœ†ç&nbsp;ç®—ç›˜æŽ’ç‰ˆå®åŒ…ï¼Œå®ƒèƒ½å¤Ÿå®žçŽ°ä½¿ç”¨æ™®é€šä¸Šç&nbsp;ã€ä¸‹ç&nbsp;
  å’Œåº•ç&nbsp;ã€é¡¶ç&nbsp;åŠæ‚¬ç&nbsp;çš„ç®—ç›˜æŽ’ç‰ˆã€‚è¯¥å®åŒ…æä¾›äº†å”¯ä¸€çš„ä¸€ä¸ª
  \env{suanpan}ç®—ç›˜æŽ’ç‰ˆçŽ¯å¢ƒåŠä»…åœ¨è¯¥çŽ¯å¢ƒä¸­ä½¿ç”¨çš„ \tn{rod}ã€
  \tn{rods}ã€\tn{bid}ã€\tn{bids}ã€\tn{rodmark}å’Œ\tn{mkframe}æ¡£æ†ã€ç®—ç&nbsp;
  ç€è‰²ã€æ¨ªæ¢æ&nbsp;‡è®°å’Œè¾¹æ¡†æŽ’ç‰ˆå‘½ä»¤ã€‚åŒæ—¶ï¼Œè¯¥å®åŒ…è¿˜æä¾›äº†\tn{suanpanset}%
  å‘½ä»¤ç”¨äºŽå¯¹ç®—ç›˜å¤–è§‚è¿›è¡Œè®¾ç½®ã€‚
  \begin{center}
    \begin{suanpan}[framedraw = brown2, scale = 0.45, bidsep=1.5pt,
                    roddraw = brown3, rodfill = brown4]
      % å„æ¡£ä½æ•°å­—åˆ—è¡¨
      \rods{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20}
      % å®šä½ç‚¹
      \rod*{4}{3}
      \rod*{18}{17}
      % ä½¿ç”¨é¡¶ç&nbsp;
      \bid{12}{9}{azure5}
      \bid{13}{9}{azure5}
      \bid{14}{9}{azure5}
      \bid{15}{9}{azure5}
      \bid{16}{9}{azure5}
      % ä½¿ç”¨æ‚¬ç&nbsp;
      \bid{17}{11}{red5}
      \bid{18}{11}{red5}
      \bid{19}{11}{red5}
      \bid{20}{11}{red5}
      \bid{21}{11}{red5}
      % ä½¿ç”¨åº•ç&nbsp;
      \bid{11}{3}{olive5}
      \bid{16}{3}{olive5}
      \bid{21}{3}{olive5}
      \rodmark{21,20,19,{},17,16,15,14,13,12,11,10,9,8,7,6,5,{},3,2,1}
      \mkframe
    \end{suanpan}
  \end{center}
\end{abstract}

{\small
\tableofcontents
}
\newpage

\begin{documentation}

\section{å¼•è¨€}

\pkg{suanpan-l3}å®åŒ…æ˜¯ä¸€ä¸ªåŸºäºŽ\pkg{l3draw}å’Œ\pkg{TikZ}ç»˜å›¾å®åŒ…ï¼Œ
ç”¨\pkg{Expl3}å¼€å‘çš„ä¸­å›½ä¼&nbsp;ç»Ÿ7ç&nbsp;åœ†ç&nbsp;ç®—ç›˜æŽ’ç‰ˆå®åŒ…ï¼Œå®ƒåˆ©ç”¨\pkg{l3draw}%
å®åŒ…ï¼Œé€šè¿‡\env{l3coffin}å®¹å™¨çš„å¹³ç§»å˜æ¢ï¼Œå°†ä½¿ç”¨\pkg{TikZ}å®åŒ…ç»˜åˆ¶çš„
ç®—ç&nbsp;ã€æ¡£æ†ã€è¾¹æ¡†ç­‰åŸºæœ¬å›¾å…ƒç»„è£…æˆç®—ç›˜ï¼Œä»Žè€Œå®žçŽ°ç®—ç›˜çš„æŽ’ç‰ˆã€‚

ç”±äºŽåœ†ç&nbsp;æ˜¯é€šè¿‡åœ†è§’çŸ©å½¢å®žçŽ°çš„ï¼Œå›&nbsp;æ­¤å½“ç®—ç&nbsp;æ•°é‡è¾ƒå¤šæ—¶ï¼Œç»˜åˆ¶è€—æ—¶è¾ƒé•¿ï¼Œ
å…¶ç¼–è¯‘é€Ÿåº¦è¾ƒæ…¢ã€‚

\section{ç”¨æˆ·æŽ¥å£}

\subsection{\env{suanpan}ç®—ç›˜æŽ’ç‰ˆçŽ¯å¢ƒ}

\begin{function}{suanpan}
  \begin{syntax}
    \tn{begin}|{suanpan}|\oarg{å¤–è§‚é€‰é¡¹}
    .....
    \tn{end}|{suanpan}|
  \end{syntax}
\end{function}

  æŒ‰å¯é€‰é¡¹è®¾ç½®çš„\oarg{å¤–è§‚é€‰é¡¹}å®žçŽ°ç®—ç›˜æŽ’ç‰ˆã€‚

  åœ¨\env{suanpan}çŽ¯å¢ƒä¸­ï¼Œå¯ä»¥é€šè¿‡ä¸“ç”¨å‘½ä»¤\tn{rod}%
  (æŽ’ç‰ˆç®—ç›˜çš„ä¸€ä¸ªæ¡£ä½)ï¼Œ\tn{rods}(æŽ’ç‰ˆä¸€ç»„æ¡£ä½)ï¼Œ
  \tn{bid}(æŒ‡å®šç®—ç&nbsp;é¢œè‰²)ï¼Œ\tn{bids}(æŒ‡å®šå†…/å¤–ç&nbsp;é¢œè‰²)ï¼Œ
  \tn{rodmark}(ä¸ºæ¡£ä½æ·»åŠ&nbsp;æ&nbsp;‡è®°)ï¼Œ\tn{mkframe}(æŽ’ç‰ˆè¾¹æ¡†)
  æŒ‰éœ€å®žçŽ°ç®—ç›˜æŽ’ç‰ˆã€‚

  åœ¨\oarg{å¤–è§‚é€‰é¡¹}ä¸­å¯ä»¥é€šè¿‡key-valueçš„æ–¹å¼è®¾ç½®çº¿å®½ã€é¢œè‰²ã€
  ç¼©æ”¾æ¯”ä¾‹ç­‰å¤–è§‚å±žæ€§ã€‚

  é€šè¿‡\oarg{å¤–è§‚é€‰é¡¹}è®¾ç½®çš„å¤–è§‚å‚æ•°ä»…å¯¹\env{suanpan}çŽ¯å¢ƒå±€éƒ¨æœ‰æ•ˆã€‚

  \begin{notezh}
    \env{suanpan}çŽ¯å¢ƒä¸­\textsf{ä¸å¯ä»¥å‡ºçŽ°ç©ºè¡Œ}ã€‚
  \end{notezh}

\begin{SideBySideExample}[frame=single,numbers=left,%
    xrightmargin=.48\linewidth,gobble=2]
  \centering
  % ä¸ºä¾¿æŽ’ç‰ˆï¼Œè¿›è¡Œç¼©æ”¾
  \suanpanset{scale = 0.65}
  \begin{suanpan}
    \rod{1}{0}
    \rod{2}{3}
    \rod{3}{0}
  \end{suanpan}
\end{SideBySideExample}

\subsection{\env{suanpan}çŽ¯å¢ƒä¸­çš„ä¸“ç”¨å‘½ä»¤}

\changes{v1.1.3}{2024/09/04}{add highlight to rod(s) and beam}
\subsubsection{\tn{rod}å•ä¸€æ¡£ä½æŽ’ç‰ˆå‘½ä»¤}

\begin{function}{\rod}
  \begin{syntax}
    \cs{rod} \marg{æ¡£ä½ç¼–å·} \marg{æ¡£ä½æ•°å­—}
  \end{syntax}
\end{function}

  ç”¨äºŽæŽ’ç‰ˆ\marg{æ¡£ä½ç¼–å·}(åŸºäºŽ1ï¼Œä»Žå·¦å‘å³è¿›è¡Œç¼–å·)å‚æ•°æŒ‡å®šçš„ç®—ç›˜
  æ¡£ä½ï¼Œæœ¬æ¡£çš„è®¡æ•°å€¼ç”±\marg{æ¡£ä½æ•°å­—}å‚æ•°æŒ‡å®šã€‚

  \marg{æ¡£ä½æ•°å­—}æ”¯æŒ[0, 20]å†…çš„æ•°å­—ï¼Œå…¶ä¸­[0, 9]å†…çš„
  æ•°å­—é‡‡ç”¨å¸¸è§„4ä¸ªä¸‹ç&nbsp;ç»“åˆ1ä¸ªä¸Šç&nbsp;çš„æ–¹æ³•è¿›è¡Œè¡¨ç¤ºï¼Œ[10, 15]
  å†…çš„æ•°å­—åˆ™éœ€è¦é¢å¤–ä½¿ç”¨\enquote{åº•ç&nbsp;}å’Œ\enquote{é¡¶ç&nbsp;}è¿›è¡Œè¡¨ç¤ºï¼Œ
  [16, 20]å†…çš„æ•°å­—åˆ™éœ€è¦å†é¢å¤–ä½¿ç”¨\enquote{æ‚¬ç&nbsp;}è¿›è¡Œè¡¨ç¤ºã€‚

  å®åŒ…è¿˜ä¸º\tn{rod}å‘½ä»¤åŒæ—¶æä¾›äº†\tn{rod*}æ˜Ÿå·å‘½ä»¤ç”¨äºŽæŽ’ç‰ˆåœ¨
  æ¨ªæ¢ä¸Šå¸¦æœ‰è®¡ä½ç‚¹(åœ†ç‚¹)çš„æ¡£ä½ã€‚

\begin{SideBySideExample}[frame=single,numbers=left,%
    xrightmargin=.48\linewidth,gobble=2]
  \centering
  \suanpanset{scale = 0.65}
  \begin{suanpan}
    \rod{1}{1}   % å¸¸è§„æ¡£ä½
    \rod{2}{6}
    \rod*{3}{10} % è®¡ä½ç‚¹ï¼Œä½¿ç”¨åº•ç&nbsp;
    \rod{4}{12}  % ä½¿ç”¨é¡¶ç&nbsp;
    \rod{5}{18}  % ä½¿ç”¨æ‚¬ç&nbsp;
  \end{suanpan}
\end{SideBySideExample}

\subsubsection{\tn{rods}ä¸€ç»„æ¡£ä½æŽ’ç‰ˆå‘½ä»¤}

\begin{function}{\rods}
  \begin{syntax}
    \cs{rods} \marg{æ•°å­—åˆ—è¡¨}
  \end{syntax}
\end{function}

  ç”¨äºŽæŽ’ç‰ˆåœ¨\marg{æ•°å­—åˆ—è¡¨}ä¸­ç”¨é€—å·åˆ†éš”çš„ä¸€ç»„æ•°å­—æŒ‡å®šçš„æ¡£ä½ï¼Œ
  å„æ¡£ä½ç¼–å·åŸºäºŽ1ï¼Œä»Žå·¦å‘å³è¿›è¡Œè‡ªåŠ¨ç¼–å·ã€‚

  \marg{æ•°å­—åˆ—è¡¨}ä¸­çš„å„æ¡£ä½æ•°å­—æ”¯æŒ[0, 20]å†…çš„æ•°å­—ï¼Œå…¶ä¸­[0, 9]å†…çš„
  æ•°å­—é‡‡ç”¨å¸¸è§„4ä¸ªä¸‹ç&nbsp;ç»“åˆ1ä¸ªä¸Šç&nbsp;çš„æ–¹æ³•è¿›è¡Œè¡¨ç¤ºï¼Œ[10, 15]
  å†…çš„æ•°å­—åˆ™éœ€è¦é¢å¤–ä½¿ç”¨\enquote{åº•ç&nbsp;}å’Œ\enquote{é¡¶ç&nbsp;}è¿›è¡Œè¡¨ç¤ºï¼Œ
  [16, 20]å†…çš„æ•°å­—åˆ™éœ€è¦å†é¢å¤–ä½¿ç”¨\enquote{æ‚¬ç&nbsp;}è¿›è¡Œè¡¨ç¤ºã€‚

  \begin{notezh}
    å®åŒ…å¹¶æ²¡æœ‰ä¸º\tn{rods}å‘½ä»¤æä¾›åœ¨æ¨ªæ¢æŽ’ç‰ˆè®¡ä½ç‚¹çš„æ¡£ä½çš„
    æ“ä½œã€‚å¦‚æžœéœ€è¦ï¼Œåˆ™å¯ä»¥ä½¿ç”¨\tn{rod*}å‘½ä»¤å¯¹æŒ‡å®šæ¡£ä½è¿›è¡Œè¦†ç›–ç»˜åˆ¶ã€‚
  \end{notezh}

\begin{SideBySideExample}[frame=single,numbers=left,%
    xrightmargin=.48\linewidth,gobble=2]
  \centering
  \suanpanset{scale = 0.65}
  \begin{suanpan}
    \rods{0, 6, 12, 18, 0}
    \rod*{3}{12}
  \end{suanpan}
\end{SideBySideExample}

\changes{v1.0.1}{2024/08/26}{rename \tn{bidclr} to \tn{bid}.}
\changes{v1.1.3}{2024/09/01}{add draw color option to \tn{bid},
                             change \texttt{pos} to clist and
                             set default bid draw color to \texttt{innerdrawcolor}.}
\changes{v1.1.3}{2024/09/04}{add highlight to bid(s)}

\subsubsection{\tn{bid}ç®—ç&nbsp;ç€è‰²å‘½ä»¤}

\begin{function}{\bid}
  \begin{syntax}
    \cs{bid} \marg{æ¡£ä½ç¼–å·}\marg{ä½ç½®åˆ—è¡¨}\marg{å¡«å……é¢œè‰²}\oarg{ç»˜åˆ¶é¢œè‰²}
  \end{syntax}
\end{function}

  ç”¨äºŽå°†\marg{æ¡£ä½ç¼–å·}æŒ‡å®šçš„æ¡£ä½ä¸­ï¼Œç”¨é€—å·åˆ†éš”çš„\marg{ä½ç½®åˆ—è¡¨}ä¸­
  æŒ‡å®šçš„æ‰€æœ‰ç®—ç&nbsp;çš„å¡«å……è‰²è®¾ç½®ä¸º\marg{å¡«å……é¢œè‰²}æŒ‡å®šçš„é¢œè‰²ï¼Œå°†å…¶ç»˜åˆ¶
  é¢œè‰²è®¾ç½®ä¸ºå¯é€‰é¡¹\oarg{ç»˜åˆ¶é¢œè‰²}(é»˜è®¤ä¸ºå†…ç&nbsp;ç»˜åˆ¶é¢œè‰²)ã€‚

  ä¸€ä¸ªæ¡£ä½ä¸­çš„\marg{ç®—ç&nbsp;ä½ç½®}è‡ªä¸‹å‘ä¸Šï¼ŒæŒ‰\enquote{$1, 2, \cdots, 11$}%
  çš„é¡ºåºè¿›è¡Œç¼–å·ã€‚å…¶ä¸­ä¸‹ç&nbsp;å&nbsp;\enquote{$1, 2, \cdots, 7$}çš„ä½ç½®ï¼Œä¸Šç&nbsp;å&nbsp;
  \enquote{$8, 9, 10$}çš„ä½ç½®ï¼Œæ‚¬ç&nbsp;å&nbsp;\enquote{$11$}çš„ä½ç½®ã€‚

\begin{SideBySideExample}[frame=single,numbers=left,%
    xrightmargin=.48\linewidth,gobble=2]
  \centering
  \suanpanset{scale = 0.65}
  \begin{suanpan}
    \rods{0, 0, 7, 11, 8, 19}
    \bid{1}{1}{brown5}
    \bid{2}{5}{brown5}
    \bid{3}{6}{red5}
    \bid{4}{7}{red5}
    \bid{4}{8}{azure5}
    \bid{4}{9}{yellow5}
    \bid{5}{10}{violet5}
    \bid{6}{4,5,6,11}{teal4}[magenta5]
  \end{suanpan}
\end{SideBySideExample}

\changes{v1.1.0}{2024/08/28}{adde \tn{bids} macro.}
\changes{v1.1.3}{2024/09/01}{change \tn{bids} macro inner bids draw color to
                             \texttt{innerdrawcolor} and outter bids draw
                             color to \texttt{outerdrawcolor}.}

\subsubsection{\tn{bids}å†…ç&nbsp;æˆ–å¤–ç&nbsp;ç€è‰²å‘½ä»¤}

\begin{function}{\bids}
  \begin{syntax}
    \cs{bids} \marg{æ¡£ä½ç¼–å·}\marg{æ¡£ä½æ•°å­—}\marg{å¡«å……é¢œè‰²}
  \end{syntax}
\end{function}

  ç”¨äºŽå°†\marg{æ¡£ä½ç¼–å·}æŒ‡å®šçš„æ¡£ä½ä¸­ï¼Œæ‰€æœ‰\marg{æ¡£ä½æ•°å­—}çš„å†…ç&nbsp;
  è®¾ç½®ä¸º\marg{å¡«å……é¢œè‰²}æŒ‡å®šçš„é¢œè‰²ã€‚åŒæ—¶ï¼Œè¯¥å‘½ä»¤è¿˜å°†
  ç®—ç&nbsp;ç»˜åˆ¶é¢œè‰²è®¾ç½®å†…ç&nbsp;ç»˜åˆ¶é¢œè‰²(\texttt{innerdrawcolor})ã€‚

  å®åŒ…è¿˜ä¸º\tn{bids}å‘½ä»¤åŒæ—¶æä¾›äº†\tn{bids*}æ˜Ÿå·å‘½ä»¤ç”¨äºŽè®¾ç½®è¯¥æ¡£
  æ‰€æœ‰å¤–ç&nbsp;çš„é¢œè‰²ã€‚æ­¤æ—¶ï¼Œç®—ç&nbsp;ç»˜åˆ¶é¢œè‰²è®¾ç½®å¤–ç&nbsp;ç»˜åˆ¶é¢œè‰²
  (\texttt{outerdrawcolor})ã€‚

  \begin{notezh}
    è¯¥å‘½ä»¤åªèƒ½é€‰æ‹©å†…ç&nbsp;æˆ–å¤–ç&nbsp;è¿›è¡Œç€è‰²ï¼Œä¸èƒ½åŒæ—¶é€‰æ‹©å†…ç&nbsp;å’Œå¤–ç&nbsp;ã€‚
  \end{notezh}

\begin{SideBySideExample}[frame=single,numbers=left,%
    xrightmargin=.48\linewidth,gobble=2]
  \centering
  \suanpanset{scale = 0.65}
  \begin{suanpan}
    \rods{0, 0, 7, 11, 8, 19}
    \bids{3}{7}{teal4}
    \bids*{5}{8}{azure5}
  \end{suanpan}
\end{SideBySideExample}

\changes{v1.2.0}{2024/09/04}{add \tn{rodmark} macro for marking rod(s) on beams.}

\subsubsection{\tn{rodmark}æ¨ªæ¢æ&nbsp;‡è®°å‘½ä»¤}

\begin{function}{\rodmark}
  \begin{syntax}
    \cs{rodmark} \oarg{èµ·å§‹æ¡£ä½}\marg{æ&nbsp;‡è®°åˆ—è¡¨}
  \end{syntax}
\end{function}

  ç”¨äºŽä»Ž\oarg{èµ·å§‹æ¡£ä½}å¯é€‰é¡¹æŒ‡å®šçš„æ¡£ä½å¼€å§‹ï¼Œç”¨\marg{æ&nbsp;‡è®°åˆ—è¡¨}%
  ä¸­é€—å·åˆ†éš”çš„æ&nbsp;‡è®°åœ¨ç®—ç›˜æ¨ªæ¢ä¸Šä¸ºå„æ¡£ä½æ·»åŠ&nbsp;æ&nbsp;‡è®°ã€‚

  \begin{notezh}
    å¦‚æžœ\marg{æ&nbsp;‡è®°åˆ—è¡¨}ä¸­çš„æ&nbsp;‡è®°æ•°é‡è¶…å‡ºä»Ž\oarg{èµ·å§‹æ¡£ä½}å¼€å§‹çš„
    æ¡£ä½æ•°ï¼Œå¤šä½™çš„æ&nbsp;‡è®°å°†è¢«å¿½ç•¥ã€‚åœ¨\marg{æ&nbsp;‡è®°åˆ—è¡¨}ä¸­ï¼Œå¯ä»¥ç”¨ä¸€
    å¯¹``\{\}''åˆ†ç»„ç¬¦å·è¡¨ç¤ºç©ºç™½æ&nbsp;‡è®°ã€‚
  \end{notezh}

\begin{SideBySideExample}[frame=single,numbers=left,%
    xrightmargin=.48\linewidth,gobble=2]
  \centering
  \suanpanset{scale = 0.65}
  \begin{suanpan}
    \rods{0, 2, 6, 6, 9, 0}
    \rodmark{4,{},2,1,0,-1,-2}
  \end{suanpan}
\end{SideBySideExample}

\begin{SideBySideExample}[frame=single,numbers=left,%
    xrightmargin=.48\linewidth,gobble=2]
  \centering
  \suanpanset{scale = 0.65}
  \begin{suanpan}
    \rods{0, 2, 6, 6, 9, 0}
    \rodmark[2]{åƒ,ç™¾,å,ä¸ª}
  \end{suanpan}
\end{SideBySideExample}

\changes{v1.1.3}{2024/09/04}{highlight all frame and remove arguments of \tn{lrframe},
                             at the same time change \tn{lrframe} to \tn{mkframe}.}

\subsubsection{\tn{mkframe}è¾¹æ¡†æŽ’ç‰ˆå‘½ä»¤}

\begin{function}{\mkframe}
  \begin{syntax}
    \cs{mkframe}
  \end{syntax}
\end{function}

  ç”¨äºŽæŽ’ç‰ˆç®—ç›˜çš„è¾¹æ¡†ã€‚

\begin{SideBySideExample}[frame=single,numbers=left,%
    xrightmargin=.48\linewidth,gobble=2]
  \centering
  \suanpanset{scale = 0.65}
  \begin{suanpan}
    \rods{0, 6, 12, 18, 0}
    \mkframe
  \end{suanpan}
\end{SideBySideExample}

\subsection{\tn{suanpanset}é€‰é¡¹è®¾ç½®å‘½ä»¤}

\begin{function}{\suanpanset}
  \begin{syntax}
    \cs{suanpanset} \marg{å¤–è§‚é€‰é¡¹}
  \end{syntax}
\end{function}

  é€šè¿‡\marg{å¤–è§‚é€‰é¡¹}çš„key-valueé€‰é¡¹è®¾ç½®ç®—ç›˜çš„ç®—ç&nbsp;ã€è¾¹æ¡†ç­‰å…ƒç´&nbsp;çš„
  ç»˜åˆ¶é¢œè‰²ã€å¡«å……é¢œè‰²ã€çº¿æ¡å®½åº¦ï¼›å„æ¡£ä½ä¹‹é—´çš„é—´è·ã€ç®—ç&nbsp;ä¹‹é—´çš„é—´è·ï¼›
  ç®—ç›˜æ•´ä½“çš„ç¼©æ”¾æ¯”ä¾‹ç­‰å¤–è§‚å±žæ€§ã€‚

  é€šè¿‡\cs{suanpan}\marg{å¤–è§‚é€‰é¡¹}è®¾ç½®çš„å¤–è§‚å±žæ€§å¯¹åŽç»­æ‰€æœ‰ç®—ç›˜æŽ’ç‰ˆ
  æ“ä½œæœ‰æ•ˆã€‚

  % \begin{notezh}
  %   ç”±äºŽ\pkg{suanpan-l3}å®åŒ…æ¶‰åŠå¤§é‡ç»˜å›¾æ“ä½œï¼Œå›&nbsp;æ­¤å»ºè®®å°½é‡å‡å°‘åœ¨æ¯ä¸ª
  %   \env{suanpan}æŽ’ç‰ˆçŽ¯å¢ƒçš„å¯é€‰é¡¹ä¸­ä½¿ç”¨\oarg{å¤–è§‚é€‰é¡¹}è®¾ç½®ï¼Œä»¥
  %   èŠ‚çº¦ç¼–è¯‘æ—¶é—´ã€‚å¦‚éœ€è¦æ›´æ”¹ç®—ç›˜å¤–è§‚ï¼Œå¯ä»¥åœ¨å¼•ç”¨å®åŒ…æ—¶ï¼Œé€šè¿‡ä¸ºå®åŒ…
  %   æ·»åŠ&nbsp;é€‰é¡¹å®žçŽ°ï¼Œä¹Ÿå¯ä»¥æ‰§è¡Œ\tn{suanpanset}å‘½ä»¤è¿›è¡Œå¿…è¦çš„
  %   å…¨å±€è®¾ç½®æˆ–åœ¨ä¸€å®šèŒƒå›´å†…è¿›è¡Œç»Ÿä¸€è®¾ç½®ã€‚
  % \end{notezh}

\section{å®åŒ…é€‰é¡¹}

åœ¨\pkg{suanpan-l3}å®åŒ…ä¸­ï¼Œç®—ç›˜é¢œè‰²ã€çº¿æ¡å®½åº¦ã€æ¡£ä½åŠç®—ç&nbsp;é—´è·ç­‰
ç®—ç›˜å¤–è§‚å±žæ€§å¯ä»¥åœ¨å¼•å…¥å®åŒ…æ—¶é€šè¿‡\oarg{å®åŒ…é€‰é¡¹}è¿›è¡Œè®¾ç½®ï¼Œ
ä¹Ÿå¯ä»¥åœ¨\env{suanpan}çŽ¯å¢ƒçš„\oarg{å¤–è§‚é€‰é¡¹}ä¸­è¿›è¡Œå±€éƒ¨è®¾ç½®ï¼Œ
è¿˜å¯ä»¥é€šè¿‡\cs{suanpanset}å‘½ä»¤è¿›è¡Œå…¨å±€æˆ–å±€éƒ¨è®¾ç½®ã€‚

å¼ºçƒˆå»ºè®®åœ¨å¼•ç”¨å®åŒ…æ—¶é€šè¿‡\oarg{å®åŒ…é€‰é¡¹}ä¸ºä¸€ä¸ªæ–‡æ¡£ç»Ÿä¸€å…¨å±€è®¾ç½®
ç®—ç›˜å¤–è§‚å±žæ€§ï¼Œä»¥èŠ‚çº¦ç¼–è¯‘æ—¶é—´ã€‚åº”é¿å…é¢‘ç¹\env{suanpan}çŽ¯å¢ƒä¸­ä½¿ç”¨
\oarg{å®åŒ…é€‰é¡¹}æˆ–ä½¿ç”¨\cs{suanpanset}å‘½ä»¤è®¾ç½®ç®—ç›˜å¤–è§‚å±žæ€§ã€‚

\pkg{suanpan-l3}å®åŒ…é€‰é¡¹æ˜¯ä¸€ä¸ªè‹±æ–‡é€—å·åˆ†éš”çš„é€‰é¡¹åˆ—è¡¨ï¼Œå…¶
é€‰é¡¹æ˜¯\marg{key}|=|\marg{value}å½¢å¼ã€‚éƒ¨åˆ†é€‰é¡¹çš„\marg{value}å¯ä»¥çœç•¥ã€‚
å¯¹äºŽåŒä¸€é€‰é¡¹ï¼ŒåŽç»­è®¾ç½®ä¼šè¦†ç›–ä»¥å‰è®¾ç½®ã€‚

\pkg{suanpan-l3}å®åŒ…é‡‡ç”¨\LaTeX3é£Žæ&nbsp;¼çš„é”®å€¼è®¾ç½®ï¼Œæ”¯æŒä¸åŒç±»åž‹ä»¥åŠå¤šç§å±‚æ¬¡çš„
é€‰é¡¹è®¾å®šã€‚é”®å€¼åˆ—è¡¨ä¸­ï¼Œ``|=|''å·¦å³çš„ç©ºæ&nbsp;¼ä¸å½±å“è®¾ç½®ã€‚ä½†éœ€æ³¨æ„ï¼Œå‚æ•°åˆ—è¡¨ä¸­%
\textsf{ä¸å¯ä»¥å‡ºçŽ°ç©ºè¡Œ}ã€‚

å¸ƒå°”åž‹çš„å‚æ•°\marg{é€‰é¡¹}|=true|ä¸­çš„``|=true|''å¯ä»¥çœç•¥ã€‚

\changes{v1.2.1}{2024/09/05}{change bid(s) figure to a single
                             round cap line in draft and remove
                             all highlight of bid(s), rod(s) and
                             frame.}

\subsection{è‰ç¨¿æ¨¡å¼}

\begin{option}{ opt = draft, desc = {= \meta{è‰ç¨¿æ¨¡å¼}}, init=false }
  è®¾ç½®è‰ç¨¿æ¨¡å¼ã€‚
\end{option}

  \oarg{draft}é€‰é¡¹ä¼šå°†ç®—ç&nbsp;ç”¨åœ†è§’çº¿å†’ç›´çº¿å®žçŽ°ç»˜åˆ¶ï¼Œå–æ¶ˆæ‰€æœ‰é«˜å…‰æ•ˆæžœï¼Œ
  ä»Žè€ŒåŠ&nbsp;å¿«ç¼–è¯‘é€Ÿåº¦ã€‚åŒæ—¶ï¼Œ\oarg{draft}é€‰é¡¹è¿˜ä¼šå°†ç©ºæ¡£ç®—ç&nbsp;ç»˜åˆ¶é€‰é¡¹\oarg{empty}%
  è®¾ç½®ä¸º\texttt{false}ï¼Œä¹Ÿå°±æ˜¯ä¸ç»˜åˆ¶ç©ºæ¡£ä¸Šçš„ç®—ç&nbsp;ã€‚

  \begin{notezh}
    åœ¨è‰ç¨¿æ¨¡å¼ä¸‹ç®—ç›˜æŽ’ç‰ˆä¼šä¸ŽæœŸæœ›çš„æŽ’ç‰ˆç»“æžœæœ‰å‡ºå…¥ã€‚
  \end{notezh}

\begin{SideBySideExample}[frame=single,numbers=left,%
                xrightmargin=.53\linewidth,gobble=2]
  % \usepackage[draft]{suanpan}
  \centering
  \suanpanset{scale = 0.65}
  \begin{suanpan}[draft]
    \rods{0, 6, 12, 18, 0}
  \end{suanpan}
\end{SideBySideExample}

\changes{v1.1.2}{2024/08/31}{add empty option to remove bids on empty rod.}

\subsection{æ˜¯å¦ç»˜åˆ¶ç©ºæ¡£ç®—ç&nbsp;}

\begin{option}{ opt = empty, desc = {= \meta{ç©ºæ¡£}}, init=true }
  è®¾ç½®æ˜¯å¦ç»˜åˆ¶ç©ºæ¡£ç®—ç&nbsp;ã€‚
\end{option}

  \oarg{empty}é€‰é¡¹ç”¨äºŽé€‰æ‹©æ˜¯å¦ç»˜åˆ¶ç©ºæ¡£ä¸Šçš„ç®—ç&nbsp;ï¼Œå¦‚æžœä¸ç»˜åˆ¶ï¼Œ
  åœ¨ä¸€å®šç¨‹åº¦ä¸Šå¯ä»¥åŠ&nbsp;å¿«ç¼–è¯‘é€Ÿåº¦ã€‚

  \begin{notezh}
    å¦‚æœ‰éœ€è¦ï¼Œå¯ä»¥ä½¿ç”¨\tn{bid}æˆ–\tn{bids*}å‘½ä»¤ä¸ºç©ºæ¡£ç»˜åˆ¶ç®—ç&nbsp;ã€‚
  \end{notezh}

\begin{SideBySideExample}[frame=single,numbers=left,%
                xrightmargin=.53\linewidth,gobble=2]
  \centering
  \suanpanset{scale = 0.65}
  \begin{suanpan}[empty = false]
    \rods{0, 6, 12, 18, 0}
    \bids*{5}{0}{gray6}
  \end{suanpan}
\end{SideBySideExample}

\subsection{çº¿å®½}

\begin{option}{ opt = linewd, desc = {= \meta{çº¿å®½}}, init=2pt }
  è®¾ç½®ç®—ç›˜ç»˜åˆ¶ä¸­çš„çº¿å®½ã€‚
\end{option}

  \oarg{linewd}é€‰é¡¹ç”¨äºŽè®¾ç½®ç®—ç›˜è¾¹æ¡†å†…çº¿çº¿å®½ï¼ŒåŒæ—¶ä¼šå°†
  è¾¹æ¡†å¤–çº¿è®¾ç½®ä¸ºlinewdçš„7.00å€ï¼Œå°†æ¡£æ†å’Œç®—ç&nbsp;çº¿å®½
  è®¾ç½®ä¸ºlinewdçš„0.2å€ã€‚

\begin{SideBySideExample}[frame=single,numbers=left,%
                xrightmargin=.40\linewidth,gobble=2]
  \centering
  \suanpanset{scale = 0.65, linewd = 3pt}
  \begin{suanpan}
    \rods{0, 6, 12, 18, 0}
  \end{suanpan}
\end{SideBySideExample}

\changes{v1.2.2}{2024/09/07}{add bidh, bidd, rodd and framew options
                             to set the base size of suanpan.}

\subsection{ç®—ç&nbsp;é«˜åº¦}

\begin{option}{ opt = bidh, desc = {= \meta{ç®—ç&nbsp;é«˜åº¦}}, init=12mm }
  è®¾ç½®ç®—ç&nbsp;é«˜åº¦ã€‚
\end{option}

\begin{SideBySideExample}[frame=single,numbers=left,%
                xrightmargin=.40\linewidth,gobble=2]
  \centering
  \suanpanset{scale = 0.65, bidh = 18mm}
  \begin{suanpan}
    \rods{0, 6, 0}
  \end{suanpan}
\end{SideBySideExample}

\subsection{ç®—ç&nbsp;ç›´å¾„}

\begin{option}{ opt = bidd, desc = {= \meta{ç®—ç&nbsp;ç›´å¾„}}, init=23mm }
  è®¾ç½®ç®—ç&nbsp;ç›´å¾„ã€‚
\end{option}

\begin{SideBySideExample}[frame=single,numbers=left,%
                xrightmargin=.40\linewidth,gobble=2]
  \centering
  \suanpanset{scale = 0.65, bidd = 36mm}
  \begin{suanpan}
    \rods{0, 6, 0}
  \end{suanpan}
\end{SideBySideExample}

\subsection{æ¡£æ†ç›´å¾„}

\begin{option}{ opt = rodd, desc = {= \meta{æ¡£æ†ç›´å¾„}}, init=7mm }
  è®¾ç½®æ¡£æ†ç›´å¾„ã€‚
\end{option}

\begin{noteen}
  æ¡£æ†ç›´å¾„roddåº”è¯¥å°äºŽç®—ç&nbsp;ç›´å¾„biddã€‚
\end{noteen}

\begin{SideBySideExample}[frame=single,numbers=left,%
                xrightmargin=.40\linewidth,gobble=2]
  \centering
  \suanpanset{scale = 0.65, rodd = 3mm}
  \begin{suanpan}
    \rods{0, 6, 0}
  \end{suanpan}
\end{SideBySideExample}

\subsection{è¾¹æ¡†å®½åº¦}

\begin{option}{ opt = framew, desc = {= \meta{è¾¹æ¡†å®½åº¦}}, init=13mm }
  è®¾ç½®è¾¹æ¡†å®½åº¦ã€‚
\end{option}

\begin{SideBySideExample}[frame=single,numbers=left,%
                xrightmargin=.40\linewidth,gobble=2]
  \centering
  \suanpanset{scale = 0.65, framew = 7mm}
  \begin{suanpan}
    \rods{0, 6, 12, 18, 0}
    \mkframe
  \end{suanpan}
\end{SideBySideExample}

\subsection{æ¡£ä½é—´è·}

\begin{option}{ opt = rodsep, desc = {= \meta{æ¡£ä½é—´è·}}, init=3.0pt }
  è®¾ç½®ç®—ç›˜å„æ¡£é—´çš„é—´è·ã€‚
\end{option}

\begin{SideBySideExample}[frame=single,numbers=left,%
                xrightmargin=.40\linewidth,gobble=2]
  \centering
  \suanpanset{scale = 0.65, rodsep = 15pt}
  \begin{suanpan}
    \rods{0, 6, 0}
  \end{suanpan}
\end{SideBySideExample}

  \begin{notezh}
    ä¿®æ”¹æ¡£ä½é—´è·ä¼šæ”¹å˜ç®—ç›˜æŽ’ç‰ˆçš„å®½åº¦ã€‚
  \end{notezh}

\subsection{ç®—ç&nbsp;é—´è·}

\begin{option}{ opt = bidsep, desc = {= \meta{ç®—ç&nbsp;é—´è·}}, init=1.8pt }
  è®¾ç½®ç®—ç&nbsp;é—´çš„é—´è·ã€‚
\end{option}

\begin{SideBySideExample}[frame=single,numbers=left,%
                xrightmargin=.40\linewidth,gobble=2]
  \centering
  \suanpanset{scale = 0.65, bidsep = 4pt}
  \begin{suanpan}
    \rods{0, 6, 0}
  \end{suanpan}
\end{SideBySideExample}

  \begin{notezh}
    ä¿®æ”¹ç®—ç&nbsp;é—´è·ä¸ä¼šæ”¹å˜ç®—ç›˜çš„å°ºå¯¸ï¼Œä½†ç®—ç&nbsp;é«˜åº¦ä¼šå‘ç”Ÿå˜åŒ–ã€‚
    å¦å¤–ï¼Œè¿‡å°çš„ç®—ç&nbsp;é«˜åº¦ä¼šé€&nbsp;æˆç®—ç&nbsp;åœ†è§’çš„ç•¸å˜ã€‚
  \end{notezh}

\subsection{ç¼©æ”¾æ¯”ä¾‹}

\begin{option}{ opt = scale, desc = {= \meta{ç¼©æ”¾æ¯”ä¾‹}}, init=1.0 }
  è®¾ç½®ç®—ç›˜è¾“å‡ºç»“æžœçš„æ•´ä½“ç¼©æ”¾æ¯”ä¾‹ã€‚
\end{option}

\begin{SideBySideExample}[frame=single,numbers=left,%
                xrightmargin=.40\linewidth,gobble=2]
  \centering
  \suanpanset{scale = 1.20}
  \begin{suanpan}
    \rods{0, 6, 0}
  \end{suanpan}
\end{SideBySideExample}

\subsection{è¾¹æ¡†é¢œè‰²}

\begin{option}{ opt = framedraw, desc = {= \meta{è¾¹æ¡†é¢œè‰²}}, init=black }
  è®¾ç½®ç®—ç›˜è¾¹æ¡†é¢œè‰²ã€‚
\end{option}

\begin{SideBySideExample}[frame=single,numbers=left,%
                xrightmargin=.37\linewidth,gobble=2]
  \centering
  \suanpanset{scale = 0.65, framedraw = brown3}
  \begin{suanpan}
    \rods{0, 6, 0}
  \end{suanpan}
\end{SideBySideExample}

  \begin{notezh}
    è¾¹æ¡†é¢œè‰²åŒ…æ‹¬å†…å¤–è¾¹æ¡†å’Œæ¨ªæ¢é¢œè‰²ã€‚
  \end{notezh}

\subsection{æ¡£æ†ç»˜åˆ¶é¢œè‰²}

\begin{option}{ opt = roddraw, desc = {= \meta{æ¡£æ†ç»˜åˆ¶é¢œè‰²}}, init=black }
  è®¾ç½®æ¡£æ†ç»˜åˆ¶é¢œè‰²ã€‚
\end{option}

\begin{SideBySideExample}[frame=single,numbers=left,%
                xrightmargin=.37\linewidth,gobble=2]
  \centering
  \suanpanset{scale = 0.65, roddraw = red8}
  \begin{suanpan}
    \rods{0, 6, 0}
  \end{suanpan}
\end{SideBySideExample}

\subsection{æ¡£æ†å¡«å……é¢œè‰²}

\begin{option}{ opt = rodfill, desc = {= \meta{æ¡£æ†å¡«å……é¢œè‰²}}, init=white }
  è®¾ç½®æ¡£æ†å¡«å……é¢œè‰²ã€‚
\end{option}

\begin{SideBySideExample}[frame=single,numbers=left,%
                xrightmargin=.37\linewidth,gobble=2]
  \centering
  \suanpanset{scale = 0.65, rodfill = brown6}
  \begin{suanpan}
    \rods{0, 6, 0}
  \end{suanpan}
\end{SideBySideExample}

\subsection{å¤–ç&nbsp;ç»˜åˆ¶é¢œè‰²}

\begin{option}{ opt = outerdraw, desc = {= \meta{å¤–ç&nbsp;ç»˜åˆ¶é¢œè‰²}}, init=black }
  è®¾ç½®æ¡£æ†ä¸Šå¤–ç&nbsp;\footnote{å¤–ç&nbsp;æ˜¯æŒ‡ç¦»æ¢ä¸è®°æ•°çš„ç®—ç&nbsp;ã€‚}ç»˜åˆ¶é¢œè‰²ã€‚
\end{option}

\begin{SideBySideExample}[frame=single,numbers=left,%
                xrightmargin=.37\linewidth,gobble=2]
  \centering
  \suanpanset{scale = 0.65, outerdraw = red8}
  \begin{suanpan}
    \rods{0, 6, 0}
  \end{suanpan}
\end{SideBySideExample}

\subsection{å¤–ç&nbsp;å¡«å……é¢œè‰²}

\begin{option}{ opt = outerfill, desc = {= \meta{å¤–ç&nbsp;å¡«å……é¢œè‰²}}, init=black!40 }
  è®¾ç½®å¤–ç&nbsp;å¡«å……é¢œè‰²ã€‚
\end{option}

\begin{SideBySideExample}[frame=single,numbers=left,%
                xrightmargin=.37\linewidth,gobble=2]
  \centering
  \suanpanset{scale = 0.65, outerfill = yellow6}
  \begin{suanpan}
    \rods{0, 6, 0}
  \end{suanpan}
\end{SideBySideExample}

\subsection{å†…ç&nbsp;ç»˜åˆ¶é¢œè‰²}

\begin{option}{ opt = innerdraw, desc = {= \meta{å†…ç&nbsp;ç»˜åˆ¶é¢œè‰²}}, init=black }
  è®¾ç½®æ¡£æ†ä¸Šå†…ç&nbsp;\footnote{å†…ç&nbsp;æ˜¯æŒ‡é&nbsp;æ¢è®°æ•°çš„ç®—ç&nbsp;ã€‚}ç»˜åˆ¶é¢œè‰²ã€‚
\end{option}

\begin{SideBySideExample}[frame=single,numbers=left,%
                xrightmargin=.37\linewidth,gobble=2]
  \centering
  \suanpanset{scale = 0.65, innerdraw = red8}
  \begin{suanpan}
    \rods{0, 6, 0}
  \end{suanpan}
\end{SideBySideExample}

\subsection{å†…ç&nbsp;å¡«å……é¢œè‰²}

\begin{option}{ opt = innerfill, desc = {= \meta{å†…ç&nbsp;å¡«å……é¢œè‰²}}, init=black}
  è®¾ç½®å†…ç&nbsp;å¡«å……é¢œè‰²ã€‚
\end{option}

\begin{SideBySideExample}[frame=single,numbers=left,%
                xrightmargin=.37\linewidth,gobble=2]
  \centering
  \suanpanset{scale = 0.65, innerfill = red5}
  \begin{suanpan}
    \rods{0, 6, 0}
  \end{suanpan}
\end{SideBySideExample}

\changes{v1.2.2}{2024/09/07}{add font option
                             to set the font of mark.}
\subsection{æ&nbsp;‡è®°å­—ä½“}

\begin{option}{ opt = font, desc = {= \meta{æ&nbsp;‡è®°å­—ä½“}}, init=\tn{bfseries}\tn{Large} }
  è®¾ç½®æ&nbsp;‡è®°å­—ä½“ã€‚
\end{option}

\begin{SideBySideExample}[frame=single,numbers=left,%
                xrightmargin=.40\linewidth,gobble=2]
  \centering
  \suanpanset{scale = 0.65,
              font=\rmfamily\Huge}
  \begin{suanpan}
    \rods{0, 2, 6, 6, 9, 0}
    \rodmark{4,3,2,1,0,-1}
  \end{suanpan}
\end{SideBySideExample}

\changes{v1.2.3}{2024/09/10}{change bid's highlight to shading=ball
                             and add bidspot option to set the angle
                             of shading.}

\subsection{é«˜å…‰ä½ç½®(è§’åº¦)}

\begin{option}{ opt = bidspot, desc = {= \meta{é«˜å…‰ä½ç½®}}, init=0 }
  è®¾ç½®ç®—ç&nbsp;é«˜å…‰ç‚¹çš„ä½ç½®ï¼Œç”¨è§’åº¦è¡¨ç¤ºï¼Œé€†æ—¶é’ˆä¸ºæ­£ã€‚
\end{option}

\begin{SideBySideExample}[frame=single,numbers=left,%
    xrightmargin=.45\linewidth,gobble=2]
  \centering
  \suanpanset{scale = 0.65, bidspot = 180}
  \begin{suanpan}
    \rods{0, 0, 7, 11, 8, 19}
    \bid{1}{1}{brown5}
    \bid{2}{5}{brown5}
    \bid{3}{6}{red5}
    \bid{4}{7}{red5}
    \bid{4}{8}{azure5}
    \bid{4}{9}{yellow5}
    \bid{5}{10}{violet5}
    \bid{6}{4,5,6,11}{teal4}[magenta5]
  \end{suanpan}
\end{SideBySideExample}

\bigskip

\changes{v1.1.1}{2024/08/30}{add English documentation.}

\title{
  \pkg{suanpan-l3} package for traditional Chinese 7-bids suanpan(abacus)
  \rlap{\makebox[4cm][r]{
    \normalsize $\Longrightarrow$ \color{red}
    \protect\hyperlink{zh}{ä¸­æ–‡ç‰ˆæœ¬}
    \protect\hypertarget{en}{}
  }}
}
\author{Nan Geng \texttt{&lt;nangeng@nwafu.edu.cn&gt;}}
\date{\today\qquad \vers}

\maketitle

\section{Introduction}

\pkg{suanpan-l3} is a traditional Chinese 7-bids suanpan drawing package
utilizes \pkg{l3draw} and \pkg{TikZ} and is developed with \pkg{Expl3}.
It can effectively manage both upper and lower bids, while also considering
bottom bid, top bid, and hanging bid.

This package offers a unique environment for drawing suanpan,
denoted as \env{suanpan}. Within this environment, 8 specialized macros
are available for the creation of suanpan. The \tn{rod} macro is used
to lay out a single rod, while the \tn{rod*} macro draws a counting point
on this rodâ€™s beam. The \tn{rods} macro is capable of laying out a set of rods.
The \tn{bid} macro colors the specified bid. The \tn{bids} macro colors
all inner bids that are near the beam, while the \tn{bids*} macro colors
all outer bids that are far from the beam. The \tn{rodmark} macro mark all rods
on beam. Lastly, the \tn{mkframe} macro
is used to lay out the left and right frames of an abacus.

At the same time, the package offers customization options for suanpan,
including line width, draw color, fill color, bid space, rod space, etc.
These can be configured through package options, \env{suanpan} environment
options, or the \tn{suanpanset} macro.

\begin{center}
  \begin{suanpan}[framedraw = brown2, scale = 0.45, bidsep=1.5pt,
                  roddraw = brown3, rodfill = brown4]
    % rod's val list
    \rods{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20}
    % counting point
    \rod*{4}{3}
    \rod*{18}{17}
    % top bid
    \bid{12}{9}{azure5}
    \bid{13}{9}{azure5}
    \bid{14}{9}{azure5}
    \bid{15}{9}{azure5}
    \bid{16}{9}{azure5}
    % hanging bid
    \bid{17}{11}{red5}
    \bid{18}{11}{red5}
    \bid{19}{11}{red5}
    \bid{20}{11}{red5}
    \bid{21}{11}{red5}
    % bottom bid
    \bid{11}{3}{olive5}
    \bid{16}{3}{olive5}
    \bid{21}{3}{olive5}
    \rodmark{21,20,19,{},17,16,15,14,13,12,11,10,9,8,7,6,5,{},3,2,1}
    \mkframe
  \end{suanpan}
\end{center}

\section{Interface}

\subsection{\env{suanpan} environment}

\begin{function}{suanpan}
  \begin{syntax}
    \tn{begin}|{suanpan}|\oarg{options}
    .....
    \tn{end}|{suanpan}|
  \end{syntax}
\end{function}

  Typesetting 7-bids Chinese suanpan with \oarg{options}.

  Within the \env{suanpan} environment, \tn{rod}, \tn{rod*}, \tn{rods}, \tn{bid},
  \tn{bids}, \tn{bids*}, \tn{rodmark} and \tn{mkframe} 8 specialized macros
  are available for the creation of suanpan.

  \oarg{options} is a key-value list for line width, draw color, fill color,
  bid space, rod space, etc.

  \oarg{options} is environment's local setting.

  \begin{noteen}
    You should remove all blank line in \env{suanpan} environment.
  \end{noteen}

\begin{SideBySideExample}[frame=single,numbers=left,%
    xrightmargin=.48\linewidth,gobble=2]
  \centering
  \suanpanset{scale = 0.65}
  \begin{suanpan}
    \rod{1}{0}
    \rod{2}{3}
    \rod{3}{0}
  \end{suanpan}
\end{SideBySideExample}

\subsection{\env{suanpan}'s specialized macros}

\subsubsection{\tn{rod}---single rod}

\begin{function}{\rod}
  \begin{syntax}
    \cs{rod} \marg{num} \marg{val}
  \end{syntax}
\end{function}

  The \tn{rod} macro is used to lay out a single rod.

  The \marg{num} argument numbers the rods from left to right.
  The \marg{val} is the number to be represented on the rod from
  0 to 20. For number within [0, 9], it is represented using 4 lower deck
  bids and 1 upper deck bid. Numbers within [10, 15] are represented additionally
  using bottom bid and top bid. For numbers within [16, 20], hanging bid is also
  required for representation.

  The starred version \tn{rod*} will draw a counting point on this rod's beam.

\begin{SideBySideExample}[frame=single,numbers=left,%
    xrightmargin=.48\linewidth,gobble=2]
  \centering
  \suanpanset{scale = 0.65}
  \begin{suanpan}
    \rod{1}{1}   % normal rod
    \rod{2}{6}
    \rod*{3}{10} % counting point and
                 % bottom bid
    \rod{4}{12}  % top bid
    \rod{5}{18}  % hanging bid
  \end{suanpan}
\end{SideBySideExample}

\subsubsection{\tn{rods}---a set of rods}

\begin{function}{\rods}
  \begin{syntax}
    \cs{rods} \marg{val list}
  \end{syntax}
\end{function}

  The \tn{rods} macro is used to lay out a set of rods.

  The \marg{val list} is a value list of each rod seperated by commas.
  Each rod number is automatically numbered from left to right.

  Each value in \marg{val list} is the number to be represented on the rod from
  0 to 20. For number within [0, 9], it is represented using 4 lower deck
  bids and 1 upper deck bid. Numbers within [10, 15] are represented additionally
  using bottom bid and top bid. For numbers within [16, 20], hanging bid is also
  required for representation.

  \begin{noteen}
    The starred version \tn{rods*} for counting point is not provided.
    Use the \tn{rod*} macro to overlay the specified rod for drawing.
  \end{noteen}

\begin{SideBySideExample}[frame=single,numbers=left,%
    xrightmargin=.48\linewidth,gobble=2]
  \centering
  \suanpanset{scale = 0.65}
  \begin{suanpan}
    \rods{0, 6, 12, 18, 0}
    \rod*{3}{12}
  \end{suanpan}
\end{SideBySideExample}

\subsubsection{\tn{bid}---color bid}

\begin{function}{\bid}
  \begin{syntax}
    \cs{bid} \marg{num}\marg{pos list}\marg{fill color}\oarg{draw color}
  \end{syntax}
\end{function}

  The \tn{bid} macro fills the specified bid.

  The \marg{num} is the same as for \tn{rod}; the \marg{fill color} argument
  defines the fill color and the comma-seperated \marg{pos list} argument tells
  which bid has to be colored in \marg{num} rod. The \oarg{draw color} option
  gives the draw color(default is inner bid draw color) .

  The \marg{pos} in a rod is numbered from the bottom up in the order
  $1, 2, \cdots, 11$. The lower deck bids occupies position
  $1, 2, \cdots, 7$, the upper deck bids occupies position $8, 9, 10$,
  and the hanging bead occupies position $11$ between $9$ and $10$ .

\begin{SideBySideExample}[frame=single,numbers=left,%
    xrightmargin=.48\linewidth,gobble=2]
  \centering
  \suanpanset{scale = 0.65}
  \begin{suanpan}
    \rods{0, 0, 7, 11, 8, 19}
    \bid{1}{1}{brown5}
    \bid{2}{5}{brown5}
    \bid{3}{6}{red5}
    \bid{4}{7}{red5}
    \bid{4}{8}{azure5}
    \bid{4}{9}{yellow5}
    \bid{5}{10}{violet5}
    \bid{6}{4,5,6,11}{teal4}[magenta5]
  \end{suanpan}
\end{SideBySideExample}

\subsubsection{\tn{bids}---color inner/outer bids}

\begin{function}{\bids}
  \begin{syntax}
    \cs{bids} \marg{num}\marg{val}\marg{color}
  \end{syntax}
\end{function}

  The \tn{bids} macro fills all inner bids that are near the beam.

  \marg{num} and \marg{color} are the same as for \tn{bid};
  the \marg{val} argument is the same as for \tn{rod}.

  The \marg{color} is fill color for inner bids. it also set
  \texttt{innercolor} to be used for inner bids drawing color.

  The starred version \tn{bids*} is used to color outer bids of \marg{num} rod.
  it also set \texttt{outercolor} to be used for inner bids drawing color.

  \begin{noteen}
    This macro can only select the inner bids or the outer bids for coloring,
    you can't select both the inner and outer bids at the same time.
  \end{noteen}

\begin{SideBySideExample}[frame=single,numbers=left,%
    xrightmargin=.48\linewidth,gobble=2]
  \centering
  \suanpanset{scale = 0.65}
  \begin{suanpan}
    \rods{0, 0, 7, 11, 8, 19}
    \bids{3}{7}{teal4}
    \bids*{5}{8}{azure5}
  \end{suanpan}
\end{SideBySideExample}

\subsubsection{\tn{rodmark} rod(s) marking on beam}

\begin{function}{\rodmark}
  \begin{syntax}
    \cs{rodmark} \oarg{st}\marg{maker list}
  \end{syntax}
\end{function}

  The \tn{rodmark} macro marks the rod(s) on the beam.

  The \oarg{st} argument is the start rod and \marg{marker list}
  is the marker list.

  \begin{noteen}
    If the number of \marg{marker List} exceeds the number of
    rods from \oarg{st}, the excess markers will be ignored.
    In the \marg{marker list}, it is possible to use a pair of
    ``\{\}'' grouping to indicate blank marker.
  \end{noteen}

\begin{SideBySideExample}[frame=single,numbers=left,%
    xrightmargin=.48\linewidth,gobble=2]
  \centering
  \suanpanset{scale = 0.65}
  \begin{suanpan}
    \rods{0, 2, 6, 6, 9, 0}
    \rodmark{4,{},2,1,0,-1,-2}
  \end{suanpan}
\end{SideBySideExample}

\begin{SideBySideExample}[frame=single,numbers=left,%
    xrightmargin=.48\linewidth,gobble=2]
  \centering
  \suanpanset{scale = 0.65}
  \begin{suanpan}
    \rods{0, 2, 6, 6, 9, 0}
    \rodmark[2]{Q,C,X,I}
  \end{suanpan}
\end{SideBySideExample}

\subsubsection{\tn{mkframe}---layout frame}

\begin{function}{\mkframe}
  \begin{syntax}
    \cs{mkframe}
  \end{syntax}
\end{function}

  The \tn{mkframe} macro is used to lay out the frames of
  a suanpan.

\begin{SideBySideExample}[frame=single,numbers=left,%
    xrightmargin=.48\linewidth,gobble=2]
  \centering
  \suanpanset{scale = 0.65}
  \begin{suanpan}
    \rods{0, 6, 12, 18, 0}
    \mkframe
  \end{suanpan}
\end{SideBySideExample}

\subsection{\tn{suanpanset}}

\begin{function}{\suanpanset}
  \begin{syntax}
    \cs{suanpanset} \marg{options}
  \end{syntax}
\end{function}

  The \tn{suanpanset} macro offers customization options for suanpan,
  including line width, draw color, fill color, bid space, rod space, etc.

  The \marg{options} is a key-value list.

  The \marg{options} seted by the \cs{suanpanset} are valid for
  all subsequent \env{suanpan} environments.

\section{options}

The \pkg{suanpan-l3} package offers customization options for abacus,
including line width, draw color, fill color, bid space, rod space, etc.
These can be configured through package \oarg{options}, \env{suanpan}
environment \oarg{options}, or the \tn{suanpanset} macro.

It is strongly recommended that suanpan options be set globally
for a document uniformly via \oarg{options} of packages to save compilation time.
Frequent use of \oarg{options} in \env{suanpan} environments or
use of the \tn{suanpanset} command to set suanpan options should be avoided.

The \oarg{options} is a comma-seperated list of options in the form
\marg{key}|=|\marg{value}. The \marg{value} can be omitted for some options.
For the same option, subsequent settings will override the previous one.

The \pkg{suanpan-l3} package uses \LaTeX3 style key settings,
supporting different types and levels of options. In the key list,
spaces around ``='' do not affect the settings.
However, it is important to note that blank lines are not allowed in the list.

The ``|=true|'' in the \marg{option}|=true| for Boolean types can be omitted.

\subsection{draft}

\begin{option}{ opt = draft, desc = {= \meta{draft}}, init=false }
  Draft mode.
\end{option}

  The \oarg{draft} option speeds up compilation by drawing
  bids using round cap line, at same time it will remove all
  highlight of bid(s), rod(s) and frame.

  At the same time \oarg{draft} option will set the \oarg{empty} option
  to \texttt{false} to remove all bids on empty rod.

  \begin{noteen}
    Suanpan layout in draft mode may differ from the desired layout.
  \end{noteen}

\begin{SideBySideExample}[frame=single,numbers=left,%
                xrightmargin=.53\linewidth,gobble=2]
  % \usepackage[draft]{suanpan}
  \centering
  \suanpanset{scale = 0.65}
  \begin{suanpan}[draft]
    \rods{0, 6, 12, 18, 0}
  \end{suanpan}
\end{SideBySideExample}

\subsection{empty}

\begin{option}{ opt = empty, desc = {= \meta{empty}}, init=true }
  Remove bids on empty rod or not.
\end{option}

  The \oarg{empty} option will remove all bids on empty rod.

  \begin{noteen}
    If necessary, you can use the \tn{bid} or \tn{bids*} macro to
    draw bid(s) for the empty rod.
  \end{noteen}

\begin{SideBySideExample}[frame=single,numbers=left,%
                xrightmargin=.53\linewidth,gobble=2]
  \centering
  \suanpanset{scale = 0.65}
  \begin{suanpan}[empty=false]
    \rods{0, 6, 12, 18, 0}
    \bids*{5}{0}{gray6}
  \end{suanpan}
\end{SideBySideExample}

\subsection{line width}

\begin{option}{ opt = linewd, desc = {= \meta{linewd}}, init=2pt }
  Drawing line width.
\end{option}

  The \oarg{linewd} is used to set the line width of the frame inner,
  and will also set the line width the frame outer to 7.00 times linewd,
  and the rod and bid line widths to 1.00 times linewd.

\begin{SideBySideExample}[frame=single,numbers=left,%
                xrightmargin=.40\linewidth,gobble=2]
  \centering
  \suanpanset{scale = 0.65, linewd = 3pt}
  \begin{suanpan}
    \rods{0, 6, 12, 18, 0}
  \end{suanpan}
\end{SideBySideExample}

\subsection{bid height}

\begin{option}{ opt = bidh, desc = {= \meta{bidh}}, init=12mm }
  The height of bid.
\end{option}

\begin{SideBySideExample}[frame=single,numbers=left,%
                xrightmargin=.40\linewidth,gobble=2]
  \centering
  \suanpanset{scale = 0.65, bidh = 18mm}
  \begin{suanpan}
    \rods{0, 6, 0}
  \end{suanpan}
\end{SideBySideExample}

\subsection{bid diameter}

\begin{option}{ opt = bidd, desc = {= \meta{bidd}}, init=23mm }
  The diameter of bid.
\end{option}

\begin{SideBySideExample}[frame=single,numbers=left,%
                xrightmargin=.40\linewidth,gobble=2]
  \centering
  \suanpanset{scale = 0.65, bidd = 36mm}
  \begin{suanpan}
    \rods{0, 6, 0}
  \end{suanpan}
\end{SideBySideExample}

\subsection{rod diameter}

\begin{option}{ opt = rodd, desc = {= \meta{rodd}}, init=7mm }
  The diameter of rod.
\end{option}

\begin{noteen}
  The rodd should be smaller than the bidd.
\end{noteen}

\begin{SideBySideExample}[frame=single,numbers=left,%
                xrightmargin=.40\linewidth,gobble=2]
  \centering
  \suanpanset{scale = 0.65, rodd = 3mm}
  \begin{suanpan}
    \rods{0, 6, 0}
  \end{suanpan}
\end{SideBySideExample}

\subsection{frame width}

\begin{option}{ opt = framew, desc = {= \meta{framew}}, init=13mm }
  The width of frame.
\end{option}

\begin{SideBySideExample}[frame=single,numbers=left,%
                xrightmargin=.40\linewidth,gobble=2]
  \centering
  \suanpanset{scale = 0.65, framew = 7mm}
  \begin{suanpan}
    \rods{0, 6, 12, 18, 0}
    \mkframe
  \end{suanpan}
\end{SideBySideExample}

\subsection{rod spacing}

\begin{option}{ opt = rodsep, desc = {= \meta{rodsep}}, init=3.0pt }
  The spacing between suanpan rods.
\end{option}

\begin{SideBySideExample}[frame=single,numbers=left,%
                xrightmargin=.40\linewidth,gobble=2]
  \centering
  \suanpanset{scale = 0.65, rodsep = 15pt}
  \begin{suanpan}
    \rods{0, 6, 0}
  \end{suanpan}
\end{SideBySideExample}

  \begin{noteen}
    The \oarg{rodsep} will change the width of the suanpan.
  \end{noteen}

\subsection{bid spacing}

\begin{option}{ opt = bidsep, desc = {= \meta{bidsep}}, init=1.8pt }
  The spacing between suanpan bids.
\end{option}

\begin{SideBySideExample}[frame=single,numbers=left,%
                xrightmargin=.40\linewidth,gobble=2]
  \centering
  \suanpanset{scale = 0.65, bidsep = 4pt}
  \begin{suanpan}
    \rods{0, 6, 0}
  \end{suanpan}
\end{SideBySideExample}

  \begin{noteen}
    The \oarg{bidsep} does not change the size of the suanpan.
    But the height of each bid will be changed.
    In addition, too small an bid height will cause distortion
    of the rounded corners of the bid.
  \end{noteen}

\subsection{scale}

\begin{option}{ opt = scale, desc = {= \meta{scale}}, init=1.0 }
  Scaling factor of whole suanpan.
\end{option}

\begin{SideBySideExample}[frame=single,numbers=left,%
                xrightmargin=.40\linewidth,gobble=2]
  \centering
  \suanpanset{scale = 1.20}
  \begin{suanpan}
    \rods{0, 6, 0}
  \end{suanpan}
\end{SideBySideExample}

\subsection{frame color}

\begin{option}{ opt = framedraw, desc = {= \meta{framedraw}}, init=black }
  Frame drawing color.
\end{option}

\begin{SideBySideExample}[frame=single,numbers=left,%
                xrightmargin=.37\linewidth,gobble=2]
  \centering
  \suanpanset{scale = 0.65, framedraw = brown3}
  \begin{suanpan}
    \rods{0, 6, 0}
  \end{suanpan}
\end{SideBySideExample}

  \begin{noteen}
    Frame colors include inner and outer of frame and beam colors.
  \end{noteen}

\subsection{rod drawing color}

\begin{option}{ opt = roddraw, desc = {= \meta{roddraw}}, init=black }
  Rod drawing color.
\end{option}

\begin{SideBySideExample}[frame=single,numbers=left,%
                xrightmargin=.37\linewidth,gobble=2]
  \centering
  \suanpanset{scale = 0.65, roddraw = red8}
  \begin{suanpan}
    \rods{0, 6, 0}
  \end{suanpan}
\end{SideBySideExample}

\subsection{rod filling color}

\begin{option}{ opt = rodfill, desc = {= \meta{rodfill}}, init=white }
  Rod filling color.
\end{option}

\begin{SideBySideExample}[frame=single,numbers=left,%
                xrightmargin=.37\linewidth,gobble=2]
  \centering
  \suanpanset{scale = 0.65, rodfill = brown6}
  \begin{suanpan}
    \rods{0, 6, 0}
  \end{suanpan}
\end{SideBySideExample}

\subsection{outer bids drawing color}

\begin{option}{ opt = outerdraw, desc = {= \meta{outerdraw}}, init=black }
  The outer bids\footnote{The outer bid is that is not counted away from the beam.}drawing color.
\end{option}

\begin{SideBySideExample}[frame=single,numbers=left,%
                xrightmargin=.37\linewidth,gobble=2]
  \centering
  \suanpanset{scale = 0.65, outerdraw = red8}
  \begin{suanpan}
    \rods{0, 6, 0}
  \end{suanpan}
\end{SideBySideExample}

\subsection{outer bids filling color}

\begin{option}{ opt = outerfill, desc = {= \meta{outerfill}}, init=black!40 }
  The outer bids filling colorã€‚
\end{option}

\begin{SideBySideExample}[frame=single,numbers=left,%
                xrightmargin=.37\linewidth,gobble=2]
  \centering
  \suanpanset{scale = 0.65, outerfill = yellow6}
  \begin{suanpan}
    \rods{0, 6, 0}
  \end{suanpan}
\end{SideBySideExample}

\subsection{inner bids drawing color}

\begin{option}{ opt = innerdraw, desc = {= \meta{innerdraw}}, init=black }
  The inner bids\footnote{The inner bid is that is counted near to the beam.}drawing color.
\end{option}

\begin{SideBySideExample}[frame=single,numbers=left,%
                xrightmargin=.37\linewidth,gobble=2]
  \centering
  \suanpanset{scale = 0.65, innerdraw = red8}
  \begin{suanpan}
    \rods{0, 6, 0}
  \end{suanpan}
\end{SideBySideExample}

\subsection{inner bids filling color}

\begin{option}{ opt = innerfill, desc = {= \meta{innerfill}}, init=black}
  The inner bids filling color.
\end{option}

\begin{SideBySideExample}[frame=single,numbers=left,%
                xrightmargin=.37\linewidth,gobble=2]
  \centering
  \suanpanset{scale = 0.65, innerfill = red5}
  \begin{suanpan}
    \rods{0, 6, 0}
  \end{suanpan}
\end{SideBySideExample}

\subsection{mark font}

\begin{option}{ opt = font, desc = {= \meta{font}}, init=\tn{bfseries}\tn{Large} }
  The font of mark(s).
\end{option}

\begin{SideBySideExample}[frame=single,numbers=left,%
                xrightmargin=.40\linewidth,gobble=2]
  \centering
  \suanpanset{scale = 0.65,
              font=\rmfamily\Huge}
  \begin{suanpan}
    \rods{0, 2, 6, 6, 9, 0}
    \rodmark{4,3,2,1,0,-1}
  \end{suanpan}
\end{SideBySideExample}

\subsection{highlight pos/angle}

\begin{option}{ opt = bidspot, desc = {= \meta{bidspot}}, init=0 }
  The bid's highlight angle.
\end{option}

\begin{SideBySideExample}[frame=single,numbers=left,%
    xrightmargin=.45\linewidth,gobble=2]
  \centering
  \suanpanset{scale = 0.65, bidspot = 180}
  \begin{suanpan}
    \rods{0, 0, 7, 11, 8, 19}
    \bid{1}{1}{brown5}
    \bid{2}{5}{brown5}
    \bid{3}{6}{red5}
    \bid{4}{7}{red5}
    \bid{4}{8}{azure5}
    \bid{4}{9}{yellow5}
    \bid{5}{10}{violet5}
    \bid{6}{4,5,6,11}{teal4}[magenta5]
  \end{suanpan}
\end{SideBySideExample}

\end{documentation}

\end{document}
</pre></body></html>