2013-06-18 21:38:55 +03:00
\documentclass [a5paper,onecolumn] { book}
2013-06-14 00:21:34 +03:00
\usepackage [utf8] { inputenc}
\usepackage [T1] { fontenc}
\usepackage [hidelinks] { hyperref}
\usepackage { graphicx}
\usepackage [top=3.3cm, bottom=3.3cm, left=2cm, right=2cm] { geometry}
\newif \ifpdf
\ifx \pdfoutput \undefined
\pdffalse
\else
\ifnum \pdfoutput =1
\pdftrue
\else
\pdffalse
\fi
\fi
\title { Format}
\author { }
\date { }
\newcounter { sectionnr}
\begin { document}
\maketitle
2013-08-15 22:55:17 +03:00
\clearpage
2013-06-14 00:21:34 +03:00
\thispagestyle { empty}
\pagestyle { empty}
\subsection * { \begin { center} \textbf { Introduction} \end { center} }
\noindent
Adding an introduction to the gamebook here. This will create a section, but it will not be shuffled nor numbered with the gamebook sections below.
\vspace { 1em}
\subsection * { \begin { center} \textbf { Another Heading} \end { center} }
\noindent
2013-10-09 00:35:09 +03:00
This starts another non-shuffled section. \footnote { A footnote in Another Heading.}
2013-06-14 00:21:34 +03:00
\vspace { 1em}
Adventure begins in section 1.
\phantomsection
\refstepcounter { sectionnr}
\label { section1}
\subsection * { \begin { center} \textbf { 1} \end { center} }
\noindent
2013-07-28 19:45:02 +03:00
This examples tests gamebook formatting, not so much game mechanics or references. Currently there is nothing here really. This section contains some tricky characters to quote, like \} and \{ and " and ' and \textbackslash . HTML will probably not like <div> or \& boom;. You can make named references like this (\textbf { \autoref { section5} } )
2013-10-09 00:35:09 +03:00
(just happens to be exactly the same syntax as in emacs org-mode btw). There should be an image below as well. If something broke, turn to \textbf { \autoref { section2} } , otherwise turn to \textbf { \autoref { section3} } .\footnote { Good footnote.}
\begin { center}
2013-06-14 00:21:34 +03:00
\includegraphics [width=.9\textwidth] { testimage.png}
\end { center}
\vspace { 1em}
\phantomsection
\refstepcounter { sectionnr}
\label { section2}
\subsection * { \begin { center} \textbf { 2} \end { center} }
\noindent
2013-06-16 22:18:28 +03:00
Bad.
2013-06-14 00:21:34 +03:00
\vspace { 1em}
\phantomsection
\refstepcounter { sectionnr}
\label { section3}
\subsection * { \begin { center} \textbf { 3} \end { center} }
\noindent
2013-06-16 22:18:28 +03:00
Good!
2013-06-14 00:21:34 +03:00
\vspace { 1em}
2013-07-28 19:45:02 +03:00
\phantomsection
\refstepcounter { sectionnr}
\label { section4}
\subsection * { \begin { center} \textbf { 4} \end { center} }
\noindent
Very good. You win (\textbf { \autoref { section3} } )
2013-10-09 00:35:09 +03:00
.\footnote { Win footnote.}
2013-07-28 19:45:02 +03:00
\vspace { 1em}
\phantomsection
\refstepcounter { sectionnr}
\label { section5}
\subsection * { \begin { center} \textbf { 5} \end { center} }
\noindent
This is where you should end up when you follow the named reference from the starting section. From here you can go to the second named section (\textbf { \autoref { section4} } )
or to the good end (\textbf { \autoref { section3} } )
.
\vspace { 1em}
2013-06-14 00:21:34 +03:00
\refstepcounter { sectionnr}
\end { document}