例子

例子

目前,我的文件採用以下形式:

\documentclass[11pt,a4paper]{article}

\usepackage{hyperref}

\begin{document}

\tableofcontents

\section{Introduction to Problem}

There is the relation
\begin{equation}
R = k^2, \label{eq:myequation}
\end{equation}
which we have previously discussed.  

\section{Potential Solution}

Using the relation in Equation~(\ref{eq:myequation}), we can ...

\end{document}

鑑於上述文檔使用 編譯時的外觀pdfTeX 3.1415926-2.5-1.40.14 (TeX Live 2013/Debian),我只想進行 2 個更改:

  1. 任何目錄、圖形、方程式等、連結周圍都沒有彩色框
  2. 虛線將目錄條目連接到頁面右側對應的頁碼

我怎麼才能做出這些改變?

答案1

正如評論中所建議的,您可以使用 passhidelinks選項來hyperref停用這些框並

\makeatletter
\renewcommand*\l@section{\@dottedtocline{1}{1.5em}{2.3em}}
\makeatother

將點線加入目錄。

例子

\documentclass[11pt,a4paper]{article}

\usepackage[hidelinks]{hyperref}

\makeatletter \renewcommand*\l@section{\@dottedtocline{1}{1.5em}{2.3em}} \makeatother

\begin{document}

\tableofcontents

\section{Introduction to Problem}

There is the relation
\begin{equation}
R = k^2, \label{eq:myequation}
\end{equation}
which we have previously discussed.  

\section{Potential Solution}

Using the relation in Equation~(\ref{eq:myequation}), we can ...

\end{document}

結果

結果

有關兩個單獨問題的更多詳細信息,請訪問以下連結:

  1. 刪除可點擊交叉引用和超連結周圍醜陋的邊框
  2. 如何在章節的目錄中取得帶點的行?

相關內容