%*
%* Seven Kingdoms: Ancient Adversaries
%*
%* Copyright 1997,1998 Enlight Software Ltd.
%* Copyright 2018 Timothy Rink
%*
%* This program is free software: you can redistribute it and/or modify
%* it under the terms of the GNU General Public License as published by
%* the Free Software Foundation, either version 2 of the License, or
%* (at your option) any later version.
%*
%* This program is distributed in the hope that it will be useful,
%* but WITHOUT ANY WARRANTY; without even the implied warranty of
%* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
%* GNU General Public License for more details.
%*
%* You should have received a copy of the GNU General Public License
%* along with this program.  If not, see <http://www.gnu.org/licenses/>.
%*
%*

\documentclass[openany]{book}
\usepackage[paperwidth=5.51in, paperheight=8.81in, top=0.6205in, bottom=1.005in, right=0.505in, left=0.705in,]{geometry} % From the original manual. Do not change.

% Fonts:
\usepackage[utf8]{inputenc} % Now we can write UTF8 characters directly in the .tex files
\usepackage[T1]{fontenc} % T1 fonts are 8 bit fonts with a large amount of glyphs
\usepackage{universalis} % TOC, chapter, sectioning, and index font.
\usepackage{yfonts} % Swab: For first paragraphs.
\usepackage{accanthis} % Main font.

% Graphics, figures and tables:
\usepackage{graphicx} % Basic support for figures
\graphicspath{{assets/}}
\usepackage{wrapfig} % Wrap figure around text
\usepackage{xcolor} % An extended support for colors, required by tabu
\usepackage{colortbl} % Pretty colored tables, required by tabu
\usepackage{longtable} % for long tables spanning multiple pages, required by tabu
\usepackage{tabu} % for any sort of tables, unifies other environments into tabu and longtabu, but does not load required packages

% Miscellaneous 
\usepackage{fancyhdr} % An extended support for fancy headers and footers
    \pagestyle{fancy}
    \setlength{\headheight}{22.44pt} % 22.44pt used to avoid errors.
    \renewcommand{\headrulewidth}{.5pt} % From original manual?
    \fancyhf[lh,rh,ch]{}
    \fancyhf[leh]{\nouppercase{\textit{\leftmark}}}
    \fancyhf[roh]{\textit{Seven Kingdoms: Ancient Adversaries}}
    
\usepackage[explicit]{titlesec} % For modification of titles
% \titlespacing\command{left}{before}{after}
% spacing: how to read {12pt plus 4pt minus 2pt}
%           12pt is what we would like the spacing to be
%           plus 4pt means that TeX can stretch it by at most 4pt
%           minus 2pt means that TeX can shrink it by at most 2pt
\titlespacing\chapter{0pt}{1.4in}{12pt plus 6pt minus 2pt}
\titlespacing\section{0pt}{12pt plus 4pt minus 2pt}{-4pt plus 6pt minus 2pt}
\titlespacing\subsection{0pt}{12pt plus 4pt minus 2pt}{-4pt plus 6pt minus 2pt}
\titlespacing\subsubsection{0pt}{12pt plus 4pt minus 2pt}{-4pt plus 6pt minus 2pt}
\titleformat%
{\chapter}% command
[display]% shape, one of: hang, block, display, runin, leftmargin, rightmargin, drop, wrap, frame
{\bfseries\sffamily\huge}% format
{\fontsize{35}{35}\selectfont\thechapter}% label
{0em}% sep
{
	\vspace{-1.69em}
	\hspace{2.2em}
	\parbox{0.8\textwidth}{
		\raggedright%
		#1%
	}
}% before-code
[
\vspace{0.1em}
\titlerule
]% after-code

