BibTeX, biblatex and biberbiblatex: different sorting parameters

Information and discussion about BiBTeX - the bibliography tool for LaTeX documents.
Post Reply
Buchling
Posts: 16
Joined: Thu Jan 24, 2013 2:14 pm

biblatex: different sorting parameters

Post by Buchling »

Hey all,

My bibliography needs to be divided into different categories, which is working just fine, and the different categories need to follow different sorting rules, which I don't know how to do.

Code: Select all

\begin{filecontents}{test.bib}
@MISC{ICCPR,
  title = {International Covenant on Civil and Political Rights},
  keywords = {treaty},
  howpublished = {adopted and opened for signature, ratification and accession 16 Dec. 1966, entered into force 23 Mar. 1976},
  note = {999 UNTS 171},
  addendum = {UN. Doc. A/RES/2200(XXI)},
  shortauthor = {ICCPR},
  year = {1976}
}

@MISC{BanjulCharter,
  title = {African (Banjul) Charter on Human and Peoples' Rights},
  keywords = {treaty},
  howpublished = {adopted and opened for signature, ratification and accession 27 June 1981, entered into force 21 Oct. 1986},
  note = {1520 UNTS 217},
  addendum = {OAU Doc. CAB/LEG/67/3 rev. 5},
  shortauthor = {Banjul Charter},
  year = {1986}
}

@MISC{RomeStatute,
  title = {Rome Statute of the International Criminal Court},
  keywords = {treaty},
  howpublished = {adopted and opened for signature, ratification and accession 17 July 1998, entered into force 1 July 2002},
  note = {2187 UNTS 3},
  addendum = {U.N. Doc. A/CONF.183/9},
  shortauthor = {Rome Statute},
  year = {2002}
}

@MISC{AmericanConvention,
  title = {American Convention on Human Rights},
  keywords = {treaty},
  howpublished = {adopted and opened for signature, ratification and accession 22 Nov. 1969, entered into force 18 July 1978},
  note = {1144 UNTS 123},
  shortauthor = {American Convention},
  year = {1978}
}

\end{filecontents} 

\documentclass[a4paper,12pt,bibtotoc,british]{scrartcl}
\usepackage[british]{babel}
\usepackage[utf8]{inputenc} %Zeichencodierung
\usepackage[style=english]{csquotes} % ermöglicht Befehl \enquote{} für Zitate
\usepackage[T1]{fontenc}
\usepackage{lmodern} % schönere Schrift

\usepackage[citestyle=verbose-ibid,bibstyle=verbose,dashed=false,sorting=nty,block=none,alldates=long,
backend=bibtex8,pagetracker=true,citetracker=constrict,ibidtracker=constrict]{biblatex}
\nocite{*} %Ausgabe aller Bibliographieeinträge
\bibliography{test}

\setlength{\bibhang}{0mm} %hängende Einrückung in der Bibliographie
\setlength{\bibitemsep}{3mm} %Abstand zwischen einzelnen Bibliographieeinträgen
\setlength{\biblabelsep}{5mm} %Abstand zwischen 'label' (= year) und eigentlichem Eintrag

\defbibenvironment{year} %Definition einer eigenen Umgebung für Jahr -> Eintrag
  {\list
     {\printfield{year}}
     {\setlength{\labelwidth}{8.5mm}%
      \setlength{\leftmargin}{\labelwidth}%
      \setlength{\labelsep}{\biblabelsep}%
      \addtolength{\leftmargin}{\labelsep}%
      \setlength{\itemsep}{\bibitemsep}%
      \setlength{\parsep}{\bibparsep}}}   
  {\endlist}
  {\item}

\defbibheading{book}{\subsection*{Monographs and Articles}}
\defbibheading{treaty}{\subsection*{Treaties and Statutes}}
\defbibheading{declaration}{\subsection*{Declarations, Resolutions and Recommendations}}
\defbibheading{domestic}{\subsection*{Domestic Law}}
\defbibheading{intcase}{\subsection*{International Case Law}}
\defbibheading{natcase}{\subsection*{National Case Law}}
\defbibheading{other}{\subsection*{Other Documents}}
\defbibheading{online}{\subsection*{Internet Sources}}

\begin{document} 

something

\newpage 
\section*{Bibliography}
\addcontentsline{toc}{section}{Bibliography}
\printbibliography[heading=book,keyword=book]
\printbibliography[env=year,heading=treaty,keyword=treaty]
\printbibliography[env=year,heading=declaration,keyword=declaration]
\printbibliography[env=year,heading=domestic,keyword=domestic]
\printbibliography[env=year,heading=intcase,keyword=intcase]
\printbibliography[env=year,heading=natcase,keyword=natcase]
\printbibliography[heading=other,keyword=other]
\printbibliography[heading=online,keyword=online]

\end{document}
The normal sorting rule is nty (as you can see) but all the subbibliographies that use the year-bibenvironment need to be sorted as ynt (well, actually it should be ytn but that doesn't seem to be possible so ynt will work as well).

Thanks for any help!
Buchling

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

biblatex: different sorting parameters

Post by cgnieder »

You should switch backends! With biber you could not only add an individual sorting scheme to each \printbibliography (via \printbibliography[sorting=<whatever>] but you could also define and use the missing sorting scheme:

Code: Select all

\DeclareSortingScheme{ytn}{
 \sort{\field{year}}
 \sort{\field{title}}
 \sort{\field{name}}
}
Note that switching backends would require you to delete the bbl and other auxiliary files regarding the bibliography to avoid compiling errors.

Regards
site moderator & package author
Buchling
Posts: 16
Joined: Thu Jan 24, 2013 2:14 pm

biblatex: different sorting parameters

Post by Buchling »

So there's no possibility to do it with BibTex?

Well, if not, I have a (potentially stupid) question: How do I get biber working? I'm using Kubuntu 12.04 LTS and TexMaker 3.2. I downloaded biber and saved the (executable) file in usr/local/bin. I deleted all the files for my document except for the original .bib and .tex files.

However, if I run pdflatex biber pdflatex on my file, I get:

Code: Select all

buchling@pc:~/Desktop/Paper$ pdflatex plan2.tex
This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian)
entering extended mode
(./plan2.tex
LaTeX2e <2009/09/24>
Babel <v3.8l> and hyphenation patterns for english, usenglishmax, dumylang, noh
yphenation, ngerman, german, german-x-2009-06-19, ngerman-x-2009-06-19, loaded.

(/usr/share/texmf-texlive/tex/latex/koma-script/scrartcl.cls
Document Class: scrartcl 2009/07/24 v3.04a KOMA-Script document class (article)

(/usr/share/texmf-texlive/tex/latex/koma-script/scrkbase.sty
(/usr/share/texmf-texlive/tex/latex/koma-script/scrbase.sty
(/usr/share/texmf-texlive/tex/latex/graphics/keyval.sty)
(/usr/share/texmf-texlive/tex/latex/koma-script/scrlfile.sty
Package scrlfile, 2009/03/25 v3.03 KOMA-Script package (loading files)
                  Copyright (C) Markus Kohm

))) (/usr/share/texmf-texlive/tex/latex/koma-script/tocbasic.sty)

Class scrartcl Warning: You've used obsolete option `bibtotoc'.
(scrartcl)              Usage of this option indicates an old document and
(scrartcl)              changes compatibility level using
(scrartcl)              `bibliography=totoc,version=first'.
(scrartcl)              If you don't want this, you should simply replace
(scrartcl)              usage of option `bibtotoc' by `bibliography=totoc'.

(/usr/share/texmf-texlive/tex/latex/koma-script/scrsize12pt.clo)
(/usr/share/texmf-texlive/tex/latex/koma-script/typearea.sty
Package typearea, 2009/07/24 v3.04a KOMA-Script package (type area)
                  Copyright (C) Frank Neukam, 1992-1994
                  Copyright (C) Markus Kohm, 1994-

)) (/usr/share/texmf-texlive/tex/generic/babel/babel.sty
(/usr/share/texmf-texlive/tex/generic/babel/english.ldf
(/usr/share/texmf-texlive/tex/generic/babel/babel.def)))
(/usr/share/texmf-texlive/tex/latex/base/inputenc.sty
(/usr/share/texmf-texlive/tex/latex/base/utf8.def
(/usr/share/texmf-texlive/tex/latex/base/t1enc.dfu)
(/usr/share/texmf-texlive/tex/latex/base/ot1enc.dfu)
(/usr/share/texmf-texlive/tex/latex/base/omsenc.dfu)))
(/usr/share/texmf-texlive/tex/latex/csquotes/csquotes.sty
(/usr/share/texmf/tex/latex/etoolbox/etoolbox.sty
(/usr/share/texmf-texlive/tex/latex/etex-pkg/etex.sty))
(/usr/share/texmf-texlive/tex/latex/csquotes/csquotes.def)
(/usr/share/texmf-texlive/tex/latex/csquotes/csquotes.cfg))
(/usr/share/texmf-texlive/tex/latex/base/fontenc.sty
(/usr/share/texmf-texlive/tex/latex/base/t1enc.def))
(/usr/share/texmf/tex/latex/lm/lmodern.sty)
(/usr/share/texmf/tex/latex/biblatex/biblatex.sty
(/usr/share/texmf/tex/latex/logreq/logreq.sty
(/usr/share/texmf/tex/latex/logreq/logreq.def))
(/usr/share/texmf-texlive/tex/latex/base/ifthen.sty)
(/usr/share/texmf-texlive/tex/latex/ltxmisc/url.sty)
(/usr/share/texmf/tex/latex/biblatex/blx-compat.def)
(/usr/share/texmf/tex/latex/biblatex/biblatex.def)
(/usr/share/texmf/tex/latex/biblatex/bbx/verbose.bbx
(/usr/share/texmf/tex/latex/biblatex/bbx/authortitle.bbx
(/usr/share/texmf/tex/latex/biblatex/bbx/standard.bbx)))
(/usr/share/texmf/tex/latex/biblatex/cbx/verbose-ibid.cbx)
(/usr/share/texmf/tex/latex/biblatex/biblatex.cfg))
(/usr/share/texmf-texlive/tex/latex/setspace/setspace.sty
Package: `setspace' 6.7 <2000/12/01>
) (/usr/share/texmf-texlive/tex/latex/geometry/geometry.sty
(/usr/share/texmf-texlive/tex/generic/oberdiek/ifpdf.sty)
(/usr/share/texmf-texlive/tex/generic/oberdiek/ifvtex.sty))
(/usr/share/texmf-texlive/tex/latex/koma-script/scrpage2.sty)
(/usr/share/texmf-texlive/tex/latex/hyperref/hyperref.sty
(/usr/share/texmf-texlive/tex/generic/ifxetex/ifxetex.sty)
(/usr/share/texmf-texlive/tex/latex/oberdiek/hycolor.sty
(/usr/share/texmf-texlive/tex/latex/oberdiek/xcolor-patch.sty))
(/usr/share/texmf-texlive/tex/latex/hyperref/pd1enc.def)
(/usr/share/texmf-texlive/tex/generic/oberdiek/etexcmds.sty
(/usr/share/texmf-texlive/tex/generic/oberdiek/infwarerr.sty))
(/usr/share/texmf-texlive/tex/latex/latexconfig/hyperref.cfg)
(/usr/share/texmf-texlive/tex/latex/oberdiek/kvoptions.sty
(/usr/share/texmf-texlive/tex/generic/oberdiek/kvsetkeys.sty))
Implicit mode ON; LaTeX internals redefined
(/usr/share/texmf-texlive/tex/generic/oberdiek/bitset.sty
(/usr/share/texmf-texlive/tex/generic/oberdiek/intcalc.sty)
(/usr/share/texmf-texlive/tex/generic/oberdiek/bigintcalc.sty
(/usr/share/texmf-texlive/tex/generic/oberdiek/pdftexcmds.sty
(/usr/share/texmf-texlive/tex/generic/oberdiek/ifluatex.sty)
(/usr/share/texmf-texlive/tex/generic/oberdiek/ltxcmds.sty))))
(/usr/share/texmf-texlive/tex/generic/oberdiek/atbegshi.sty))
*hyperref using default driver hpdftex*
(/usr/share/texmf-texlive/tex/latex/hyperref/hpdftex.def)
(/usr/share/texmf/tex/latex/biblatex/lbx/british.lbx
(/usr/share/texmf/tex/latex/biblatex/lbx/english.lbx))
No file plan2.aux.
(/usr/share/texmf/tex/latex/lm/t1lmr.fd)
No file plan2.bbl.
*geometry auto-detecting driver*
*geometry detected driver: pdftex*

Package scrpage2 Warning: seems you are using a very small headheight.
(scrpage2)                If you get overfull \vbox warnings at almost every
(scrpage2)                page, you should increase headheight e.g. writing
(scrpage2)                 \setlength{\headheight}{1.1\baselineskip}
(scrpage2)                into the preamble of your document.
(scrpage2)                A better solution would be to use typearea package.

(/usr/share/texmf-texlive/tex/latex/graphics/color.sty
(/etc/texmf/tex/latex/config/color.cfg)
(/usr/share/texmf-texlive/tex/latex/pdftex-def/pdftex.def
(/usr/share/texmf-texlive/tex/context/base/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
))) (/usr/share/texmf-texlive/tex/latex/hyperref/nameref.sty
(/usr/share/texmf-texlive/tex/latex/oberdiek/refcount.sty))
(/usr/share/texmf/tex/latex/lm/t1lmss.fd) [1{/var/lib/texmf/fonts/map/pdftex/up
dmap/pdftex.map}] (/usr/share/texmf/tex/latex/lm/ot1lmr.fd)
(/usr/share/texmf/tex/latex/lm/omllmm.fd)
(/usr/share/texmf/tex/latex/lm/omslmsy.fd)
(/usr/share/texmf/tex/latex/lm/omxlmex.fd)
Overfull \vbox (18.59328pt too high) has occurred while \output is active
[2]

LaTeX Warning: Citation 'AmericanConvention' on page 3 undefined on input line 
146.


LaTeX Warning: Citation 'AmericanDeclaration' on page 3 undefined on input line
 146.


Overfull \vbox (18.59328pt too high) has occurred while \output is active
[3]

Package biblatex Warning: Keyword 'book' not found on input line 209.


LaTeX Warning: Empty bibliography on input line 209.


Package biblatex Warning: Keyword 'treaty' not found on input line 210.


LaTeX Warning: Empty bibliography on input line 210.


Package biblatex Warning: Keyword 'declaration' not found on input line 211.


LaTeX Warning: Empty bibliography on input line 211.


Package biblatex Warning: Keyword 'domestic' not found on input line 212.


LaTeX Warning: Empty bibliography on input line 212.


Package biblatex Warning: Keyword 'intcase' not found on input line 213.


LaTeX Warning: Empty bibliography on input line 213.


Package biblatex Warning: Keyword 'natcase' not found on input line 214.


LaTeX Warning: Empty bibliography on input line 214.


Package biblatex Warning: Keyword 'other' not found on input line 215.


LaTeX Warning: Empty bibliography on input line 215.


Package biblatex Warning: Keyword 'online' not found on input line 216.


LaTeX Warning: Empty bibliography on input line 216.


Overfull \vbox (18.59328pt too high) has occurred while \output is active
[4] (./plan2.aux)

LaTeX Warning: There were undefined references.


Package biblatex Warning: Please (re)run Biber on the file:
(biblatex)                plan2
(biblatex)                and rerun LaTeX afterwards.

 )
(see the transcript file for additional information){/usr/share/texmf/fonts/enc
/dvips/lm/lm-ec.enc}</usr/share/texmf/fonts/type1/public/lm/lmbx10.pfb></usr/sh
are/texmf/fonts/type1/public/lm/lmbx12.pfb></usr/share/texmf/fonts/type1/public
/lm/lmr10.pfb></usr/share/texmf/fonts/type1/public/lm/lmr12.pfb></usr/share/tex
mf/fonts/type1/public/lm/lmr7.pfb></usr/share/texmf/fonts/type1/public/lm/lmr8.
pfb></usr/share/texmf/fonts/type1/public/lm/lmssbx10.pfb>
Output written on plan2.pdf (4 pages, 168834 bytes).
Transcript written on plan2.log.
buchling@pc:~/Desktop/Paper$ biber plan2
INFO - This is Biber 1.5
INFO - Logfile is 'plan2.blg'
INFO - Reading 'plan2.bcf'
WARN - Warning: Found biblatex control file version 1.7, expected version 2.3
INFO - Using all citekeys in bib section 0
INFO - Processing section 0
INFO - Looking for bibtex format file 'men.bib' for section 0
INFO - Decoding LaTeX character macros into UTF-8
INFO - Found BibTeX data source 'men.bib'
WARN - Labelname candidate 'shortauthor' is not a name field - skipping
WARN - Labelname candidate 'author' is not a name field - skipping
WARN - Labelname candidate 'shorteditor' is not a name field - skipping
WARN - Labelname candidate 'editor' is not a name field - skipping
WARN - Labelname candidate 'translator' is not a name field - skipping
WARN - Labelname candidate 'shortauthor' is not a name field - skipping
WARN - Labelname candidate 'author' is not a name field - skipping
WARN - Labelname candidate 'shorteditor' is not a name field - skipping
WARN - Labelname candidate 'editor' is not a name field - skipping
WARN - Labelname candidate 'translator' is not a name field - skipping
WARN - Labelname candidate 'shortauthor' is not a name field - skipping
WARN - Labelname candidate 'author' is not a name field - skipping
WARN - Labelname candidate 'shorteditor' is not a name field - skipping
WARN - Labelname candidate 'editor' is not a name field - skipping
WARN - Labelname candidate 'translator' is not a name field - skipping
WARN - Labelname candidate 'shortauthor' is not a name field - skipping
WARN - Labelname candidate 'author' is not a name field - skipping
WARN - Labelname candidate 'shorteditor' is not a name field - skipping
WARN - Labelname candidate 'editor' is not a name field - skipping
WARN - Labelname candidate 'translator' is not a name field - skipping
WARN - Labelname candidate 'shortauthor' is not a name field - skipping
WARN - Labelname candidate 'author' is not a name field - skipping
WARN - Labelname candidate 'shorteditor' is not a name field - skipping
WARN - Labelname candidate 'editor' is not a name field - skipping
WARN - Labelname candidate 'translator' is not a name field - skipping
WARN - Labelname candidate 'shortauthor' is not a name field - skipping
WARN - Labelname candidate 'author' is not a name field - skipping
WARN - Labelname candidate 'shorteditor' is not a name field - skipping
WARN - Labelname candidate 'editor' is not a name field - skipping
WARN - Labelname candidate 'translator' is not a name field - skipping
WARN - Labelname candidate 'shortauthor' is not a name field - skipping
WARN - Labelname candidate 'author' is not a name field - skipping
WARN - Labelname candidate 'shorteditor' is not a name field - skipping
WARN - Labelname candidate 'editor' is not a name field - skipping
WARN - Labelname candidate 'translator' is not a name field - skipping
WARN - Labelname candidate 'shortauthor' is not a name field - skipping
WARN - Labelname candidate 'author' is not a name field - skipping
WARN - Labelname candidate 'shorteditor' is not a name field - skipping
WARN - Labelname candidate 'editor' is not a name field - skipping
WARN - Labelname candidate 'translator' is not a name field - skipping
WARN - Labelname candidate 'shortauthor' is not a name field - skipping
WARN - Labelname candidate 'author' is not a name field - skipping
WARN - Labelname candidate 'shorteditor' is not a name field - skipping
WARN - Labelname candidate 'editor' is not a name field - skipping
WARN - Labelname candidate 'translator' is not a name field - skipping
WARN - Labelname candidate 'shortauthor' is not a name field - skipping
WARN - Labelname candidate 'author' is not a name field - skipping
WARN - Labelname candidate 'shorteditor' is not a name field - skipping
WARN - Labelname candidate 'editor' is not a name field - skipping
WARN - Labelname candidate 'translator' is not a name field - skipping
WARN - Labelname candidate 'shortauthor' is not a name field - skipping
WARN - Labelname candidate 'author' is not a name field - skipping
WARN - Labelname candidate 'shorteditor' is not a name field - skipping
WARN - Labelname candidate 'editor' is not a name field - skipping
WARN - Labelname candidate 'translator' is not a name field - skipping
WARN - Labelname candidate 'shortauthor' is not a name field - skipping
WARN - Labelname candidate 'author' is not a name field - skipping
WARN - Labelname candidate 'shorteditor' is not a name field - skipping
WARN - Labelname candidate 'editor' is not a name field - skipping
WARN - Labelname candidate 'translator' is not a name field - skipping
WARN - Labelname candidate 'shortauthor' is not a name field - skipping
WARN - Labelname candidate 'author' is not a name field - skipping
WARN - Labelname candidate 'shorteditor' is not a name field - skipping
WARN - Labelname candidate 'editor' is not a name field - skipping
WARN - Labelname candidate 'translator' is not a name field - skipping
WARN - Labelname candidate 'shortauthor' is not a name field - skipping
WARN - Labelname candidate 'author' is not a name field - skipping
WARN - Labelname candidate 'shorteditor' is not a name field - skipping
WARN - Labelname candidate 'editor' is not a name field - skipping
WARN - Labelname candidate 'translator' is not a name field - skipping
WARN - Labelname candidate 'shortauthor' is not a name field - skipping
WARN - Labelname candidate 'author' is not a name field - skipping
WARN - Labelname candidate 'shorteditor' is not a name field - skipping
WARN - Labelname candidate 'editor' is not a name field - skipping
WARN - Labelname candidate 'translator' is not a name field - skipping
WARN - Labelname candidate 'shortauthor' is not a name field - skipping
WARN - Labelname candidate 'author' is not a name field - skipping
WARN - Labelname candidate 'shorteditor' is not a name field - skipping
WARN - Labelname candidate 'editor' is not a name field - skipping
WARN - Labelname candidate 'translator' is not a name field - skipping
WARN - Labelname candidate 'shortauthor' is not a name field - skipping
WARN - Labelname candidate 'author' is not a name field - skipping
WARN - Labelname candidate 'shorteditor' is not a name field - skipping
WARN - Labelname candidate 'editor' is not a name field - skipping
WARN - Labelname candidate 'translator' is not a name field - skipping
WARN - Labelname candidate 'shortauthor' is not a name field - skipping
WARN - Labelname candidate 'author' is not a name field - skipping
WARN - Labelname candidate 'shorteditor' is not a name field - skipping
WARN - Labelname candidate 'editor' is not a name field - skipping
WARN - Labelname candidate 'translator' is not a name field - skipping
WARN - Labelname candidate 'shortauthor' is not a name field - skipping
WARN - Labelname candidate 'author' is not a name field - skipping
WARN - Labelname candidate 'shorteditor' is not a name field - skipping
WARN - Labelname candidate 'editor' is not a name field - skipping
WARN - Labelname candidate 'translator' is not a name field - skipping
Use of uninitialized value $llabel in concatenation (.) or string at Biber.pm line 1897.
Use of uninitialized value $llabel in concatenation (.) or string at Biber.pm line 1911.
Use of uninitialized value $llabel in concatenation (.) or string at Biber.pm line 1926.
Use of uninitialized value $llabel in concatenation (.) or string at Biber.pm line 2735.
INFO - Overriding locale 'de_DE.UTF-8' default tailoring 'variable = shifted' with 'variable = non-ignorable'
Use of uninitialized value $llabel in concatenation (.) or string at Biber.pm line 2866.
INFO - Sorting 'entry' list '' keys
INFO - No sort tailoring available for locale 'de_DE.UTF-8'
Use of uninitialized value $llabel in concatenation (.) or string at Biber.pm line 1933.
INFO - Writing 'plan2.bbl' with encoding 'UTF-8'
Use of uninitialized value in string eq at Biber/Output/bbl.pm line 477.
Use of uninitialized value in string eq at Biber/Output/bbl.pm line 477.
Use of uninitialized value in string eq at Biber/SortLists.pm line 77.
Use of uninitialized value $label in string eq at Biber/SortLists.pm line 77.
Use of uninitialized value $listlabel in concatenation (.) or string at Biber/Output/bbl.pm line 491.
Use of uninitialized value $listlabel in concatenation (.) or string at Biber/Output/bbl.pm line 493.
INFO - Output to plan2.bbl
INFO - WARNINGS: 96
buchling@pc:~/Desktop/Paper$ pdflatex plan2.tex
This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian)
entering extended mode
(./plan2.tex
LaTeX2e <2009/09/24>
Babel <v3.8l> and hyphenation patterns for english, usenglishmax, dumylang, noh
yphenation, ngerman, german, german-x-2009-06-19, ngerman-x-2009-06-19, loaded.

(/usr/share/texmf-texlive/tex/latex/koma-script/scrartcl.cls
Document Class: scrartcl 2009/07/24 v3.04a KOMA-Script document class (article)

(/usr/share/texmf-texlive/tex/latex/koma-script/scrkbase.sty
(/usr/share/texmf-texlive/tex/latex/koma-script/scrbase.sty
(/usr/share/texmf-texlive/tex/latex/graphics/keyval.sty)
(/usr/share/texmf-texlive/tex/latex/koma-script/scrlfile.sty
Package scrlfile, 2009/03/25 v3.03 KOMA-Script package (loading files)
                  Copyright (C) Markus Kohm

))) (/usr/share/texmf-texlive/tex/latex/koma-script/tocbasic.sty)

Class scrartcl Warning: You've used obsolete option `bibtotoc'.
(scrartcl)              Usage of this option indicates an old document and
(scrartcl)              changes compatibility level using
(scrartcl)              `bibliography=totoc,version=first'.
(scrartcl)              If you don't want this, you should simply replace
(scrartcl)              usage of option `bibtotoc' by `bibliography=totoc'.

(/usr/share/texmf-texlive/tex/latex/koma-script/scrsize12pt.clo)
(/usr/share/texmf-texlive/tex/latex/koma-script/typearea.sty
Package typearea, 2009/07/24 v3.04a KOMA-Script package (type area)
                  Copyright (C) Frank Neukam, 1992-1994
                  Copyright (C) Markus Kohm, 1994-

)) (/usr/share/texmf-texlive/tex/generic/babel/babel.sty
(/usr/share/texmf-texlive/tex/generic/babel/english.ldf
(/usr/share/texmf-texlive/tex/generic/babel/babel.def)))
(/usr/share/texmf-texlive/tex/latex/base/inputenc.sty
(/usr/share/texmf-texlive/tex/latex/base/utf8.def
(/usr/share/texmf-texlive/tex/latex/base/t1enc.dfu)
(/usr/share/texmf-texlive/tex/latex/base/ot1enc.dfu)
(/usr/share/texmf-texlive/tex/latex/base/omsenc.dfu)))
(/usr/share/texmf-texlive/tex/latex/csquotes/csquotes.sty
(/usr/share/texmf/tex/latex/etoolbox/etoolbox.sty
(/usr/share/texmf-texlive/tex/latex/etex-pkg/etex.sty))
(/usr/share/texmf-texlive/tex/latex/csquotes/csquotes.def)
(/usr/share/texmf-texlive/tex/latex/csquotes/csquotes.cfg))
(/usr/share/texmf-texlive/tex/latex/base/fontenc.sty
(/usr/share/texmf-texlive/tex/latex/base/t1enc.def))
(/usr/share/texmf/tex/latex/lm/lmodern.sty)
(/usr/share/texmf/tex/latex/biblatex/biblatex.sty
(/usr/share/texmf/tex/latex/logreq/logreq.sty
(/usr/share/texmf/tex/latex/logreq/logreq.def))
(/usr/share/texmf-texlive/tex/latex/base/ifthen.sty)
(/usr/share/texmf-texlive/tex/latex/ltxmisc/url.sty)
(/usr/share/texmf/tex/latex/biblatex/blx-compat.def)
(/usr/share/texmf/tex/latex/biblatex/biblatex.def)
(/usr/share/texmf/tex/latex/biblatex/bbx/verbose.bbx
(/usr/share/texmf/tex/latex/biblatex/bbx/authortitle.bbx
(/usr/share/texmf/tex/latex/biblatex/bbx/standard.bbx)))
(/usr/share/texmf/tex/latex/biblatex/cbx/verbose-ibid.cbx)
(/usr/share/texmf/tex/latex/biblatex/biblatex.cfg))
(/usr/share/texmf-texlive/tex/latex/setspace/setspace.sty
Package: `setspace' 6.7 <2000/12/01>
) (/usr/share/texmf-texlive/tex/latex/geometry/geometry.sty
(/usr/share/texmf-texlive/tex/generic/oberdiek/ifpdf.sty)
(/usr/share/texmf-texlive/tex/generic/oberdiek/ifvtex.sty))
(/usr/share/texmf-texlive/tex/latex/koma-script/scrpage2.sty)
(/usr/share/texmf-texlive/tex/latex/hyperref/hyperref.sty
(/usr/share/texmf-texlive/tex/generic/ifxetex/ifxetex.sty)
(/usr/share/texmf-texlive/tex/latex/oberdiek/hycolor.sty
(/usr/share/texmf-texlive/tex/latex/oberdiek/xcolor-patch.sty))
(/usr/share/texmf-texlive/tex/latex/hyperref/pd1enc.def)
(/usr/share/texmf-texlive/tex/generic/oberdiek/etexcmds.sty
(/usr/share/texmf-texlive/tex/generic/oberdiek/infwarerr.sty))
(/usr/share/texmf-texlive/tex/latex/latexconfig/hyperref.cfg)
(/usr/share/texmf-texlive/tex/latex/oberdiek/kvoptions.sty
(/usr/share/texmf-texlive/tex/generic/oberdiek/kvsetkeys.sty))
Implicit mode ON; LaTeX internals redefined
(/usr/share/texmf-texlive/tex/generic/oberdiek/bitset.sty
(/usr/share/texmf-texlive/tex/generic/oberdiek/intcalc.sty)
(/usr/share/texmf-texlive/tex/generic/oberdiek/bigintcalc.sty
(/usr/share/texmf-texlive/tex/generic/oberdiek/pdftexcmds.sty
(/usr/share/texmf-texlive/tex/generic/oberdiek/ifluatex.sty)
(/usr/share/texmf-texlive/tex/generic/oberdiek/ltxcmds.sty))))
(/usr/share/texmf-texlive/tex/generic/oberdiek/atbegshi.sty))
*hyperref using default driver hpdftex*
(/usr/share/texmf-texlive/tex/latex/hyperref/hpdftex.def)
(/usr/share/texmf/tex/latex/biblatex/lbx/british.lbx
(/usr/share/texmf/tex/latex/biblatex/lbx/english.lbx)) (./plan2.aux)
(/usr/share/texmf/tex/latex/lm/t1lmr.fd)

Package biblatex Warning: File 'plan2.bbl' created by wrong version.

(./plan2.bbl
! Undefined control sequence.
l.21   \sortlist
                {entry}{}
? x
No pages of output.
Transcript written on plan2.log.
Sorry, I know it's long.

My minimum working example:

Code: Select all

\begin{filecontents}{men.bib}
@MISC{AmericanConvention,
  title = {American Convention on Human Rights},
  keywords = {treaty},
  howpublished = {adopted and opened for signature, ratification and accession 22 Nov. 1969, entered into force 18 July 1978},
  note = {1144 UNTS 123},
  shortauthor = {American Convention},
  year = {1978}
}
@MISC{AmericanDeclaration,
  title = {American Declaration of the Rights and Duties of Man},
  keywords = {declaration},
  howpublished = {Ninth International Conference of American States},
  note = {O.A.S. Res. XXX},
  addendum = {adopted 2 May 1948},
  shortauthor = {American Declaration},
  year = {1948}
}

\end{filecontents}

\documentclass[a4paper,12pt,bibtotoc,british]{scrartcl}
\usepackage[british]{babel}
\usepackage[utf8]{inputenc} %Zeichencodierung
\usepackage[style=english]{csquotes} % ermöglicht Befehl \enquote{} für Zitate
\usepackage[T1]{fontenc}
\usepackage{lmodern} % schönere Schrift

\addto\captionsbritish{\renewcommand{\contentsname}{Table of Contents}} %Titel des TOC

\usepackage[backend=biber,citestyle=verbose-ibid,bibstyle=verbose,dashed=false,sorting=nty,block=none, alldates=long,pagetracker=true,citetracker=constrict,ibidtracker=constrict]{biblatex}
\nocite{*} %Ausgabe aller Bibliographieeinträge
\bibliography{men}

\setlength{\bibhang}{0mm} %hängende Einrückung in der Bibliographie
\setlength{\bibitemsep}{3mm} %Abstand zwischen einzelnen Bibliographieeinträgen
\setlength{\biblabelsep}{5mm} %Abstand zwischen 'label' (= year) und eigentlichem Eintrag

\defbibenvironment{year} %Definition einer eigenen Umgebung für Jahr -> Eintrag
  {\list
     {\printfield{year}}
     {\setlength{\labelwidth}{8.5mm}%
      \setlength{\leftmargin}{\labelwidth}%
      \setlength{\labelsep}{\biblabelsep}%
      \addtolength{\leftmargin}{\labelsep}%
      \setlength{\itemsep}{\bibitemsep}%
      \setlength{\parsep}{\bibparsep}}}   
  {\endlist}
  {\item}

\defbibheading{book}{\subsection*{Monographs and Articles}}
\defbibheading{treaty}{\subsection*{Treaties and Statutes}}
\defbibheading{declaration}{\subsection*{Declarations, Resolutions and Recommendations}}
\defbibheading{domestic}{\subsection*{Domestic Law}}
\defbibheading{intcase}{\subsection*{International Case Law}}
\defbibheading{natcase}{\subsection*{National Case Law}}
\defbibheading{other}{\subsection*{Other Documents}}
\defbibheading{online}{\subsection*{Internet Sources}}

\DefineBibliographyExtras{british}{% %Zahlen in Quellen als dd month yyyy ausgeben, nicht als Ordinationszahlen
  \def\mkbibdatelong#1#2#3{%
    \iffieldundef{#3}
      {}
      {\thefield{#3}%
       \iffieldundef{#2}{}{\nobreakspace}}%
    \iffieldundef{#2}
      {}
      {\mkbibmonth{\thefield{#2}}%
       \iffieldundef{#1}{}{\space}}%
    \stripzeros{\thefield{#1}}}%
    }
    
\NewBibliographyString{available}

\DefineBibliographyStrings{british}{%
	urlseen = {last visited},
	volume = {Vol.},
	number = {No.},
	available = {available at}}

\DeclareFieldFormat{url}{\bibstring{available}\addspace\url{#1}}

\renewcommand*{\finalnamedelim}{\addspace\&\addspace } %mehrere Autoren/Editoren
\renewcommand*{\labelnamepunct}{\addcomma\space }
\DeclareNameAlias{sortname}{last-first}

\urlstyle{same} %url in gleicher Formatierung wie normaler Text
    
\setcounter{secnumdepth}{4}

\begin{document} 

\tableofcontents 

\newpage 

\section{Introduction} 

\cite{AmericanConvention} \footcite{AmericanDeclaration}

\section{Conclusion} 



\newpage 
\section*{Bibliography}
\addcontentsline{toc}{section}{Bibliography}
\printbibliography[heading=book,keyword=book]
\printbibliography[env=year,heading=treaty,keyword=treaty]
\printbibliography[env=year,heading=declaration,keyword=declaration]
\printbibliography[env=year,heading=domestic,keyword=domestic]
\printbibliography[env=year,heading=intcase,keyword=intcase]
\printbibliography[env=year,heading=natcase,keyword=natcase]
\printbibliography[heading=other,keyword=other]
\printbibliography[heading=online,keyword=online]

\end{document}

Ehm, help, please?

Thanks,
Buchling
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

biblatex: different sorting parameters

Post by cgnieder »

You have a rather outdated version of TeX Live. Your log says 2009 while the current release is 2012. In an up to date TeX Live biber is integrated and working out of the box. In your current case there's a version mismatch between biber and biblatex. Your biber log says:
Warning: Found biblatex control file version 1.7, expected version 2.3
and the log says afterwards:
Package biblatex Warning: File 'plan2.bbl' created by wrong version.
If you can and the risk of non-working packages is not too high for you (I don't know how long and how important you document is) I'd recommend to install a “vanilla” TeX Live 2012. If you don't want or can't do that I'd try to install an up to date version of biblatex at least.

Regards
site moderator & package author
Buchling
Posts: 16
Joined: Thu Jan 24, 2013 2:14 pm

Re: biblatex: different sorting parameters

Post by Buchling »

:/
I'm not a big fan of installing things manually as it tends to mess up my whole system when I'm running an upgrade. Kubuntu 12.10 comes with the new TexLive (and even Biber) so that would be my last resort but I would prefer staying with the LTS...
Is there any way to get the sorting I want with BibTex? If I enter the year as sortkey, it sorts it in the wrong order (I need the newest first) - any other option?
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

biblatex: different sorting parameters

Post by cgnieder »

Buchling wrote:Is there any way to get the sorting I want with BibTex?
If there is I don't know it... Many of biblatex's features are marked »biber only«. (The fancier they are the more probably it is that they only work with biber. It was developed in close collaboration with biblatex to overcome some of the weaknesses of bibtex. Nowadays the biber developer is also one of the biblatex developers.)

You can have several texlive installations alongside without problems if disc space wouldn't be an issue.

But as I said: you could try to update biblatex only first. If you haven't done something like this before have a look at this link: How do I install an individual package on a Linux system?

Regards
site moderator & package author
Buchling
Posts: 16
Joined: Thu Jan 24, 2013 2:14 pm

biblatex: different sorting parameters

Post by Buchling »

Ok, so I've upgraded my system last night so now biber is working just fine with the original document. However, if I define sorting schemes for the separate \printbibliography commands, I get the following output:

Code: Select all

buchling@pc:~/Desktop/Paper$ pdflatex plan2.tex
This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012/Debian)
 restricted \write18 enabled.
entering extended mode
(./plan2.tex
LaTeX2e <2011/06/27>
Babel <v3.8m> and hyphenation patterns for english, dumylang, nohyphenation, ng
erman, german, swissgerman, ngerman-x-2012-05-30, german-x-2012-05-30, loaded.
(/usr/share/texlive/texmf-dist/tex/latex/koma-script/scrartcl.cls
Document Class: scrartcl 2012/05/15 v3.11 KOMA-Script document class (article)
(/usr/share/texlive/texmf-dist/tex/latex/koma-script/scrkbase.sty
(/usr/share/texlive/texmf-dist/tex/latex/koma-script/scrbase.sty
(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty)
(/usr/share/texlive/texmf-dist/tex/latex/koma-script/scrlfile.sty
Package scrlfile, 2011/03/09 v3.09 KOMA-Script package (loading files)
                  Copyright (C) Markus Kohm

))) (/usr/share/texlive/texmf-dist/tex/latex/koma-script/tocbasic.sty)

Class scrartcl Warning: You've used obsolete option `bibtotoc'.
(scrartcl)              Usage of this option indicates an old document and
(scrartcl)              changes compatibility level using
(scrartcl)              `bibliography=totoc,version=first'.
(scrartcl)              If you don't want this, you should simply replace
(scrartcl)              usage of option `bibtotoc' by `bibliography=totoc'.

(/usr/share/texlive/texmf-dist/tex/latex/koma-script/scrsize12pt.clo)
(/usr/share/texlive/texmf-dist/tex/latex/koma-script/typearea.sty
Package typearea, 2012/05/15 v3.11 KOMA-Script package (type area)
                  Copyright (C) Frank Neukam, 1992-1994
                  Copyright (C) Markus Kohm, 1994-

)) (/usr/share/texlive/texmf-dist/tex/generic/babel/babel.sty
(/usr/share/texlive/texmf-dist/tex/generic/babel/english.ldf
(/usr/share/texlive/texmf-dist/tex/generic/babel/babel.def)))
(/usr/share/texlive/texmf-dist/tex/latex/base/inputenc.sty
(/usr/share/texlive/texmf-dist/tex/latex/base/utf8.def
(/usr/share/texlive/texmf-dist/tex/latex/base/t1enc.dfu)
(/usr/share/texlive/texmf-dist/tex/latex/base/ot1enc.dfu)
(/usr/share/texlive/texmf-dist/tex/latex/base/omsenc.dfu)))
(/usr/share/texlive/texmf-dist/tex/latex/csquotes/csquotes.sty
(/usr/share/texmf/tex/latex/etoolbox/etoolbox.sty
(/usr/share/texlive/texmf-dist/tex/latex/etex-pkg/etex.sty))
(/usr/share/texlive/texmf-dist/tex/latex/csquotes/csquotes.def)
(/usr/share/texlive/texmf-dist/tex/latex/csquotes/csquotes.cfg))
(/usr/share/texlive/texmf-dist/tex/latex/base/fontenc.sty
(/usr/share/texlive/texmf-dist/tex/latex/base/t1enc.def))
(/usr/share/texmf/tex/latex/lm/lmodern.sty)
(/usr/share/texmf/tex/latex/biblatex/biblatex.sty
(/usr/share/texmf/tex/latex/logreq/logreq.sty
(/usr/share/texmf/tex/latex/logreq/logreq.def))
(/usr/share/texlive/texmf-dist/tex/latex/base/ifthen.sty)
(/usr/share/texlive/texmf-dist/tex/latex/url/url.sty)
(/usr/share/texmf/tex/latex/biblatex/blx-compat.def)
(/usr/share/texmf/tex/latex/biblatex/biblatex.def)
(/usr/share/texmf/tex/latex/biblatex/bbx/verbose.bbx
(/usr/share/texmf/tex/latex/biblatex/bbx/authortitle.bbx
(/usr/share/texmf/tex/latex/biblatex/bbx/standard.bbx)))
(/usr/share/texmf/tex/latex/biblatex/cbx/verbose-ibid.cbx)
(/usr/share/texmf/tex/latex/biblatex/biblatex.cfg))
(/usr/share/texlive/texmf-dist/tex/latex/setspace/setspace.sty)
(/usr/share/texlive/texmf-dist/tex/latex/geometry/geometry.sty
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifpdf.sty)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifvtex.sty)
(/usr/share/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty))
(/usr/share/texlive/texmf-dist/tex/latex/koma-script/scrpage2.sty)
(/usr/share/texlive/texmf-dist/tex/latex/hyperref/hyperref.sty
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/hobsub-hyperref.sty
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/hobsub-generic.sty))
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/kvoptions.sty)
(/usr/share/texlive/texmf-dist/tex/latex/hyperref/pd1enc.def)
(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/hyperref.cfg))

