von Gast » Mi 25. Okt 2017, 19:10
Wenn Du keine Seitenzahl hast, dann darfst Du die Klammer nicht weglassen, Du musst sie leer lassen.
First citation.\autocite[Vgl.][]{sigfridsson}
Dieser Zitierstil ist doch totaler Schwachsinn. Ulrike und ich haben schon in
http://golatex.de/fussnoten-anzeigen-lassen-t19790.html und
http://golatex.de/mehrere-fussnoten-mit ... 19826.html auf die Probleme dieses Stils hingewiesen. Wenn ein Werk häufiger zitiert wird, ist es für den Leser überhaupt nicht mehr möglich, schnell vernünftig zu erkennen, welche Fundstelle zu welcher Fußnote gehört. Versuch doch mal mit den verantwortlichen in Kontakt zu treten, das Ganze ist ja nicht nur für die Leserin eine Zumutung, sondern auch für diejenige, die die Arbeit schreibt.
Hier aber trotzdem ein Lösungsversuch.#
Es gibt nunmehr zwei Befehle \hypercite und \hypercitevgl. Ersterer ist für Direktzitate ohne 'Vgl.', letzterer fügt 'Vgl.' sogar automatisch hinzu. Die Befehle funktionieren nach demselben Prinzip aber unabhängig voneinander, so kannst Du alle 'Vgl.'-Seiten mit \hypercitevgl zusammentragen und alle nicht-'Vgl.'-Seiten mit \hypercite. Es ist für \hypercitevgl dann nicht mehr nötig, dass 'vgl.' manuell dazuzuschreiben.
\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
\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}}}}
{}
{}
\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}}}}
{}
{}
\makeatother
\begin{document}
First citation.\hypercitevgl[8]{sigfridsson}
First citation.\hypercite[19]{herrmann}
"`Some recurrent citations on same page."'\hypercite[15]{sigfridsson}
Third citation.\hypercitevgl{sigfridsson}
"`Some recurrent citations on same page."'\hypercite[17]{sigfridsson}
Third citation.\hypercitevgl[9]{sigfridsson}
\cleardoublepage
Recurrent citation on different page.\hypercite[270]{sigfridsson}
Recurrent on different pages.\hypercite[90]{herrmann}
New citation on same page.\hypercite[28]{doody}
Some recurrent citations on same page.\hypercite[280]{sigfridsson}
\cleardoublepage
\printbibliography
\end{document}
Wenn Du das so direkt in Dein Dokument einfügst, musst Du unter Umständen zuerst die temporären Dateien löschen (.aux, ...), da es sonst beim ersten Kompilationslauf, bei dem noch die alten Definitionen in der .aux-Datei wohnen, Probleme gibt.
Wenn Du keine Seitenzahl hast, dann darfst Du die Klammer nicht weglassen, Du musst sie leer lassen.
[code]First citation.\autocite[Vgl.][]{sigfridsson}[/code]
Dieser Zitierstil ist doch totaler Schwachsinn. Ulrike und ich haben schon in http://golatex.de/fussnoten-anzeigen-lassen-t19790.html und http://golatex.de/mehrere-fussnoten-mit-komma-trennen-t19826.html auf die Probleme dieses Stils hingewiesen. Wenn ein Werk häufiger zitiert wird, ist es für den Leser überhaupt nicht mehr möglich, schnell vernünftig zu erkennen, welche Fundstelle zu welcher Fußnote gehört. Versuch doch mal mit den verantwortlichen in Kontakt zu treten, das Ganze ist ja nicht nur für die Leserin eine Zumutung, sondern auch für diejenige, die die Arbeit schreibt.
Hier aber trotzdem ein Lösungsversuch.#
Es gibt nunmehr zwei Befehle [tt]\hypercite[/tt] und [tt]\hypercitevgl[/tt]. Ersterer ist für Direktzitate ohne 'Vgl.', letzterer fügt 'Vgl.' sogar automatisch hinzu. Die Befehle funktionieren nach demselben Prinzip aber unabhängig voneinander, so kannst Du alle 'Vgl.'-Seiten mit [tt]\hypercitevgl[/tt] zusammentragen und alle nicht-'Vgl.'-Seiten mit [tt]\hypercite[/tt]. Es ist für [tt]\hypercitevgl[/tt] dann nicht mehr nötig, dass 'vgl.' manuell dazuzuschreiben.
[code]\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
\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}}}}
{}
{}
\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}}}}
{}
{}
\makeatother
\begin{document}
First citation.\hypercitevgl[8]{sigfridsson}
First citation.\hypercite[19]{herrmann}
"`Some recurrent citations on same page."'\hypercite[15]{sigfridsson}
Third citation.\hypercitevgl{sigfridsson}
"`Some recurrent citations on same page."'\hypercite[17]{sigfridsson}
Third citation.\hypercitevgl[9]{sigfridsson}
\cleardoublepage
Recurrent citation on different page.\hypercite[270]{sigfridsson}
Recurrent on different pages.\hypercite[90]{herrmann}
New citation on same page.\hypercite[28]{doody}
Some recurrent citations on same page.\hypercite[280]{sigfridsson}
\cleardoublepage
\printbibliography
\end{document}[/code]
Wenn Du das so direkt in Dein Dokument einfügst, musst Du unter Umständen zuerst die temporären Dateien löschen ([tt].aux[/tt], ...), da es sonst beim ersten Kompilationslauf, bei dem noch die alten Definitionen in der [tt].aux[/tt]-Datei wohnen, Probleme gibt.