DND-5e-LaTeX-Template

授权协议 MIT License
开发语言
所属分类 企业应用、 LaTeX排版系统
软件类型 开源软件
地区 不详
投 递 者 佘单鹗
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

DnD 5e LaTeX Template

This is a LaTeX template for typesetting documents in the style of the fifth edition of the "world's greatest roleplaying game".

Features

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

Installation

There are three options for using this project; choose the one that'sright for you.

User install using TEXMFHOME (recommended)

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.

  1. Prepare your TEXMFHOME directory.

    mkdir "$(kpsewhich -var-value TEXMFHOME)/tex/latex/"
  2. Download the latest release and extract it in $TEXMFHOME/tex/latex/.

    wget https://github.com/rpgtex/DND-5e-LaTeX-Template/archive/master.zip
    unzip -d "$(kpsewhich -var-value TEXMFHOME)/tex/latex/" master.zip
    cd "$(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"

Using Overleaf

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.

  1. Download this GitHub repository as a ZIP archive using the Cloneor download link above.
  2. On Overleaf, click the New Project button and select UploadProject. Upload the ZIP archive you downloaded from thisrepository.

Project install using TEXINPUTS

You can also clone a copy of the repository to each LaTeX project. For example, to clone the repository to a lib/ 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. Set TEXINPUTS when compiling your project to locate the package:

TEXINPUTS=./lib//: pdflatex project.tex

Usage

Class (recommended)

Load the dndbook class in your preamble:

\documentclass[10pt,twoside,twocolumn,openany,nodeprecatedcode]{dndbook}

\usepackage[english]{babel}
\usepackage[utf8]{inputenc}

\begin{document}
% ...

Package

You can also load the dnd package directly to use it with another class.Note that the package has only been tested with the book class.

\documentclass[10pt,twoside,twocolumn,openany]{book}

\usepackage[english]{babel}
\usepackage[utf8]{inputenc}

\usepackage[layout=true]{dnd}

\begin{document}
% ...

Options

Option Package dnd Class dndbook
bg
justified
layout
nomultitoc
nodeprecatedcode

The dndbook class also supports all the options of the book class.

bg

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.

justified

Justify column copy.

layout

Controls whether loading the dnd 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 is true for backwards compatibility with early releases.This will change in a future release.

nomultitoc

Disable multi-column table of contents.

nodeprecatedcode

Excludes all deprecated code from the build process.

Dependencies

If you don't have LaTeX installed, we recommend installing a complete TeX Live distribution.

Ubuntu

sudo apt-get install texlive-full

Arch

sudo pacman -S texlive-bin texlive-core texlive-latexextra

OSX

MacTex has its own installer, but you can install it through brew cask:

Full version

brew cask install mactex

Slightly smaller version without GUI

brew cask install mactex-no-gui

Minimal version

Use tlmgr to install packages as needed, see this answer for more information

brew cask install basictex
brew 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 StackExchange post

Known issues and solutions

Stat block text color does not survive page breaks

This is a known issue in tcolorbox. According to the tcolorbox 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 monsterbox in float disrupts spacing inside stat block

Wrapping a monsterbox (or monsterboxnobg) in a floating figure adds extra space between stat block elements:

\begin{figure}[b]
  \begin{monsterbox}{Orc Warden}
    % ...
  \end{monsterbox}
\end{figure}

Instead, use the tcolorbox float parameter:

\begin{monsterbox}[float=b]{Orc Warden}
  % ...
\end{monsterbox}

Refer to the tcolorbox documentation (section 4.13) for more float parameters.

Contributing

Style

We use EditorConfig to enforce consistent formatting.Install the appropriate plugin for your editor.

Preparing a new release

  1. Run ./bin/bump-version to tag the new version.

    ./bin/bumpversion <version>
  2. Compile the example PDF.

  3. Save the first page of the PDF as scrot.jpg.

  4. Update the change log for the new release; commit your changes.

  5. Push changes.

    git push && git push --tags
  6. Create a new release and attach the PDF and scrot.

Credits

License

MIT

 相关资料
  • ngx-dnd �� Drag, Drop and Sorting Library for Angular6 and beyond! Note: The drag-and-drop directives in angular/cdk are great. Use that if you don't need nested DnD containers. We are investigating u

  • Angular 2 Drag-and-Drop Angular 2 Drag-and-Drop without dependencies. Follow me to be notified about new releases. Some of these APIs and Components are not final and are subject to change! Transpilat

  • dnd kit 是一个用于 React 的现代、轻量级、高性能、可访问和可扩展的拖放工具包,目前处于 beta 阶段。 为 React 构建:公开诸如useDraggable和useDroppable之类的 hooks,并且不需要你重新构建应用程序或创建额外的包装器 DOM 节点。 功能丰富:可定制的碰撞检测算法、多个激活器、可拖动覆盖、拖动手柄、自动滚动、约束等等。 支持广泛的用例:列表、网格、

  • react-beautiful-dnd (rbd) 是一款美观且简单易用的 React 列表拖拽库。 在线体验:https://react-beautiful-dnd.netlify.app/iframe.html?id=board--simple 特性 动画效果自然 无障碍:强大的键盘和屏幕阅读器支持 性能优秀 简洁而强大的 API,易于上手 与标准浏览器的互动性非常好 Unopinionate

  • [Angular 1.x] Display treeDnD & event DrapnDrop, field 'td' by tree.  ###Support(just when I'm online) Demo: http://thienhung1989.github.io/angular-tree-dnd/demo ###Requirement: angular: >=1.2.1 Sour

  • 我需要使WebView的拖动事件作为SWT拖动事件可用。例如,每当WebView中的拖动事件(DOM元素被拖动,内容可编辑=true)时,我需要触发一个等效的SWT拖动事件,而不是发送,因此,我可以重新使用SWT API。有人已经这样做了吗?可以提供一些关于如何实现这一目标的提示吗? 刚刚意识到SWT的DNDEvent是包保护的,不能从外部实例化。会有变通办法,但不确定我是否走上了正确的道路。 谢