Гиперссылка на bibitem в LaTeX - PullRequest
0 голосов
/ 20 октября 2018

Вот минимальный рабочий пример:

\documentclass{article}

\usepackage{natbib,xspace}
\usepackage[colorlinks,citecolor=blue,linkcolor=blue]{hyperref}

\newcommand{\BOGOS}{\hyperlink{BriEtal18a}{BOGOS}\xspace}

\begin{document}

In this article we reference \cite{BriEtal18a} many times.  I want to create the shortcut \BOGOS that will still link to the reference in the bibliography.  This does not work yet.

\begin{thebibliography}{}

    \bibitem[Briol et~al., 2018]{BriEtal18a}
    Briol, F.-X., Oates, C.~J., Griolami, M., Osborne, M.~A., and Sejdinovic, D.
    (2018+).
    \newblock Probabilistic integration: A role in statistical computation?
    \newblock {\em Statist.\ Sci.}
    \newblock to appear.

\end{thebibliography}

\end{document}

Если вы нажмете на гиперссылку для цитирования, она отправит вас к ссылке.Если кто-то нажимает на мое сокращение, ничего не происходит.Мне нужно знать, что такое правильный ярлык.Вы можете помочь?

1 Ответ

0 голосов
/ 23 октября 2018

Поскольку вы используете natbib, вы можете определить цитату псевдоним , которая будет отображаться вместо обычной \cite:

enter image description here

\documentclass{article}

\usepackage{natbib}
\usepackage[colorlinks,citecolor=blue,linkcolor=blue]{hyperref}

\defcitealias{BriEtal18a}{BOGOS}% Define a citation alias
\newcommand{\BOGOS}{\citetalias{BriEtal18a}}% Use shorthand

\begin{document}

In this article we reference \citet{BriEtal18a} many times.
I want to create the shortcut \BOGOS{} that will still link to the reference in the bibliography.

\begin{thebibliography}{}

  \bibitem[Briol et~al., 2018]{BriEtal18a}
  Briol, F.-X., Oates, C.~J., Griolami, M., Osborne, M.~A., and Sejdinovic, D.
  (2018+).
  \newblock Probabilistic integration: A role in statistical computation?
  \newblock {\itshape Statist.\ Sci.}
  \newblock to appear.

\end{thebibliography}

\end{document}
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...