I'm trying to include the source citation everytime I use an image in my thesis. I have a self-written command to ease that process (code at the end of the post):
\bild[citation]{label for refs}{file}{name of the image}{size in cm}
When I try to include citation as a \cite-command (using the harvard-package), latex throws following error:
<argument> \cite
{ferstl_grundlagen_2008}
\equal #1#2#3->\TE@throw \def \@tempa {#1
}\def \@tempb {#2}\noexpand \ifx \@...
\NROrg@ifthenelse ...eval \the \toks@ \TE@endeval
}\endgroup \@gtempa \expan...
\\bild ...-0.3cm\ifthenelse {\equal {#1}{\empty }}
{\caption [{#4}]{#4}} {\c...
l.12 ...en/aufgabenstruktur}{Aufgabenstruktur}{12}
?
The command I used was following:
\bild[\cite{ferstl_grundlagen_2008}]{aufgabenstruktur}{FeSi-Aufgaben/aufgabenstruktur}{Aufgabenstruktur}{12}
I think this is a problem of the harvard implementation of \cite, as I recently used this piece of code with the bibgerm-package, where it worked like a charm. What am I doing wrong here? Is there any easy way to fix this problem?
Thanks in advance,
Uli
EDIT: Code of the \bild-macro:
\newcommand{\bild}[5][\empty]{%
\begin{figure}[htb]%
\begin{center}%
\includegraphics[width=#5cm]{images/#3}%
\vskip -0.3cm%
\ifthenelse{\equal{#1}{\empty}}
{\caption[{#4}]{#4}}
{\caption[{#4} \newline \small{\textit{Quelle: #1}}]{#4}}%
\vskip -0,2cm%
\label{#2}%
\end{center}%
\end{figure}%
}
Used packages & document class:
\documentclass[a4paper, 12pt]{article}
\usepackage{german}
\usepackage[latin1]{inputenc}
\usepackage{fancyhdr}
\usepackage[T1]{fontenc}
\usepackage{ae}
\usepackage{listings}
\usepackage{color}
\usepackage{listings}
\usepackage{harvard}
\usepackage{wrapfig}
\usepackage{helvet}
\usepackage{txfonts}
\usepackage{geometry}
\usepackage{setspace}
\usepackage{hyperref}
\usepackage{sectsty}
\usepackage{acronym}
\usepackage{eurosym}
\bild
macro as well as the document class and any citation-relevant packages.