mehrere Fussnoten mit Komma trennen

Fragen und Probleme, die nicht den obigen Kategorien zugeordnet werden können


Gast

mehrere Fussnoten mit Komma trennen

Beitrag von Gast »

Hallo Zusammen

Ich würde die Fussnoten gerne mit einem Komma trennen, wenn mehrere zusammen vorkommen. Habe es mit
\autocite{key,key} bzw.
\autocite{key}\autocite{key} bzw.
\autocite{key}~\autocite{key}

probiert, doch es kam nicht das gewünschte Ergebnis raus. Ein Komma zwischen den Fussnoten fände ich eleganter als einfach nur ein Abstand.

Kann mir da jemand behilflich sein?
\documentclass[12pt,a4paper,ngerman]{report}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}

\usepackage{scrextend}

\usepackage[backend=biber, natbib=true, style=authortitle, citetracker=true]{biblatex}

\DeclareFieldFormat{urldate}{\mkbibparens{#1}}
\addbibresource{biblatex-examples.bib}

\usepackage{hyperref}
\DeclareAutoCiteCommand{hyper}{\hypercite}{\hypercites}
\ExecuteBibliographyOptions{autocite=hyper}

\makeatletter
\AtEveryCitekey{%
  \ifcsundef{cbx@instcount@curr@\the\c@refsection @\thefield{entrykey}}
    {\csnumgdef{cbx@instcount@curr@\the\c@refsection @\thefield{entrykey}}{0}}
    {}%
  \csnumgdef{cbx@instcount@last@\the\c@refsection @\thefield{entrykey}}{%
    \csuse{cbx@instcount@curr@\the\c@refsection @\thefield{entrykey}}}%
  \csnumgdef{cbx@instcount@curr@\the\c@refsection @\thefield{entrykey}}{\value{instcount}}}

\def\iflastciteonsamepage{%
  \ifsamepage
    {\number\csuse{cbx@instcount@curr@\the\c@refsection @\thefield{entrykey}}}
    {\number\csuse{cbx@instcount@last@\the\c@refsection @\thefield{entrykey}}}}

\newbibmacro*{footcite:save}{%
  \csxdef{cbx@f@\thefield{entrykey}}{\the\value{instcount}}%
  \label{cbx@\the\value{instcount}}}

\newcommand*{\cbx@postnotestorage}[3]{%
  \ifcsundef{cbx@postnote@#1@#2}
    {\csgdef{cbx@postnote@#1@#2}{#3}}
    {\csgappto{cbx@postnote@#1@#2}{, #3}}}

\newbibmacro*{postnote:save}{%
  \iffieldundef{postnote}
    {}
    {\blx@auxwrite\@mainaux{}{\string\cbx@postnotestorage{\thefield{entrykey}}{\thepage}{\thefield{postnote}}}}}

\newbibmacro*{special:postnote}{%
  \ifcsundef{cbx@postnote@\thefield{entrykey}@\thepage}
    {}
    {\edef\cbx@tempq{\csuse{cbx@postnote@\thefield{entrykey}@\thepage}}%
     \restorefield{postnote}{\cbx@tempq}%
     \setunit{\postnotedelim}%
     \printfield{postnote}}}

\DeclareCiteCommand{\hypercite}
  {}
  {\usebibmacro{citeindex}%
   \usebibmacro{postnote:save}%
   \ifboolexpr{test {\ifciteseen} and test {\iflastciteonsamepage}}
     {\footref{cbx@\csuse{cbx@f@\thefield{entrykey}}}}
     {\mkbibfootnote{%
        \usebibmacro{prenote}%
        \usebibmacro{cite}%
        \usebibmacro{footcite:save}%
        \usebibmacro{special:postnote}}}}
  {}
  {}
\makeatother


\begin{document}
First citation.\autocite[17]{sigfridsson}
First citation.\autocite[19]{herrmann}
Some recurrent citations on same page.\autocite[156]{sigfridsson}

\cleardoublepage
Recurrent citation on different page.\autocite[270]{sigfridsson}
Recurrent on different pages.\autocite[90]{herrmann}
New citation on same page.\autocite[28]{doody}
Some recurrent citations on same page.\autocite[280]{sigfridsson}

\cleardoublepage
\printbibliography
\end{document}

Gast

Beitrag von Gast »

Probier es mal mit
\documentclass[12pt,a4paper,ngerman]{report}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}

\usepackage{scrextend}

\usepackage[backend=biber, natbib=true, style=authortitle, citetracker=true]{biblatex}

\DeclareFieldFormat{urldate}{\mkbibparens{#1}}
\addbibresource{biblatex-examples.bib}

%\usepackage{hyperref}
\DeclareMultiCiteCommand{\hypercites}{\hypercite}{\mkbibsuperscript{\supercitedelim}}
\DeclareAutoCiteCommand{hyper}{\hypercite}{\hypercites}
\ExecuteBibliographyOptions{autocite=hyper}

\makeatletter
\AtEveryCitekey{%
  \ifcsundef{cbx@instcount@curr@\the\c@refsection @\thefield{entrykey}}
    {\csnumgdef{cbx@instcount@curr@\the\c@refsection @\thefield{entrykey}}{0}}
    {}%
  \csnumgdef{cbx@instcount@last@\the\c@refsection @\thefield{entrykey}}{%
    \csuse{cbx@instcount@curr@\the\c@refsection @\thefield{entrykey}}}%
  \csnumgdef{cbx@instcount@curr@\the\c@refsection @\thefield{entrykey}}{\value{instcount}}}

\def\iflastciteonsamepage{%
  \ifsamepage
    {\number\csuse{cbx@instcount@curr@\the\c@refsection @\thefield{entrykey}}}
    {\number\csuse{cbx@instcount@last@\the\c@refsection @\thefield{entrykey}}}}

\newbibmacro*{footcite:save}{%
  \csxdef{cbx@f@\thefield{entrykey}}{\the\value{instcount}}%
  \label{cbx@\the\value{instcount}}}

\newcommand*{\cbx@postnotestorage}[3]{%
  \ifcsundef{cbx@postnote@#1@#2}
    {\csgdef{cbx@postnote@#1@#2}{#3}}
    {\csgappto{cbx@postnote@#1@#2}{, #3}}}

\newbibmacro*{postnote:save}{%
  \iffieldundef{postnote}
    {}
    {\blx@auxwrite\@mainaux{}{\string\cbx@postnotestorage{\thefield{entrykey}}{\thepage}{\thefield{postnote}}}}}

\newbibmacro*{special:postnote}{%
  \ifcsundef{cbx@postnote@\thefield{entrykey}@\thepage}
    {}
    {\edef\cbx@tempq{\csuse{cbx@postnote@\thefield{entrykey}@\thepage}}%
     \restorefield{postnote}{\cbx@tempq}%
     \setunit{\postnotedelim}%
     \printfield{postnote}}}

\DeclareCiteCommand{\hypercite}
  {}
  {\usebibmacro{citeindex}%
   \usebibmacro{postnote:save}%
   \ifboolexpr{test {\ifciteseen} and test {\iflastciteonsamepage}}
     {\footref{cbx@\csuse{cbx@f@\thefield{entrykey}}}}
     {\mkbibfootnote{%
        \usebibmacro{prenote}%
        \usebibmacro{cite}%
        \usebibmacro{footcite:save}%
        \usebibmacro{special:postnote}}}}
  {\mkbibsuperscript{\supercitedelim}}
  {}
\makeatother


\begin{document}
First citation.\autocite[17]{sigfridsson}
First citation.\autocite[19]{herrmann}
Some recurrent citations on same page.\autocite[156]{sigfridsson}

\cleardoublepage
Recurrent citation on different page.\autocites[18]{sigfridsson}[20]{worman}
Recurrent on different pages.\autocite[90]{herrmann}
New citation on same page.\autocite[28]{doody}
Some recurrent citations on same page.\autocite[280]{sigfridsson,worman}

\cleardoublepage
\printbibliography
\end{document}
Dann benutzt Du \autocites[90]{foo}[290]{bar} für mehrere Zitate.

Gast

Beitrag von Gast »

Vielen Dank!! Es klappt einwandfrei! :)

Mit dem Definieren von neuen Befehlen habe ich eben noch nicht so viel Übung... :oops:

Gast

Beitrag von Gast »

So, nun sollte auch der Status stimmen... :oops:

Antworten