%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% These macros are for the TestamenTeX                      %
% Written by Sam Flint, 2013.                               %
% This is placed into the public domain, in the spirit of   %
% TeX itself, and for the benefit of all.                   %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\font\mainfont=cmr10
\font\chheadfont=cmssbx10
\font\bkheadfont=cmssbx10 scaled \magstep2
\font\titlefont=cmti10 scaled \magstep4
\font\emphfont=cmti10
\font\itheading=cmss10

% Setup count registers
% chapter
\count10=1
% verse
\count11=1
% book
\count12=1

% Macros
%eject to odd
\def\ejtoodd#1{\ifodd\count0\null\break\eject\null\break\eject\else\null\break\eject\fi}

%title
\def\title#1{\centerline{\titlefont #1}\vskip 26pt \centerline{\bkheadfont \versionname}\eject}

%version
\def\version#1{\def\versionname{The #1 Version}}

%testament
\def\testament#1{\ejtoodd\rightline{\titlefont The #1 Testament}\eject\count12=1\count0=0}

%book
\def\book#1{\null\eject\advance\count12 by 1{\bkheadfont \number\count12\ #1\break}\count10=1\count11=1}

%chapter
\def\chapter{{\chheadfont \number\count10}\count11=1\advance\count10 by 1}

%verse
\def\verse{$ ^{\number\count11} $\advance\count11 by 1}

%emphasis
\def\emph#1{{\emphfont #1}}

%ithead
\def\ithead#1{\break\centerline{\itheading #1}\break}
