Skip to content

Commit c6452fc

Browse files
committed
Added tables, cleaned things up a bit
1 parent d2fd692 commit c6452fc

File tree

3 files changed

+50
-4
lines changed

3 files changed

+50
-4
lines changed

README.md

+26-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,27 @@
1-
Title: D&D 5e LaTeX Template
1+
# D&D 5e LaTeX Template
2+
3+
This is a prelimary attempt at a D&D 5e LaTeX template. The color scheme is close to the original source books, as are the fonts. The fonts chosen are included by default in TeX Live.
4+
5+
An example of a table with alternating row colors is given. It's a bit gross, however, and a lot could be done to clean that up.
6+
7+
The template compiles with pdflatex.
8+
9+
### Version
10+
0.1
11+
12+
### Installation
13+
14+
Just clone the repo. From terminal:
15+
16+
```sh
17+
$ git clone [git-repo-url] 5e-template
18+
$ cd 5e-template
19+
$ pdflatex main.tex
20+
```
21+
22+
### Todo's
23+
24+
- Wrap tables up in macros
25+
- Export most of the preamble to a .cls file
26+
- Consider implementing more complex tables for monsters, etc.
227

3-
A prelimary attempt at a latex template for 5e-style material. Really should be using a different font for the green box environment and text. Also, no attempt is made at alternating table highlights.

main.pdf

50.7 KB
Binary file not shown.

main.tex

+24-2
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@
88
\usepackage{lipsum} % Filler text
99
\usepackage{multicol} % Two cols
1010
\usepackage[cm]{fullpage} % Small margins
11+
\setlength{\columnsep}{1cm}
1112
\usepackage{bookman} % Closest built-in font I could find
1213
\usepackage[T1]{fontenc}
1314
\usepackage{mdframed} % Used for green boxes
14-
\setlength{\columnsep}{1cm}
15+
\usepackage[table]{xcolor}
16+
\usepackage{tabularx}
1517

1618
% Define colors, sample from the books
1719
\usepackage{color}
@@ -23,9 +25,15 @@
2325

2426
% Green comment box definition
2527
\newenvironment{commentbox}[1]
26-
{\begin{mdframed}[frametitle={#1}, frametitlefont=\scshape\bfseries, linecolor=commentgreen, backgroundcolor=commentgreen]}
28+
{\fontfamily{lmss}\selectfont\begin{mdframed}[frametitle={#1},
29+
frametitlefont=\scshape\bfseries,
30+
linecolor=commentgreen,
31+
backgroundcolor=commentgreen]}
2732
{\end{mdframed}}
2833

34+
% Font environment
35+
\newenvironment{lmss}{\fontfamily{lmss}\selectfont}{}
36+
2937
% Adjust section and subsection colors and font
3038
\titleformat{\section}
3139
{\color{titlered}\normalfont\scshape\Huge}{\thesection}{1em}{}
@@ -35,13 +43,27 @@
3543
% Start document
3644
\begin{document}
3745
\begin{multicols}{2}
46+
\fontfamily{ppl}\selectfont % Set text font
3847
% Your content goes here
3948
\section*{Test Section}
4049
\lipsum[1]
4150
\subsection*{Test Subsection}
4251
\begin{commentbox}{Neat Green Box!}
4352
\lipsum[1]
4453
\end{commentbox}
54+
\lipsum[3]
55+
56+
\noindent
57+
\begin{lmss} % Switch font
58+
\rowcolors{1}{bgtan}{commentgreen} % Alternate colors
59+
\begin{tabularx}{\linewidth}{XX}
60+
\textbf{Table head} & \textbf{Table head} \\
61+
Some value & Some value \\
62+
Some value & Some value \\
63+
Some value & Some value
64+
\end{tabularx}
65+
\end{lmss}
66+
4567
\lipsum
4668

4769
% End document

0 commit comments

Comments
 (0)