Skip to content

Commit

Permalink
implemented chapters, changing class to book
Browse files Browse the repository at this point in the history
  • Loading branch information
Vladar4 committed Jan 17, 2017
1 parent 47b2f4b commit 4b352e2
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 4 deletions.
6 changes: 4 additions & 2 deletions dnd.sty
Expand Up @@ -93,7 +93,7 @@
% Setup for custom footer
\pagestyle{fancy}

\footskip = 50pt %push the footer down so it fits with the decal from the bg-img
\footskip = 48pt %push the footer down so it fits with the decal from the bg-img
\fancyhfoffset[LE]{28pt} % push the footer left on even pages so it fits the decal
\fancyhfoffset[RO]{30pt} % push the footer right on odd pages so it fits the decalbg-img
\renewcommand{\headrulewidth}{0.0pt} %no rule for header
Expand All @@ -109,12 +109,14 @@
}

\fancyfoot[RO]{
\raisebox{12pt}{\textsc{\textcolor{uppergold}{\nouppercase\rightmark}}}
\raisebox{12pt}{\textsc{\textcolor{uppergold}{\nouppercase\leftmark}}}
\hspace*{1cm}
\textcolor{uppergold}{\thepage}
}

\renewcommand{\chaptermark}[1]{\markboth{#1}{}} % Don not write word "chapter"

\fancypagestyle{plain}{}

% Fancy DnD 5e-style hline
\renewcommand{\hline}{
Expand Down
Binary file modified example.pdf
Binary file not shown.
4 changes: 3 additions & 1 deletion example.tex
@@ -1,4 +1,4 @@
\documentclass[10pt,twoside,twocolumn]{article}
\documentclass[10pt,twoside,twocolumn,openany]{book}
\usepackage[bg-letter]{dnd} % Options: bg-a4, bg-letter, bg-full, bg-print, bg-none.
\usepackage[ngerman]{babel} % Trennungsregeln und autom. Überschriften in n. dt. RS
\usepackage[utf8]{inputenc}
Expand All @@ -9,6 +9,8 @@

% Your content goes here

\chapter{Chapter 1: Example}

\section{Main Section}
\lipsum[1] % filler text

Expand Down
8 changes: 7 additions & 1 deletion lib/dndsections.sty
@@ -1,12 +1,18 @@
%Remove Numbering from section (If you want Numbering on the sections comment the following three lines and change the "0em" separation-definitions in the lower part to 1em)
\renewcommand\thechapter{}
\renewcommand\thesection{}
\renewcommand\thesubsection{}
\renewcommand\thesubsubsection{}

% Adjust chapter formatting
\titleclass{\chapter}{top}
\titleformat{\chapter}
{\color{titlered}\normalfont\scshape\Huge}{\thechapter}{0em}{}
\titlespacing*{\chapter}{0pt}{0pt}{20pt}

% Adjust section and subsection colors and font (change 0em to 1em if you commented the removal of section numbering)
\titleformat{\section}
{\color{titlered}\normalfont\scshape\Huge}{\thesection}{0em}{}
{\color{titlered}\normalfont\scshape\LARGE}{\thesection}{0em}{}

\titleformat{\subsection}
{\color{titlered}\normalfont\scshape\Large}{\thesubsection}{0em}{}[{\titleline{\color{undergold}\titlerule[1pt]}}]
Expand Down
Binary file modified scrot.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 4b352e2

Please sign in to comment.