diff --git a/README.md b/README.md index 6742fe49..f428ae35 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/main.pdf b/main.pdf index d4234ef7..f04352d9 100644 Binary files a/main.pdf and b/main.pdf differ diff --git a/main.tex b/main.tex index 16f527a5..e70ea5ee 100644 --- a/main.tex +++ b/main.tex @@ -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} @@ -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}{} @@ -35,6 +43,7 @@ % Start document \begin{document} \begin{multicols}{2} +\fontfamily{ppl}\selectfont % Set text font % Your content goes here \section*{Test Section} \lipsum[1] @@ -42,6 +51,19 @@ \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