
단지 번호만 표시하는 대신 전체 인용을 해당 참고문헌 항목에 대한 링크로 만들고 싶습니다.
\cite
또한 이 링크의 일부 에 대한 선택적 인수를 만들고 싶습니다 .
내 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}
\cite
명령의 결과가 다음과 같기를 바랍니다 .
답변1
나는 약간의 연구를 수행했지만 기본 방법으로 원하는 것을 수행할 수 있는 방법을 찾지 못했습니다.
뭔가를 만들었지만 예쁘지 않고 오류가 발생할 수도 있습니다.
(거의) Donald Knuth가 말했듯이:
아래 코드의 버그에 주의하세요. 테스트만 했을 뿐 정확하다고 증명하지는 않았습니다.
:피
나는 새로운 명령을 정의했습니다 \ccite
. 그것~해야 한다표준 \cite
명령과 똑같이 작동합니다. 이 명령은 내부에서 후자를 호출하는 \ccite
실제 명령에 대한 래퍼입니다 .\cite
\hyperlink
에서는 태그를 \hyperlink
사용하여 cite.<citation-name>
참고문헌에 대한 하이퍼링크를 만들고 해당 링크를 \cite
명령에 첨부합니다.
이 \ccite
명령은 명령의 선택적 인수와 함께 작동하며 참고 \cite
문헌이 bibTeX로 작성된 경우에도 작동합니다. 하지만 bibLaTeX로는 테스트하지 않았습니다.
메모:하이퍼링크는 인용 명령으로 만들어지기 때문에그리고연결 명령을 사용하면 전체 인용의 색상이 의 citecolor
및 linkcolor
옵션에 의해 지정됩니다 hyperref
.
그래서 여기 있습니다:
\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}