<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">\documentclass{article}

\usepackage[margin=3cm]{geometry}

\usepackage{tikz-bagua}
\usetikzlibrary{math}
\usepackage{ctex}%[fontset=kefonts]

\input{binhex}

\usepackage{makeidx}   %ĺĺťşç´˘ĺź

\makeindex  

\title{TikZ-Bagua ĺŽĺ}
\author{WANG Xu \\ cwangx@hotmail.com}
\date{\zhtoday~v1.01}

\begin{document}

\maketitle

\section{çŽäť}

\verb+TikZ-Bagua+ ĺŽĺä˝żç¨ \verb+TikZ+ ĺŽĺ, ĺĺŠäş \verb+xparse+, \verb+xstring+, \verb+bitset+ äťĽĺ \verb+xintexpr+, ĺŽäšäş \verb+\taiji+, \verb+\liangyi+, \verb+\sixiang+, ä¸çť \verb+\bagua+ ĺĺ­çť \verb+\Bagua+,  çťĺşăĺ¨ćăä¸­ćç¨ççĺ¤Şćé´éł, ä¸¤äťŞĺčąĄĺŤĺŚĺĺ­ĺĺĺŚçŹŚĺˇ, ĺŻšĺ­ä˝ć˛ĄćčŚćą.

\section{ä˝żç¨ćšćł}

ćĺŽäšçä¸čż°äşä¸Şĺ˝äť¤ä¸­ćĺä¸ä¸ŞĺŻéĺć°ĺä¸şćžçźŠĺć° \verb|scale|, çźşçĺźĺä¸ş $1$.

\subsection{ĺ¤Şćé´éł}

ćč°˘ç­ĺżç˝ĺçćĺş, éťčŽ¤ćŻĺ¤çąä¸­çĺ¤Şćĺž, ä¸ć˛Ąćéąźçź, ĺ&nbsp;ćĺćžç¤şéąźçź. é´äşç°ĺ¨ĺ¸¸č§ĺ°çĺĺćé&nbsp;çäšä¸ĺ°, ćć°ĺ˘ĺ˝äť¤äťĽćžç¤şäš, ćžç¤şéąźçźč§ĺĺä¸. 

\verb+\taiji [&lt;scale&gt;]+\index{taiji@\verb+\taiji+}, \verb+\taiji* [&lt;scale&gt;]+\index{xtaiji@\verb+\xtaiji+}.

\verb+\xtaiji [&lt;scale&gt;]+\index{taiji@\verb+\taiji+}, \verb+\xtaiji* [&lt;scale&gt;]+\index{xtaiji@\verb+\xtaiji+}.

ĺä¸Şĺ˝äť¤éťčŽ¤ç´ćĽĺŻšĺşĺžĺ° çŹŚĺˇ \taiji \taiji* \xtaiji \xtaiji*.

\subsection{ä¸¤äťŞ}
\verb+\liangyi {&lt;bin&gt;} [&lt;scale&gt;]+\index{liangyi@\verb+\liangyi+}.

\verb+\liangyi{&lt;bin&gt;}+ éčżćĽĺĺć° $1$ ć $0$ ĺžĺ°ä¸¤äťŞçŹŚĺˇ \liangyi{1} ć \liangyi{0}.

\subsection{ĺčąĄ}
\verb+\sixiang {&lt;bin&gt;} [&lt;scale&gt;]+\index{sixiang@\verb+\sixiang+}, \verb+\sixiang* {&lt;dec&gt;} [&lt;scale&gt;]+\index{sixiang*@\verb+\sixiang*+}.

\verb+\sixiang{&lt;bin&gt;}+ éčżćĽĺĺć° $3,2,1,0$ çäşčżĺść°ĺžĺ°ĺčąĄçŹŚĺˇ, č \verb+\sixiang*{&lt;dec&gt;}+ ćĽćśĺčżĺść°.

