Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I could need some help with natbib / biblatex. In my document I use the \footcite{} command to add my references. I use bibstyle=numeric-verb and citestyle = authortitle-icomp – thats nice, I like that.

Now my Problem! The references for pictures are not very nice. So far I also use \footcite{} but I simply want the number of the source in brackets behind the figure title. And this only in the list of figures.

A short example:

...
\includegraphics[draft]{fig1.jpg}
\caption[My first figure (Source: \cite{Geppert2004})]{My first figure}
...

In the list of figures it should look like:

1.1 My first figure (Source: [2]) ....... page x

Alright and here is a complete MWE:

\begin{filecontents}{mybib.bib}

@ELECTRONIC{nowheel,
  author = {Richard Dawkins},
  month = {November},
  year = {1996},
  title = {Why dont animals have wheels?},
  language = {EN},
  url = {http://www.simonyi.ox.ac.uk/dawkins/WorldOfDawkins-archive/Dawkins/Work/Articles/1996-11-24wheels.shtml},
  timestamp = {2012.06.27}
}

@ARTICLE{Geppert2004,
  author = {Geppert, L. },
  title = {Qrio, the robot that could},
  journal = IEEE_M_SPECT,
  year = {2004},
  volume = {41},
  pages = {34--37},
  number = {5},
  timestamp = {2012.06.11}
}

\end{filecontents}

\documentclass[pdftex,a4paper,12pt, titlepage]{scrreprt}
\usepackage[a4paper, left=3cm, right=2.5cm, top=3cm, bottom=3cm]{geometry}

\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage[babel,german=quotes]{csquotes}

\usepackage{hyperref,blindtext,graphicx}

\usepackage[
natbib=true,  
bibstyle=numeric-verb,  
citestyle = authortitle-icomp,
sorting = none
]{biblatex} 
\addbibresource{mybib.bib}
\renewcommand*{\mkbibnamelast}[1]{\textsc{#1}}


\begin{document}

\tableofcontents

\chapter{Hallo Welt}

\blindtext \footcite[S.45]{nowheel}

\begin{figure}[htp]
\centering
  \includegraphics[width=0.5\linewidth,draft]{fig1.jpg}
  \caption[My first figure (Quelle: \cite{Geppert2004}]{My first figure}
  \label{fig1l}
\end{figure}

\chapter{Nochmal}

\blindtext \footcite[S. 36 ff.]{Geppert2004}

\begin{figure}[htp]
\centering
  \includegraphics[width=0.5\linewidth,draft]{fig2.jpg}
  \caption[My second figure (Quelle: \cite{nowheel}]{My second figure}
  \label{fig12}
\end{figure}

\printbibliography
\addcontentsline{toc}{chapter}{Literaturverzeichnis} 

\listoffigures
\addcontentsline{toc}{chapter}{Abbildungsverzeichnis}

\end{document}
share|improve this question
    
You can actually delete your question yourself (I think that doesn't require any reputation points). Otherwise, the easiest way to contact the moderators is to use the "flag" link below every question/answer. –  Caramdir Jun 29 '12 at 20:18
add comment

1 Answer

up vote 2 down vote accepted

I would question the wisdom of this: for the reader I think there is much to be said for consistency in citations, and mixing numerical and author-title schemes like this is not, I suspect, desirable.

But it's your choice.

You can define a revised cite command which prints a numeric label instead of author and title, like this (apart from the renaming this is just the cite citation command and macro from numeric.cbx). Put it in your preamble after you have loaded biblatex.

\newbibmacro*{numcite}{%
  \printtext[bibhyperref]{%
    \printfield{prefixnumber}%
    \printfield{labelnumber}%
    \ifbool{bbx:subentry}
      {\printfield{entrysetcount}}
      {}}}

\DeclareCiteCommand{\numcite}[\mkbibbrackets]
  {\usebibmacro{prenote}}
  {\usebibmacro{citeindex}%
   \usebibmacro{numcite}}
  {\multicitedelim}
  {\usebibmacro{postnote}}

Now, instead of \cite in your captions (and only there) use \numcite, and you will get something that looks like a standard numerical citation (because it is!).

I can't promise that this won't cause unexpected problems in a complex bibliography; but for the simple case you suggest I suppose it will pass.

(A more complex approach would then involve patching \caption to switch \cite and \numcite automatically; but that seems like overkill.)

share|improve this answer
    
Hi Paul, thank you! For my purposes it's exactly what I was looking for. Until now my bib contained around 100 keys and your solution works well. –  tomcatkonsti Jun 30 '12 at 0:31
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.