% ------------------------------------------------------- % Example for gamebook.sty % ------------------------------------------------------- % Copyright (C) 2011 by Andr\'e Miede, http://www.miede.de % ------------------------------------------------------- % % This file may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3 % of this license or (at your option) any later version. % The latest version of this license is in: % % http://www.latex-project.org/lppl.txt % % and version 1.3 or later is part of all distributions of LaTeX % version 2005/12/01 or later. % ------------------------------------------------------- \documentclass[10pt,twoside]{article} \usepackage[T1]{fontenc} %\usepackage[latin9]{inputenc} %\usepackage[osf]{libertine} %\usepackage[osf]{mathpazo} %\usepackage{lmodern} %\usepackage[opticals,mathlf,onlytext]{MinionPro} %\usepackage[dvipsnames]{xcolor} \usepackage[colorlinks=true,urlcolor=black]{hyperref}% RoyalBlue \usepackage{gamebook} % [debug,draft] \title{Example for using the \textsf{gamebook} package} \author{} \date{} \renewcommand{\gbturntext}{turn~to~} \renewcommand{\gbheadtext}{Gamebook Example} \begin{document} \maketitle \pagenumbering{arabic} \gbheader \section*{Introduction} This is an example for using the \textsf{gamebook} package that can be used for typesetting gamebooks with \LaTeX. If you do not know what a gamebook is, just have a look at the informative Wikipedia article \begin{center} \url{http://en.wikipedia.org/wiki/Gamebook} \end{center} or check out Demian's very good overview website, where you can find tons of information about gamebooks: \begin{center} \url{http://www.gamebooks.org} \end{center} The example text is a modified translation of the ``Spielbuch''-example on Wikipedia, \url{http://de.wikipedia.org/wiki/Spielbuch} used under CC-by-sa-3.0, \url{http://creativecommons.org/licenses/by-sa/3.0/legalcode}. Many thanks go to the authors of that article. \gbsection{start} You are locked in a strange room. Right in front of you, there is a big red button with a bright sign above it. On the northern wall, there is a heavy steel door. What would like to do in order to escape this room? \begin{gbturnoptions} \gbitem{Press the red button}{redbutton} \gbitem{Read the sign above the button}{signread} \gbitem{Try to open the steel door}{steelclosed} \end{gbturnoptions} \gbsection{wrongsec} Sections like this do not exist in typical gamebooks, because you cannot access them. In this example, such a section is only included in order to show you that you are reading the text in a ``wrong'' way. After section~1, you do not read directly section~2, but you proceed with the section you chose in section~1. This kind of interaction is what makes gamebooks a lot of fun. Now, please choose an option from section~1 above. \gbsection{redbutton} When you press the button, the whole building explodes. The game is over, please restart and remember: save early, save often. \gbsection{steelopen} You enter the code and a green light starts blinking. The heavy steel door opens. If you want to leave the room, \gbturn{steelleave}, if you would rather like to press the red button, \gbturn{redbutton}. \gbsection{steelclosed} The door is locked, but you find a small keypad right next to it. The pad's display reads ``ENTER CODE''. Do you know the right code? If so, turn to the section with the respective number. If you do not know the code, you can either press the red button (\gbturn{redbutton}) or read the sign above it (\gbturn{signread}). \gbsection{signread} The sign reads: \begin{quote} ``\emph{This is a simple little example that shows the typical structure of a gamebook. The original version was written for the German Wikipedia. And by the way, the code for the heavy steel door is '\ref{steelopen}'. Have fun and better do not press the red button!}'' \end{quote} With this new and hopefully valuable information, you wonder what to do next. If you think the warning is just for fun and, thus, would like to press the red button, \gbturn{redbutton}. If you would like to examine the heavy steel door, \gbturn{steelclosed}. \gbsection{steelleave} Congratulations, you made it! Sunshine falls on your eyes and after you got used to the bright light, you see an angry \textsc{Orc} running towards you, a blood-stained knife ready in its claw. You have no choice but to defend yourself. \gbvillain{Orc}{Skill}{5}{Stamina}{6} The fight begins, but that is another story\dots \end{document}