forked from adamhaapala/DND-5e-LaTeX-Template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
example.tex
242 lines (201 loc) · 7.91 KB
/
example.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
% Changing book to article will make the footers match on each page,
% rather than alternate every other.
%
% Note that the article class does not have chapters.
\documentclass[letterpaper,10pt,twoside,twocolumn,openany]{book}
% Use babel or polyglossia to automatically redefine macros for terms
% Armor Class, Level, etc...
% Default output is in English; captions are located in lib/dndstring-captions.sty.
% If no captions exist for a language, English will be used.
%1. To load a language with babel:
% \usepackage[<lang>]{babel}
%2. To load a language with polyglossia:
% \usepackage{polyglossia}
% \setdefaultlanguage{<lang>}
\usepackage[english]{babel}
%usepackage[italian]{babel}
% For further options (multilanguage documents, hypenations, language environments...)
% please refer to babel/polyglossia's documentation.
\usepackage[utf8]{inputenc}
\usepackage{lipsum}
\usepackage{listings}
\usepackage{dnd}
\lstset{%
basicstyle=\ttfamily,
language=[LaTeX]{TeX},
}
% Start document
\begin{document}
% Your content goes here
% Comment this out if you're using the article class.
\chapter{Chapter 1: The Dark \LaTeX}
\section{Main Section}
\lipsum[2] % filler text
\begin{quotebox}
As you approach this template you get a sense that the blood and tears of many generations went into its making. A warm feeling welcomes you as you type your first words.
\end{quotebox}
\subsection{Fun with boxes}
\subsubsection{Even more fun!}
\begin{commentbox}{This Is a Comment Box!}
A \lstinline!commentbox! is a box for minimal highlighting of text. It lacks the ornamentation of \lstinline!paperbox!, but it can handle being broken over a column.
\end{commentbox}
\subtitlesection{Weapon, +1, +2, or +3}
{Weapon (any), uncommon (+1), rare (+2), or very rare (+3)}
\lipsum[3]
\begin{figure}[!t]
\begin{paperbox}{Behold, the Paperbox!}
The \lstinline!paperbox! is used as a sidebar. It does not break over columns and is best used with a figure environment to float it to one corner of the page where the surrounding text can then flow around it.
\end{paperbox}
\end{figure}
% For more columns, you can say \begin{dndtable}[your options here].
% For instance, if you wanted three columns, you could say
% \begin{dndtable}[XXX]. The usual host of tabular parameters are
% available as well.
\header{Nice table}
\begin{dndtable}
\textbf{Table head} & \textbf{Table head} \\
Some value & Some value \\
Some value & Some value \\
Some value & Some value
\end{dndtable}
% You can optionally not include the background by saying
% begin{monsterboxnobg}
\begin{monsterbox}{Monster Foo}
\begin{hangingpar}
\textit{Small metasyntactic variable (goblinoid), neutral evil}
\end{hangingpar}
\hline%
\basics[%
armorclass = 12,
hitpoints = \dice{3d8 + 3},
speed = 50 ft
]
\hline%
\stats[
STR = \stat{12}, % This stat command will autocomplete the modifier for you
DEX = \stat{7}
]
\hline%
\details[%
% If you want to use commas in these sections, enclose the
% description in braces.
% I'm so sorry.
languages = {Common Lisp, Erlang},
]
\hline %[1mm]
\begin{monsteraction}[Monster-super-powers]
This Monster has some serious superpowers!
\end{monsteraction}
\monstersection{Actions}
\begin{monsteraction}[Generate text]
This one can generate tremendous amounts of text! Though only when it wants to.
\end{monsteraction}
\begin{monsteraction}[More actions]
See, here he goes again! Yet more text.
\end{monsteraction}
\end{monsterbox}
\section{Spells}
\begin{spell}
{Beautiful Typesetting}
{4th-level illusion}
{1 action}
{5 feet}
{S, M (ink and parchment, which the spell consumes)}
{Until dispelled}
You are able to transform a written message of any length into a beautiful scroll. All creatures within range that can see the scroll must make a wisdom saving throw or be charmed by you until the spell ends.
While the creature is charmed by you, they cannot take their eyes off the scroll and cannot willingly move away from the scroll. Also, the targets can make a wisdom saving throw at the end of each of their turns. On a success, they are no longer charmed.
\end{spell}
\lipsum[2]
\section{Colors}
This package provides several global color variables to style \lstinline!commentbox!, \lstinline!quotebox!, \lstinline!paperbox!, and \lstinline!dndtable! environments.
\begin{dndtable}[lX]
\textbf{Color} & \textbf{Description} \\
\lstinline!commentboxcolor! & Controls \lstinline!commentbox! background. \\
\lstinline!paperboxcolor! & Controls \lstinline!paperbox! background. \\
\lstinline!quoteboxcolor! & Controls \lstinline!quotebox! background. \\
\lstinline!tablecolor! & Controls background of even \lstinline!dndtable! rows. \\
\end{dndtable}
See Table~\ref{tab:colors} for a list of accent colors that match the core books.
\begin{table*}
\begin{dndtable}[XX]
\textbf{Color} & \textbf{Description} \\
\lstinline!PhbLightGreen! & Light green used in PHB Part 1 \\
\lstinline!PhbLightCyan! & Light cyan used in PHB Part 2 \\
\lstinline!PhbMauve! & Pale purple used in PHB Part 3 \\
\lstinline!PhbTan! & Light brown used in PHB appendix \\
\lstinline!DmgLavender! & Pale purple used in DMG Part 1 \\
\lstinline!DmgCoral! & Orange-pink used in DMG Part 2 \\
\lstinline!DmgSlateGray! (\lstinline!DmgSlateGrey!) & Blue-gray used in PHB Part 3 \\
\lstinline!DmgLilac! & Purple-gray used in DMG appendix \\
\end{dndtable}
\caption{Colors supported by this package}%
\label{tab:colors}
\end{table*}
\begin{itemize}
\item Use \lstinline!\setthemecolor[<color>]! to set \lstinline!themecolor!, \lstinline!commentcolor!, \lstinline!paperboxcolor!, and \lstinline!tablecolor! to a specific color.
\item Calling \lstinline!\setthemecolor! without an argument sets those colors to the current \lstinline!themecolor!.
\item \lstinline!commentbox!, \lstinline!dndtable!, \lstinline!paperbox!, and \lstinline!quoteboxcolor! also accept an optional color argument to set the color for a single instance.
\end{itemize}
\subsection{Examples}
\subsubsection{Using \lstinline!themecolor!}
\begin{lstlisting}
\setthemecolor[PhbMauve]
\begin{paperbox}{Example}
\lipsum[2]
\end{paperbox}
\setthemecolor[PhbLightCyan]
\header{Example}
\begin{dndtable}[cX]
\textbf{d8} & \textbf{Item} \\
1 & Small wooden button \\
2 & Red feather \\
3 & Human tooth \\
4 & Vial of green liquid \\
6 & Tasty biscuit \\
7 & Broken axe handle \\
8 & Tarnished silver locket \\
\end{dndtable}
\end{lstlisting}
\begingroup
\setthemecolor[PhbMauve]
\begin{paperbox}{Example}
\lipsum[2]
\end{paperbox}
\setthemecolor[PhbLightCyan]
\header{Example}
\begin{dndtable}[cX]
\textbf{d8} & \textbf{Item} \\
1 & Small wooden button \\
2 & Red feather \\
3 & Human tooth \\
4 & Vial of green liquid \\
6 & Tasty biscuit \\
7 & Broken axe handle \\
8 & Tarnished silver locket \\
\end{dndtable}
\endgroup
\subsubsection{Using element color arguments}
\begin{lstlisting}
\begin{dndtable}[cX][DmgCoral]
\textbf{d8} & \textbf{Item} \\
1 & Small wooden button \\
2 & Red feather \\
3 & Human tooth \\
4 & Vial of green liquid \\
6 & Tasty biscuit \\
7 & Broken axe handle \\
8 & Tarnished silver locket \\
\end{dndtable}
\end{lstlisting}
\begin{dndtable}[cX][DmgCoral]
\textbf{d8} & \textbf{Item} \\
1 & Small wooden button \\
2 & Red feather \\
3 & Human tooth \\
4 & Vial of green liquid \\
6 & Tasty biscuit \\
7 & Broken axe handle \\
8 & Tarnished silver locket \\
\end{dndtable}
% End document
\end{document}