\begin{center}
	\begin{tikzpicture}
		\foreach \j in {3,2,1,0}
		{
			\node at (3-\j,-0.5) {$\j$};
			\node at (3-\j,0.5) {\nbinary{2}{\j}};
			\node at (3-\j,0) {\sixiang*{\j}};
		}
	\end{tikzpicture}
\end{center}

\subsection{ä¸çťĺŤĺŚ}
\verb+\bagua {&lt;bin&gt;} [&lt;scale&gt;]+\index{bagua@\verb+\bagua+}, \verb+\bagua* {&lt;dec&gt;} [&lt;scale&gt;]+\index{bagua*@\verb+\bagua*+}.

\verb+\bagua{&lt;bin&gt;}+ éčżćĽĺĺć° $7,6,\dots,0$ çäşčżĺść°ĺžĺ°ä¸çťĺŤĺŚçŹŚĺˇ, č \verb+\bagua*{&lt;dec&gt;}+ ćĽćśĺčżĺść°.

\begin{center}
	\begin{tikzpicture}
		\foreach \j in {7,6,...,0}
		{
			\node at (7-\j,-0.5) {$\j$};
			\node at (7-\j,0.5) {\nbinary{3}{\j}};
			\node at (7-\j,0) {\bagua*{\j}};
		}
	\end{tikzpicture}
\end{center}

\subsection{ĺ­çťĺŤĺŚ}
\verb+\Bagua [&lt;2,8&gt;]{&lt;bin,oct&gt;} [&lt;scale&gt;]+\index{Bagua@\verb+\Bagua+}, \verb+\Bagua* {&lt;dec&gt;} [&lt;scale&gt;]+\index{Bagua*@\verb+\Bagua*+}.

\verb+\Bagua{&lt;bin&gt;}+ éčżćĽĺĺć° $63,62,\dots,0$ çäşčżĺść°ĺžĺ°ĺ­çťĺŤĺŚçŹŚĺˇ, \verb+\Bagua[8]{&lt;oct&gt;}+ ćĽćśçä¸ş$63,62,\dots,0$ çĺŤčżĺść°, č \verb+\Bagua*{&lt;dec&gt;}+ ćĽćśĺčżĺść°.

ĺĺşććçĺ­ĺĺĺŚ, ĺśä¸­ćŻĺŚä¸ä¸čĄĺ­ä˝ć°ä¸şĺŻšĺşçäşčżĺść°, ä¸ä¸čĄĺˇŚĺłä¸¤čžšĺĺŤä¸şĺŻšĺşçĺčżĺśĺĺŤčżĺść°.

\begin{center}
	\begin{tikzpicture}
		\foreach \j in {7,6,...,0}
		{
			\foreach \k in {7,6,...,0}
			{
				\node at (7*1.25-1.25*\k-0.3,1.5*\j-0.5) {\pgfmathparse{int(8*\j+\k)}\pgfmathresult};
				\node at (7*1.25-1.25*\k+0.3,1.5*\j-0.5) {\j\k};
				\node at (7*1.25-1.25*\k,1.5*\j+0.5) {\nbinary{3}{\j}\nbinary{3}{\k}};
				\node at (7*1.25-1.25*\k,1.5*\j) {\Bagua[8]{\j\k}[1.5]};
			}
%			\node at (7-\j,0) {$\j$};
%			\node at (7-\j,-0.5) {\nbinary{3}{\j}};
%			\node at (7-\j,-1) {\bagua*{\j}};
		}
	\end{tikzpicture}
\end{center}

\section{çćŹčŽ°ĺ˝}
\subsection*{v1.01~2022.08.04}
äżŽćšéťčŽ¤ \verb+\taiji+ ä¸şć&nbsp;éąźçźçĺ¤çąä¸çĺ¤Şć, ä¸şç°ĺ¨ĺ¸¸č§çĺĺćé&nbsp;ć°ĺ˘ \verb+\xtaiji+, äżŽĺ¤äşĺˇ˛ĺç°ç bug.

\subsection*{v1.0~2021.10.17}
ĺĺ¸ \verb+TikZ-Bugua+ ĺŽĺ.

\printindex

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