Skip to content

Commit

Permalink
Added tables, cleaned things up a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
evanbergeron committed Mar 12, 2015
1 parent d2fd692 commit c6452fc
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 4 deletions.
28 changes: 26 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
Title: D&D 5e LaTeX Template
# D&D 5e LaTeX Template

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.

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.

The template compiles with pdflatex.

### Version
0.1

### Installation

Just clone the repo. From terminal:

```sh
$ git clone [git-repo-url] 5e-template
$ cd 5e-template
$ pdflatex main.tex
```

### Todo's

- Wrap tables up in macros
- Export most of the preamble to a .cls file
- Consider implementing more complex tables for monsters, etc.

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.
Binary file modified main.pdf
Binary file not shown.
26 changes: 24 additions & 2 deletions main.tex
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@
\usepackage{lipsum} % Filler text
\usepackage{multicol} % Two cols
\usepackage[cm]{fullpage} % Small margins
\setlength{\columnsep}{1cm}
\usepackage{bookman} % Closest built-in font I could find
\usepackage[T1]{fontenc}
\usepackage{mdframed} % Used for green boxes
\setlength{\columnsep}{1cm}
\usepackage[table]{xcolor}
\usepackage{tabularx}

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

% Green comment box definition
\newenvironment{commentbox}[1]
{\begin{mdframed}[frametitle={#1}, frametitlefont=\scshape\bfseries, linecolor=commentgreen, backgroundcolor=commentgreen]}
{\fontfamily{lmss}\selectfont\begin{mdframed}[frametitle={#1},
frametitlefont=\scshape\bfseries,
linecolor=commentgreen,
backgroundcolor=commentgreen]}
{\end{mdframed}}

% Font environment
\newenvironment{lmss}{\fontfamily{lmss}\selectfont}{}

% Adjust section and subsection colors and font
\titleformat{\section}
{\color{titlered}\normalfont\scshape\Huge}{\thesection}{1em}{}
Expand All @@ -35,13 +43,27 @@
% Start document
\begin{document}
\begin{multicols}{2}
\fontfamily{ppl}\selectfont % Set text font
% Your content goes here
\section*{Test Section}
\lipsum[1]
\subsection*{Test Subsection}
\begin{commentbox}{Neat Green Box!}
\lipsum[1]
\end{commentbox}
\lipsum[3]

\noindent
\begin{lmss} % Switch font
\rowcolors{1}{bgtan}{commentgreen} % Alternate colors
\begin{tabularx}{\linewidth}{XX}
\textbf{Table head} & \textbf{Table head} \\
Some value & Some value \\
Some value & Some value \\
Some value & Some value
\end{tabularx}
\end{lmss}

\lipsum

% End document
Expand Down

0 comments on commit c6452fc

Please sign in to comment.