Package hyperref Message: Driver (autodetected): hpdftex.

(/usr/share/texlive/texmf-dist/tex/latex/hyperref/hpdftex.def
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/rerunfilecheck.sty))
(/usr/share/texmf/tex/latex/biblatex/lbx/british.lbx
(/usr/share/texmf/tex/latex/biblatex/lbx/english.lbx))
No file plan2.aux.
(/usr/share/texmf/tex/latex/lm/t1lmr.fd)
No file plan2.bbl.
*geometry* driver: auto-detecting
*geometry* detected driver: pdftex

Package scrpage2 Warning: seems you are using a very small headheight.
(scrpage2)                If you get overfull \vbox warnings at almost every
(scrpage2)                page, you should increase headheight e.g. writing
(scrpage2)                 \setlength{\headheight}{1.1\baselineskip}
(scrpage2)                into the preamble of your document.
(scrpage2)                A better solution would be to use typearea package.

(/usr/share/texlive/texmf-dist/tex/latex/graphics/color.sty
(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/color.cfg)
(/usr/share/texlive/texmf-dist/tex/latex/pdftex-def/pdftex.def
(/usr/share/texlive/texmf-dist/tex/context/base/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
))) (/usr/share/texlive/texmf-dist/tex/latex/hyperref/nameref.sty
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/gettitlestring.sty))
(/usr/share/texmf/tex/latex/lm/t1lmss.fd) [1{/var/lib/texmf/fonts/map/pdftex/up
dmap/pdftex.map}] (/usr/share/texmf/tex/latex/lm/ot1lmr.fd)
(/usr/share/texmf/tex/latex/lm/omllmm.fd)
(/usr/share/texmf/tex/latex/lm/omslmsy.fd)
(/usr/share/texmf/tex/latex/lm/omxlmex.fd)
Overfull \vbox (18.59328pt too high) has occurred while \output is active
[2]

