URL 包含 # 导致错误

URL 包含 # 导致错误
\begin{frame}{Triphala Churn}
     \begin{enumerate}
     \item  Three fruits – Amalaki [Indian Gooseberry – Emblica officinalis], Haritaki [Myrobalan – Terminalia chebula], and Vibhatika [Belleric Myrobalan – Terminalia belerica]
    \item Laxative 
    \item result in allergic reaction including anaphylaxis 
     \end{enumerate}
     Ref: http://www.stylecraze.com/articles/harmful-side-effects-of-triphala-churna/#gref
    \end{frame}

我可能因为 #gref 而收到错误。解决方案是什么?我尝试使用 $..$ 将其作为数学符号包含。

答案1

软件包url提供了\url处理特殊字符的功能。fragile框架可能还需要以下选项:

\usepackage{url}% (shold be already loaded by `hyperref`, which is loaded by `beamer`)

\begin{frame}[fragile]
  ...
  \url{http://www.example.org/index.html#gref}
\end{frame}

相关内容