
Wikipedia verfügt seit einiger Zeit über ein wirklich schönes Zitatsystem, bei dem mehrere Fälle, in denen dieselbe Referenz verwendet wird, beispielsweise im Text als „“ gekennzeichnet werden , aber vom Abschnitt „Bibliografie“ aus mit „“, „“ usw. 1
verlinkt sind.1a
1b
Ich frage mich, ob es ein Paket gibt, das dieselbe Funktionalität in LaTeX bietet. Ich konnte nur biblatex und natbib finden, von denen keines ein solches Zitatschema hat.
Verspotten:
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore[1] et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor[2] in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur[1]. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum[1].
[1 a,b,c] Lorem ipsum dolor sit amet
[2] Konsectetur adipiscing elit, sed do eiusmod tempo
wobei alle 1en auf dieselbe Zeile verweisen, aber von dieser Zeile aus wird jede einzelne Zeile durch einen Buchstaben zurückverlinkt. Alternativ können Sie sich die Bibliographie und den Zitierstil von ansehenDieser Artikel.
Bitte helfen Sie mir, ein MWE dieser Funktionalität basierend auf diesem Backbone zu erhalten:
\documentclass{article}
\usepackage{filecontents}
\begin{filecontents}{jobname.bib}
@book{ref1,
title = {Book's title},
author = {Author, Some},
location = {The City},
publisher = {Publisher},
date = {2005},
}
@book{ref2,
title = {Book's title},
author = {A. U. Thor},
location = {The City},
publisher = {Publisher},
date = {2005},
}
\end{filecontents}
\usepackage[style=ieee,backend=bibtex]{biblatex}
\bibliography{jobname}
\begin{document}
Lorem ipsum dolor sit amet, consectetur adipiscing elit\cite{ref1}, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat\cite{ref2}. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui\cite{ref1} officia deserunt mollit anim id est laborum.
\printbibliography
\end{document}
Antwort1
Verwenden von BibLateX
Es ist möglich, \AtEveryCiteKey
bei jedem Zitierbefehl einen Anker einzufügen und den Backref zu speichern. Anschließend können Sie die Formatierungsfunktionen von BibLateX verwenden, um irgendwo in den Bibliografieeinträgen eine Liste mit Backreferaten anzuhängen.
\documentclass{article}
\usepackage{filecontents}
\begin{filecontents}{jobname.bib}
@book{ref1,
title = {Book's title},
author = {Author, Some},
location = {The City},
publisher = {Publisher},
date = {2005},
}
@book{ref2,
title = {Book's title},
author = {A. U. Thor},
location = {The City},
publisher = {Publisher},
date = {2005},
}
\end{filecontents}
\usepackage[style=ieee,backend=bibtex]{biblatex}
\bibliography{jobname}
\usepackage[colorlinks]{hyperref} % If needed
\makeatletter
\newcounter{backref@bref}
\AtEveryCitekey{% Appends a target for hyperlink, and setups backref
\stepcounter{backref@bref}%
\ifhyperref{%
\Hy@raisedlink{\hypertarget{bref.\thebackref@bref}{}}%
}{}%
\listcsxadd{bref@\abx@field@entrykey}{bref.\thebackref@bref}%
}
\AfterEndPreamble{% Needs to wait until hyperref is loaded
\DeclareFieldFormat{labelnumberwidth}{%
\printtext[brackets]{#1% Label number
\setcounter{backref@bref}{0}%
\renewcommand*{\do}[1]{
\stepcounter{backref@bref}%
\ifhyperref{\hyperlink{##1}{\alph{backref@bref}}}%
{\alph{backref@bref}}%
}%
\dolistcsloop{bref@\abx@field@entrykey}% List of back refs
}%
}}
\makeatother
\begin{document}
Lorem ipsum sit amet, consectetur adipiscing elit\cite{ref1}, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat\cite{ref2}. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui\cite{ref1} officia deserunt mollit anim id est laborum.
\printbibliography
\end{document}
Verwendung von BibTeX und hyperref
/backref
Hier ist eine Möglichkeit, dies zu tun, indem Sie das hyperref
Paket mit der backref
Option verwenden. Es druckt einfach die Backrefs aus, a,b,...
indem es einen Zähler erhöht.
\makeatletter
\newcounter{backref@bref} %Define new counter
\long\def\hyper@letters@backref#1#2#3{ %Defines new backref printer
\stepcounter{backref@bref}%
\hyperlink{#3}{\alph{backref@bref}}% Shows backref@bref as a letter
}
\let\backrefxxx\hyper@letters@backref %Selects printer
\renewcommand{\backref}[1]{%
\setcounter{backref@bref}{0} %Reset the counter at each ref
[#1\ ]%
}
\makeatother
Um den Backref in das Referenzlabel einzufügen, wie beispielsweise in Wikipedia, müssten Sie sich vermutlich einklinken \bibitem
.
Beachten Sie auch, dass dieses backref
Paket zum Drucken der Abschnitts- oder Seitennummern der Rückverweise konzipiert ist, was besser ist als die a,b..
Nummerierung,insbesondere wenn Sie das Dokument ausdrucken möchten.