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 need citations (mostly) as footnotes in the following form:

Book first appearance:

F. Author ­– T.S. Author, The Longtitle and not the Shorttitle, Address 1965, 4.

Second appearance:

F. Author ­– T.S. Author, Shorttitle (cf. nt. 1) 5.

Article in journal first appearance:

A. Author, "Title of the Article", Journal Title 65 (1968) 113­-126.

So far I got to:

F. Author ­– T.S. Author, The Longtitle and not the Shorttitle, Address, 1965, 4.

F. Author ­– T.S. Author, Shorttitle (cf. nt. 1), 5.

A. Author, "Title of the Article", Journal Title 65 (1968), 113­-126.

As you see, I didn't achieve to get rid of the commas between address and year and after the two parentheses. So far I got with the following code:

\documentclass{scrartcl}
\begin{filecontents*}{mybib.bib}
@BOOK{Abook,
 author = "First Author and The Second Author",
 title = {The Longtitle and not the Shorttitle},
 shorttitle = {Shorttitle},
 publisher = "The Publisher",
 address =  "Address",
 year = "1965"}
@article{Aarticle,
Author = {Article Author},
Journal = {Journal Title},
Pages = {113-126},
Title = {Title of the Article},
Volume = {65},
Year = {1968}}
\end{filecontents*}

\usepackage[style=verbose-note,firstinits=true]{biblatex}

\renewbibmacro*{footcite:note}{%
  \ifnameundef{labelname}
    {\printfield{label}}
    {\printnames[first-last]{labelname}}%
    {\setunit*{\nametitledelim}%
     \printfield[title]{labeltitle}}%
  \setunit*{\space\printtext{(}}%
  \printtext{%
    \bibstring{seenote}\addnbspace
    \ref{cbx@\csuse{cbx@f@\thefield{entrykey}}})%
    \iftoggle{cbx:pageref}
      {\ifsamepage{\the\value{instcount}}
                  {)\csuse{cbx@f@\thefield{entrykey}}}
         {}
     {\addcomma\space\bibstring{page}\addnbspace
      \pageref{cbx@\csuse{cbx@f@\thefield{entrykey}}}}}
      {}}}

