9

In my .bib-file the language field is filled out in all entries.

As MWE, they all look (as expected) like:

@Collection{Bakker:Grammar,
  editor =   {Egbert J[an] Bakker},
  gender =   {sm},
  title =    {Grammar as Interpretation},
  subtitle = {Greek Literature in its Linguistic Context},
  shorttitle = {Grammar},
  language = {english},
  year =     1997,
  series =   {Mnemosyne. Supplementum},
  number =   171,
  publisher = {Brill},
  location ={Leiden AND New York AND K{\"o}ln}
  }

To print the bibliogeaphy I created this file

\documentclass[paper=a4,twoside,ngerman]{scrartcl}
\usepackage[LGR,T1]{fontenc}
\usepackage[utf8]{inputenc}
\input{ix-utf8enc.dfu}
\usepackage{savesym}
\usepackage{gfsdidot,gfsporson}
\savesymbol{og}
\usepackage[main=ngerman,greek,italian,frenchb,english,british,german]{babel}
\usepackage[GlyphNames,boldLipsian]{teubner}
\savesymbol{breve}
\savesymbol{aa}
\usepackage[osf,sc]{mathpazo}
\restoresymbol{pplj}{breve}
\usepackage{courier}
\usepackage[scaled=.9]{DejaVuSansCondensed}
\Lipsiantrue
\ifFamily{pplj}{porson}
\usepackage{textcase}
\usepackage{textcomp}
\usepackage{xpatch}
\usepackage[pdftex]{hyperref}
\usepackage[style=german, german=guillemets]{csquotes}
\usepackage[style=philosophy-modern, sortlocale=de_DE,
            sorting=nyvt, autolang=hyphen, alldates=terse,
            annotation=true, useprefix=true, language=ngerman,
             datezeros=false,  bibencoding=auto, pagetracker=spread,
             publocformat= loccolonpub, backend=biber, 
             citetracker = constrict, ibidtracker=constrict,
             opcittracker=constrict, idemtracker=constrict,
             relatedformat=parens,  clearlang=true]{biblatex}
\usepackage{moredefs}
\usepackage{lips}
\usepackage{ragged2e}
\usepackage[twothirds,nonegthinspace]{thinsp}
\usepackage[babel]{microtype}
\usepackage{fixltx2e}

After compiling it with biber --bblsafechars mybib and latex mybib.tex I get

Bakker, Egbert J[an]

1997 Hrsg., Grammar as Interpretation. Greek Literature in its Linguistic Context, Englisch, Mnemosyne. Supplementum 171, Leiden, New York und Köln: Brill.

But I don't want LaTeX to print the name of the language ("Englisch" in the example above) but to use it only for hyphenation, and though I've been trying everything I've been trying everything for several months, I only found ways either to put each entry in another otherlanguage-environment (by passing the option babel=other to biblatex) or suppress all infos about the language by putting all known languages in \DeclareRedundantLanguages{ngerman}{german,english,french,italian,british,franconian,vedic,malaysian ...}

Another idea was to change the language-field in the .bib-file to hyphenation, but I still got the name of the language in each entry.

9
  • biblatex does not use language but hyphenation to determine the hyphenation language, so you need to use the latter field. If you use babel=other, you will have to load the languages in babel though. You might be OK with babel=hyphen. So your best bet is to change the language to hyphenation fields. If you want, there is an automatic solution to map language to hyphenation.
    – moewe
    Commented Nov 1, 2013 at 19:07
  • On second reading through your post, I'm almost certain that what you want is babel=hyphen and the hyphenation field. Keep in mind that hyphenation takes babel/polyglossia language identifiers such as ngerman, american etc.
    – moewe
    Commented Nov 1, 2013 at 19:20
  • You are so -- first, I actually wrote babel=hyphen, then biblatex complained and I changed it to autolang=hyphen. But nothing changed, neither with babel=hyphen nor with autolang=hyphen nor after replacing language = with hyphenation = in the .bib-file. So the first step is to map language to hyphenation (how do I do it?), but I don't expect it to solve the problem---at least not even hyphenation instead of language in the (very large: 450 items) .bib-file could prevent Englisch in the example above. Commented Nov 1, 2013 at 19:28
  • In version 2.7 and before you want babel=hyphen, in 2.8 and above it's autolang (though babel still works). The new name for the hyphen field is langid (though, again, the old one should still work).
    – moewe
    Commented Nov 1, 2013 at 19:36
  • 2
    If you just want to remove the language field, you can do \AtEveryBibitem{\clearlist{language}}. See biblatex remove the eng. from citations
    – Alan Munn
    Commented Nov 1, 2013 at 19:40

1 Answer 1

17

You want biblatex's autolang=hyphen option (formerly known as babel=hyphen). One has to specify the hyphenation language via the langid (formerly [<= 2.7] hyphenation) field.

There is a way to automatically map the language field to the langid field. The following lines in the preamble should be enough to do that.

\DeclareSourcemap{
  \maps{
    \map{
      \step[fieldsource=language, fieldset=langid, origfieldval, final]
      \step[fieldset=language, null]
    }
  }
}

This command will copy the language field into the langid field and will then delete the contents of the language field. The language field will only be deleted if it was successfully copied into the langid field.

The caveats in my comment above still apply: In the language field one can write german or even langlatin and langgerman, while the langid field should take proper babel/polyglossia language identifiers (and only one of those; "The identifier must be a language name known to the babel/polyglossia packages.", §2.2.3, p.24 of the biblatex documentation (v. 2.8)). In particular for entries in new German orthography language should of course be german while langid ought to be ngerman.

See this MWE

\documentclass[ngerman,english]{article}
\usepackage{babel}
\usepackage[autolang=hyphen, backend=biber]{biblatex}
\begin{filecontents}{\jobname.bib}
@Book{vangennep:trans,
  author       = {van Gennep, Arnold},
  title        = {The Rites of Passage},
  year         = 1960,
  translator   = {Vizedom, Monika B. and Caffee, Gabrielle L.},
  language     = {english},
  origlanguage = {french},
  publisher    = {University of Chicago Press},
}
@Book{cicero,
  author       = {Cicero, Marcus Tullius},
  title        = {De natura deorum. {\"U}ber das Wesen der G{\"o}tter},
  date         = 1995,
  editor       = {Blank-Sangmeister, Ursula},
  translator   = {Blank-Sangmeister, Ursula},
  afterword    = {Thraede, Klaus},
  language     = {langlatin and langgerman},
  publisher    = {Reclam},
  location     = {Stuttgart},
  hyphenation  = {german},
}
@book{testbook,
  author        = {Walter Ordsmith},
  title         = {The Work},
  subtitle      = {Subtitle},
  year          = {1983},
  publisher     = {P. Ublisher \& Co.},
  address       = {Townsville},
  language      = {german},
}
@article{testart1,
  author  = {Steven C. Ientist and Paula Rofessor},
  title   = {Thrilling, Intelligent and True Limes of Erudition},
  journal = {Journal of Articles},
  volume  = {20},
  number  = {3},
  year    = {1935},
  pages   = {1--46},
  language= {american},
}
@incollection{ordChap3,
  author     = {Walter Ordsmith and William Riter},
  title      = {A Chapter},
  booktitle  = {The Second Work},
  publisher  = {Academic Press},
  year       = {1977},
  language   = {french},
}

\end{filecontents}

\addbibresource{\jobname.bib}

\DeclareSourcemap{
  \maps{
    \map{
      \step[fieldsource=language, fieldset=langid, origfieldval, final]
      \step[fieldset=language, null]
    }
  }
}

\begin{document}
  \nocite{*}
  \printbibliography
\end{document}

yields enter image description here

11
  • Thank you, but it doesn't work. After the first attempt I even wrote \DeclareSourcemap{ \maps[datatype=biblatex]{ \map{ \step[fieldsource=language, null] \step[fieldset=langid, origfieldval] } } }` I still get Bakker Title, Englisch. Dixsaut, Title, Französisch. Commented Nov 1, 2013 at 20:21
  • @AlexanderWittmann Yep, I missed that, I changed the answer. Does it now do what you want?
    – moewe
    Commented Nov 1, 2013 at 20:33
  • If I sum it up: If I write langid instead of language, the name of the language is not printed (and the hyphenation rules of the language are probably applied), but neither with the original \DeclareSourceMap ...` code nor with the improved one does anything change. Commented Nov 1, 2013 at 20:33
  • @AlexanderWittmann I made small change again, on my machine it finally does what you want (technically: the files say it does), though I cannot be sure about application of hyphenation rules (I have no proper test cases, I could spot a difference with).
    – moewe
    Commented Nov 1, 2013 at 20:37
  • Thnkx---one moment. Commented Nov 1, 2013 at 20:40

You must log in to answer this question.

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