WIP: таблицы, вычисления в TeX
This commit is contained in:
parent
42fda72157
commit
724f3d3d84
|
@ -16,7 +16,7 @@
|
||||||
\subsection{Холодное оружие}
|
\subsection{Холодное оружие}
|
||||||
|
|
||||||
\weapon{Камень}{Самый обыкновенный камень.}
|
\weapon{Камень}{Самый обыкновенный камень.}
|
||||||
\weaponstats{0}{0,5}
|
\weaponstats{0}{2.5}
|
||||||
\meleestats{4}{5}{Рукопашный Урон + 1}
|
\meleestats{4}{5}{Рукопашный Урон + 1}
|
||||||
\throwingstats{4}{5}{Рукопашный Урон + 1}{5-15}
|
\throwingstats{4}{5}{Рукопашный Урон + 1}{5-15}
|
||||||
|
|
||||||
|
|
22
special.cls
22
special.cls
|
@ -35,20 +35,30 @@
|
||||||
\pagestyle{empty}
|
\pagestyle{empty}
|
||||||
\setcounter{secnumdepth}{0}
|
\setcounter{secnumdepth}{0}
|
||||||
\setcounter{tocdepth}{2}
|
\setcounter{tocdepth}{2}
|
||||||
|
\RequirePackage{ifthen}
|
||||||
|
\RequirePackage{pgf}%rounding
|
||||||
|
|
||||||
|
\newcommand*{\RoundNum}[1]{\pgfmathprintnumber[fixed,precision=0]{#1}}%
|
||||||
|
|
||||||
\chapterstyle{southall}
|
\chapterstyle{southall}
|
||||||
|
|
||||||
%%%
|
%%%
|
||||||
|
\newcommand{\equalsNothing}[1]{%
|
||||||
|
\ifthenelse{\equal{\unexpanded{#1}}{}}{true}{false}%
|
||||||
|
}
|
||||||
|
|
||||||
\newcommand{\weapon}[2]{
|
\newcommand{\weapon}[2]{
|
||||||
\subsubsection{#1}
|
\subsubsection{#1}
|
||||||
#2\par
|
#2\par
|
||||||
}
|
}
|
||||||
\newcommand{\weaponstats}[2]{
|
\newcommand{\calcmaxstrength}[1]{\RoundNum{\pgfmathparse{#1/1.1}}}%
|
||||||
\begin{table}[h] \begin{tabulary}{\textwidth}{CC}
|
\newcommand{\maxstrength}[1]{\ifthenelse{\calcmaxstrength{#1} < 1}{1}{\calcmaxstrength{#1}}}
|
||||||
Цена & #1\\
|
\newcommand{\weaponstats}[2]{%
|
||||||
Вес & #2\\
|
\begin{table}[h] \begin{tabulary}{\textwidth}{CC}%
|
||||||
Минимальная Сила & \\
|
Цена & #1 \\
|
||||||
Дальность & 1
|
Вес & #2 \\
|
||||||
|
Минимальная Сила & \maxstrength{#2} \\
|
||||||
|
Дальность & 1%
|
||||||
\end{tabulary}\end{table}
|
\end{tabulary}\end{table}
|
||||||
}
|
}
|
||||||
% Холодное оружие.
|
% Холодное оружие.
|
||||||
|
|
Loading…
Reference in a new issue