Skip to content

xeals/emacs-org-dnd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

emacs-org-dnd

Provides an org-mode compatability layer to the D&D 5e LaTeX Template.

News

See CHANGELOG.org.

Installation

As much effort as possible has been taken to make creation feel like natural org-mode markup.

Follow the instructions to set up the package at the LaTeX template repo.

Clone this repo somewhere and add it to your emacs load path.

Add the following to your .emacs:

(require 'ox-dnd)

Usage

Simply add the following to your .org file:

#+LATEX_CLASS: dnd

Each environment in the LaTeX package corresponds to an org-mode block. Each block is customised using (several) attributes.

ox-dnd provides an org-mode export backend. You can export the buffer as a PDF file with <C-c> <C-e> l d (invoking the org-mode export dispatcher, then l d).

Options are included here. For full usage examples, see the example document. A sample PDF and tex output is included in the example folder.

Additional options

Package options can be specified in the standard #+OPTIONS header. The following options are added or changed from their default LaTeX export values:

:title
Boolean. Disabled by default, as of upstream version 0.7.0 there is no official styled title.
:justified
Boolean. Justify column copy (default t).
:layout
Boolean. Controls whether loading the dnd LaTeX package also modifies the document layout (default t). Has no effect if org-dnd-use-package is nil.
:bg
String value. Declare how to load background and footer images:
full
Load both the background and footer images (default).
none
Remove both the background and footer images.
print
Load only the footer images.
:mtoc
Boolean. Use the multi-column table of contents (default t).

Customisation

If you prefer to use the package in your exported file rather than the class (the recommended option), you can set org-dnd-use-package in your .emacs before loading this package:

(setq org-dnd-use-package t)
(require 'ox-dnd)

Comment/paper/quote box

NAME
Title of box

Subtitle

No attributes.

Heading on first line of block, subtitle on second line of block.

Spell

NAME
Name of spell
ATTR_SPELL
Spell information:
:level
Spell level
:school
Spell school (illusion, abjuration, etc.)
:range
Spell range (include unit; e.g., 5 feet)
:cast
Cast time (include unit; e.g., 1 action)
:duration
Spell duration (include unit; e.g., Until dispelled, 1 round/level)
:comp
Spell components (in full, including information for material components)

Block contents are the spell description.

Monster

NAME
Name of monster
ATTR_MONSTER_INFO
Content in the subheader of a monster:
  • :size
  • :race
  • :subrace; optional
  • :alignment
ATTR_MONSTER_BASICS
Basic stat block; all optional:
  • :ac (armor class)
  • :hp (hit dice; given as dice notation, e.g., 3d8+3)
  • :speed; for ground speed. For other types of speed, additionally use :fly, :burrow, :climb, :swim, or :hover
ATTR_MONSTER_STATS
Monster stats; modifiers are calculated automatically; all optional:
  • :con
  • :str
  • :dex
  • :int
  • :wis
  • :cha
ATTR_MONSTER_DETAILS
Detailed information; all optional:
  • :skills
  • :saves
  • :imm (damage immunities)
  • :res (damage resistances)
  • :vul (damage vulnerabilities)
  • :senses (e.g., darkvision, tremorsense)
  • :langs (languages)
  • :cr (challenge rating; experience value calculated automatically)

Block contents are the monster skills in the following format:

- Skill name :: Effect
- Actions
  - Action name :: Effect
- Legendary Actions
  - Legendary action name :: Effect

Any entry that appears before the actions header is a passive skill. The blurb for legendary actions is added automatically. Any number of entries in each category (skill, action, legendary action) can be added.

Tables

Tables are formatted the same as regular org-mode tables.

NAME is used only internally (i.e., for referencing). To set a visible title for a table, use HEADER.

Tables with no CAPTION are formatted inline with text and allow wrapping. Texts with a caption span both columns.

Tables accept the following attributes through ATTR_DND:

:align
As with the standard org-mode align attribute, accepts a LaTeX alignment string. Common are lX or cX to left- or centre-align the left column and expand the right column to fill the page column.
:color
Accepts a color as defined by the LaTeX package. See the example document for a list of valid colors.

Map sections

Map sections are automatically from any heading with the :map: tag. The :map: tag will not be rendered as tags normally are. Area sections have two levels (area and subarea), so any deeper than two nested levels is not supported.

NOTE: Things may break in the section if a top-level heading (rather than a level 2 heading as in the example) is tagged as a map. There should probably be a fix eventually for this.

License

Licensed under Apache License, Version 2.0 (LICENSE or http://www.apache.org/licenses/LICENSE-2.0).

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be licensed as above, without any additional terms or conditions.

About

org-mode wrapper for DND-5e-LaTeX-Template

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published