LaTeX Warning: Citation 'AmericanConvention' on page 3 undefined on input line 
152.


LaTeX Warning: Citation 'AmericanDeclaration' on page 3 undefined on input line
 152.


Overfull \vbox (18.59328pt too high) has occurred while \output is active
[3]

! Package keyval Error: sorting undefined.

See the keyval package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.217 ...hy[sorting=nty,heading=book,keyword=book]
                                                  
? x
{/usr/share/texmf/fonts/enc/dvips/lm/lm-ec.enc}</usr/share/texmf/fonts/type1/pu
blic/lm/lmbx10.pfb></usr/share/texmf/fonts/type1/public/lm/lmbx12.pfb></usr/sha
re/texmf/fonts/type1/public/lm/lmr10.pfb></usr/share/texmf/fonts/type1/public/l
m/lmr12.pfb></usr/share/texmf/fonts/type1/public/lm/lmr7.pfb></usr/share/texmf/
fonts/type1/public/lm/lmr8.pfb></usr/share/texmf/fonts/type1/public/lm/lmssbx10
.pfb>
Output written on plan2.pdf (3 pages, 162727 bytes).
Transcript written on plan2.log.
Updated minimum working example:

Code: Select all

\begin{filecontents}{men.bib}
@MISC{AmericanConvention,
  title = {American Convention on Human Rights},
  keywords = {treaty},
  howpublished = {adopted and opened for signature, ratification and accession 22 Nov. 1969, entered into force 18 July 1978},
  note = {1144 UNTS 123},
  shortauthor = {American Convention},
  year = {1978}
}

