Skip to content
Brian Criswell edited this page Sep 27, 2018 · 1 revision

The following code example is based on how @briancriswell sets up a .sty file to provide consistent styling across multiple documents that is different from the default styling provided by this package. You then include this package instead of dnd.sty (because it includes it for you).

overridednd.sty

\ProvidesPackage{overridednd}

% Pass options to packages included by the dnd package to avoid package option clashes

% Require packages needed to set up package options for overridednd

% Set up package options for overridednd

\RequirePackage{dnd}
% Require other packages not already required by dnd that are used by code in this package

% Set variables and other package settings based on package options (setting booleans, declaring colors as RGB vs CMYK, etc.)

% Override parts of dnd that there is not a way to incorporate changes (fancyhead, dndtable, etc.)

% Override parts of dnd that can incorporate changes to the base package over time.

% Custom sidebar. Treat it like you would a paperbox, but call this instead
\newenvironment{sidebar}[2][]
{
	\begin{paperbox}[% place changes to paperbox styling before the "#1" the following option clears the overlay
		overlay=,
		#1,
	]{#2}
}
{\end{paperbox}}

% Custom readaloud text. Treat it like you would a quotebox, but call this instead.
newenvironment{readaloud}[1][]
{
	\begin{quotebox}[% place changes to paperbox styling before the "#1" the following option is another way to clear the overlay
		no overlay,
		#1,
	]
}
{\end{quotebox}}

% Other commands common to your documents to provide consistency across the documents.
Clone this wiki locally