% Copyright (c) 2026 Simon Rubinstein-Salzedo.
% Distributed under the LaTeX Project Public License, version 1.3c or later.
% Maintenance status: maintained. Current Maintainer: Simon Rubinstein-Salzedo.
% License: https://www.latex-project.org/lppl.txt
% See README.md for the list of files and attribution.
\documentclass[12pt]{amsart}
\usepackage{combgames-symbols}
\usepackage{verbatim}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{array}
\usepackage{fancyvrb}
\usepackage{bigstrut}
\ifPDFTeX\usepackage[T1]{fontenc}\fi
\usepackage[margin=1in]{geometry}
\usepackage{float,longtable,needspace}
\usepackage[hidelinks]{hyperref}
\setcounter{tocdepth}{2}


\newcommand\cn[1]{\texttt{\string#1}}
\newcommand\ds[1]{$#1$ & \cn{#1}}

\newenvironment{VExample}
{\VerbatimEnvironment\begin{VerbatimOut}{combgames-symbols-doc-example.out}}
	{\end{VerbatimOut}
	\par\noindent\begin{minipage}{\linewidth}
    \VerbatimInput{combgames-symbols-doc-example.out}
    \medskip\par
    \begin{center}$\displaystyle\input combgames-symbols-doc-example.out $\end{center}
    \end{minipage}\par\medskip}
	
\newenvironment{HExample}
{\VerbatimEnvironment\begin{VerbatimOut}{combgames-symbols-doc-example.out}}
	{\end{VerbatimOut}
	\begin{center}
		\begin{minipage}{.52\linewidth}
			\BVerbatimInput{combgames-symbols-doc-example.out}
		\end{minipage}
		\begin{minipage}{.44\linewidth}
			\centering$\displaystyle\input combgames-symbols-doc-example.out $
		\end{minipage}
\end{center}}

\title{Combinatorial Game Symbols and Notation}
\author{Simon Rubinstein-Salzedo}
\email{simon@eulercircle.com}
\date{Version 1.0 --- October 28, 2026}
\begin{document}
\raggedbottom
\begin{abstract}
The \textsf{combgames-symbols} package provides symbols and braces-and-slashes notation for combinatorial game theory. It is based on \textsf{combgames} by Raymond Chen, David Wolfe and Aaron N.\ Siegel. I replaced the old bitmap symbols made in METAFONT with vector graphics made in MetaPost. Board drawings are provided separately by \textsf{combgames-tikz}.
\end{abstract}
\maketitle
{\footnotesize\tableofcontents}
\clearpage
\section{Installation and a first example}\label{sec:install}
Load \texttt{combgames-symbols} for symbols and game notation:
\begin{verbatim}
\documentclass{article}
\usepackage{combgames-symbols}
\begin{document}
$\cgtripleup + \cgsunny \qquad \combgame{\{1|0\}}$
\end{document}
\end{verbatim}
For a local installation or an Overleaf project, place
\texttt{combgames-symbols.sty} in the document directory.
With pdfLaTeX, also provide the files with extensions
\texttt{.tfm}, \texttt{.map}, \texttt{.enc}, and \texttt{.pfb},
all with basename \texttt{combgames-symbols}.
The package loads its font map automatically.
With XeLaTeX or LuaLaTeX, provide \texttt{combgames-symbols.otf}
instead of those four font files. Font-building sources are not needed
to compile documents. The TikZ board package is not required.

For documents using the development package, replace
\texttt{cgt} with \texttt{combgames-symbols} in the preamble.
The symbol and notation commands retain their names.

\section{Font Symbols}

\begin{table}[H]
\centering
\begin{tabular}{clclcl}
\ds{\cgup} & \ds{\cgdown} & \ds{\cgstar} \bigstrut\\
\ds{\cgdoubleup} & \ds{\cgdoubledown} & \ds{\cgneg} \bigstrut\\
\ds{\cgtripleup} & \ds{\cgtripledown} & \ds{\cgfarstar} \bigstrut\\
\ds{\cgquadup} & \ds{\cgquaddown} & \ds{\cgsunny} \bigstrut\\
\ds{\cgtiny} & \ds{\cgminy} & \ds{\cgloony} \bigstrut\\
\ds{\cgko} & \ds{\cgKo} \bigstrut\\
\ds{\cgkobar} & \ds{\cgKobar} \bigstrut
\end{tabular}
\caption{\textsf{combgames-symbols} ordinary symbols.}
\end{table}

\begin{table}[H]
	\centering
	\begin{tabular}{clclclcl}
		\ds{\cglfuz} & \ds{\cggfuz} & \ds{\cgfuzzy} \bigstrut\\
		\ds{\cgupsum} & \ds{\cgdownsum} & \ds{\cgnmultiply} & \ds{\cgbow} \bigstrut
	\end{tabular}
	\caption{\textsf{combgames-symbols} relations (first row) and binary operators (second row).}
\end{table}

\subsection{Repeated arrows and mathematical spacing}
\cn{\cgups}\texttt{\{n\}} and \cn{\cgdowns}\texttt{\{n\}} accept nonnegative integers. Zero gives $0$; one through four use the individual arrow symbols; larger values use a numerical multiple.
\begin{VExample}
\cgups{0},\ \cgups{1},\ \cgups{2},\ \cgups{3},\ \cgups{4},\ \cgups{5}
\qquad \cgdowns{5}
\end{VExample}

\section{Braces-and-Slashes Notation}

The command \cn{\combgame} has been updated from the \textsf{combgames} package to include angle brackets, denoting scoring games. Use \cn{\<} and \cn{\>} for angle brackets in \cn{\combgame}.

\begin{table}[H]
	{
		\centering
		\begin{tabular}{@{}l@{\hspace{0.3in}}c@{}}
			%%%%%
			\begin{verb}
				\combgame{\<2||1|0\>}
			\end{verb}
			&
			$\displaystyle \combgame{\<2||1|0\>}$
			\bigskip \\
			%%%%%
			\begin{verb}
				\combgame{\{3,\{4||2|1\}|||0||||-8\}}
			\end{verb} &
			$\displaystyle \combgame{\{3,\{4||2|1\}|||0||||-8\}}$
			\bigskip
		\end{tabular}
		%%%%%
	}
	
	\begin{verb}
		\int^T G = \combgame{\{T + \int^T G^L | -T + \int^T G^R\}}
	\end{verb}
	\bigskip
	
	\hfill$\displaystyle \int^T G = \combgame{\{T + \int^T G^L | -T + \int^T G^R\}}$
	
	\caption{Example usage of \cn{\combgame}.}
\end{table}

\begin{itemize}
	\item There is also a starred form, \cn{\combgame*}, that suppresses growth of the vertical bars:
	\begin{center}
		\begin{tabular}{@{}l@{\hspace{0.3in}}c@{}}
			%%%%%
			\begin{verb}
				\combgame{2|1||0|||-1||||-2}
			\end{verb}
			&
			$\displaystyle \combgame{2|1||0|||-1||||-2}$
			\bigskip \\
			%%%%%
			\begin{verb}
				\combgame*{2|1||0|||-1||||-2}
			\end{verb} &
			$\displaystyle \combgame*{2|1||0|||-1||||-2}$
			\bigskip
		\end{tabular}
		%%%%%
	\end{center}
	
\item You should use \cn{\combgame} whenever appropriate, even for simple expressions, since it will typeset the result much more cleanly than otherwise.  Compare the following two examples.

\begin{center}
	\begin{tabular}{l@{\hspace{1cm}}l@{\hspace{1cm}}l}
		\begin{verb}
			\combgame*{\{2||-1|-3\}}
		\end{verb}
		&
		$\combgame*{\{2||-1|-3\}}$
		&
		Beautiful!
		\bigskip \\
		\begin{verb}
			\{2||-1|-3\}
		\end{verb}
		&
		$\{2||-1|-3\}$
		&
		Hideous!
	\end{tabular}
\end{center}

\item Within the \texttt{combgame} argument, the brace commands \cn{\{} and \cn{\}} are redefined to mean \cn{\left}\cn{\{} and \cn{\right}\cn{\}}.  The old commands are still available as \cn{\lbrace} and \cn{\rbrace}.
\item Literal bars depend on when \TeX{} reads the input. In a macro definition or an argument already read by another command, they may have been tokenized before \cn{\combgame} can make them active.  If you wish to define macros that refer to \cn{\combgame}, there is an alternative command \verb|\cgslashes{n}| for an $n$-tuple slash.  The commands \cn{\cgslash} and \cn{\cgsslash} are shorthand for $n = 1$ and $2$, respectively.  Here's an example:

\begin{verbatim}
\newcommand\threeswitch[3]
{\combgame{\{#1 \cgsslash #2 \cgslash #3\}}}
\end{verbatim}

Then \verb|\threeswitch{2}{1}{0}| would typeset

\[\combgame{\{2||1|0\}}\]

\item You can control the growth of the slashes by setting \cn{\cgslashextension}.  The default is \texttt{1.5pt}.  For example:
\begin{center}
	\begin{tabular}{@{}l@{\hspace{0.3in}}c@{}}
		%%%%%
		\begin{verb}
			\combgame{2|1||0|||-1||||-2}
		\end{verb}
		&
		$\displaystyle \combgame{2|1||0|||-1||||-2}$
		\bigskip \\
		%%%%%
		\begin{minipage}{2.75in}
			\begin{verbatim}
\setlength\cgslashextension{3pt}
\combgame{2|1||0|||-1||||-2}

\end{verbatim}
		\end{minipage} &
		$\displaystyle \setlength\cgslashextension{3pt} \combgame{2|1||0|||-1||||-2}$
		\bigskip
	\end{tabular}
	%%%%%
\end{center}
\end{itemize}


\paragraph{Spacing and scope.}
The commands \cn{\cgslash}, \cn{\cgsslash}, and \cn{\cgslashes} are only valid inside \cn{\combgame}. Its explicit form \verb|\cgslashes{3}| draws three bars. The math glue \cn{\cgslashmuskip} controls the spacing between adjacent bars and defaults to \texttt{-2mu}. Change it with an assignment such as \verb|\cgslashmuskip=-1mu|, preferably in a local group. The starred form removes the extra growth of longer bar groups; it still sizes the bars to their contents. The extra growth controlled by \cn{\cgslashextension} applies in display style.


\section{Compatibility and troubleshooting}
The source-and-result examples follow the
\href{https://github.com/aaron-siegel/combgames/blob/master/doc/latex/combgames/combgames.tex}{original combgames manual}
by Aaron N.\ Siegel and David Wolfe. This package retains the symbol and
braces-and-slashes interfaces, but does not implement the original tree
or thermograph facilities. Do not load it together with \textsf{combgames}.

If a font or encoding is missing, check that all the files listed in
Section~\ref{sec:install} are present. The map refers to
\texttt{combgames-symbols.enc} and \texttt{combgames-symbols.pfb}.
Use the complete set of renamed font files; files from the development
version are not substitutes.

Literal bars in an argument already read by another macro cannot always
be made active. Use the explicit slash commands described above.
\end{document}