\renewcommand{\newunitpunct}{\addcomma\space}
\renewcommand*{\mkbibnamefirst}[1]{{\iffirstinits{\let~\-}{}#1}}

\renewcommand*{\multinamedelim}{~--\space}
\renewcommand*{\finalnamedelim}{~--\space}

\renewbibmacro{in:}{%
  \ifentrytype{article}{}{%
  \printtext{\bibstring{in}\intitlepunct}}}

\DeclareFieldFormat{postnote}{#1}
\DeclareFieldFormat{multipostnote}{#1}
\DeclareFieldFormat{pages}{#1}

\AtEveryCitekey{%
  \clearlist{publisher}%
}

\DefineBibliographyStrings{english}{%
  seenote = {cf. nt.},
}

\bibliography{mybib}

\begin{document}

Here and there. \footcite[4]{Abook}

There and here. \footcite[5]{Abook}

Up and down. \footcite{Aarticle}

\end{document}

My first attempt to get any further was to use \ifciteseen the following way:

\renewcommand*{\postnotedelim}{%
  \ifciteseen 
  {\space}
  {\addcomma\space}}

This does not work as also the first appearance is treated as already seen (I think because it is nested with another \ifciteseen inside \newbibmacro*{footcite}.

So my second try was:

\newbibmacro*{footcite}{%
  \usebibmacro{cite:citepages}%
  \ifciteseen
    {\renewcommand*{\postnotedelim}{\space}
    {\iffieldundef{shorthand}
       {\usebibmacro{footcite:note}}
       {\usebibmacro{footcite:shorthand}}}}
    {\usebibmacro{footcite:full}%
     \usebibmacro{footcite:save}}}

This solved part of the problem, but created another one: It retained the comma in the first appearance of the book (god), removed the comma in the second appearance (god), added a space between the footnote number and the citation (bad).

For the commas between the address and year and after the parenthesis in the article citation I didn't find any idea how to proceed.

So any suggestions how to get rid of the three commas mentioned, without touching the others?

share|improve this question
    
I'm sorry but this my first time to post here and I should obviously have used "pre" instead of "code", so my code got all mixed up. I could post it again if that helps. –  newtothis Dec 20 '12 at 21:15
    
It appears to me you have two accounts with the same name, one of which you used to ask the question, and the other to "answer" it. –  Vivi Dec 20 '12 at 21:24

2 Answers 2

You need to insert \nopunct into appropriate places for these two different problems.

For the year, this is in the biblatex macro issue+date and you can insert it before the final \newunit:

\renewbibmacro{issue+date}{%
  \printtext[parens]{%
    \iffieldundef{issue}
      {\usebibmacro{date}}
      {\printfield{issue}%
       \setunit*{\addspace}%
       \usebibmacro{date}}}%
  \nopunct\newunit}

For the see note, it should be part of your redefinition of footnote:cite after your closing parenthesis. I would also suggest moving the opening parenthesis into the same block.

Putting this into your code, we get:

Sample output

from

\documentclass{scrartcl}
\begin{filecontents*}{mybib.bib}
@BOOK{Abook,
 author = "First Author and The Second Author",
 title = {The Longtitle and not the Shorttitle},
 shorttitle = {Shorttitle},
 publisher = "The Publisher",
 address =  "Address",
 year = "1965"}
@article{Aarticle,
Author = {Article Author},
Journal = {Journal Title},
Pages = {113-126},
Title = {Title of the Article},
Volume = {65},
Year = {1968}}
\end{filecontents*}

\usepackage[style=verbose-note,firstinits=true]{biblatex}

\renewbibmacro*{footcite:note}{%
  \ifnameundef{labelname}
    {\printfield{label}}
    {\printnames[first-last]{labelname}}%
    {\setunit*{\nametitledelim}%
     \printfield[title]{labeltitle}}%
  \setunit*{\space}%
  \printtext{%
  (%
    \bibstring{seenote}\addnbspace
    \ref{cbx@\csuse{cbx@f@\thefield{entrykey}}})\nopunct%
    \iftoggle{cbx:pageref}
      {\ifsamepage{\the\value{instcount}}
                  {)\csuse{cbx@f@\thefield{entrykey}}}
         {}
     {\addcomma\space\bibstring{page}\addnbspace
      \pageref{cbx@\csuse{cbx@f@\thefield{entrykey}}}}}
      {}}}

\renewcommand{\newunitpunct}{\addcomma\space}
\renewcommand*{\mkbibnamefirst}[1]{{\iffirstinits{\let~\-}{}#1}}

\renewcommand*{\multinamedelim}{~--\space}
\renewcommand*{\finalnamedelim}{~--\space}

\renewbibmacro{in:}{%
  \ifentrytype{article}{}{%
  \printtext{\bibstring{in}\intitlepunct}}}

\renewbibmacro{issue+date}{%
  \printtext[parens]{%
    \iffieldundef{issue}
      {\usebibmacro{date}}
      {\printfield{issue}%
       \setunit*{\addspace}%
       \usebibmacro{date}}}%
  \nopunct\newunit}

\DeclareFieldFormat{postnote}{#1}
\DeclareFieldFormat{multipostnote}{#1}
\DeclareFieldFormat{pages}{#1}

\AtEveryCitekey{%
  \clearlist{publisher}%
}

\DefineBibliographyStrings{english}{%
  seenote = {cf.~nt.\adddot},
}


\bibliography{mybib}

\begin{document}

Here and there. \footcite[4]{Abook}

There and here. \footcite[5]{Abook}

Up and down. \footcite{Aarticle}

\end{document}
share|improve this answer

I solved part of the problem (the extra space) by rewriting the \renewbibmacro*{footcite}:

\renewbibmacro*{footcite}{%
   \usebibmacro{cite:citepages}%
   \ifciteseen%
   {\renewcommand*{\postnotedelim}{\space}\iffieldundef{shorthand}                                 {\usebibmacro{footcite:note}}
    {\usebibmacro{footcite:shorthand}}}
   {\usebibmacro{footcite:full}%
    \usebibmacro{footcite:save}}}

So what remains to be solved is the comma between address and year and after the parenthesis in the article citation.

share|improve this answer
    
I enabled cookies and hope to be recognized as the same user from now on. –  newtothis Dec 21 '12 at 11:12
    
Andrew's solution is of course much better. And points to the last step to the full solution. To remove the comma between address and year one has recode publisher+location+date. (Changing \addcomma\space to \addspace at the approriate place.) –  newtothis Dec 21 '12 at 16:05

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.