DND-5e-LaTeX-Template 使用教程

DND-5e-LaTeX-Template 使用教程

DND-5e-LaTeX-TemplateLaTeX package to typeset material for the fifth edition of the "world's greatest roleplaying game".项目地址:https://gitcode.com/gh_mirrors/dn/DND-5e-LaTeX-Template

1. 项目的目录结构及介绍

DND-5e-LaTeX-Template 是一个用于创建 DND 5e 角色卡和相关文档的 LaTeX 模板。以下是该项目的目录结构及其介绍:

DND-5e-LaTeX-Template/
├── README.md
├── dnd.cls
├── example.tex
├── images/
│   ├── dnd-icons/
│   └── logo.png
├── macros/
│   ├── abilities.tex
│   ├── background.tex
│   ├── classes.tex
│   ├── equipment.tex
│   ├── features.tex
│   ├── languages.tex
│   ├── magic.tex
│   ├── proficiencies.tex
│   ├── races.tex
│   ├── skills.tex
│   └── spells.tex
├── sections/
│   ├── abilities.tex
│   ├── background.tex
│   ├── classes.tex
│   ├── equipment.tex
│   ├── features.tex
│   ├── languages.tex
│   ├── magic.tex
│   ├── proficiencies.tex
│   ├── races.tex
│   ├── skills.tex
│   └── spells.tex
└── style/
    ├── dndheader.sty
    └── dndstyle.sty
  • README.md: 项目说明文件,包含项目的基本信息和使用指南。
  • dnd.cls: LaTeX 类文件,定义了模板的主要样式和结构。
  • example.tex: 示例文件,展示了如何使用模板创建文档。
  • images/: 包含项目所需的图片资源,如图标和logo。
  • macros/: 包含各种宏定义文件,用于定义角色卡中的各种属性和内容。
  • sections/: 包含各个章节的 LaTeX 文件,用于组织文档内容。
  • style/: 包含样式文件,定义了文档的外观和格式。

2. 项目的启动文件介绍

项目的启动文件是 example.tex,它是一个示例文件,展示了如何使用 DND-5e-LaTeX-Template 创建角色卡和相关文档。以下是 example.tex 的主要内容:

\documentclass{dnd}

\usepackage[utf8]{inputenc}
\usepackage[singlelinecheck=false]{caption}
\usepackage{lipsum}
\usepackage{listings}
\usepackage{shortvrb}
\usepackage{stfloats}

\captionsetup[table]{labelformat=empty,font={sf,sc,bf,},skip=0pt}

\MakeShortVerb{|}

\lstset{%
  basicstyle=\ttfamily,
  language=[LaTeX]{TeX},
  breaklines=true,
}

\title{DND 5e LaTeX Template}
\author{Your Name}

\begin{document}

\maketitle

\tableofcontents

\section{Introduction}
\lipsum[1]

\section{Character Sheet}
\input{sections/abilities.tex}
\input{sections/background.tex}
\input{sections/classes.tex}
\input{sections/equipment.tex}
\input{sections/features.tex}
\input{sections/languages.tex}
\input{sections/magic.tex}
\input{sections/proficiencies.tex}
\input{sections/races.tex}
\input{sections/skills.tex}
\input{sections/spells.tex}

\end{document}
  • \documentclass{dnd}: 指定使用 dnd 类文件。
  • \usepackage: 引入各种 LaTeX 包,用于增强文档功能。
  • \title\author: 设置文档的标题和作者。
  • \maketitle: 生成标题页。
  • \tableofcontents: 生成目录。
  • \section: 定义各个章节,并使用 \input 命令引入各个章节的 LaTeX 文件。

3. 项目的配置文件介绍

项目的配置文件主要包括 dnd.clsstyle/ 目录下的样式文件。以下是这些配置文件的介绍:

  • dnd.cls: 这是主要的类文件,定义了模板的整体结构和样式。它包含了文档的基本设置、页眉页脚、章节样式等。

  • `style/dndheader

DND-5e-LaTeX-TemplateLaTeX package to typeset material for the fifth edition of the "world's greatest roleplaying game".项目地址:https://gitcode.com/gh_mirrors/dn/DND-5e-LaTeX-Template

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

倪澄莹George

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值