forked from matsavage/DND-5e-LaTeX-Character-Sheet-Template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dndtemplate.sty
111 lines (94 loc) · 3.33 KB
/
dndtemplate.sty
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
\NeedsTeXFormat{LaTeX2e}[1994/06/01]
\ProvidesPackage{dndtemplate}[2021/08/07 DnD Character Template]
\usepackage{fontspec}
\usepackage{ifthen}
\usepackage{pstricks}
\usepackage{xstring}
\usepackage{ragged2e}
% DEFINE FONT FOR USER INPUTTED TEXT
\newfontfamily\entryfont{Kalam}[Path=template/fonts/,Extension=.ttf,UprightFont=Kalam-Regular,BoldFont=Kalam-Bold]
% HEADER BACKGROUND COLOR AND OPACITY
\newrgbcolor{header-background-color}{0.87058824 0.87450981 0.87450981}
\pgfmathsetmacro{\headercolorbackgroundopacity}{1}
% HEADER DRAWING (DRAGON ETC) COLOR AND OPACITY
\newrgbcolor{character-sheet-dragon-color}{0 0 0}
\newrgbcolor{character-sheet-dragon-eye-color}{1 0 0}
\newrgbcolor{spell-sheet-fireball-color}{0 0 0}
\pgfmathsetmacro{\headerdragonopacity}{1}
% HEADER TRIM
\newrgbcolor{header-color}{0.850 0.764 0.466}
\newrgbcolor{header-color-accent}{0.705 0.607 0.431}
% GREY BACKGROUND FOR STAT BLOCK SECTION
\pgfmathsetmacro{\generalbackgroundopacity}{0}
\pgfmathsetmacro{\statsbackgroundopacity}{0}
% WHITE BACKGROUNDS FOR STATS BLOCKS AND MODIFIERS
\pgfmathsetmacro{\statsscoreopacity}{0}
\pgfmathsetmacro{\statsmodifieropacity}{0}
% COLOR FOR BLOCK OUTLINES
\newrgbcolor{outline-color}{0.850 0.764 0.466}
% COLORS FOR MONEY OUTLINES
\newrgbcolor{money-outline-color}{0.850 0.764 0.466}
\newrgbcolor{money-outline-color-accent}{0.705 0.607 0.431}
% COLOR INDICATORS
\newrgbcolor{primary-indicator-color}{0 0 0}
\newrgbcolor{secondary-indicator-color}{0.1 0.1 0.1}
\newrgbcolor{tertiary-indicator-color}{0.6 0.6 0.6}
% SPELL HEADER COLOR AND BACKGROUND OPACITY
\pgfmathsetmacro{\spellheaderbackgroundopacity}{0}
\pgfmathsetmacro{\spellheaderbackgroundinfillopacity}{1}
% PROFICIENCY MARKER COLOR
\newrgbcolor{proficiency-marker-color}{0 0 0}
\newrgbcolor{expert-proficiency-marker-color}{0.18 0.04 0.39}
% TEXT COLOR
\newrgbcolor{text-color}{0 0 0}
% SPELL LINE COLOR
\newrgbcolor{spell-line-color}{0.3 0.3 0.3}
% SIMPLIFY TRANSPARENCY OPTIONS WHEN ALLOWPSTRANSPARENCY ISN'T SET
\ifnum \headercolorbackgroundopacity=0
\def \headercolorbackgroundfill{none}
\else
\def \headercolorbackgroundfill{solid}
\fi
\ifnum \headerdragonopacity=0
\def \headerdragonfill{none}
\else
\def \headerdragonfill{solid}
\fi
\ifnum \generalbackgroundopacity=0
\def \generalbackgroundfill{none}
\else
\def \generalbackgroundfill{solid}
\fi
\ifnum \statsbackgroundopacity=0
\def \statsbackgroundfill{none}
\else
\def \statsbackgroundfill{solid}
\fi
\ifnum \statsmodifieropacity=0
\def \statsmodifierfill{none}
\else
\def \statsmodifierfill{solid}
\fi
\ifnum \statsscoreopacity=0
\def \statsscorefill{none}
\else
\def \statsscorefill{solid}
\fi
\ifnum \spellheaderbackgroundopacity=0
\def \spellheaderbackgroundfill{none}
\else
\def \spellheaderbackgroundfill{solid}
\fi
\ifnum \spellheaderbackgroundinfillopacity=0
\def \spellheaderbackgroundinfillfill{none}
\else
\def \spellheaderbackgroundinfillfill{solid}
\fi
\input{template/character-sheet-commands}
\input{template/sheet-calculations}
\input{template/fitbox}
\newcommand{\rendercharactersheet}{\input{template/character-sheet.tex}}
\newcommand{\renderbackgroundsheet}{\input{template/background-sheet.tex}}
\newcommand{\renderspellsheet}{\input{template/spell-sheet.tex}}
\newcommand{\renderfullspellsheet}{\input{template/spell-sheet.tex}}
\newcommand{\renderhalfspellsheet}{\input{template/half-spell-sheet.tex}}