rpgtex / dnd-5e-latex-template Goto Github PK
View Code? Open in Web Editor NEWLaTeX package to typeset material for the fifth edition of the "world's greatest roleplaying game".
License: MIT License
LaTeX package to typeset material for the fifth edition of the "world's greatest roleplaying game".
License: MIT License
LaTeX packages are supposed to provide portable macros that work with many document classes.
This package functions more like an extension of the book
class. It:
book
class because it sets chapter styles (we can work around this).We can't embed the boxes, tables, or other features in documents without formatting the entire document. This isn't particularly useful for users, but it is useful for the user manual (#49).
I think we should split this functionality into two pieces:
dnd.sty
: Provides macros, environments, and colours. Loading this package would have no side-effects.dnd.cls
: Formats the document according to the book style.The document class would accept the same arguments as the book
class, as well as any current package arguments:
\documentclass[letterpaper, twocolumn, bg=print, nomultitoc]{dnd}
Alternatively, we could wrap all the underlying book
arguments in a book
key:
\documentclass[book={letterpaper, twocolumn}, bg=print, nomultitoc]{dnd}
That opens the door to customize other packages called by the class, or even support other base classes.
It's possible to make this change in a backwards-compatible way.
The package would still contain all the formatting code. I suggest wrapping that code with a boolean package option (e.g., layout
). Initially, we'd set it as a default option to enable the current formatting code:
\ExecuteOptionsX{bg=full, layout=true}
Inside the class, we'd add layout=true
to the default package options:
\PassOptionsToPackage{layout=true}{dnd}
\RequirePackage{dnd}
Users would simply be able to call the class to format their document:
\documentclass{dnd}
\begin{document}
% ...
Inside the user manual, we'd load the package without the formatting code:
\documentclass{book}
\usepackage[layout=false]{dnd}
At some future release, we'd switch the default. If users don't want to use the class, and want the current behaviour, they could set layout
explicitly:
\documentclass{book}
\usepackage[layout=true]{dnd}
We can detect if the user loaded the dnd
class or not and log appropriate warnings.
Hi
Awesome template you made! Thanks for providing it to the world. 👍
I try to define a table where the first of the two columns is not as wide as the second one. But unfortunately I don't understand how to use "\begin{dndtable}[your options here}".
How would I need to do this?
Thanks beforehand,
Andy
I am trying to compile example.tex
on Ubuntu 14.04
while running the command pdflatex example.tex
I get the following error
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/grfext.sty
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/kvdefinekeys.sty))
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/kvoptions.sty)
(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg))
(/usr/share/texlive/texmf-dist/tex/latex/psnfss/t1ppl.fd)
Chapter .
! Package pgfkeys Error: I do not know the key '/tcb/before skip' and I am goin
g to ignore it. Perhaps you misspelled it.
See the pgfkeys package documentation for explanation.
Type H <return> for immediate help.
...
l.24 \begin{commentbox}{Neat Green Box!}
?
Any idea why?
When I use the package with the memoir class it breaks the table of contents of the memoir class.
See gist for MWE and details: https://gist.github.com/bt2901/257b76d54936c233758a7e462ea5afe6
Compiled with pdfLatex, LaTex, LuaTex and XeLaTex: all produce some issues (but some compilers produce a different set of issues)
From #106.
We need a table that:
tabularx
X
column typeUse-case: multi-column tables like the example trinkets table (PHB 160).
Similarly to paperbox as described in #51, monsterbox renders its top and bottom decorations on both parts when it is broken across a column. Unlike paperbox, it is valid for a monsterbox to break across a column.
Does anyone know how to suppress the rendering of the top and bottom decorations that are rendered in the middle when the monsterbox breaks across a column?
Mac LaTeX install using homebrew is brew cask install mactex
I am getting a weird error when I try to compile the example.tex file on my machine with either pdflatex or latexmk -pdf. I have attached my compilation log file and the error appears on line 1669 of it.
I've noticed that on Player's Handbook we have the same footer on both the page.
Have you consider to switch from
\fancyfoot[LE]{
\textcolor{uppergold}{\scshape\thepage}
\hspace*{0.9cm}
\raisebox{12pt}{\scshape\textcolor{uppergold}{\leftmark}}
}
\fancyfoot[RO]{
\raisebox{12pt}{\scshape\textcolor{uppergold}{\rightmark}}
\hspace*{1cm}
\textcolor{uppergold}{\scshape\thepage}
}
}
to change your \fancyfoot[RO]
with \leftmark
??
When you run the pdflatex
command (as recommended in the README.md) on an Ubuntu installation without latex it suggests installing texlive-latex-base
. Doing so and running will lead to a long series of errors.
I think this project depends on texlive-full
, as I've installed it and have no errors now. The install took forever, though, so identifying what subset of texlive-full the project depends on would be a great help.
@JohanSpaedtke, @tsegers, @Toiwat, @jjtParadox, @hirnstrudel, @FrederikGoovaerts, @dougsko, @fverdoja, @jaybill, @crow1170, @Xecese
First, thank you for contributing to https://github.com/evanbergeron/DND-5e-LaTeX-Template in the past. I have just started as a collaborator on this project and have started cleaning up the old issues and pull requests. I have posted a number of new questions about solutions for various issues and would value your input on them. Please also consider watching this project if you would be interested in contributing in the future.
To Create a rulebook it would be nice to use the "maketitle" command to create the titlepage with the same Backgroundimage.
/u/Bronze_Johnson on Reddit created an SVG version of the footer image.
We can convert this to EPS/PDF and include it in the footer directly. This would eliminate the large print version background images. We'd also be able to provide a package option to disable it.
There's a bunch of other resources from the /r/UnearthedArcana subreddit in that drive.
Though the automatic chapter styling is glorious, I can't for the life of me get a decent title page. \maketitle does what I want, but I'd like to keep the nice background.
I spent several hours attempting to make a title using the paper image and simply couldn't get it. I don't know enough about LaTex, but is a \makedndtitle possible?
Edit: Immediately after posting this, it occurred that someone else might have had the same problem, and I found the example at https://github.com/Vladar4/DND-5e-LaTeX-Template-Module-Example/blob/master/module.tex - unfortunately I have no real idea what I'm doing and I can't get it to do what I want.
To clarify; when \maketitle is added, I get a blank white page with the title, date and author. I want that, except with the paper background.
When using BasicTeX
(and I'm sure many would, as it's much much smaller), not all packages come installed by default; it'd be useful if a guide about it could be included, so one knows what additional packages are needed.
I personally needed to install the following packages using tlmgr
in the console only to get it compiled, but it may be the pdf still shows some issues.
$ tlmgr update --self
$ tlmgr install lipsum
$ tlmgr install keycommand
$ tlmgr install tcolorbox
$ tlmgr install environ
$ tlmgr install trimspaces
$ tlmgr install enumitem
$ tlmgr install xstring
$ tlmgr install tocloft
$ tlmgr install titlesec
$ tlmgr install collection-fontsrecommended
One of the first thiings I encountered when using this package was that I instinctively wanted to put my own images in img, leading to a crowded folder. What does everyone think about going from the existing structure:
-|-img
|-lib
|-root files
to:
-|-dndlib
| |-img
|-root files
In other words, renaming the lib folder to dndlib so it is less generic and placing the img folder within dndlib to encapsulate the entire package aside from dnd.sty. This strikes me as more of a "nice to have" than a critical issue, but it would make people's projects cleaner. What does everyone think?
Would it be possible to add a license to this code so we know what permissible uses are?
So I used a reasonably edited version of this package to create the 5e update of War of the Burning Sky. The following link has links to chapter 1 as well as the player's guide and campaign guide. It is a great adventure path, and if you do not want to spoil what happens (in case you want to be a player), the player's guide is safe to read.
Currently, a \paragraph
heading does not match the look of the monster ability heading or a paragraph heading from the PHB. It also has an unreasonable amount of space after it.
When compiling example.tex
using pdflatex
, the following error is thrown:
! LaTeX Error: Environment hangingpar undefined.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.79 \begin{hangingpar}
Is there a particular package corresponding to the hangingpar
environment? If not, adding \usepackage{hanging}
in the preamble and replacing hangingpar
with hangparas
resolves the problem.
I've noticed that the monster box formatting does not work correctly when broken across a column. I've attached my source and the PDF generated from it. Notice how the portion in the next column no longer uses red text for the languages and challenge rating.
My specific use case also involves being able to float monster boxes. In my actual code, this results in extra blank lines after the hlines, but I'm still working on reducing that to a reproducible example.
The PDF was generated with this command: pdflatex -file-line-error -interaction=nonstopmode "\input" main.tex
I want to use this template to typeset characters and NPCs. How best to go about doing this?
There are a few pull requests that are fully compatible and useful that I think can and should get merged in :)
I would like a printerfriendly keyword added to the package. This would be used similarly to the background choice keywords the package already has to determine whether a background image is used. In this case, printerfriendly would shut off the background image, change the even rows tablecolor to gray, switch monsterboxes to the nobg style, and removes the ornaments from paperbox and turns it gray. Essentially, it would look like the SRD. A user could then create a beautiful pdf for screen viewing, set the printerfriendly flag, and compile a second version of the pdf for printing.
With development picking up we need a better way of communicating changes to our users. I propose we:
Adopt semver and bump versions like so:
We can start at 0.1.0 because things are still in flux.
Obey LaTeX conventions and \ProvidePackage{dnd}{YYYY/mm/dd <version>}
.
Compile the manual/example document for every release and attach it as a release artefact.
Maintain a changelog.
Note in the README that we adopted semver as of <date>
.
Tools like bumpversion and github-release can automate most of the chore work.
Afaik, table of contents currently doesn't look that great. This is more book-keeping for myself, but if anyone wants to tackle this, I'd be happy to merge the PR.
Have you consider to redefine the plain pagestyle on dnd.sty?
If you make on your dnd.sty
\fancypagestyle{plain}{%redefining plain pagestyle
\footskip = 50pt %push the footer down so it fits with the decal from the bg-img
\fancyhfoffset[LE]{28pt} % push the footer left on even pages so it fits the decal
\fancyhfoffset[RO]{30pt} % push the footer right on odd pages so it fits the decalbg-img
\renewcommand{\headrulewidth}{0.0pt} %no rule for header
\renewcommand{\footrulewidth}{0.0pt} %no rule for footer
\fancyhead{} % clear all header fields
\fancyfoot{} % clear all footer fields
\fancyfoot[LE]{
\textcolor{uppergold}{\scshape\thepage}
\hspace*{0.9cm}
\raisebox{12pt}{\scshape\textcolor{uppergold}{\leftmark}}
}
\fancyfoot[RO]{
\raisebox{12pt}{\scshape\textcolor{uppergold}{\leftmark}}
\hspace*{1cm}
\textcolor{uppergold}{\scshape\thepage}
}
}
Index Pages, First pages on Chapters or Parts are well styled (I'm using book
and extbook
)
Hey,
Slowly but surely I'm learning Latex through a little pet project; I'm using this template and package, which I think is fantastic and cannot thank you enough for making and contributing to. The one issue I'm having is to break a dndtable across two pages without having to write
...
\end{dndtable}
\pagebreak
\begin{dndtable}
...
every time.
For those familiar with the Player's Handbook, I'm looking to recreate the table of Trinkets. I know the longtable package will do it, but being a novice I'm not sure where to go from there.
Sorry if this seems very rudimentary, but I would greatly appreciate any advice, either on how to incorporate it into the dndtable package and redefine it, or if the functionality may be added in the future.
Thank you for your time,
Clos3y
Looking for someone to do the following:
For a Rulebook it would be nice to create the Table of Contents with the "\tableofcontents" command.
The Style should be the same as the rest but only in one Column.
Actually the Table is generated in two Columns.
It would be useful to be able to specify a label for the spells. That would allow hyperlinking from a spell list to a spell description. The following is a suggestion/use-case:
\section{Spell List}
…
\hyperlink{Some Magic}{spell:some-magic}
…
\section{Spell Descriptions}
…
\begin{spell}[label=spell:some-magic]
{Some Magic}
…
\end{spell}
…
The paperbox is used as a sidebar in the core books. It is never larger than one column and never breaks from one column to the next. I think we should remove the breakable keyword from paperbox. When a paperbox breaks from one column to the next, it is rendered as two distinct paperboxes, each with their own top and bottom decorations. The way I have been using paperbox is wrapping it in the figure environment and floating it to the top or bottom of a column like this:
\begin{figure}[!b]
\begin{paperbox}[breakable=false]{Title}
\lipsum[1]
\end{paperbox}
\end{figure}
If you do not include [breakable=false], the additional decorations are rendered in the middle of the paperbox where the break was calculated to go even though the floating figure environment keeps it from breaking across columns.
Removing breakable would mean that the paperbox could only be used in places where it would not overlap the end of a column or be wrapped in a figure environment. Otherwise and places where paperbox is used would be pushed to the next column. It also means that paperbox cannot be longer than a column, but both those conditions fit with how it is actually used in the books. This could be a breaking change depending on how people are using paperbox.
What does everyone think of this?
Hi @evanbergeron: Please excuse me if this is an easy fix, I'm a LaTeX noob, as in I've spent only spent a few hours using it.
How do I use a column break in your template? I'm trying to use a column break command, and it seems to break the render.
The command i am using is as follows:
\vfill\null
\columnbreak
It seems the \columnbreak command breaks the render, and only renders the content after it is placed, not the content on the page before it. The \vfill\null doesn't seem to do anything.
Is there a specific command to use in your template to render a column break, so that the text can be placed in the next column?
Kind regards,
RJBPrime
I was wondering if there's a simple way to include a title page and cover sheet using this? This is great for internal pages, but it'd be great to make at least a title page explaining what the document is. :)
Thanks!
In my document, I need to be able to float monster boxes. But if they are close to a page break, the formatted is affected, most notably by extra vertical space being inserted as well as the text color no longer being correct.
I've attached the source and the generated PDF. Notice how the monster box is place on the next page as a single box, but there is extra space located above the monster stats, and the text for the monster stats is not red as it should be.
The PDF was generated with the command pdflatex -file-line-error -interaction=nonstopmode "\input" main.tex
New to LaTeX, so I can't figure this out. How would I insert a picture and have it take both columns, instead of just being in one.
Thanks!
When I attempt to change the documentclass
to article
, I get the following LaTeX error:
LaTeX Error: \thechapter undefined
As several people have noted, the core books have tables and sidebars in different colors depending on the book or even chapter within the book. One potential solution to allow a color to be set for a sidebar is to add an optional color argument as shown in #41. While that solution would work, it means that someone needs to set the color every time they use the environment (such as paperbox or dndtable)
I would like to start discussion on a slightly different solution. The dnd.sty already includes xcolor which means we have access to \colorlet{colorname}{othercolor} in addition to the built in \definecolor{colorname}{format}{numbers}. What this allows us to do is the following:
\definecolor{monstertandark}{HTML}{F0DBB5} %e.g. used for older monsterbox
...
\colorlet{papercolor}{monstertandark}
A user can then override with one of the two options in the preamble:
\colorlet{papercolor}{blue!20}
% or
\definecolor{papercolor}{HTML}{444444}
This solution means we only need 1 table definition and colors can be swapped more easily when the color names match their corresponding environment. What does everyone think?
Currently we only have the dependencies for Ubuntu fleshed out - it'd be good to include installation instructions for a variety of distros.
If you're on a non-Ubuntu system and you have trouble getting this installed, when you get it figured out, could you comment here so we can add it to the README?
Thanks :)
While using a onecolumn version, text is not justified in quotebox and commentbox environment. It overflows the boxes on the right side.
The example.pdf currently generated by the package looks beautiful, but I wonder if it helps new users grasp how to use the package. What does everyone think about changing it so that it looks more like the user manual found with fancyhdr http://mirrors.ctan.org/macros/latex/contrib/fancyhdr/fancyhdr.pdf or titlesec http://mirrors.ctan.org/macros/latex/contrib/titlesec/titlesec.pdf?
This would allow new users to see up front how to use the various parts of the package along with their options, and the current example could be included as an example at the end. What does everyone think?
What do you thing about adding one more bg option similar to bg-print but with monsterboxes' backgrounds (as in bg-full) enabled (e.g. bg-nopaper or something)?
I prefer using justified text in my documents, but I have noticed that this makes the monster boxes less pleasing as they now have extra vertical space in them.
I've attached the source and the generated PDF.
The PDF was generated with the command pdflatex -file-line-error -interaction=nonstopmode "\input" main.tex
.
I'd like to see a table citing the reference styles of each component.
For example, consult PHB 170 for item lists, PHB 211 for spell descriptions, etc.
When trying to compile example.tex
after cloning the repo, I get the following:
(./lib/dndcomment.sty
! Undefined control sequence.
l.2 \DeclareTColorBox
{commentbox}{O{} m O{commentboxcolor}}{%
Any thoughts?
When specifying a monster's challenge rating in the details section of a monsterbox environment, the experience value of the monster should be automatically appended to the creature's CR. Currently this is not appended. EDIT: See the crexp command in dndmonster.sty.
The first time I compile the example.pdf
(when there's no example.aux
), the pdf ends up with the background all messed up and some other quirks in the content:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.