# Getting “Unknown option” error with \DeclareStringOption in custom package

I'm trying to write a package for personal use that takes custom arguments as follows:

\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{ZTPS}[2014/15/10 v1.0 Zach Taylor Problem Set]

\RequirePackage{datetime}
\RequirePackage{fancyhdr}
\pagestyle{fancy}

\usdate

\usepackage{kvoptions}

\DeclareStringOption [Zachary Taylor]{name}
\DeclareStringOption [\today]{date}
\DeclareStringOption [MTH 265]{course}
\DeclareStringOption [Untitled]{title}

\title{\ztps@title}
\author{\ztps@name}
\date{\ztps@date}
...


If I invoke it as follows, everything works fine and the header/footer include the default option values (My name, "MTH 265", and the date.):

\documentclass[14]{Article}

\usepackage{ztps}

\begin{document}

test

\end{document}


However, if I try:

\documentclass[14]{Article}

\usepackage[name=test]{ztps}

\begin{document}

test

\end{document}


I get

"Unknown Option: 'name=test' for package 'zpts'".

If I just put [name] I get the same error

"Unknown Option: 'name' for package 'zpts'".

I'm probably missing something simple but I've searched extensively and can't find it.

• I don't see a line to process options in your short demo file: we'll need to see that. Also (not linked to the issue): you've got \ProvidesClass but the code seems to be a package, which should be corrected. – Joseph Wright Oct 15 '14 at 7:40
• That turned out to be my problem, actually-- thanks for pointing it out. – Dumb Political Scientist Oct 19 '14 at 10:08

Options are processed (by kvoptions) only when you give the command
\ProcessKeyvalOptions