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 encouter the following problem to which I simply can't find a solution.

I'm working on a homework, and I want to cite the slides the professor gave us. So, if I type \cite[20]{presentationOne} I want [1, F. 20] as result and not [1, S. 20]. (F. for Folie, and S. for Seite, I'm from Germany).

I'm citing books as well, therefore simply changing it for all citations isn't a solution.

I use biblatex with biber backend.

Hope anyone got a clean solution for this. Otherwise I would have to mention in the foreword what I mean with those citations.

share|improve this question
4  
You could use \cite[F.~20]{presentationOne} when citing the presentation. Do you want an automatic solution for certain entries? –  lockstep Mar 8 '13 at 13:39
    
For my work now, your comment solves my problem. But I think for future readers, with longer documents and more citations than mine, an automatic solution would be nice. So if you know one it would be nice. –  Dave Mar 8 '13 at 13:51
    
Do you have a special bibliography driver for presentations? –  Marco Daniel Mar 8 '13 at 13:58
    
@MarcoDaniel No, I don't have any. Would you recommend one? –  Dave Mar 8 '13 at 14:27
3  
If you have a special driver like presentation you can setup the formation of the optional key by \DeclareFieldFormat[presentation]{postnote}{F~#1} or some other modification related to the driver. –  Marco Daniel Mar 8 '13 at 14:34

2 Answers 2

up vote 6 down vote accepted

There are different ways to achieve this:

  1. You can just use something like \cite[F.~20]{reference}. Whenever the optional argument is more than just a number, then biblatex outputs it literally instead of putting a pagination string in front of it.¹
  2. As already mentioned in a comment to your question, you could define a separate bibliography driver presentation for presentations. Then you could just define a specific postnote style with \DeclareFieldFormat[presentation]{postnote}{F~#1} or something similar. This would some kind of a global solution.
  3. For every item in your .bib file you can set the pagination = {page|column|line|verse|section|paragraph|none} field. biblatex evaluates this field and changes its formatting of the postnotes according to the value of the pagination field.

    3.1 You could now just set the pagination field to none which will already prevent biblatex from printing a "p." before the number, but you will still have to care about setting the "F.~" at the right places.

    3.2 You could abuse one of the default types (column, verse etc.) to use it in your case. In this case you must give your .bib entry for example a pagination = {verse} field and redefine the corresponding verse locale to fit your needs by \DefineBibliographyStrings{german}{verse = {Folie}, verses = {Folien}}.

    3.3 I didn't have a look into the code of biblatex but I think it may be possible to copy and modify the code for the pagination command to add another value (something like slide) to the paginantion type list. On the long run, this would be the cleanest but also most invasive method to solve your problem.

––

¹ This is not exactly the whole story, as there are also the commands like \psq to announce "and following pages". But everything that differs from a number and those special commands is just printed by biblatex without further processing.

share|improve this answer

Expanding on Benedikt Bauer's wonderful answer, it is actually not very hard to define one's own pagination style (point 3.3).

biblatex treats the pagination field in a way very convenient for us:

The pagination field takes a key, such as the standard keys page, column, line, verse, section, paragraph or none. biblatex reads the key and tries to put the bibstring named after the key before the page numbers; except, of course, for the case in which pagination is none, in that case no bibstring is inserted.

So if we define two new bibliography strings slide and slides, we can then specify pagination = {slide} in the .bib entry and are good to go.

\NewBibliographyString{slide,slides}
\DefineBibliographyStrings{ngerman}{%
  slide   = {F\adddot},%{Folie}
  slides  = {F\adddot},%{Folien}
}
\DefineBibliographyStrings{english}{%
  slide   = {s\adddot},%{slide}
  slides  = {ss\adddot},%{slides}
}

Unfortunately, \DefineBibliographyStrings, which can be used in the preamble, does not support short and long bibstrings; if you want those, you will have to define your own .lbx file inheriting all the other features, but adding slide and slides.

\ProvidesFile{ngerman-slides.lbx}[2013/10/15 ngerman with slides]
\InheritBibliographyExtras{ngerman}
\NewBibliographyString{slide,slides}
\DeclareBibliographyStrings{%
  inherit   = {ngerman},
  slide     = {{Folie}{F\adddot}},
  slides    = {{Folien}{F\adddot}},
}

This language definition can then be loaded via \DeclareLanguageMapping{ngerman}{ngerman-slides}.

The MWE

\documentclass[11pt]{scrartcl}
\begin{filecontents}{\jobname.bib}
@inbook{DahmenReusken:Interpolation,
  author          = {Wolfgang Dahmen and Arnold Reusken},
  title           = {Interpolation},
  chapter         = {8},
  booktitle       = {Numerik für Ingenieure und Naturwissenschaftler},
  booktitleaddon  = {Folien für Dozenten},
  date            = {2007-11-21},
  url             = {https://www.igpm.rwth-aachen.de/Download/DahmenReusken/Folien/Kapitel8.pdf},
  urldate         = {2013-08-11},
  pagination      = {slide},
}
\end{filecontents}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage{lmodern}
\usepackage[ngerman]{babel}
\usepackage[babel]{csquotes}
\usepackage[backend=biber, style=authoryear]{biblatex}

\NewBibliographyString{slide,slides}
\DefineBibliographyStrings{ngerman}{%
  slide   = {F\adddot},%{Folie}
  slides  = {F\adddot},%{Folien}
}
\DefineBibliographyStrings{english}{%
  slide   = {s\adddot},%{slide}
  slides  = {ss\adddot},%{slides}
}

\addbibresource{\jobname.bib}

\begin{document}
  \parencite[vgl.][4]{DahmenReusken:Interpolation}.
  \printbibliography
\end{document}

yields enter image description here

share|improve this answer

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.