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'm trying to modify biblatex-chicago to meet the idiosyncratic style of a specific journal. One thing they insist on is that subsequent citations of a work should appear in a shortened form along with a reference to the note where the full citation may be found; e.g.:

Goossens, Mittelbach, and Samarin, LaTeX Companion (see n. 1), 23--32.

Following the advice here, I looked into biblatex's verbose-note.cbx and made the following additions:

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{csquotes}
\usepackage[american]{babel}
\usepackage[backend=biber]{biblatex-chicago}
\addbibresource{biblatex-examples.bib}

\renewbibmacro*{cite:save}{% <--- based on verbose-note.cbx
  \csxdef{cbx@\thefield{entrykey}}{\the\value{instcount}}}

\renewbibmacro*{cite:short}{%
  \ifthenelse{\ifnameundef{labelname}\OR%
    \iffieldequalstr{entrytype}{inreference}\OR%
    \iffieldequalstr{entrytype}{reference}}%
  {\iffieldequalstr{entrysubtype}{magazine}% Simplify .bib creation
    {\ifuseauthor%
      {\printfield[journaltitle]{journaltitle}\isdot\newcunit}%
      {}}%
    {\iffieldequalstr{entrytype}{manual}%
      {\printlist{organization}\isdot\newcunit}%
      {}}}%
  {\iffieldequalstr{authortype}{anon}%
    {\bibleftbracket\printnames{labelname}%
      \bibrightbracket\classicpunct}%
    {\iffieldequalstr{authortype}{anon?}%
      {\bibleftbracket\printnames{labelname}?%
         \bibrightbracket\classicpunct}%
      {\printnames{labelname}%
        \isdot\classicpunct}}}%
  \printtext[bibhyperlink]{%
    \printfield[citetitle]{labeltitle}}%
\addspace% <--- additions start here
\mkbibparens{%
  \bibstring{seenote}\addnbspace%
  \ref{cbx@\csuse{cbx@\thefield{entrykey}}}}%
  }%

\begin{document}

Test.%
\footnote{\cite{companion}.}%
Test.%
\footnote{\mancite\cite{companion}.}%

\end{document}

This does not work (nor have my more elaborate attempts), and I keep wasting time worrying about this when I still have revisions to do. I would appreciate any pointers as to why this solution is incomplete.

share|improve this question

1 Answer 1

up vote 5 down vote accepted

The \ref has no target, since there is no \label defined. Thus, you have to add a \label to your cite:save bibmacro. I have improved your example accordingly:

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{csquotes}
\usepackage[american]{babel}
\usepackage[backend=biber]{biblatex-chicago}
\addbibresource{biblatex-examples.bib}

\makeatletter
\renewbibmacro*{cite:save}{% <--- based on verbose-note.cbx
  \savefield{entrykey}{\cbx@lastkey}% <-- this is in the original chicago-notes.cbx
  \csxdef{cbx@\thefield{entrykey}}{\the\value{instcount}}%
  \label{cbx@\the\value{instcount}}}

\renewbibmacro*{cite:short}{%
  \ifthenelse{\ifnameundef{labelname}\OR%
    \iffieldequalstr{entrytype}{inreference}\OR%
    \iffieldequalstr{entrytype}{reference}}%
  {\iffieldequalstr{entrysubtype}{magazine}% Simplify .bib creation
    {\ifuseauthor%
      {\printfield[journaltitle]{journaltitle}\isdot\newcunit}%
      {}}%
    {\iffieldequalstr{entrytype}{manual}%
      {\printlist{organization}\isdot\newcunit}%
      {}}}%
  {\iffieldequalstr{authortype}{anon}%
    {\bibleftbracket\printnames{labelname}%
      \bibrightbracket\classicpunct}%
    {\iffieldequalstr{authortype}{anon?}%
      {\bibleftbracket\printnames{labelname}?%
         \bibrightbracket\classicpunct}%
      {\printnames{labelname}%
        \isdot\classicpunct}}}%
  \printtext[bibhyperlink]{%
    \printfield[citetitle]{labeltitle}}%
\addspace% <--- additions start here
\mkbibparens{%
  \bibstring{seenote}\addnbspace%
  \ref{cbx@\csuse{cbx@\thefield{entrykey}}}}%
  }%
\makeatother

\begin{document}

Test.%
\footnote{\cite{companion}.}
Test.%
\footnote{\mancite\cite{companion}.}%

\end{document}
share|improve this answer
    
Ah, OK. I had tried both of your additions to the cite:save macro, but since my attempts at adding a label were clearly incorrect, I stripped them from my more basic example. The solution seems so simple and obvious now that I see it before me; thanks! –  jon Dec 13 '11 at 15:08

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.