diff --git a/CHANGELOG.md b/CHANGELOG.md index d78ef0c7..61580d0e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -49,6 +49,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. * Deprecated `dnditemtable`. * Deprecated `bg-a4` and `bg-letter` package options. +* Deprecated `lmss` environment. ## [0.5] - 2016-03-24 diff --git a/README.md b/README.md index 3a5e05a8..8edee3e4 100644 --- a/README.md +++ b/README.md @@ -76,13 +76,12 @@ Load the template in your preamble: ### Package options -| Option | Description | Default | -|-------------|-------------------------------------------------------------------|:-------:| -| `bg-letter` | Loads a letter-sized background image | ✓ | -| `bg-a4` | Loads an A4-sized background image | | -| `bg-print` | Loads a printer-friendly background-image (only the footer image) | | -| `bg-full` | Loads the full background image | ✓ | -| `justified` | Justifies column copy | | +| Option | Description | Default | +|-------------|-------------------------------------------|:-------:| +| `bg-full` | Loads both background and footer images | ✓ | +| `bg-none` | Removes both background and footer images | | +| `bg-print` | Loads only the footer image | | +| `justified` | Justifies column copy | | ## Dependencies diff --git a/dnd.sty b/dnd.sty index d322cac1..ad054c01 100644 --- a/dnd.sty +++ b/dnd.sty @@ -16,8 +16,6 @@ bottom=50pt, % .7in footskip=30pt, % makes the footer text line up with the graphic ]{geometry} -\RequirePackage{bookman} % Closest built-in font I could find -\RequirePackage[T1]{fontenc} \RequirePackage[table]{xcolor} \RequirePackage{array} \RequirePackage{tabularx} @@ -37,6 +35,7 @@ % Load other modules of this package \RequirePackage{lib/dndcolors} % color definitions +\RequirePackage{lib/dndfonts} % font definitions \RequirePackage{lib/dndcomment} % \commentbox definition \RequirePackage{lib/dndheader} % fancy headers and footers \RequirePackage{lib/dndmonster} % \monsterbox definition @@ -86,7 +85,10 @@ \setlength{\parskip}{0pt} % Font environment -\newenvironment{lmss}{\fontfamily{lmss}\selectfont}{} +\newenvironment{lmss}{% + \dnd@deprecate{lmss}{0.7} + \fontfamily{lmss}\selectfont + }{} % Columns setup \setlength{\columnsep}{25pt} % .35in diff --git a/lib/dndcomment.sty b/lib/dndcomment.sty index ab9cf1f3..f7bed503 100644 --- a/lib/dndcomment.sty +++ b/lib/dndcomment.sty @@ -11,8 +11,8 @@ left=8pt, right=8pt, arc=0mm, - fonttitle=\fontfamily{fosj}\selectfont\scshape\bfseries\color{black}, - fontupper=\fontfamily{lmss}\selectfont, + fonttitle=\dnd@BoxTitleFont\color{black}, + fontupper=\dnd@BoxBodyFont, title={#2}, parbox=false, colback={#3}, diff --git a/lib/dndfonts.sty b/lib/dndfonts.sty new file mode 100644 index 00000000..247456c5 --- /dev/null +++ b/lib/dndfonts.sty @@ -0,0 +1,19 @@ +\RequirePackage{bookman} +\RequirePackage[T1]{fontenc} + +\renewcommand{\sfdefault}{lmss} + +\newcommand{\dnd@TitleFont}{\normalfont\scshape} + +\newcommand{\dnd@TableTitleFont}{\fontfamily{fosj}\selectfont\bfseries\scshape} +\newcommand{\dnd@TableBodyFont}{\sffamily} + +\newcommand{\dnd@BoxTitleFont}{\fontfamily{fosj}\selectfont\bfseries\scshape} +\newcommand{\dnd@BoxBodyFont}{\sffamily} + +\newcommand{\dnd@StatBlockTitleFont}{\normalfont\bfseries\scshape} +\newcommand{\dnd@StatBlockSubtitleFont}{\fontfamily{fosj}\selectfont\scshape} +\newcommand{\dnd@StatBlockBodyFont}{\sffamily} + +\newcommand{\dnd@FooterFont}{\normalfont\scshape} +\newcommand{\dnd@PageNumberFont}{\normalfont} diff --git a/lib/dndheader.sty b/lib/dndheader.sty index 55de7bbc..8865c960 100644 --- a/lib/dndheader.sty +++ b/lib/dndheader.sty @@ -29,12 +29,12 @@ \iftoggle{bool-footer-scroll}{ \begin{tikzpicture}[remember picture,overlay] \node[xscale=-1,inner sep=0pt,anchor=south,nearly opaque] at (current page.south) {\includegraphics[width=\paperwidth,height=43pt]{img/footerscroll}}; - \node[xshift=20pt,yshift=30pt] at (current page.south west) {\textcolor{pagegold}{\thepage}}; - \node[anchor=south west,xshift=\marginparwidth+\marginparpush,yshift=27pt] at (current page.south west) {\textsc{\textcolor{pagegold}{\nouppercase\leftmark}}}; + \node[xshift=20pt,yshift=30pt] at (current page.south west) {\dnd@PageNumberFont\textcolor{pagegold}{\thepage}}; + \node[anchor=south west,xshift=\marginparwidth+\marginparpush,yshift=27pt] at (current page.south west) {\dnd@FooterFont{\textcolor{pagegold}{\nouppercase\leftmark}}}; \end{tikzpicture} }{ \begin{tikzpicture}[remember picture,overlay] - \node[anchor=south west,xshift=\marginparwidth-\marginparpush,yshift=\nobgfooterheight+2pt] at (current page.south west) {\textbf{\thepage}}; + \node[anchor=south west,xshift=\marginparwidth-\marginparpush,yshift=\nobgfooterheight+2pt] at (current page.south west) {\dnd@PageNumberFont{\thepage}}; \node[anchor=south west,xshift=\marginparwidth+\marginparpush,yshift=\nobgfooterheight] at (current page.south west) {\leftmark}; \end{tikzpicture} } @@ -44,12 +44,12 @@ \iftoggle{bool-footer-scroll}{ \begin{tikzpicture}[remember picture,overlay] \node[inner sep=0pt,anchor=south,nearly opaque] at (current page.south) {\includegraphics[width=\paperwidth,height=43pt]{img/footerscroll}}; - \node[xshift=-20pt,yshift=30pt] at (current page.south east) {\textcolor{pagegold}{\thepage}}; - \node[anchor=south east,xshift=-\marginparwidth-\marginparpush,yshift=27pt] at (current page.south east) {\textsc{\textcolor{pagegold}{\nouppercase\leftmark}}}; + \node[xshift=-20pt,yshift=30pt] at (current page.south east) {\dnd@PageNumberFont\textcolor{pagegold}{\thepage}}; + \node[anchor=south east,xshift=-\marginparwidth-\marginparpush,yshift=27pt] at (current page.south east) {\dnd@FooterFont{\textcolor{pagegold}{\nouppercase\leftmark}}}; \end{tikzpicture} }{ \begin{tikzpicture}[remember picture,overlay] - \node[anchor=south east,xshift=-\marginparwidth+2\marginparpush,yshift=\nobgfooterheight+2pt] at (current page.south east) {\textbf{\thepage}}; + \node[anchor=south east,xshift=-\marginparwidth+2\marginparpush,yshift=\nobgfooterheight+2pt] at (current page.south east) {\dnd@PageNumberFont{\thepage}}; \node[anchor=south east,xshift=-\marginparwidth,yshift=\nobgfooterheight] at (current page.south east) {\leftmark}; \end{tikzpicture} } diff --git a/lib/dndmonster.sty b/lib/dndmonster.sty index f11345fa..a44ddc91 100644 --- a/lib/dndmonster.sty +++ b/lib/dndmonster.sty @@ -50,8 +50,8 @@ arc=0mm, opacityback=0, colframe=titlered, - fonttitle=\scshape\bfseries\color{titlered}\Large, - fontupper=\fontfamily{lmss}\selectfont, + fonttitle=\dnd@StatBlockTitleFont\color{titlered}\Large, + fontupper=\dnd@StatBlockBodyFont, title=#2, after={\vspace{7pt plus 1pt}\noindent}, #1 @@ -76,8 +76,8 @@ colback=statblockbg, colbacktitle=statblockbg, colframe=titlered, - fonttitle=\scshape\bfseries\color{titlered}\Large, - fontupper=\fontfamily{lmss}\selectfont, + fonttitle=\dnd@StatBlockTitleFont\color{titlered}\Large, + fontupper=\dnd@StatBlockBodyFont, title=#2, after={\vspace{7pt plus 1pt}\noindent}, #1 @@ -88,13 +88,10 @@ %\newcommand{\monstersection}[1]{\subsubsection*{#1}} \newcommand{\monstersection}[1]{ {\par - \color{titlered}\normalfont\scshape\Large #1 \vspace{3pt} + \color{titlered}\dnd@StatBlockSubtitleFont\large #1 \vspace{3pt} \titleline{\color{titlered}\titlerule[0.6pt]} \par\medskip} } -%\titlespacing*{\subsubsection}{0pt}{*0.5}{5pt} -%\titleformat{\subsubsection} -%{\color{titlered}\normalfont\scshape\Large}{\thesubsection}{1em}{}[{\color{titlered}\titlerule[0.5pt]\color{black}}] \newenvironment{monsteraction}[1][\unskip]{\emph{\textbf{#1.}}}{\vspace{0.5em}} diff --git a/lib/dndpaperbox.sty b/lib/dndpaperbox.sty index bc66f423..83ec330f 100644 --- a/lib/dndpaperbox.sty +++ b/lib/dndpaperbox.sty @@ -9,8 +9,8 @@ boxsep=0.25ex, left=8pt, right=8pt, - fonttitle=\fontfamily{fosj}\selectfont\scshape\bfseries\color{black}, - fontupper=\fontfamily{lmss}\selectfont, + fonttitle=\dnd@BoxTitleFont\color{black}, + fontupper=\dnd@BoxBodyFont, title={#2}, arc=0mm, parbox=false, diff --git a/lib/dndquote.sty b/lib/dndquote.sty index 6b07c743..85b8b9fc 100644 --- a/lib/dndquote.sty +++ b/lib/dndquote.sty @@ -16,7 +16,7 @@ parbox=false, borderline west={1pt}{-0.5pt}{titlered}, borderline east={1pt}{-0.5pt}{titlered}, - fontupper=\fontfamily{lmss}\selectfont, + fontupper=\dnd@BoxBodyFont, overlay={% \foreach\n in {north east,north west,south east,south west} {\draw[titlered, fill=titlered] (frame.\n) circle (2pt); }; }, diff --git a/lib/dndsections.sty b/lib/dndsections.sty index 35a5cbe5..f650fcbc 100644 --- a/lib/dndsections.sty +++ b/lib/dndsections.sty @@ -7,24 +7,24 @@ % Chapter \titleformat{\chapter} -{\color{titlered}\normalfont\scshape\Huge}{\thechapter\quad}{0pt}{} +{\color{titlered}\dnd@TitleFont\Huge}{\thechapter\quad}{0pt}{} \titlespacing*{\chapter}{0pt}{0pt}{20pt} -\renewcommand\cftchapfont{\color{titlered}\bfseries\scshape} +\renewcommand\cftchapfont{\color{titlered}\dnd@TitleFont\bfseries} % Section \titleformat{\section} -{\color{titlered}\normalfont\scshape\LARGE}{\thesection\quad}{0pt}{} +{\color{titlered}\dnd@TitleFont\LARGE}{\thesection\quad}{0pt}{} % Subsection \titleformat{\subsection} -{\color{titlered}\normalfont\scshape\Large}{\thesubsection\quad}{0pt}{} +{\color{titlered}\dnd@TitleFont\Large}{\thesubsection\quad}{0pt}{} [\titleline{\color{titlegold}\titlerule[1pt]}] % Subsubsection \titleformat{\subsubsection} -{\color{titlered}\normalfont\scshape\large}{\thesubsubsection\quad}{0pt}{}[] +{\color{titlered}\dnd@TitleFont\large}{\thesubsubsection\quad}{0pt}{}[] % Paragraph \titleformat{\paragraph}[runin] diff --git a/lib/dndtable.sty b/lib/dndtable.sty index 3461fd2f..d8426175 100644 --- a/lib/dndtable.sty +++ b/lib/dndtable.sty @@ -2,7 +2,7 @@ \newcommand{\header}[1]{{ \par\vspace*{8pt} \noindent - \sffamily\bfseries\scshape + \dnd@TableTitleFont #1}} % Centered Column @@ -12,7 +12,7 @@ \NewDocumentEnvironment{dndtable}{O{XX} O{tablecolor}}{% \par\vspace*{8pt} \noindent - \fontfamily{lmss}\selectfont + \dnd@TableBodyFont \rowcolors{1}{}{#2} \tabularx{\linewidth}{#1} }{% @@ -25,7 +25,7 @@ \dnd@deprecate{dnditemtable}{0.7}[Set tablecolor and use dndtable instead.] \par\vspace*{8pt} \noindent - \fontfamily{lmss}\selectfont + \dnd@TableBodyFont \rowcolors{1}{}{DmgCoral} \tabularx{\linewidth}{#1} }{%