moewew / biblatex-ext

Extensions for the biblatex standard styles
LaTeX Project Public License v1.3c
24 stars 3 forks source link

footcitetext does not pick up footcite delims #19

Closed moewew closed 4 years ago

moewew commented 4 years ago

See https://golatex.de/viewtopic.php?p=111333#p111333

\footcitetext does not pick up the inner cite delims from \footcite despite there being a mapping to do so.

\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}

\usepackage[style=ext-authoryear, backend=biber]{biblatex}

\DeclareInnerCiteDelims{footcite}{\bibopenparen}{\bibcloseparen}

\addbibresource{biblatex-examples.bib}

\begin{document}
Lorem\footcite{sigfridsson}
dolor\footnotemark\footcitetext{sigfridsson}
\end{document}

It might have been nicer, easier and more consistent to just alias the delim context footcitetext to footcite, but we've gone down the other way of aliasing the outcomes later. In any case,

https://github.com/moewew/biblatex-ext/blob/df8a75b1ed9e990da3c8d23ea0ed064844853281/ext-biblatex-aux.def#L97

and

https://github.com/moewew/biblatex-ext/blob/df8a75b1ed9e990da3c8d23ea0ed064844853281/ext-biblatex-aux.def#L105

are the wrong way round and we need stuff like

\DeclareFieldFormat{extblx@innerfootcitetextdelims}{%
  \csuse{mkinner\blx@delimcontext delims}{#1}}

Maybe those field formats should be generated automatically? That would avoid a lot of repetition and hassle.


edit Corrected embarrassing typo in example. There is no "s" in \bibopenparen and \bibcloseparen.

moewew commented 4 years ago

Since the actual definition of the field formats unfortunately depends on the implementation in the styles, we can't generate them automatically. So we have to resort to field aliases here.

moewew commented 4 years ago

biblatex-ext v0.8f (2020-05-09) with the fix for this issue is on CTAN and available in both TeX live and MikTeX now.