prelude.tex 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. \usepackage[dvipsnames]{xcolor}
  2. % \usepackage{hyperref}
  3. \usepackage{lmodern}
  4. \usepackage{amssymb,amsmath}
  5. \usepackage{ifxetex,ifluatex}
  6. \usepackage{anyfontsize}
  7. \usepackage[percent]{overpic}
  8. \usepackage[margin=0.4in]{geometry}
  9. \usepackage{multicol}
  10. \setlength{\columnsep}{0.05cm}
  11. \usepackage[T1]{fontenc}
  12. \usepackage[utf8]{inputenc}
  13. \usepackage{fontspec} % For loading fonts
  14. \usepackage{titlesec}
  15. \makeatletter
  16. \newcommand{\choicelabel}[1]{
  17. {\hss\llap{\Checkbox{6pt}}}
  18. }
  19. \newcommand{\choicelabeldef}{
  20. \@gobble{choicelabeldef}
  21. }
  22. \newenvironment{choices}
  23. {
  24. \itemize
  25. \let\makelabel\choicelabel
  26. \let\@itemlabel\choicelabeldef
  27. }
  28. {\enditemize
  29. }
  30. \makeatother
  31. \newcommand{\choice}{\Checkbox{6pt} }
  32. \pagestyle{empty}
  33. \IfFileExists{upquote.sty}{\usepackage{upquote}}{}
  34. % use microtype if available
  35. \IfFileExists{microtype.sty}{%
  36. \usepackage[]{microtype}
  37. \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
  38. }{}
  39. \PassOptionsToPackage{hyphens}{url} % url is loaded by hyperref
  40. \makeatother
  41. % Scale images if necessary, so that they will not overflow the page
  42. % margins by default, and it is still possible to overwrite the defaults
  43. % using explicit options in \includegraphics[width, height, ...]{}
  44. \setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio}
  45. \IfFileExists{parskip.sty}{%
  46. \usepackage{parskip}
  47. }{% else
  48. \setlength{\parindent}{0pt}
  49. \setlength{\parskip}{6pt plus 2pt minus 1pt}
  50. }
  51. \setlength{\emergencystretch}{3em} % prevent overfull lines
  52. \providecommand{\tightlist}{%
  53. \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
  54. \setcounter{secnumdepth}{0}
  55. % Redefines (sub)paragraphs to behave more like sections
  56. \ifx\paragraph\undefined\else
  57. \let\oldparagraph\paragraph
  58. \renewcommand{\paragraph}[1]{\oldparagraph{#1}\mbox{}}
  59. \fi
  60. \ifx\subparagraph\undefined\else
  61. \let\oldsubparagraph\subparagraph
  62. \renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}}
  63. \fi
  64. % set default figure placement to htbp
  65. \makeatletter
  66. \def\fps@figure{htbp}
  67. \makeatother
  68. \setlength{\multicolsep}{6.0pt plus 2.0pt minus 1.5pt}% 50% of original values
  69. \date{}
  70. \usepackage{etoolbox}
  71. \patchcmd{\quote}{\rightmargin}{\leftmargin 1em \rightmargin}{}{}
  72. \usepackage{tikz}
  73. \newcommand{\Checkbox}[1]{\tikz{\path[draw=black] (0,0) rectangle (#1,#1);}}
  74. \newcommand{\pbClass}[1]{\newcommand{\Class}{#1}}
  75. \newcommand{\pbBaseHP}[1]{\newcommand{\BaseHP}{#1}}
  76. \newcommand{\pbDamage}[1]{\newcommand{\Damage}{#1}}
  77. \newcommand{\Look}{}
  78. \newcommand{\Names}{}
  79. \makeatletter
  80. \newcommand{\pbLook}[1]{\g@addto@macro\Look{\par#1}}
  81. \newcommand{\pbNames}[2]{\g@addto@macro\Names{\par\hangindent=0.2in#1: #2}}
  82. \makeatother
  83. \newcommand{\leftbanner}[1]{
  84. \begin{overpic}[width=3.1in,height=0.45in]{assets/short_left.png}
  85. \put (2,4) {\fontsize{16}{40}\selectfont \textcolor{white}{\headingfont #1}}
  86. \end{overpic}
  87. }
  88. \newcommand{\rightbanner}[1]{
  89. \begin{overpic}[width=4.4in,height=0.45in]{assets/long_right.png}
  90. \put (5,4) {\fontsize{16}{40}\selectfont \textcolor{white}{\headingfont #1}}
  91. \end{overpic}
  92. }
  93. \newcommand{\gearbanner}{
  94. \begin{overpic}[width=7.47986in,height=0.40945in]{assets/templateEquip.png}
  95. \put (3,2) {\fontsize{16}{40}\selectfont \textcolor{white}{\headingfont Gear}}
  96. \end{overpic}
  97. }
  98. \newcommand{\topbanner}[1]{
  99. \begin{overpic}[width=7.47986in,height=1.0in]{assets/templateRuleHeader.png}
  100. \put (1,2) {\fontsize{32}{40}\selectfont\headingfont \textcolor{white}{#1}}
  101. \end{overpic}
  102. }
  103. \newcommand{\widebanner}[1]{
  104. \begin{overpic}[width=7.47986in,height=1.0in]{assets/templateThinHeader.png}
  105. \put (1,1) {\fontsize{16}{40}\selectfont\headingfont \textcolor{white}{#1}}
  106. \end{overpic}
  107. }
  108. \newcommand{\charbanner}{
  109. \begin{overpic}[width=8.008in,height=3.0in]{assets/charsheet_upper.png}
  110. % names
  111. \put(1, 30) {\parbox{4.3in}{\fontsize{12}{12}\Names}}
  112. % look
  113. \put(59, 30) {\parbox{3in}{\fontsize{12}{12}\Look}}
  114. % some stats: damage...
  115. \put (25,4) {\makebox[0pt]{\fontsize{18}{10}\selectfont\headingfont \textcolor{black}{D\Damage{}}}}
  116. % max HP...
  117. \put (89,6) {\fontsize{6}{8}\selectfont\headingfont \textcolor{white}{Your max HP is}}
  118. % and Constitution
  119. \put (89,4.6) {\fontsize{6}{8}\selectfont\headingfont \textcolor{white}{\BaseHP{} + Constitution}}
  120. \end{overpic}
  121. }
  122. \newcommand{\charlower}{
  123. \vfill\null
  124. \begin{overpic}[width=7.47986in,height=1.0in]{assets/charsheet_lower.png}
  125. \put (10,1) {\fontsize{32}{40}\selectfont\headingfont \textcolor{white}{The \Class}}
  126. \end{overpic}
  127. }
  128. \input{assets/common.tex}
  129. \openup -0.2em