100 lines
2.6 KiB
TeX
100 lines
2.6 KiB
TeX
% General commands
|
|
\usepackage{xstring}
|
|
% String manipulation
|
|
|
|
\newcommand{\nte}{\emph{Not the End}}
|
|
\newcommand{\hexsys}{\emph{HexSys}}
|
|
\DeclareRobustCommand{\glo}[1]{%
|
|
% For "technical" terms
|
|
\uppercase{\StrChar{#1}{1}}%
|
|
\StrGobbleLeft{#1}{1}{}%
|
|
}
|
|
|
|
% Tokens
|
|
\usepackage{xifthen}
|
|
\usepackage{fdsymbol} % Token symbols
|
|
\usepackage{etoolbox} % Declare robust commands
|
|
|
|
\newrobustcmd{\tokensucc}[1]%
|
|
{\ifthenelse{\isempty{#1}}%
|
|
{\unskip~$\medcircle$}%
|
|
{#1\,$\medcircle$}%
|
|
}
|
|
|
|
\newrobustcmd{\tokenfail}[1]%
|
|
{\ifthenelse{\isempty{#1}}%
|
|
{\unskip~$\medblackcircle$}%
|
|
{#1\,$\medblackcircle$}%
|
|
}
|
|
|
|
\newrobustcmd{\tokenrand}[1]%
|
|
{\ifthenelse{\isempty{#1}}%
|
|
{\unskip~$\oast$}%
|
|
{#1\,$\oast$}%
|
|
}
|
|
|
|
% Lessons
|
|
\usepackage{quoting}
|
|
% Required for "citations" into the effect
|
|
\quotingsetup{font=small}
|
|
|
|
\usepackage{tikz}
|
|
\usetikzlibrary{calc}
|
|
\usepackage{enumitem}
|
|
|
|
\newcommand{\les}[2]%
|
|
% Card
|
|
{\begin{tikzpicture}
|
|
% Define vertexes
|
|
\coordinate (nw) at (0,0);
|
|
\coordinate (se) at (6,-8);
|
|
\coordinate (ne) at (nw -| se);
|
|
\coordinate (sw) at (nw |- se);
|
|
\coordinate (title) at ($ (nw)!.5!(ne) + (0,-0.25) $);
|
|
\coordinate (effect) at ($ (title) + (0,-1.5) $);
|
|
\coordinate (separator) at ($ (title)!.75!(effect) $);
|
|
|
|
% Uncomment the next line to show the help grid
|
|
% (for debug purposes)
|
|
|
|
% \draw [help lines] (nw) grid (se);
|
|
|
|
% Card borders
|
|
\draw [rounded corners] (nw) rectangle (se);
|
|
|
|
\draw [loosely dotted]
|
|
($ (separator -| nw) + (.5,0) $)
|
|
-- ($ (separator -| ne) + (-.5,0) $);
|
|
|
|
% Title
|
|
\node [anchor=north,% draw,
|
|
text width=5.5cm, align=center,
|
|
font=\scshape]
|
|
at (title)
|
|
{#1};
|
|
|
|
% Description
|
|
\node [anchor=north,% draw
|
|
text width=5cm, align=justify,
|
|
font=\small]
|
|
at (effect)
|
|
{#2};
|
|
\end{tikzpicture}}
|
|
|
|
\newcommand{\lesdesc}[2]%
|
|
% Card notes
|
|
{\begin{center}
|
|
\begin{minipage}[t]{.3\columnwidth}
|
|
% Draw the card
|
|
\vspace{0pt}
|
|
#1
|
|
\medskip
|
|
\end{minipage}
|
|
\hspace{\fill}
|
|
\begin{minipage}[t]{.5\columnwidth}
|
|
% Add the notes
|
|
\vspace{0pt}
|
|
#2
|
|
\end{minipage}
|
|
\end{center}}
|