Guest User

Untitled

a guest
Jan 19th, 2019
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.19 KB | None | 0 0
  1. documentclass{amsart}
  2.  
  3. usepackage{hyperref}
  4.  
  5. newtheorem{theorem}{Theorem}
  6.  
  7. begin{document}
  8.  
  9. begin{theorem}
  10. label{bigthm}
  11. begin{itemize}
  12. item A claim.
  13. item Another claim.
  14. end{itemize}
  15. end{theorem}
  16.  
  17. Let's prove Theorem~ref{bigthm}.
  18.  
  19. end{document}
  20.  
  21. pdfTeX warning (dest): name{theorem.1} has been
  22. referenced but does not exist, replaced by a fixed one
  23.  
  24. begin{theorem}
  25. label{bigthm}leavevmode
  26. begin{itemize}[...]
  27.  
  28. begin{theorem}
  29. phantomsectionlabel{bigthm}
  30. begin{itemize}[...]
  31.  
  32. Let's prove~autoref{bigthm}.
  33.  
  34. documentclass{amsart}
  35.  
  36.  
  37.  
  38. usepackage{hyperref}
  39. newtheorem{theorem}{Theorem}
  40.  
  41. makeatletter
  42. newcommand{fakephantomsection}{%
  43. Hy@MakeCurrentHref{@currenvir.theHy@linkcounter}
  44. Hy@raisedlink{hyper@anchorstart{@currentHref}hyper@anchorend}%
  45. }
  46. makeatother
  47.  
  48.  
  49.  
  50. begin{document}
  51.  
  52. tableofcontents
  53.  
  54. clearpage
  55. section{Foo}
  56. begin{theorem}
  57. fakephantomsectionlabel{bigthm}
  58. begin{itemize}
  59. item A claim.
  60. item Another claim.
  61. end{itemize}
  62. end{theorem}
  63.  
  64. Let's prove Theorem~ref{bigthm} autoref{bigthm}.
  65.  
  66. end{document}
  67.  
  68. newcommand*{fakephantomsection}{%
  69. Hy@GlobalStepCountHy@linkcounter%
  70. Hy@MakeCurrentHref{@currenvir.theHy@linkcounter}%
  71. Hy@raisedlink{hyper@anchorstart{@currentHref}hyper@anchorend}%
  72. }
Add Comment
Please, Sign In to add comment