2

Is there something akin to BibTeX that can be used for images? It would be helpful to have an image database, wherein static information like image source and date could be kept and referenced.

  • You can add a field to your BibTeX file referring to your image files. Compiling the images together into a single huge PDF file is possible if you edit your BibTeX style file adding \includegraphics with your field as an argument. – Júda Ronén Dec 19 '14 at 8:41
  • But I’m not sure at all TeX is the best solution for your needs. There are plenty of programs for managing image collection, taking advantage of Exif matadata. – Júda Ronén Dec 19 '14 at 9:24
  • @júda-ronén, thanks for your comments. Can you expand a little on your first suggestion (\includegraphics in a style file)? – lclaudius Dec 19 '14 at 10:17
3

I have created a hack that works. I'm using biblatex. In a .bib file there is this entry:

@Misc{crete,
addendum                 = {Bull-leaping in Crete.},
annotation               = {Bull-leaping in Crete. Photo by Wolfgang Sauber, Wikimedia Commons.}
}

The image file is named crete.jpg. I created a \Figura command with this definition:

\newcommand{\Figura}[1]{
\includegraphics[width=\textwidth]{#1}
\caption[\citefield{#1}{annotation}]{\citefield{#1}{addendum}}
}

\citefield is a biblatex command. In the main file, I used the \Figura command like this:

\begin{figure}
   \Figura{crete}
   \label{fig:crete}
\end{figure}

The content of the addendum field is the figure caption, the content of the annotation field is the caption as it appears at the figure list. The image source is included in the annotation field.

Since I used the filename as the biblatex key, I can use the filename directly as the parameter for \Figura. I don't know if it would be possible to have the filename in \includegraphics as a dynamic field, or in the \label command, but I suspect that it wouldn't work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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