\titleformat{\section}
{\sffamily\LARGE\bfseries}{\thesection}{1em}{#1}
\titleformat{\subsection}
{\sffamily\Large\bfseries}{\thesubsection}{1em}{#1}
\titleformat{\subsubsection}
{\sffamily\large\bfseries}{\thesubsubsection}{1em}{#1}

\usepackage{makeidx} % Index
    \makeindex
\usepackage[hidelinks]{hyperref} % For the index and TOC but not for external links. Non color, frameless links from the original manual.

%\usepackage{showframe} % For testing.

% -- New Environment -- %
% \raggedright % From the original manual.
\setcounter{tocdepth}{1} % Display only chapters and sections in toc - from the original manual.
\setcounter{secnumdepth}{0}
\makeatletter
\renewcommand\@dotsep{140} % default value 4.5
\makeatother
% -- New Environment end -- %

% -- Additional Options -- %

\setlength{\parskip}{1ex} % From the original manual.
\setlength{\parindent}{0pt} % From the original manual.
\def\changemargin#1#2{\list{}{\rightmargin#2\leftmargin#1}\item[]} % Indentation command.
\let\endchangemargin=\endlist % Indentation command end.

% -- Additional Options end -- %

\begin{document}

\title{
\includegraphics[width=0.9\linewidth]{7klogo}~\\[1cm]
{\Huge{\textbf{Ancient Adversaries}}}~\\[1cm]
{\huge{\textbf{Instruction Manual}}}
}
\author{Chris Whitehouse et al. Updated by members of the \\
Seven Kingdoms: Ancient Adversaries OSS Project} % Do not change.
\date{2018-07-29} % Do not change.

\frontmatter
\maketitle

\section*{Copyright Notice}

Seven Kingdoms: Ancient Adversaries Instruction Manual

Copyright 1997, 1998 Enlight Software Ltd.

This manual is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version.

This manual is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this manual.  If not, see <http://www.gnu.org/licenses/>.

\subsection*{Other Copyright}

\subsubsection*{Music}

The music is the work of Bjørn Lynne, Copyright 1997, and is not provided under the GPL. It may be freely downloaded and used with Seven Kingdoms: Ancient Adversaries but not modified or repurposed into derivative works.

\subsubsection*{Trademark}

Seven Kingdoms is a trademark of Enlight Software Ltd., and the 7kfans project is using the trademark with permission. This license does not constitute a transfer of any ownership, rights, or authority to the trademarks owned by Enlight. Any questions regarding use must be directed to Enlight.

\clearpage

\section*{Project Introduction}

\textswab{\huge{I}}n 2009, Trevor Chan from Enlight Software released the source code for \textit{Seven Kingdoms: Ancient Adversaries}. He released it under a community project so that developers can provide some long awaited bug fixes and address some other game-play issues.

The official website for \textit{Seven Kingdoms: Ancient Adversaries} OSS Project is at https://7kfans.com/. Here you will find the forums and download page.

\textit{Seven Kingdoms: Ancient Adversaries} has been under active development since its 2009 release. If you want to see what has been fixed or changed, see the changelogs for the official releases under News.

This manual is part of the community project. It has been updated to reflect the current status of \textit{Seven Kingdoms: Ancient Adversaries}.

\section*{Registration}

\index{registering}

\textswab{\huge{R}}egister for a forums account. An account is necessary to post on the forums, use the mChat feature, and to play using the 7kfans.com multiplayer service.

\section*{Questions or Problems}

\textswab{\huge{I}}f you have difficulties with this game and cannot find the solution in this manual, post your question or problem on the forums for assistance from a member of the community.

\clearpage
\tableofcontents
\addtocontents{toc}

\mainmatter
\include{src/introduction}
\include{src/starting_new_game}
\include{src/village}
\include{src/information_interface}
\include{src/buildings_workers_links}
\include{src/force_and_its_use}
\include{src/developing_your_economy}
\include{src/developing_weapons}
\include{src/harbors_ships}
\include{src/mercenaries}
\include{src/diplomacy}
\include{src/creating_empire}
\include{src/spies_espionage}
\include{src/nationalities}
\include{src/fryhtans_their_ways}
\include{src/seats_of_powers_and_greater_beings}
\include{src/rebellion_rebels}
\include{src/fire_forces_nature}
\include{src/assorted_costs_amounts}
\include{src/strategy_tips}
\include{src/faq}
\include{src/credits}

\backmatter

\cleardoublepage
\addcontentsline{toc}{chapter}{Index}
\printindex

\end{document}