- Notifications
You must be signed in to change notification settings - Fork317
LaTeX package to typeset material for the fifth edition of the "world's greatest roleplaying game".
License
rpgtex/DND-5e-LaTeX-Template
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This is a LaTeX template for typesetting documents in the style of the fifth edition of the "world's greatest roleplaying game".
- Color schemes, fonts, and layout are close to the core books (but not exactly the same).
- TeX Live includes the default fonts.
- Works with pdfTeX, LuaTeX, and XeTeX.
There are three options for using this project; choose the one that'sright for you.
This will install the template for your current user in one of the following locations:
- Linux:
~/.texmf/tex/latex
- OS X / macOS:
~/Library/texmf/tex/latex
- Windows:
C:\Users\{username}\texmf\tex\latex
LaTeX will find the package automatically.
Prepare your
TEXMFHOME
directory.mkdir"$(kpsewhich -var-value TEXMFHOME)/tex/latex/"
Download thelatest release and extract it in
$TEXMFHOME/tex/latex/
.wget https://github.com/rpgtex/DND-5e-LaTeX-Template/archive/master.zipunzip -d"$(kpsewhich -var-value TEXMFHOME)/tex/latex/" master.zipcd"$(kpsewhich -var-value TEXMFHOME)/tex/latex/"mv DND-5e-LaTeX-Template-master dnd
Alternatively, clone the repo to the same location:
git clone https://github.com/rpgtex/DND-5e-LaTeX-Template.git"$(kpsewhich -var-value TEXMFHOME)/tex/latex/dnd"
Overleaf is an online TeX editor -- thinkabout it like Google Docs for TeX documents. This option does notrequire a local TeX installation and is an ideal approach for one-offprojects.
- Download this GitHub repository as a ZIP archive using theCloneor download link above.
- On Overleaf, click theNew Project button and selectUploadProject. Upload the ZIP archive you downloaded from thisrepository.
You can also clone a copy of the repository to each LaTeX project. For example, to clone the repository to alib/
directory in your project:
mkdir lib/git clone https://github.com/rpgtex/DND-5e-LaTeX-Template.git lib/dnd
LaTeX will not find the template automatically. SetTEXINPUTS
when compiling your project to locate the package:
TEXINPUTS=./lib//: pdflatex project.tex
Load thedndbook
class in your preamble:
\documentclass[10pt,twoside,twocolumn,openany,nodeprecatedcode]{dndbook}\usepackage[english]{babel}\usepackage[utf8]{inputenc}\begin{document}% ...
You can also load thednd
package directly to use it with another class.Note that the package has only been tested with thebook
class.
\documentclass[10pt,twoside,twocolumn,openany]{book}\usepackage[english]{babel}\usepackage[utf8]{inputenc}\usepackage[layout=true]{dnd}\begin{document}% ...
Option | Packagednd | Classdndbook |
---|---|---|
bg | ✓ | ✓ |
justified | ✓ | ✓ |
layout | ✓ | |
nomultitoc | ✓ | ✓ |
nodeprecatedcode | ✓ | ✓ |
Thedndbook
class also supports all the options of thebook
class.
Declare how to load background and footer images. This is a key-value option with the following possible values:
full
: Load both background and footer images. (default)none
: Removes both background and footer images.print
: Loads only the footer images.
Justify column copy.
Controls whether loading thednd
package also modifies the document layout (geometry, colors, typography, etc.).This is a boolean option with the following possible values:
true
: Modify the document layout.false
: Do not modify the document layout.
The default value istrue
for backwards compatibility with early releases.This will change in a future release.
Disable multi-column table of contents.
Excludes all deprecated code from the build process.
If you don't have LaTeX installed, we recommend installing a completeTeX Live distribution.
sudo apt-get install texlive-full
sudo pacman -S texlive-bin texlive-core texlive-latexextra
MacTex has its owninstaller, but you can install it through brew cask:
brew cask install mactex
brew cask install mactex-no-gui
Usetlmgr
to install packages as needed, see thisanswer for more information
brew cask install basictexbrew cask install tex-live-utility
After any of this, use the following such that the texlive directory doesn't require admin rights.
sudo chown -R myuser:mygroup /usr/local/texlive
For more information about MacTex permissions, see the following StackExchangepost
This is a known issue intcolorbox
. According to thetcolorbox
4.12 manual (p. 363):
If your text content contains some text color changing commands, your color will not survive the break to the next box.
You can use LuaTeX to compile the document.
lualatex main.tex
Wrapping amonsterbox
(ormonsterboxnobg
) in a floating figure adds extra space between stat block elements:
\begin{figure}[b]\begin{monsterbox}{Orc Warden}% ...\end{monsterbox}\end{figure}
Instead, use thetcolorbox
float
parameter:
\begin{monsterbox}[float=b]{Orc Warden}% ...\end{monsterbox}
Refer to thetcolorbox
documentation (section 4.13) for more float parameters.
We useEditorConfig to enforce consistent formatting.Install the appropriate plugin for your editor.
Run
./bin/bump-version
to tag the new version../bin/bumpversion<version>
Compile the example PDF.
Save the first page of the PDF as scrot.jpg.
Update the change log for the new release; commit your changes.
Push changes.
git push&& git push --tags
Create a new release and attach the PDF and scrot.
- Background image fromLost and Taken
MIT
About
LaTeX package to typeset material for the fifth edition of the "world's greatest roleplaying game".