Download Addendum - Index of
Transcript
Package clashes
The optional hfilli argument is inserted just before the rule is drawn. To ensure that footnotes are at the bottom \raggedbottom pages you can use this:
\setfootnoterule[\vfill]{3pt}{0.4\columnwidth}{\normalrulethickness}
1.9
Package clashes
On occasions a package does not work with memoir because the class has already defined
a macro that the package wants to define. There are ways to cope with this, depending
on what you want to do [Wil04]. For the sake of argument, assume that both the memoir
class and the pack package have both defined the macro \amacro, the package by using
\newcommand. If pack is used with memoir then there will be a report that \amacro has
already been defined.
1. Discard memoir’s definition:
\documentclass[...]{memoir}
\let\amacro\undefined% or \relax
‘undefine’ memoir’s definition
\usepackage{pack}
and pack’s version of \amacro is used from now on.
2. Discard pack’s definition:
\documentclass[...]{memoir}
\let\memamacro\amacro%
save memoir’s definition
\let\amacro\undefined
\usepackage{pack}
\let\amacro\memamacro%
restore memoir’s definition
and memoir’s version of \amacro is used from now on.
3. Keep both definitions:
\documentclass[...]{memoir}
\let\memamacro\amacro%
save memoir’s definition
\let\amacro\undefined
\usepackage{pack}
and after this use \memamacro when you need memoir’s version and \amacro when
you want to use pack’s definition. But this solution doesn’t always work as you
might not know when the particular versions must be used, or it is impossible to
partition the uses. A last resort is to ask the authors that one or the other macro
names be changed, however, for good reasons, neither may be willing to do this.
I was spurred to write the above following the thread Typesetting algorithms in memoir
started by Filip Militic on CTT (2006/12/12) where he had problems because both the alg
and algorithm packages use the float package which defines \newfloat which is also defined by memoir. There was a response by Danie Els who said that the algorithm package
actually consisted of two packages — algorithmic and algorithm and it is the latter one
that uses the float package. In this particular case Danie suggested ignoring the algorithm
package and using memoir’s methods, and he gave the example below.
\documentclass[...]{memoir}
\usepackage{algorithmic}
% simple new memoir float
\newcommand*{\algorithmname}{Algorithm}
\newcommand*{\listalgorithmname}{List of Algorithms}
3