2012-10-11 16:38:28 +03:00
|
|
|
|
% Declare that this style file requires at least LaTeX version 2e.
|
|
|
|
|
\NeedsTeXFormat{LaTeX2e}
|
|
|
|
|
|
|
|
|
|
% Provide the name of your page, the date it was last updated, and a comment about what it's used for
|
|
|
|
|
\ProvidesPackage{special}[2012/11/09 custom style for this book]
|
|
|
|
|
|
|
|
|
|
\DeclareOption*{%
|
|
|
|
|
\PassOptionsToClass{\CurrentOption}{memoir}% or book or whatever
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
% Now we'll execute any options passed in
|
|
|
|
|
\ProcessOptions\relax
|
|
|
|
|
|
|
|
|
|
% Instead of defining each and every little detail required to create a new document class,
|
|
|
|
|
% you can base your class on an existing document class.
|
|
|
|
|
\LoadClass{memoir}% or book or whatever you class is closest to
|
|
|
|
|
|
2012-10-17 14:08:01 +03:00
|
|
|
|
\RequirePackage{ifxetex}
|
|
|
|
|
\ifxetex
|
|
|
|
|
\RequirePackage{fontspec}
|
|
|
|
|
\RequirePackage{xunicode}
|
|
|
|
|
\RequirePackage{xltxtra}
|
|
|
|
|
\RequirePackage{polyglossia}
|
|
|
|
|
\setdefaultlanguage{russian}
|
|
|
|
|
\defaultfontfeatures{Mapping=tex-text, Scale=MatchLowercase}
|
|
|
|
|
\setmainfont{PT Serif}
|
|
|
|
|
\setmonofont{PT Mono}
|
|
|
|
|
\setmathrm{PT Serif}
|
|
|
|
|
\newfontfamily{\cyrillicfont}{PT Serif}
|
|
|
|
|
\newfontinstance\scshape[Letters=SmallCaps, Numbers=Uppercase]{PT Serif Caption}
|
|
|
|
|
\else
|
|
|
|
|
\RequirePackage[T1]{fontenc}
|
|
|
|
|
\RequirePackage[utf8]{inputenc}
|
|
|
|
|
\RequirePackage[russian]{babel}
|
|
|
|
|
\RequirePackage{paratype}
|
|
|
|
|
\fi
|
2012-10-11 16:38:28 +03:00
|
|
|
|
\usepackage{hyperref}
|
|
|
|
|
\usepackage{indentfirst}
|
|
|
|
|
%\usepackage[cm]{fullpage}
|
|
|
|
|
\semiisopage[12]
|
|
|
|
|
\checkandfixthelayout
|
|
|
|
|
\RequirePackage{tabulary}
|
|
|
|
|
\pagestyle{empty}
|
|
|
|
|
\setcounter{secnumdepth}{0}
|
|
|
|
|
\setcounter{tocdepth}{2}
|
2012-10-16 11:12:27 +03:00
|
|
|
|
\RequirePackage{ifthen}
|
|
|
|
|
\RequirePackage{pgf}%rounding
|
|
|
|
|
|
|
|
|
|
\newcommand*{\RoundNum}[1]{\pgfmathprintnumber[fixed,precision=0]{#1}}%
|
2012-10-11 16:38:28 +03:00
|
|
|
|
|
|
|
|
|
\chapterstyle{southall}
|
|
|
|
|
|
2012-10-16 08:20:48 +03:00
|
|
|
|
%%%
|
2012-10-16 11:12:27 +03:00
|
|
|
|
\newcommand{\equalsNothing}[1]{%
|
|
|
|
|
\ifthenelse{\equal{\unexpanded{#1}}{}}{true}{false}%
|
|
|
|
|
}
|
|
|
|
|
|
2012-10-16 08:20:48 +03:00
|
|
|
|
\newcommand{\weapon}[2]{
|
|
|
|
|
\subsubsection{#1}
|
|
|
|
|
#2\par
|
|
|
|
|
}
|
2012-10-16 11:12:27 +03:00
|
|
|
|
\newcommand{\calcmaxstrength}[1]{\RoundNum{\pgfmathparse{#1/1.1}}}%
|
|
|
|
|
\newcommand{\maxstrength}[1]{\ifthenelse{\calcmaxstrength{#1} < 1}{1}{\calcmaxstrength{#1}}}
|
|
|
|
|
\newcommand{\weaponstats}[2]{%
|
|
|
|
|
\begin{table}[h] \begin{tabulary}{\textwidth}{CC}%
|
|
|
|
|
Цена & #1 \\
|
|
|
|
|
Вес & #2 \\
|
|
|
|
|
Минимальная Сила & \maxstrength{#2} \\
|
|
|
|
|
Дальность & 1%
|
2012-10-16 08:20:48 +03:00
|
|
|
|
\end{tabulary}\end{table}
|
|
|
|
|
}
|
|
|
|
|
% Холодное оружие.
|
|
|
|
|
% Параметры: цена, вес, ОД на удар, ОД на прицельный удар, повреждения
|
|
|
|
|
% вычисляет НЁХ по ОД и повреждениям
|
|
|
|
|
\newcommand{\meleestats}[3]{
|
|
|
|
|
\begin{table}[h] \begin{tabulary}{\textwidth}{CC}
|
|
|
|
|
ОД на удар & #1\\
|
|
|
|
|
ОД на прицельный удар & #2\\
|
|
|
|
|
Повреждения & #3\\
|
|
|
|
|
НЁХ (удар) & \\
|
|
|
|
|
\end{tabulary}\end{table}
|
|
|
|
|
}
|
|
|
|
|
\newcommand{\throwingstats}[4]{
|
|
|
|
|
\begin{table}[h] \begin{tabulary}{\textwidth}{CC}
|
|
|
|
|
ОД на бросок & #1\\
|
|
|
|
|
ОД на прицельный бросок & #2\\
|
|
|
|
|
Повреждения (бросок) & #3\\
|
|
|
|
|
Эффективная дальность (бросок) & #4\\
|
|
|
|
|
НЁХ (бросок) & \\
|
|
|
|
|
\end{tabulary}\end{table}
|
|
|
|
|
}
|
|
|
|
|
%%%
|
|
|
|
|
|
|
|
|
|
\endinput
|