Fussnoten mit \hypercite anders darstellen als mit \autocite Thema ist als GELÖST markiert

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


neeSch

Fussnoten mit \hypercite anders darstellen als mit \autocite

Beitrag von neeSch »

Hallo Zusammen

Ich habe nochmals ein Problem mit den Fussnoten.
Die gleichen Fussnoten mit \autocite sollen am Ende der Seite zusammengefasst werden, wie es auch der Fall ist.
Allerdings sollen die Fussnoten mit \hypercite nicht zusammengefasst werden, da es sich dabei um Zitate handelt und je nach dem unterschiedliche Seitenzahlen angegeben werden.

Das die Zitate nicht zusammengenommen werden dürfen, ist mir leider erst jetzt aufgefallen... :oops:

(mehr zum Thema auch unter: http://golatex.de/vgl-in-fussnote-einfu ... snote.html)

Ich weiss nicht genau, was ich beim Umdefinieren der Befehle ändern müsste. Könnte mir bitte jemand helfen?
\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} 
\DeclareAutoCiteCommand{hypervgl}{\hypercitevgl}{\hypercitevgls} 
\ExecuteBibliographyOptions{autocite=hypervgl} 

\makeatletter 
\newbibmacro{cite:init}[1]{% 
  \ifcsundef{cbx@instcount@curr@\the\c@refsection @\thefield{entrykey}@#1} 
    {\csnumgdef{cbx@instcount@curr@\the\c@refsection @\thefield{entrykey}@#1}{0}} 
    {}% 
  \csnumgdef{cbx@instcount@last@\the\c@refsection @\thefield{entrykey}@#1}{% 
    \csuse{cbx@instcount@curr@\the\c@refsection @\thefield{entrykey}@#1}}% 
  \csnumgdef{cbx@instcount@curr@\the\c@refsection @\thefield{entrykey}@#1}{\value{instcount}}} 

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

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

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

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

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

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

\DeclareCiteCommand{\hypercitevgl} 
  {} 
  {\usebibmacro{citeindex}% 
   \usebibmacro{cite:init}{vgl}% 
   \usebibmacro{postnote:save}{vgl}% 
   \ifboolexpr{test {\ifciteseen} and test {\iflastciteonsamepage{vgl}}} 
     {\footref{cbx@\csuse{cbx@f@\thefield{entrykey}@vgl}}} 
     {\mkbibfootnote{% 
        \printtext{Vgl.}\setunit{\addspace}% 
        \usebibmacro{cite}% 
        \usebibmacro{footcite:save}{vgl}% 
        \usebibmacro{special:postnote}{vgl}}}} 
  {\mkbibsuperscript{\supercitedelim}} 
  {} 

\DeclareMultiCiteCommand{\hypercites}{\hypercite}{\mkbibsuperscript{\supercitedelim}} 
\DeclareMultiCiteCommand{\hypercitevgls}{\hypercitevgl}{\mkbibsuperscript{\supercitedelim}} 
\makeatother 


\begin{document} 
First citation.\hypercitevgl[8]{sigfridsson}
Citation with two footnotes.\autocites{herrmann}{sigfridsson}
Citation with three footnotes.\autocites{herrmann,sigfridsson,doody}
First citation.\hypercite[19]{herrmann}
"`Some recurrent citations on same page."'\hypercite[15]{sigfridsson}
Third  citation.\hypercitevgl[20]{sigfridsson}
"`Some recurrent citations on same page."'\hypercite[17]{sigfridsson}
Third  citation.\hypercite[9]{sigfridsson}

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

\cleardoublepage 
\printbibliography 
\end{document}

Gast

Beitrag von Gast »

In dem Fall wird \hypercite einfach zu \footcite. In der folgenden Lösung gibt es also kein \hypercite mehr, stattdessen wird \footcite verwendet. \autocite ist noch immer \hyprecitevgl. Dann könnte man sich natürlich den Code sparen, den ich in der letzten Antwort eingebaut habe, um 'normale' Zitate und 'Vgl.' zu unterscheiden, aber man muss sich ja nicht mehr Arbeit machen als eh schon. Möglicherweise wird der Code, der die Seitenzahlen sammeln soll, jetzt auch überflüssig, wenn Du in den Vhl.-Zitaten keine Seitenzahlen hast, aber auch den Code habe ich dringelassen, da ich nicht genau weiß, was Du brauchst.
\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{hypervgl}{\hypercitevgl}{\hypercitevgls}
\ExecuteBibliographyOptions{autocite=hypervgl}

\makeatletter
\newbibmacro{cite:init}[1]{%
  \ifcsundef{cbx@instcount@curr@\the\c@refsection @\thefield{entrykey}@#1}
    {\csnumgdef{cbx@instcount@curr@\the\c@refsection @\thefield{entrykey}@#1}{0}}
    {}%
  \csnumgdef{cbx@instcount@last@\the\c@refsection @\thefield{entrykey}@#1}{%
    \csuse{cbx@instcount@curr@\the\c@refsection @\thefield{entrykey}@#1}}%
  \csnumgdef{cbx@instcount@curr@\the\c@refsection @\thefield{entrykey}@#1}{\value{instcount}}}

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

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

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

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

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

\DeclareCiteCommand{\hypercitevgl}
  {}
  {\usebibmacro{citeindex}%
   \usebibmacro{cite:init}{vgl}%
   \usebibmacro{postnote:save}{vgl}%
   \ifboolexpr{test {\ifciteseen} and test {\iflastciteonsamepage{vgl}}}
     {\footref{cbx@\csuse{cbx@f@\thefield{entrykey}@vgl}}}
     {\mkbibfootnote{%
        \printtext{Vgl.}\setunit{\addspace}%
        \usebibmacro{cite}%
        \usebibmacro{footcite:save}{vgl}%
        \usebibmacro{special:postnote}{vgl}}}}
  {\mkbibsuperscript{\supercitedelim}}
  {}

\DeclareMultiCiteCommand{\hypercitevgls}{\hypercitevgl}{\mkbibsuperscript{\supercitedelim}}
\makeatother


\begin{document}
First citation.\autocite[8]{sigfridsson}
Citation with two footnotes.\autocites{herrmann}{sigfridsson}
Citation with three footnotes.\autocites{herrmann,sigfridsson,doody}
First citation.\footcite[19]{herrmann}
"`Some recurrent citations on same page."'\footcite[15]{sigfridsson}
Third  citation.\autocite[20]{sigfridsson}
"`Some recurrent citations on same page."'\footcite[17]{sigfridsson}
Third  citation.\footcite[9]{sigfridsson}

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

\cleardoublepage
\printbibliography
\end{document}

neeSch

Beitrag von neeSch »

Vielen vielen Dank für die schnelle Hilfe!!

Den Code, um die Seiten zu sammeln, brauche ich tatsächlich noch, da die Seitenzahlen auch dort angegeben werden müssen. :wink:

Nochmals vielen Dank!! :)

Antworten