# New list environment not working in class file

Sorry in advance for the length of this one....

The following MWE contains an enumerate environment I defined:

\documentclass{memoir}
\usepackage{multicol}
\usepackage{enumitem}

\newlist{argo}{enumerate}{1}
\setlist[argo,1]{label=\arabic*.}
\newcommand{\prem}{\item}
\newcommand{\conc}{\rule{.3\linewidth}{1pt}\\[0em]\vspace{-3ex} \item[C.]}

\begin{document}

\begin{argo}
\prem Blah

\prem Blah

\conc Blah
\end{argo}

\begin{multicols}{3}
\begin{argo}
\prem Blah

\prem Blah

\conc Blah
\end{argo}

\begin{argo}
\prem Blah

\prem Blah

\conc Blah
\end{argo}

\begin{argo}
\prem Blah

\prem Blah

\conc Blah
\end{argo}

\begin{argo}
\prem Blah

\prem Blah

\conc Blah
\end{argo}
\end{multicols}
\end{document}


The main thing I'm looking to achieve is an environment for typesetting arguments in premise-conclusion form, where a rule is automatically inserted to separate the premises from the conclusion. I've included multicols because columns are what seems to mess things up.

Here is the PDF, with the list working as it should:

Once I embed this list definition into my .cls file, however, the behavior changes and the rules no longer properly scale to 1/3 line width. Like so:

Here is the custom .cls file I'm working with:

\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{dkhandout}[2014/05/04 DK Handout]

\RequirePackage[T1]{fontenc}
\RequirePackage[utf8]{inputenc}
\RequirePackage{geometry}
\let\footruleskip\undefined % makes memoir compatible with fncyhdr
\RequirePackage{fancyhdr}
\RequirePackage{tikz}
\RequirePackage{datetime}
\RequirePackage{etoolbox}
\RequirePackage{enumitem}
\RequirePackage{multicol}
%%%%%CLASS OPTIONS%%%%%%%%%%%%

\DeclareOption{10pt}{
\PassOptionsToClass{\CurrentOption}{memoir}
}
\DeclareOption{11pt}{
\PassOptionsToClass{\CurrentOption}{memoir}
}
\DeclareOption{12pt}{
\PassOptionsToClass{\CurrentOption}{memoir}
}
%% Fallback
\DeclareOption*{
\ClassWarning{myclass}{Unknown option '\CurrentOption'}
}
%%%%%DEFAULT CLASS OPTIONS%%%%%%%
\ExecuteOptions{10pt}

%%%%%PROCESS OPTIONS%%%%%%%%%%
\ProcessOptions\relax

\pagestyle{fancy}

\fancypagestyle{plain}{%
}

%%%%%DOCUMENT FORMATTING%%%%%%%
% Title flush left and compact spacing
\pretitle{\vspace*{-10ex}\flushleft\Large\bfseries}
\posttitle{\par\vspace{0em}}
\preauthor{\par\vspace{0em}}
\postauthor{\par\vspace{0em}}
\predate{\par\vspace{0em}}
\postdate{\par\vspace{5ex}}

% No paragraph indentation
\setlength{\parindent}{0pt}
\nonzeroparskip

% Blank date and author
\date{}
\author{}

% New argument environment "argo"
\newlist{argo}{enumerate}{1}
\setlist[argo,1]{label=\arabic*.}
\newcommand{\prem}{\item}
\newcommand{\conc}{\rule{.3\linewidth}{1pt}\\ \relax \vspace{-3ex} \item[C.]}

%%%%%END OF CLASS%%%%%%%%%%%%%
\endinput


Some tinkering gives me the vague impression that fancyhdr is to blame, but this is my first .cls and so I might have done something wrong at an even more basic level.

So what is going wrong here? Why does the rule (and only the rule) get messed up when I put the list definition in a .cls file?

• If you suspect fancyhdr, comment it out and test. I have an environment which I use for this defined in a class file but I seem to have hard-coded the length of the line. (I doubt this was because I had problems - I think this is probably just how I did it.) – cfr Sep 5 '14 at 20:11
• Use \newcommand{\conc}{\rule{.3\columnwidth}{1pt}\par \vspace{-1ex} \item[C.]} Note \columnwidth : i.stack.imgur.com/kNWIC.png – user11232 Sep 5 '14 at 23:45
• A short advice: your class file (or rather the user) will get into trouble as soon as another inputencoding or another engine than pdflatex is used. Be aware of that and take the needed precautions. – Johannes_B Sep 6 '14 at 8:03
• @HarishKumar Sorry, I'd totally forgotten about this question. Your comment fixed my problem, so if you'd like to turn it into an answer I'd be happy to accept it to get this guy off of the unanswered list. – Dennis Sep 27 '14 at 19:52

Use \columnwidth instead of \linewidth in
\newcommand{\conc}{\rule{.3\columnwidth}{1pt}\par \vspace{-1ex} \item[C.]} Note \columnwidth