forked from rpgtex/DND-5e-LaTeX-Template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dndcore.def
90 lines (76 loc) · 3.34 KB
/
dndcore.def
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
\ExplSyntaxOn
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Package Dependencies
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Helps prevent option clash with other packages that include xcolor
\PassOptionsToPackage {table} {xcolor}
\RequirePackage {array}
\RequirePackage {colortbl}
\RequirePackage {enumitem}
\RequirePackage {etoolbox}
\RequirePackage {textcomp,gensymb} % degree symbol for italian ordinals
\RequirePackage {hang} % hanging paragraphs
\RequirePackage [autolanguage] {numprint} % localization of thousands separator
\RequirePackage {tabularx} % variable-width table columns
\RequirePackage [breakable,skins,xparse]{tcolorbox} % styled text boxes
\RequirePackage {tikz} % drawing ornaments and lines
\RequirePackage {xcolor}
\RequirePackage {xparse} % \NewDocumentCommand and expl3
\sys_if_engine_luatex:T
{
\RequirePackage {luacolor}
}
\bool_if:NT \l__dnd_layout_bool
{
\RequirePackage {geometry}
\RequirePackage {microtype} % Improve ragged2e hyphenation and overfull boxes
\RequirePackage {ragged2e}
\RequirePackage [titles] {tocloft} % multi-column toc
\RequirePackage [newparttoc] {titlesec} % Used to adjust (sub)section, part, and table of contents formatting
\bool_if:NT \l__dnd_multitoc_bool
{ \RequirePackage [toc] {multitoc} }
% Set page geometry.
\geometry
{
hmargin = .75in, % Left and right margins
top = .46in, % Top of text area to top of page
bottom = .8in, % Bottom of text area to bottom of page
footskip = .32in, % Bottom of text area to bottom of footer text
columnsep = .33in, % Space between columns
}
% Set paragraph and line spacing
\setlength {\parindent} {1em}
\setlength {\RaggedRightRightskip} {0pt plus 1em}
\setlength {\RaggedRightParindent} {\parindent}
% Restrict hyphenation
\tolerance = 1
\emergencystretch = \maxdimen
\hyphenpenalty = 10000
\hbadness = 10000
% Set left justification if not justified
\bool_if:NF \l__dnd_justified_bool
{ \RaggedRight }
% Customize itemize environment.
\setlist{leftmargin=1em}
\setitemize{noitemsep,topsep=0.5ex,label=\footnotesize{\textbullet}}
}
% Load other modules of this package after all dependencies to avoid load order
% conflicts (e.g., package options).
% Low-level modules first.
\RequirePackage {lib/compat} % compatibility definitions
\RequirePackage {lib/dndutility} % utility functions
\RequirePackage {lib/dndcolors} % color definitions
\RequirePackage {lib/dndfonts} % font definitions
\RequirePackage {lib/dndstrings} % Load document strings
% Conditionally load deprecated code for backwards compatibility
\bool_if:NF \l__dnd_no_deprecated_code_bool
{ \RequirePackage {lib/dnddeprecated} }
% Main modules in alphabetical order
\RequirePackage {lib/dndcomment} % inline comment boxes
\RequirePackage {lib/dndheader} % fancy headers and footers
\RequirePackage {lib/dndmonster} % stat blocks
\RequirePackage {lib/dndreadaloud} % read-aloud text
\RequirePackage {lib/dndsections} % section styling and special section headers
\RequirePackage {lib/dndsidebar} % sidebars
\RequirePackage {lib/dndtable} % tables
\RequirePackage {lib/dndtoc} % table of contents styling