# BibLaTeX: Edition as superscript in front of year, but year after author(s)

There is a similar question (biblatex-verbose: edition as superscript in front of year) that has already an answer, but the solution doesn't help me. I need a quite strange order in my bibliography:

@Book as: Last Name, First Name (EditionYear): Title. Place: Publisher.

@InBook as: Last Name, First Name (EditionYear): "Title." In: Book, First Name [Editior] Last Name [Editor] (Hrsg.) Place: Publisher, Pages.

I really hope there is a solution to this. If more Information is needed, please feel free to ask!

Edit: my preamble looks like this

\documentclass[a4paper,12pt,numbers=endperiod]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[T2A,T1]{fontenc}
\usepackage[russian,ngerman]{babel}
\usepackage{tipa}
\usepackage{graphicx}
\usepackage{setspace}
\usepackage{caption}
\usepackage[footskip=1cm]{geometry}
\usepackage[footnote,printonlyused]{acronym}
\usepackage{filecontents}
\usepackage{lipsum}
\usepackage{csquotes}
\usepackage{CJKutf8}

\usepackage[backend=biber,style=authoryear,sorting=nyt]{biblatex}
\DefineBibliographyStrings{ngerman}{references={Bibliographie}}

\renewbibmacro*{byeditor+others}{%
\ifnameundef{editor}
{}
{\printnames[byeditor]{editor}%
\clearname{editor}%
\newunit}%
\usebibmacro{byeditorx}%
\usebibmacro{bytranslator+others}}
\usepackage{xpatch}

\renewcommand*{\multinamedelim}{/}
\renewcommand*{\finalnamedelim}{/}

\setkomafont{disposition}{\mdseries\rmfamily}
\onehalfspacing
\captionsetup[table]{skip=5pt,font=footnotesize}
\deffootnote[1.0em]{1.0em}{1.0em}
{\textsuperscript{\thefootnotemark}\,\enskip}
\DeclareFieldFormat{postnote}{#1}
\DeclareFieldFormat{multipostnote}{#1}
\renewcommand{\baselinestretch}{1.5}


And all this gives me: (Problems in bf)

@Book: Altmann, Hans/Ute Ziegenhain (2010): Prüfungswissen Phonetik, Phonologie und Graphemik. Arbeitstechniken – Klausurfragen – Lösungen. 3. Göttingen: Vandenhoeck & Ruprecht. --> the 3 should be in front of the 2010 (inside the brackets) (it is already in superscript)

@InBook: Bochmann, Klaus (1989): „Rumänisch: Sprachnormierung und Standardsprache“. In: Lexikon der romanistischen Linguistik. Band III. Die einzelnen romanischen Sprachen und Sprachgebiete von der Renaissance bis zur Gegenwart Rumänisch, Dalmatisch/Istroromanisch, Friaulisch, Ladinisch, Bündnerromanisch. Michael Metzeltin/Günter Holtus/Christian Schmitt (hrsg. von). Tübingen: Niemeyer**,** S. 239–251. --> it should just say (Hrsg.), the last comma should be a colon and the "S." has to go

@Articel: Borgwaldt, Susanne R./Frauke**,** M. Hellwig/Annette**,** M. B. de Groot (2004): „Word-initial entropy in five languages. Letter to sound, and sound to letter“. In: Written Language & Literacy 7**,** S. 165–184. --> like before the last comma has to be a colon and the "S." has to leave. also I've just noticed that the commas between the last name and the first name(s) for all authors apart from the first are missing, which is of course undesired.

I really hope this helps and is not too much of a mess!

• What bibliography/citation style are you using? And what exactly about the solution in the linked question doesn't work for you? Jul 16 '16 at 22:24
• I'm using the authoryear-style. The other solution puts the edition in superscript (which is great) but it moves it to the end of the entry. Jul 17 '16 at 2:35
• Do you apply any other modifications to authoryear that we need to take special care of, or can we assume you use standard authoryear? (If the former is the case, an MWE would be really, really helpful.) Jul 17 '16 at 12:30
• We normally prefer to ask one question per ... question. That way it is easier to find questions and answers. I suggest you make this question about the edition format and ask new questions about the other problems. Jul 18 '16 at 11:40
• For the name issue you will find that only the first name is in the format "Last, First" all subsequent names are in "First Last" format and do not require a comma. If you want "Last, First" for all names, use \DeclareNameAlias{sortname}{family-given}. Jul 18 '16 at 11:56

The authoryear styles use different macros to print the year, so we have to modify other macros

\DeclareFieldFormat{superedition}{\textsuperscript{#1}}

\iffieldundef{labelyear}
{}
{\printtext[parens]{%
\iffieldnum{edition}
{\printfield[superedition]{edition}%
\global\clearfield{edition}}
{}%
\iflabeldateisdate
{\printdateextra}
{\printlabeldateextra}}}}


should be enough. This prints the edition in superscript if it is a number. The code works with the standard mergedate=compact setting, for other mergedates this needs adapting.

The pages issue can be addressed with

\renewcommand*{\bibpagespunct}{\addcolon\space}
\DeclareFieldFormat{pages}{#1}


analogous to what you do with postnote.

The "Hrsg." string can be changed with

\DeclareFieldFormat{editortype}{\mkbibparens{#1}}
\renewbibmacro*{byeditor+others}{%
\ifnameundef{editor}
{}
{\printnames[byeditor]{editor}%
\clearname{editor}%
\newunit}%
\usebibmacro{byeditorx}%
\usebibmacro{bytranslator+others}}
\renewbibmacro*{bytypestrg}[2]{%
\iffieldundef{#1type}
{\bibstring{#2}}
{\ifbibxstring{\thefield{#1type}}
{\bibstring{\thefield{#1type}}}
{\printtext{\thefield{#1type}}}}}


You won't need the xpatch code then.

In the MWE I also used \DeclareNameAlias{sortname}{family-given} per my comment above.

\documentclass[a4paper,12pt,numbers=endperiod]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}
\usepackage{csquotes}
\usepackage[backend=biber,style=authoryear,sorting=nyt]{biblatex}

\DefineBibliographyStrings{ngerman}{references={Bibliographie}}

\DeclareFieldFormat{editortype}{\mkbibparens{#1}}
\renewbibmacro*{byeditor+others}{%
\ifnameundef{editor}
{}
{\printnames[byeditor]{editor}%
\clearname{editor}%
\newunit}%
\usebibmacro{byeditorx}%
\usebibmacro{bytranslator+others}}
\renewbibmacro*{bytypestrg}[2]{%
\iffieldundef{#1type}
{\bibstring{#2}}
{\ifbibxstring{\thefield{#1type}}
{\bibstring{\thefield{#1type}}}
{\printtext{\thefield{#1type}}}}}

\DeclareDelimFormat{multinamedelim}{/}
\DeclareDelimAlias{finalnamedelim}{multinamedelim}

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

\DeclareFieldFormat{superedition}{\textsuperscript{#1}}

\iffieldundef{labelyear}
{}
{\printtext[parens]{%
\iffieldnum{edition}
{\printfield[superedition]{edition}%
\global\clearfield{edition}}
{}%
\iflabeldateisdate
{\printdateextra}
{\printlabeldateextra}}}}

\DeclareFieldFormat{pages}{#1}

\DeclareNameAlias{sortname}{family-given}

\begin{document}

• @LajosH Try \renewcommand*{\labelnamepunct}{\addcolon\space}. Nov 25 '16 at 19:24