diff options
author | Karl Berry <karl@freefriends.org> | 2011-12-01 23:51:49 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2011-12-01 23:51:49 +0000 |
commit | 4cc9e43d8a258d64d976fc3860e27a95a95b08c5 (patch) | |
tree | bae7fadb2df35e9b80742a1609265ab54c4df933 /Master/texmf-dist/tex/latex/gamebook | |
parent | 3131715fb5bce44da6c7584315237731aa752eba (diff) |
new latex package gamebook (29nov11)
git-svn-id: svn://tug.org/texlive/trunk@24714 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/gamebook')
-rw-r--r-- | Master/texmf-dist/tex/latex/gamebook/gamebook.sty | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/gamebook/gamebook.sty b/Master/texmf-dist/tex/latex/gamebook/gamebook.sty new file mode 100644 index 00000000000..6cdd574b16e --- /dev/null +++ b/Master/texmf-dist/tex/latex/gamebook/gamebook.sty @@ -0,0 +1,86 @@ +%% +%% This is file `gamebook.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% gamebook.dtx (with options: `package') +%% +%% This is a generated file. +%% +%% Copyright (C) 2011 by A. 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. +%% +\NeedsTeXFormat{LaTeX2e}[1999/12/01] +\ProvidesPackage{gamebook} + [2011/11/29 v1.0 Style for gamebooks/interactive novels] +\RequirePackage{ifthen} + \newboolean{@debug} + \newboolean{@drafting} + +\DeclareOption{debug}{\setboolean{@debug}{true}} +\DeclareOption{draft}{\setboolean{@drafting}{true}} +\ProcessOptions\relax +\RequirePackage{fancyhdr} +\RequirePackage{extramarks} +\newcommand{\gbheadtext}{Gamebook} +\newcommand{\gbheader}{% +\pagestyle{fancy}% +\renewcommand{\sectionmark}[1]{\markboth{\thesection}{\thesection}}% +\fancyhead{}% clear all header fields +\fancyhead[LO,RE]{\small\gbheadtext} +\fancyhead[RO,LE]{\small\ifthenelse{\equal{\firstleftmark}% +{\leftmark}}{\leftmark}{\firstleftmark~--~\leftmark}}% +} +\newcommand{\gbdebug}[1]{\protect{\ifthenelse{\boolean{@debug}}% +{~\texttt{\scriptsize(#1)}}{\relax}}} +\newcommand{\gbdebugx}[1]{\protect{\ifthenelse{\boolean{@debug}}% +{\marginpar{\texttt{\scriptsize(#1)}}}{\relax}}} +\RequirePackage{titlesec} +\titleformat{\section}[block]{% +\centering\bfseries}{\fbox{\thesection}}{1em}{\relax} +\newcommand{\gbsection}[1]{\section{\label{#1}}\gbdebugx{#1}} +\newcommand{\gbturntext}{turn~to~} +\newcommand{\gbturn}[1]{\gbturntext{\bfseries\ref{#1}}\gbdebug{#1}}%\fbox +\newenvironment{gbtabbing} + {\setlength{\topsep}{0pt}% + \setlength{\tabbingsep}{0pt}% + \setlength{\partopsep}{0pt}% + \tabbing}% + {\endtabbing} + +\newcommand{\gbvillain}[5]{% +\hfill\begin{gbtabbing}% +\hspace{\parindent}\= Sehr sehr langer Name % +\= Sehr langer Skill + Wert \= Sehr langer Skill + Wert \kill% +\> \textsc{#1} \> #2~#3 \> #4~#5 \\% +\end{gbtabbing}% +}% +\RequirePackage{enumitem} +\newlist{gbturnoptions}{itemize}{1} +\setlist[gbturnoptions]{% +leftmargin=\parindent,labelindent=\parindent,label=} % noitemsep +\newcommand{\gbitem}[2]{\item #1\hfill\gbturn{#2}} +\ifthenelse{\boolean{@drafting}}{% + \RequirePackage{draftwatermark}% + \SetWatermarkLightness{0.9} +\SetWatermarkScale{.5} +\SetWatermarkText{Draft} +\RequirePackage{scrtime} % time access +\PassOptionsToPackage{draft}{prelim2e} +\RequirePackage{prelim2e} +\renewcommand{\PrelimWords}{\relax} +\renewcommand{\PrelimText}% +{\footnotesize[\,\today\ at \thistime\,]}}{\relax} +\endinput +%% +%% End of file `gamebook.sty'. |