@MISC{AmericanDeclaration,
  title = {American Declaration of the Rights and Duties of Man},
  keywords = {declaration},
  howpublished = {Ninth International Conference of American States},
  note = {O.A.S. Res. XXX},
  addendum = {adopted 2 May 1948},
  shortauthor = {American Declaration},
  year = {1948}
}

\end{filecontents}

\documentclass[a4paper,12pt,bibtotoc,british]{scrartcl}
\usepackage[british]{babel}
\usepackage[utf8]{inputenc} %Zeichencodierung
\usepackage[style=english]{csquotes} % ermöglicht Befehl \enquote{} für Zitate
\usepackage[T1]{fontenc}
\usepackage{lmodern} % schönere Schrift

\addto\captionsbritish{\renewcommand{\contentsname}{Table of Contents}} %Titel des TOC

\usepackage[backend=biber,citestyle=verbose-ibid,bibstyle=verbose,dashed=false,block=none, alldates=long,pagetracker=true,citetracker=constrict,ibidtracker=constrict]{biblatex}
\nocite{*} %Ausgabe aller Bibliographieeinträge
\bibliography{men}

\DeclareSortingScheme{ytn}{
 \sort{\field{year}}
 \sort{\field{title}}
 \sort{\field{name}}
}

\setlength{\bibhang}{0mm} %hängende Einrückung in der Bibliographie
\setlength{\bibitemsep}{3mm} %Abstand zwischen einzelnen Bibliographieeinträgen
\setlength{\biblabelsep}{5mm} %Abstand zwischen 'label' (= year) und eigentlichem Eintrag

