1

I am writing a PhD and my mentor wants me to use a specific short form of citation in the footnotes and long one in the bibliography at the end of the work. So basically I need to have three short fields instead of classical two (shorttitle and shortauthor).

I need to find a way to add shortseries which I would use in footnotes.

This is what I use so far for the two fields:

\DeclareBibliographyDriver{myshort}{%
    \usebibmacro{begentry}%
    \ifboolexpr{ test{\ifnameundef{shortauthor}} 
                or test {\iffieldundef{shorttitle}}}
      {\usedriver{}{\thefield{entrytype}}}
      {\printnames{shortauthor}%
       \setunit{\addcomma\space}%
       \printfield{shorttitle}\isdot}%
       \usebibmacro{finentry}%
    }
\DeclareCiteCommand{\mycite}[\mkbibfootnote]
  {\usebibmacro{prenote}}
  {\usedriver{}{myshort}}
  {\multicitedelim}
  {\usebibmacro{postnote}}

This is what this produces:

See Iust., De Triph. S. 11.

I need to either find a way to introduce another bibliography field which would be called shortseries or I need to find a way to use some of the optional fields in the incollection like note which I never use to take over this function.

Here is my MWE:

    \documentclass[a4paper,11pt]{scrartcl}
    \usepackage[latin1]{inputenc}
    \usepackage{csquotes}
    \usepackage{blindtext}
    \usepackage{filecontents}
    \begin{filecontents}{\jobname.bib} 
     @incollection{iustinus1997,
            Address = {Berlin/New York},
            Author = {{Iustinus Martyr}},
            Title = {Iustini Martyris dialogus cum Tryphone},
            Editor = {Miroslav Marcovich},
            Publisher = {Walter de Gruyter},
            Series = {Patrologiae cursus completus: Series Graeca},
            Shortauthor = {Iust.},
            Shorttitle = {De Tryph.},
            Shortseries = {PG},
            Volume = {47},
            Year = {1997}}
    \end{filecontents} 
    \usepackage[ngerman]{babel}
\usepackage[style=historische-zeitschrift, maxnames=2, hyperref=true, backref=true, backrefstyle=none, backend=bibtex,idemtracker=true]{biblatex}
    \bibliography{\jobname}
    \DeclareBibliographyDriver{myshort}{%
        \usebibmacro{begentry}%
        \ifboolexpr{ test{\ifnameundef{shortauthor}}
                    or test {\iffieldundef{shorttitle}}}
          {\usedriver{}{\thefield{entrytype}}}
          {\printnames{shortauthor}%
           \setunit{\addcomma\space}%
           \printfield{shorttitle}\isdot}%
           \usebibmacro{finentry}%
        }
    \DeclareCiteCommand{\mycite}[\mkbibfootnote]
      {\usebibmacro{prenote}}
      {\usedriver{}{myshort}}
      {\multicitedelim}
      {\usebibmacro{postnote}}
    \begin{document}
    \blindtext \mycite[See][S. 11]{iustinus1997}
    \blindtext
    \printbibliography

    \end{document}

and when i use: \mycite[See][11]{iustinus1997} this is what I need to get as an end-result:

See Iust., De Tryph., in: PG 47, S. 11.

Anyone got the idea how I can achieve this? Thanks in advance for your answers!

1 Answer 1

4

The easiest way to do this would be to use one of the user fields. Let's say usera.

The following is essentially the code posted above, but using usera rather than shortseries:

\documentclass[a4paper,11pt]{scrartcl}
\usepackage[latin1]{inputenc}
\usepackage{csquotes}
\usepackage{blindtext}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib} 
 @incollection{iustinus1997,
        Address = {Berlin/New York},
        Author = {{Iustinus Martyr}},
        Title = {Iustini Martyris dialogus cum Tryphone},
        Editor = {Miroslav Marcovich},
        Publisher = {Walter de Gruyter},
        Series = {Patrologiae cursus completus: Series Graeca},
        Shortauthor = {Iust.},
        Shorttitle = {De Tryph.},
        Usera = {PG},
        Volume = {47},
        Year = {1997}}
\end{filecontents} 
\usepackage[ngerman]{babel}
\usepackage[style=authoryear, hyperref=true]{biblatex} 
\bibliography{\jobname}
\DeclareBibliographyDriver{myshort}{%
    \usebibmacro{begentry}%
    \ifboolexpr{ test{\ifnameundef{shortauthor}}
                or test {\iffieldundef{shorttitle}}}
      {\usedriver{}{\thefield{entrytype}}}
      {\printnames{shortauthor}%
       \setunit{\addcomma\space}%
       \printfield{shorttitle}\isdot}%
       \iffieldundef{usera}
         {}
         {\setunit{\addcomma\space}% or \newunit
          \usebibmacro{in:}%
          \printfield{usera}%
          \setunit*{\addspace}%
          \printfield[default]{volume}}% or \printfield{volume}
       \usebibmacro{finentry}%
    }
\DeclareFieldFormat{usera}{#1}
\DeclareCiteCommand{\mycite}[\mkbibfootnote]
  {\usebibmacro{prenote}}
  {\usedriver{}{myshort}}
  {\multicitedelim}
  {\usebibmacro{postnote}}
\begin{document}
\blindtext \mycite[See][S. 11]{iustinus1997}
\blindtext
\printbibliography

\end{document}

Which produces

Image of footnote as requested

This should also work (1) If there is no "Usera" field, and (2) if there is no volume number. A variation would be to use the "usual" way of writing volumes, which I have suppressed, and to have a period (rather than a comma) before the "in:". I've shown this code in comments, above. If we replace those lines we get.

enter image description here

By all means play around with the driver to get things to your liking. Be careful not to introduce stray spaces, which are the most common source of infuriation in driver-writing. If in doubt, comment the end of every line.

You could use your "shortseries" field if you wanted to using a source mapping, but it's probably overkill.

7
  • Thank you for this! It works great except that it produces ) after some volume numbers (not always) like this: Vgl. Cyr. H., catech., in: PG 33), S. 448-449 (16). Any idea why?
    – stx932
    Mar 28, 2014 at 17:21
  • None! How mysterious. Is it always the same entries that do this? Mar 28, 2014 at 17:24
  • I figured it out what it is! The thing that makes begentry errors and probably messes with ) is my biblatex style I am using which is Historische Zeitschrift Style.
    – stx932
    Mar 28, 2014 at 17:29
  • Some of the things here are messing with everything: \usepackage[style=historische-zeitschrift, maxnames=2, hyperref=true, backref=true, backrefstyle=none, backend=bibtex,idemtracker=true]{biblatex}
    – stx932
    Mar 28, 2014 at 17:30
  • Could be. I assumed your style was as posted. I can't look now but I'll see if I can track down the issue tomorrow. Incidentally you should use \addbibresource not bibliography too. Mar 28, 2014 at 17:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .