0

I want to add a subbibliography after the main bibliography with matching numeric references. The main bibliography is to be sorted in order of appearance sorting=none while the subbibliography must be sorted as sorting=ydnt. The ordering of the references is okay but I can't get the numeric labels to match and the inline labels are taken from the sub bibliography as well. Where is my mistake?

I am using texlive2022 with biblatex v3.18 and biber v2.18.

\documentclass{article}
\usepackage[%
backend=biber,%
style=numeric,%
sorting=none,%
defernumbers=true,%
]{biblatex}
\addbibresource{\jobname.bib}
\usepackage{filecontents}

\begin{filecontents}{\jobname.bib} @book{A2000, keywords={own}, author = {Author, A.}, year = {2000}, title = {Titel A}, publisher = {Publisher}, } @book{B1900, author = {Boathor, B.}, year = {1900}, title = {Titel B}, publisher = {Publisher}, }

@book{C1950,
    keywords={own},
    author = {Coathor, C.},
    year = {1950},
    title = {Titel C},
    publisher = {Publisher},   
} 

} \end{filecontents}

\begin{document} This is the first ref \cite{A2000}, and the second \cite{B1900} and the third \cite{C1950}.

\printbibliography[] \newrefcontext[sorting=ydnt] \printbibliography[keyword=own,heading=subbibliography,title={My Publications}] \endrefcontext

\end{document}

enter image description here

1 Answers1

1

You should be able to use the approach from https://tex.stackexchange.com/a/663183/35864 where we locally restore the outer refcontext inside the bibliography.

\documentclass{article}
\usepackage[%
  backend=biber,%
  style=numeric,%
  sorting=none,%
  defernumbers=true,%
]{biblatex}

\begin{filecontents}{\jobname.bib} @book{A2000, keywords = {own}, author = {Author, A.}, year = {2000}, title = {Titel A}, publisher = {Publisher}, } @book{B1900, author = {Boathor, B.}, year = {1900}, title = {Titel B}, publisher = {Publisher}, } @book{C1950, keywords = {own}, author = {Coathor, C.}, year = {1950}, title = {Titel C}, publisher = {Publisher}, } \end{filecontents} \addbibresource{\jobname.bib}

\begin{document} This is the first ref \cite{A2000}, and the second \cite{B1900} and the third \cite{C1950}.

\printbibliography[]

\csletcs{saved@blx@refcontext@context}{blx@refcontext@context} \newrefcontext[sorting=ydnt] \makeatletter \AtNextBibliography{% \def\blx@setdefaultrefcontext#1{}% \csletcs{blx@refcontext@context}{saved@blx@refcontext@context}} \makeatother \printbibliography[keyword=own,heading=subbibliography,title={My Publications}] \endrefcontext \end{document}

moewe
  • 175,683