diff --git a/config/preamble.tex b/config/bind.sty similarity index 93% rename from config/preamble.tex rename to config/bind.sty index c4eb7c75e8cdd53b6883b6b706eb0a2a25e43120..ee56e0fdb44d0fcd6f555ef433a9dcc483436665 100644 --- a/config/preamble.tex +++ b/config/bind.sty @@ -1,31 +1,34 @@ -\usepackage[latin1]{inputenc} -\usepackage{stmaryrd} % For boxy Maths symbols -\usepackage{wasysym} % for circly Maths symbols -\usepackage{epsdice} % for dice symbols -\usepackage{dingbat} % for curly section symbols -\usepackage{appendix} -\usepackage{geometry} % changes page borders +\ProvidesPackage{bind} +\RequirePackage{glossaries} +\RequirePackage{glossary-mcols} +\RequirePackage[latin1]{inputenc} +\RequirePackage{stmaryrd} % For boxy Maths symbols +\RequirePackage{wasysym} % for circly Maths symbols +\RequirePackage{epsdice} % for dice symbols +\RequirePackage{dingbat} % for curly section symbols +\RequirePackage{appendix} +\RequirePackage{geometry} % changes page borders \geometry{margin=50pt} -\usepackage{svg} -\usepackage{alltt} +\RequirePackage{svg} +\RequirePackage{alltt} \svgsetup{width=\textwidth} -\usepackage{tabularx} -\usepackage{wrapfig} -\usepackage{float} -\usepackage{epigraph} % part quotes -\usepackage{makeidx} -\usepackage[english]{babel} -\usepackage{multicol} +\RequirePackage{tabularx} +\RequirePackage{wrapfig} +\RequirePackage{float} +\RequirePackage{epigraph} % part quotes +\RequirePackage{makeidx} +\RequirePackage[english]{babel} +\RequirePackage{multicol} \raggedcolumns -\usepackage{graphicx} -\usepackage{etoolbox} -\usepackage{titlesec,titletoc} -\usepackage{needspace} -\usepackage{tikz} +\RequirePackage{graphicx} +\RequirePackage{etoolbox} +\RequirePackage{titlesec,titletoc} +\RequirePackage{needspace} +\RequirePackage{tikz} \usetikzlibrary{mindmap,trees} -\usepackage{pifont} -\usepackage{colortbl} -\usepackage[poster]{tcolorbox} +\RequirePackage{pifont} +\RequirePackage{colortbl} +\RequirePackage[poster]{tcolorbox} \tcbuselibrary{breakable,raster} %\tcbset{enhanced, attach boxed title to top center={yshift*=-3mm},drop shadow east,colback=white,arc=6mm,outer arc=1mm} @@ -44,7 +47,7 @@ interior code={ \path[tcb fill interior] ([xshift=-2mm]interior.west) } } -\usepackage[ +\RequirePackage[ pdfstartpage=2, bookmarks=true]% {hyperref} diff --git a/config/example.tex b/config/example.tex index aa787b8bd7a0c995bcf90af9791d61e9d2dc58aa..3cddbf40934e922633d585440c3dc25b8396193d 100644 --- a/config/example.tex +++ b/config/example.tex @@ -1,10 +1,9 @@ -\documentclass{report} +\documentclass[a4paper,openany]{book} +\usepackage{bind} +\usepackage{monsters} \date{\today} -\input{preamble.tex} -\input{monsters.tex} - \begin{document} \chapter{How to Make Monsters} diff --git a/config/main.tex b/config/main.tex index a1ced01c4efad07e8eb88efae1f0249e036f48f6..1fbd35a18da5f57cfa66aef4d90b9239c1336a00 100644 --- a/config/main.tex +++ b/config/main.tex @@ -1,9 +1,7 @@ \documentclass[a4paper,openany]{book} -\usepackage{glossaries} -\usepackage{glossary-mcols} -\input{config/preamble.tex} -\input{config/monsters.tex} +\usepackage{config/bind} +\usepackage{config/monsters} \settoggle{verbose}{true} diff --git a/config/monsters.tex b/config/monsters.sty similarity index 99% rename from config/monsters.tex rename to config/monsters.sty index cb28847687f07ed9ce2e9fcc20beefa601d0e958..bedfd7d9517636702a1de856187ab7244f776ea1 100644 --- a/config/monsters.tex +++ b/config/monsters.sty @@ -1,4 +1,4 @@ -% !TeX root = main.tex +\ProvidesPackage{monsters} %%%%%%%%%%%%%%%%%%%% Introduction % This is a list of monster-commands. You put in the command, like "\dragon", and a dragon will be conjured unto your pdf. % If you're unhapy with your dragon, copy-paste the bit where it says \dragon{blah}{bla}, then change those numbers. @@ -768,8 +768,9 @@ \ifnum\value{age}>7\mana{8}\else\mana{6}\fi\gdef\armourtype{C}} } -\newcommand{\dwarventrader}[1][\npc{\M}{Dwarven Trader}]{ +\newcommand{\dwarventrader}[1][\npc{\M}{\arabic{r12} Dwarven Traders}]{ #1 + \randomdozen \randomthree\randomtwo\addtocounter{enc}{-1} \person{\arabic{enc}}% STRENGTH {1}% DEXTERITY @@ -797,7 +798,7 @@ {0}% DR {2}% COMBAT {Crafts 1, Tactics 1}% SKILLS - {\ifodd\value{r2}\shortsword\else\woodaxe\fi, \completeplate, \lootMedium}% EQUIPMENT + {\ifodd\value{r2}\woodaxe, \partialchain\else\shortsword, \partialplate\fi, \lootMedium}% EQUIPMENT {\knacks{Chosen Enemy: Goblinoids}\ifodd\value{r2b}, \defender\fi}% SKILLS }