\defbibenvironment{year} %Definition einer eigenen Umgebung für Jahr -> Eintrag
  {\list
     {\printfield{year}}
     {\setlength{\labelwidth}{8.5mm}%
      \setlength{\leftmargin}{\labelwidth}%
      \setlength{\labelsep}{\biblabelsep}%
      \addtolength{\leftmargin}{\labelsep}%
      \setlength{\itemsep}{\bibitemsep}%
      \setlength{\parsep}{\bibparsep}}}  
  {\endlist}
  {\item}

\defbibheading{book}{\subsection*{Monographs and Articles}}
\defbibheading{treaty}{\subsection*{Treaties and Statutes}}
\defbibheading{declaration}{\subsection*{Declarations, Resolutions and Recommendations}}
\defbibheading{domestic}{\subsection*{Domestic Law}}
\defbibheading{intcase}{\subsection*{International Case Law}}
\defbibheading{natcase}{\subsection*{National Case Law}}
\defbibheading{other}{\subsection*{Other Documents}}
\defbibheading{online}{\subsection*{Internet Sources}}

\DefineBibliographyExtras{british}{% %Zahlen in Quellen als dd month yyyy ausgeben, nicht als Ordinationszahlen
  \def\mkbibdatelong#1#2#3{%
    \iffieldundef{#3}
      {}
      {\thefield{#3}%
       \iffieldundef{#2}{}{\nobreakspace}}%
    \iffieldundef{#2}
      {}
      {\mkbibmonth{\thefield{#2}}%
       \iffieldundef{#1}{}{\space}}%
    \stripzeros{\thefield{#1}}}%
    }
      
\NewBibliographyString{available}

\DefineBibliographyStrings{british}{%
        urlseen = {last visited},
        volume = {Vol.},
        number = {No.},
        available = {available at}}

\DeclareFieldFormat{url}{\bibstring{available}\addspace\url{#1}}

\renewcommand*{\finalnamedelim}{\addspace\&\addspace } %mehrere Autoren/Editoren
\renewcommand*{\labelnamepunct}{\addcomma\space }
\DeclareNameAlias{sortname}{last-first}

\urlstyle{same} %url in gleicher Formatierung wie normaler Text
       
\setcounter{secnumdepth}{4}

\begin{document}

\tableofcontents

\newpage

\section{Introduction}

\cite{AmericanConvention} \footcite{AmericanDeclaration}

\section{Conclusion}



\newpage
\section*{Bibliography}
\addcontentsline{toc}{section}{Bibliography}
\printbibliography[sorting=nty,heading=book,keyword=book]
\printbibliography[sorting=ytn,env=year,heading=treaty,keyword=treaty]
\printbibliography[sorting=ytn,env=year,heading=declaration,keyword=declaration]
\printbibliography[sorting=ytn,env=year,heading=domestic,keyword=domestic]
\printbibliography[sorting=ytn,env=year,heading=intcase,keyword=intcase]
\printbibliography[sorting=ytn,env=year,heading=natcase,keyword=natcase]
\printbibliography[sorting=nty,heading=other,keyword=other]
\printbibliography[sorting=nty,heading=online,keyword=online]

\end{document}
     
Thanks again!
Buchling

P.S.: How can I define a key to run biber in TexMaker so I don't have to go through the terminal all the time? And I can remove BibTex from my system now, can't I?
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

biblatex: different sorting parameters

Post by cgnieder »

I have no problems running your example. Everything seems to look as expected and I get no error messages. So your version of biblatex and biber is both 2.5 from 2013/10/10?
Buchling wrote:How can I define a key to run biber in TexMaker so I don't have to go through the terminal all the time? And I can remove BibTex from my system now, can't I?
I have know idea as I've never really used TeXmaker but I'm sure someone here will know.


Regards
site moderator & package author
Buchling
Posts: 16
Joined: Thu Jan 24, 2013 2:14 pm

Re: biblatex: different sorting parameters

Post by Buchling »

....sorry, should have checked that first. No, only TexLive is the new version, biblatex and biber are outdated. Now that I removed the automatically installed versions and manually installed the newer ones (thanks for the link on how to do that), the sorting works.
Thanks a lot for your help!!
Post Reply