DND-5e-LaTeX-Template: Installation and Usage
LaTeX package to typeset material for the fifth edition of the "world's greatest roleplaying game".
At a glance
- What is it?
- DND-5e-LaTeX-Template is a TeX class and package for producing fifth-edition-style Dungeons & Dragons documents. It offers a closer approximation to the core books than plain LaTeX, with several installation paths and explicit layout controls.
- Who is it for?
- Adopt the `dndbook` class when a document should closely follow the package's fifth-edition typography, colors, columns, and page treatment. Do not adopt it if exact reproduction of the core books is required, because the README explicitly says the result is close rather than identical.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 8 days ago.
- What is it written in?
- Mainly TeX, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on October 20, 2026, and from our analysis. They are not legal advice.
Editorial analysis
Why DND-5e-LaTeX-Template exists
DND-5e-LaTeX-Template addresses a specific typesetting problem: LaTeX can reproduce the structure of a game document, but its defaults will not resemble a fifth-edition Dungeons & Dragons book. The project supplies a `dndbook` class and a `dnd` package that add the book's characteristic presentation elements, including color schemes, fonts, layouts, background artwork, footers, and multi-column contents. According to the README, these choices are close to those used in the core books, but they are not exact reproductions. That distinction matters for publishers, campaign writers, game masters, and designers who want a consistent fifth-edition visual identity without manually rebuilding the style in ordinary LaTeX. It is less suitable for authors who require typographically identical core-book output or who need a generic publishing template unrelated to this game. The package is intended for people who already have a LaTeX toolchain or are willing to use Overleaf, because it does not provide a graphical document editor.
The dndbook class and dnd package
The recommended entry point is the `dndbook` class. A document loads it in the preamble and can then place content in a familiar LaTeX document body. The class supports the options of the standard `book` class, which gives authors access to conventional controls such as `10pt`, `twoside`, `twocolumn`, and `openany`. It also recognizes package-level options including `bg`, `justified`, `nomultitoc`, and `nodeprecatedcode`. The `layout` option belongs only to the `dnd` package. This reflects two integration levels. `dndbook` defines the intended document architecture itself, while `dnd` can be attached to an existing class and alter typography, colors, geometry, and other layout settings. The README says the package mode has only been tested with the `book` class, so choosing another host class introduces a support boundary. For a new fifth-edition-style document, the class route is the documented default. Package mode is most relevant when retaining an existing `book` document structure is more important than adopting the complete `dndbook` class.
Installing the template for a LaTeX user
After either installation, a document using `\documentclass{dndbook}` should resolve the local `dndbook.cls`. The archive command follows the repository's `master` URL even though the repository's default branch is identified as `dev`. That distinction is worth checking before an organization relies on the archive route for a controlled build.
A first dndbook document
Create a small document that requests the class before loading ordinary language and input packages. The README's class example uses `pdfTeX`-compatible setup and leaves the document body as a placeholder:
\documentclass[10pt,twoside,twocolumn,openany,nodeprecatedcode]{dndbook}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\begin{document}
% ...
\end{document}This first document exercises the class resolution and package loading path. The `nodeprecatedcode` option excludes deprecated code from the build. The README also states that the template works with `pdfTeX`, `LuaTeX`, and `XeTeX`, so engine choice is not limited to `pdflatex`. If the project is being built from its repository, the supplied `Makefile` uses `latexmk` and defaults to `pdflatex`. Its explicit `LATEX` variable can select another engine:
.PHONY: all clean lint
LATEX ?= pdflatex
all: example.pdf
%.pdf: %.tex
latexmk --interaction=nonstopmode --pdf --pdflatex=$(LATEX) $<The documented release process also says to compile the example PDF, making `example.tex` the most concrete repository-backed starting point for evaluating the template.
Overleaf and project-scoped alternatives
This project-scoped method is a real alternative to a user-wide package installation. It makes the dependency explicit beside the document and can suit a repository that wants to pin a known checkout. The cost is manual path configuration and an additional clone. Overleaf is more convenient for a temporary document, while `TEXINPUTS` is better suited to a versioned local project where package acquisition should be reproducible.
Layout controls and compatibility trade-offs
The options expose several decisions that can materially affect a document. `bg` is key-value: `full` loads background and footer images, `none` removes both, and `print` retains only the footer images. `justified` enables justified column copy. `nomultitoc` disables the multi-column table of contents. The package-only `layout` option accepts `true` or `false`; when enabled, loading `dnd` also modifies geometry, colors, and typography. The documented default is `true` for compatibility with early releases, but the README says that default will change in a future release. That makes explicit configuration preferable for a document intended to survive an upgrade. The recommended class example includes `nodeprecatedcode`, which also removes deprecated code from the build. Together, these options let an author narrow the package's visual intervention, but they do not make the result identical to the core books. The README's “close” wording should be treated as the defining limitation.
Known failure modes and the MIT license
A second issue occurs when a `monsterbox` or `monsterboxnobg` is wrapped in a floating `figure`. The extra spacing disrupts spacing inside the stat block. The README instead directs authors to pass `float` directly to `monsterbox`:
\begin{monsterbox}[float=b]{Orc Warden}
% ...
\end{monsterbox}The repository uses the MIT license. That permits use, modification, distribution, and sublicensing under the license terms, subject to its notice and disclaimer. This is a licensing observation rather than legal advice. For maintenance, the repository is not archived and the last push was on 2026-10-15. The most recent listed release is `v0.8.0`, dated 2020-04-21, so repository activity and packaged release history should be treated as separate signals when selecting a version.
Editorial conclusion
Adopt the `dndbook` class when a document should closely follow the package's fifth-edition typography, colors, columns, and page treatment. Do not adopt it if exact reproduction of the core books is required, because the README explicitly says the result is close rather than identical. Before committing, compile a small document with the intended TeX engine, review the `layout`, `bg`, and `justified` settings, and confirm that the installed TeX distribution includes the required packages.
Frequently asked questions
How do I install DND-5e-LaTeX-Template for my user?
The README recommends creating a directory under `TEXMFHOME`, then extracting the latest release there or cloning the repository into `$(kpsewhich -var-value TEXMFHOME)/tex/latex/dnd`. LaTeX can then find the package automatically.
Can I use DND-5e-LaTeX-Template with an existing LaTeX class?
Yes. Load the `dnd` package with an existing class, but the README says this mode has only been tested with the `book` class. The package accepts `layout=true` or `layout=false` to control whether it modifies the document layout.
Which TeX engines are supported by DND-5e-LaTeX-Template?
The README states that the template works with `pdfTeX`, `LuaTeX`, and `XeTeX`. It also documents `lualatex main.tex` as a workaround for stat block text color not surviving page breaks.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/rpgtex-dnd-5e-latex-template)Was this useful?