biblatex: Use field value in tex document before compilation
I am trying to create a timeline of some publications. Since each
publication includes information about it's publication time, I want to
use that information automatically to place the reference on the timeline.
This is my code so far:
\documentclass{scrartcl}
\usepackage{chronology}
\usepackage[landscape]{geometry}
\usepackage[backend=biber]{biblatex}
\addbibresource{refs.bib}
\newcommand{\paperevent}[1]{%
\event{\citeyear}{\textcite{#1}}%
}
\begin{document}
\begin{chronology}[5]{1960}{2013}{\textwidth}
\paperevent{Miller1960}
\end{chronology}
\end{document}
As you might guess, this doesn't work, probably because \citeyear is not
known during the first LaTeX compilation. Is there any way I can make this
work using biblatex macros?
The error currently sounds:
There were errors in your LaTeX source
./timeline.tex:15: Extra \else. [ \paperevent{Miller1960}]
./timeline.tex:15: Package PGF Math Error: Unknown operator `1' or `19'
(in '(\citeyear -1960)*\unit '). [ \paperevent{Miller1960}]
No comments:
Post a Comment