
Ich möchte, dass das gesamte Zitat einen Link zum entsprechenden Bibliografieeintrag enthält und nicht nur die Nummer.
\cite
Ich möchte auch das optionale Argument eines Teils dieses Links vorbringen .
Mein MWE:
\documentclass[12pt,a4paper]{article}
%------------------------------------------------------------
\usepackage{amsmath,amssymb,amsthm}
%------------------------------------------------------------
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[colorlinks=true,pagebackref=true]{hyperref}
\hypersetup{urlcolor=blue, citecolor=red, linkcolor=blue}
% ------------------------------------------------------------
\newtheorem{theorem}{Theorem}[section]
\newtheorem{definition}{Definition}[section]
\newtheorem{definitions}{Definitions}[section]
\newtheorem{notation}{Notation}[section]
\newtheorem{corollary}{Corollary}[section]
\newtheorem{proposition}{Proposition}[section]
\newtheorem{lemma}{Lemma}[section]
\newtheorem{remark}{Remark}[section]
\newtheorem{example}{Example}[section]
\numberwithin{equation}{section}
\begin{document}
By \cite[Theorem2.1]{4}, the A-covariance operator
\begin{thebibliography}{10}
\bibitem{4}{W. Arendt, J.R. Goldstein, and J.A. Goldstein:} {Outgrowths
of Hardy's inequality,} Contemp. Math. 412 (2006), pp. 51-68.
\end{thebibliography}
\end{document}
Ich möchte, dass das Ergebnis des \cite
Befehls ungefähr so aussieht:
Antwort1
Ich habe ein wenig recherchiert und keine Möglichkeit gefunden, das Gewünschte mit einer sofort einsatzbereiten Methode zu erreichen.
Ich habe etwas gemacht, aber es ist nicht schön und es können Fehler auftreten.
(Fast) wie Donald Knuth sagte:
Achten Sie auf Fehler im folgenden Code. Ich habe ihn nur getestet, aber nicht seine Richtigkeit bewiesen.
:P
Ich habe einen neuen Befehl definiert \ccite
. Ersollenfunktioniert genau wie der Standardbefehl \cite
. Der \ccite
Befehl ist ein Wrapper für den eigentlichen \cite
Befehl, der diesen innerhalb eines aufruft \hyperlink
.
Mithilfe \hyperlink
des cite.<citation-name>
Tags wird ein Hyperlink zur Bibliografie erstellt und der Link wird an den \cite
Befehl angehängt.
Der \ccite
Befehl funktioniert mit dem optionalen Argument des \cite
Befehls und funktioniert auch, wenn die Bibliographie mit bibTeX erstellt wird. Ich habe es jedoch nicht mit bibLaTeX getestet.
Notiz:Da die Hyperlinkung mit einem Zitationsbefehl erfolgtUndBei einem Verknüpfungsbefehl wird die Farbe des vollständigen Zitats durch die beiden citecolor
Optionen und linkcolor
angegeben hyperref
.
Hier ist es also:
\documentclass[12pt,a4paper]{article}
%------------------------------------------------------------
\usepackage{amsmath,amssymb,amsthm}
%------------------------------------------------------------
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{xcolor}
\definecolor{citeblue}{HTML}{617BAC}
\usepackage[colorlinks=true,pagebackref=true]{hyperref}
\hypersetup{urlcolor=blue, citecolor=citeblue, linkcolor=citeblue}
% ------------------------------------------------------------
\newtheorem{theorem}{Theorem}[section]
\newtheorem{definition}{Definition}[section]
\newtheorem{definitions}{Definitions}[section]
\newtheorem{notation}{Notation}[section]
\newtheorem{corollary}{Corollary}[section]
\newtheorem{proposition}{Proposition}[section]
\newtheorem{lemma}{Lemma}[section]
\newtheorem{remark}{Remark}[section]
\newtheorem{example}{Example}[section]
\numberwithin{equation}{section}
\makeatletter
\def\ccitecolor{red}
\def\ccite{%
\@ifnextchar[{\@@ccite}{\@ccite}%
}
\def\@@ccite[#1]#2{%
\hyperlink{cite.#2}{\cite[#1]{#2}}%
}
\def\@ccite#1{%
\hyperlink{cite.#1}{\cite{#1}}%
}
\makeatother
\begin{document}
By \ccite{4}, the A-covariance operator
By \ccite[Theorem 2.1]{4}, the A-covariance operator
By \textcolor{citeblue}{\cite[Theorem 2.1]{4}}, the A-covariance operator
\begin{thebibliography}{10}
\bibitem{4}{W. Arendt, J.R. Goldstein, and J.A. Goldstein:} {Outgrowths
of Hardy's inequality,} Contemp. Math. 412 (2006), pp. 51-68.
\end{thebibliography}
\end{document}