There is some conflict or error I don't understand. I can skip it and nothing visible happens. The output is okay and everything seems to be fine. Still I would like to get rid of the error message. If I run the following minimal example:
\documentclass[]{scrbook}
\usepackage[applemac, grafiken]{tahbiblatex}
\usepackage[ngerman]{babel}
\begin{document}
Testing äüöaüä.
\end{document}
I get the error message:
! Missing = inserted for \ifnum.
<to be read again>
,
l.4 \usepackage
[ngerman]{babel}
?
! Missing number, treated as zero.
<to be read again>
,
l.4 \usepackage
[ngerman]{babel}
Here is my .sty file:
\NeedsTeXFormat{LaTeX2e}\relax
\ProvidesPackage{tahbiblatex}[2012, by tah modified by sm]
\RequirePackage{ifthen}
\DeclareOption{latin1}{\PassOptionsToPackage{\CurrentOption}{inputenc}}
\DeclareOption{applemac}{\PassOptionsToPackage{\CurrentOption}{inputenc}}
\DeclareOption{cp850}{\PassOptionsToPackage{\CurrentOption}{inputenc}}
\DeclareOption{utf8}{\PassOptionsToPackage{\CurrentOption}{inputenc}}
\DeclareOption{dvi}{%
\newif\ifpdf
\ifx\pdfoutput\undefined
\pdffalse
\else
\pdfoutput=0
\pdftrue
\fi}
\newcounter{Grafiken}\setcounter{Grafiken}{0}
\DeclareOption{grafiken}{\setcounter{Grafiken}{1}}
\newcounter{Randausgleich}\setcounter{Randausgleich}{0}
\DeclareOption{randausgleich}{\setcounter{Randausgleich}{1}}
\newcounter{Tabellen}\setcounter{Tabellen}{0}
\DeclareOption{tabellen}{\setcounter{Tabellen}{1}}
\newcounter{Sync}\setcounter{Sync}{0}
\DeclareOption{sync}{\setcounter{Sync}{1}}
\ProcessOptions
\RequirePackage{fixltx2e}
\RequirePackage{inputenc}
\RequirePackage[T1]{fontenc}
\RequirePackage[T1]{url}
\RequirePackage{setspace}
%\RequirePackage[german]{varioref}
\RequirePackage{textcomp}
\newcommand{\urlangabe}[2]{%
$\langle$\url{#1}$\rangle$ -- Zugriff am #2}
\def\hierlockern {\begingroup \def\par{\endgraf\endgroup}%
\tolerance 1414%
\hbadness 1414%
\emergencystretch 1.5em%
\hfuzz 0.3pt%
\vfuzz \hfuzz%
\raggedbottom%
}
\newcommand{\alleslockern}{%
\tolerance 1414%
\hbadness 1414%
\emergencystretch 1.5em%
\hfuzz 0.3pt%
\vfuzz \hfuzz%
\raggedbottom%
}
\ifthenelse{\value{Grafiken}=1}
{
\ifx\pdfoutput\undefined \newcount\pdfoutput \fi
\ifcase\pdfoutput
\RequirePackage[dvips]{graphicx}
\DeclareGraphicsExtensions{.eps}
\typeout{Paket tah Meldung: Die Option `grafiken' fuer DVI wurde gewaehlt.}%
\else
\RequirePackage[pdftex]{graphicx}
\DeclareGraphicsExtensions{.jpg,.tif,.png,.pdf}
\typeout{Paket tah Meldung: Die Option `grafiken' fuer PDF wurde gewaehlt.}%
\fi}
{}
\ifthenelse{\value{Sync}=1}
{
\ifx\pdfoutput\undefined \newcount\pdfoutput \fi
\ifcase\pdfoutput
\RequirePackage{srcltx}
\typeout{Paket tah Meldung: Die Option `sync' fuer DVI wurde gewaehlt.}%
\else
\RequirePackage{pdfsync}
\typeout{Paket tah Meldung: Die Option `sync' fuer PDF wurde gewaehlt.}%
\fi
}
{}
\ifthenelse{\value{Randausgleich}=1}
{\typeout{Paket tah Meldung: Die Option `randausgleich' wurde gewaehlt.}%
\RequirePackage[activate]{pdfcprot}}
{}
\ifthenelse{\value{Tabellen}=1}
{\typeout{Paket tah Meldung: Die Option `tabellen' wurde gewaehlt.}%
\RequirePackage{tabularx}
\RequirePackage{ragged2e}
\RequirePackage{dcolumn}
\RequirePackage{booktabs}
\newcolumntype{L}{>{\RaggedRight\hspace{0pt}\arraybackslash}l}
\newcolumntype{Y}{>{\RaggedRight\hspace{0pt}\arraybackslash}X}
\newcolumntype{d}[1]{>{\DC@{.}{,}{#1}}l<{\DC@end}}
}
{}
\endinput
I also don't really need all the features. So it would be nice to reduce it to minimal features, which are needed..
Best Answer
The optional argument to
\ProvidesPackage
must be of the formfor instance
In particular, one digit numbers of days or months must be prefixed by
0
and the year must be in four digit form. So January 2nd, 2013 has to be expressed asTurning to the package's contents, all which regards
\pdfoutput
is wrong: require the packageifpdf
and use the\ifpdf
conditional it provides. Here's an amended version; notice that allocating a counter for each option is wasting resources:I don't recommend loading the
pdfsync
package: the SyncTeX technology is way better, nowadays. Instead ofpdfcprot
the more powerfulmicrotype
package is preferable.