Code Monkey home page Code Monkey logo

dnd-5e-latex-template's People

Contributors

alanquatermain avatar anoderay avatar benwebber avatar briancriswell avatar clue-codes avatar dependabot[bot] avatar dinosourcesrex avatar dpwright avatar evanbergeron avatar frederikgoovaerts avatar fverdoja avatar girsi avatar gryphius avatar j2nlab avatar jaybill avatar johanspaedtke avatar m42e avatar maia-everett avatar n9199 avatar polpetta avatar raphael-proust avatar ravenclaw900 avatar stwerp avatar toiwat avatar tsegers avatar vermiculus avatar vladar4 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dnd-5e-latex-template's Issues

Convert to a document class

Problem

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:

  • Requires the book class because it sets chapter styles (we can work around this).
  • Changes the page geometry, sets fonts, page numbers, etc.

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).

Proposal

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.

API

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.

Migration

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.

column width in table

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

Error while doing Pdflatex

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?

Breakable tabularx

From #106.

We need a table that:

  • supports the tabularx X column type
  • breaks across page breaks (or columns in two-column mode)

Use-case: multi-column tables like the example trinkets table (PHB 160).

Formatting monsterbox when breaking across columns

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?

Too tired to PR

Mac LaTeX install using homebrew is brew cask install mactex

The same Footer on both the page

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??

Unclear dependencies

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.

Looking for input

@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.

Feature Request: MakeTitle

To Create a rulebook it would be nice to use the "maketitle" command to create the titlepage with the same Backgroundimage.

Separate footer from background image

/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.

Title Page

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.

BasicTeX instructions

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

Package folder structure

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?

Just a chance to show what can be done with this package.

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.

http://www.enworld.org/forum/showthread.php?641606-Witness-The-Mighty-And-Terrible-Face-Of-War-In-A-World-Of-Magic!

Change Paragraph Heading Style and Spacing

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.

Undefined environment: hangingpar

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.

Strange formatting for monster boxes split across columns

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

Source gist

test.tar.gz

Merge Pull Requests

There are a few pull requests that are fully compatible and useful that I think can and should get merged in :)

Add printerfriendly keyword to package.

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.

Package versioning

With development picking up we need a better way of communicating changes to our users. I propose we:

  1. Adopt semver and bump versions like so:

    • major
      • make a backwards-incompatible change to an existing macro or package option
    • minor
      • introduce a new macro
      • introduce a new package option
      • make a backwards-incompatible change to an existing macro or package option before 1.0.0
    • patch
      • backwards-compatible bug or documentation fixes

    We can start at 0.1.0 because things are still in flux.

  2. Obey LaTeX conventions and \ProvidePackage{dnd}{YYYY/mm/dd <version>}.

  3. Compile the manual/example document for every release and attach it as a release artefact.

  4. Maintain a changelog.

  5. Note in the README that we adopted semver as of <date>.


Tools like bumpversion and github-release can automate most of the chore work.

Table of Contents Styling

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.

Hacking the plain pagestyle

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)

longtable package in dndtable

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

Line Spacing

Looking for someone to do the following:

  1. The line spacing seems a bit tight compared to the books. While the books have a parskip of 0pt, the line spacing seems to be a bit wider. This looks like a slight adjustment to linespread is needed.
  2. I mistakenly suggested to @Vladar4 in #44 to have the top spacing on the paragraph and subparagraph \titlespacing* to be 0pt. It should be \parskip as @Vladar4 originally intended so that anyone using a \parskip > 0pt has consistency through their document.

Feature Request: Tableofcontents

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.

Spell labels

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}
…

Should we remove the "breakable" keyword from paperbox?

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?

Quick Question RE Column Breaks

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

Making a title page and cover sheet?

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!

Strange formatting for monster boxes floats

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

Source gist

test.tar.gz

Insert picture, full page

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!

Handling color in the template

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:

  1. Rename the colors in the template to their function rather than their color. For example monstertandark becomes paperboxcolor inside dndpaperbox.sty and dndtable uses tablecolor instead of commentgreen.
  2. A user can use \definecolor or \colorlet to override one of the colors such as paperboxcolor at any point in the document. The custom color can be set in the preamble or changed from chapter to chapter.
  3. Combined with #41, a user could override their own custom color for a single instance of paperbox or dndtable.
  4. Some people may already have used this solution with the current color names, keeping the current color definitions probably makes sense to avoid breaking changes. In this case, paperboxcolor would be handled in the following way in dnd.sty:
\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?

Dependencies on Non-Ubuntu Systems

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 :)

text overflow in boxes

While using a onecolumn version, text is not justified in quotebox and commentbox environment. It overflows the boxes on the right side.

New User Manual document

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?

Suggestion regarding bg options

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)?

Style guide or reference

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.

Cannot compile example.tex

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?

Experience not generated for monster CR

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.

First time compilation quirks

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:

example.pdf

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.