我在 DVI>PS>PDF 编译中使用 Hyperref,但它在 TOC 中不起作用。我需要帮助。感谢您的评论。
\documentclass[12pt,twoside,letterpaper,spanish]{book}
%----------------------------------------------------------
%\usepackage[margin=2cm]{geometry}
\usepackage[spanish]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{textcomp}
\usepackage{lmodern}
\usepackage{natbib}
%\usepackage{epstopdf}
\usepackage[table]{xcolor}
\usepackage{amsfonts}
\usepackage{amsmath}
\usepackage{mathtools}
\usepackage{mathabx}
\usepackage{pst-all}
\usepackage[dvips]{graphicx}
\usepackage{rotating}
\usepackage[font=small,labelsep=period]{caption}
\usepackage{colortbl,enumitem}
\usepackage{tabularx}
\usepackage{longtable,tabu}
\usepackage{setspace}
\usepackage{pbox}
\usepackage{multirow}
\usepackage{ragged2e}
\usepackage{fancyhdr}
\setlength{\textwidth}{15.59cm}
\pagestyle{fancy}
\usepackage{booktabs}
\usepackage{fancybox}
\usepackage{lipsum}
\usepackage{shadowtext} %Paquete Sombras
\usepackage{type1cm} % Paquete tamaño de fuente
\usepackage[colorinlistoftodos, textwidth=2cm, shadow,textsize=scriptsize]{todonotes}
\usepackage[skins,most,many,breakable]{tcolorbox}
\usepackage[explicit]{titlesec}
\usepackage{titletoc}
\usepackage{tikz}
\usetikzlibrary{shapes.misc}
\usepackage[letterpaper]{geometry}
\geometry{letterpaper,verbose,
tmargin=2.5cm,
bmargin=2cm,
lmargin=4cm,
rmargin=2cm
}
\usepackage[perpage,ragged]{footmisc}
\usepackage{perpage} %the perpage package
\MakePerPage{footnote} %the perpage package command
%----------------------------------------------------------------------------
\usepackage[titles]{tocloft}% http://ctan.org/pkg/tocloft
\renewcommand\cftchapaftersnum{.}% adds dot after chapter title in ToC
\renewcommand\cftchapdotsep{\cftdotsep}% adds leader dots from chapter titles to page numbers
\renewcommand{\cftsecaftersnum}{.}% adds dot after section title in ToC
%----------------------------------------------------------------------------
\usepackage{listings}
\lstset
{
language={[LaTeX]TeX},
basicstyle=\tt\color{black},
literate=%
{é}{{\'{e}}}1
{á}{{\'{a}}}1
{ó}{{\'{o}}}1
{ú}{{\'{u}}}1
{í}{{\'{i}}}1,
}
\usepackage{siunitx}
\sisetup{output-decimal-marker = {,}}
\sisetup{group-digits = integer}
\sisetup{group-minimum-digits = 4}
\sisetup{group-separator = {.}}
%----------------------------------------------------------------------------
\usepackage{varwidth}
\DeclareCaptionFormat{myformat}{%
% #1: label (e.g. "Table 1")
% #2: separator (e.g. ": ")
% #3: caption text
\begin{varwidth}{\linewidth}%
\centering
#1#2#3%
\end{varwidth}%
}
%\usepackage{showframe}
%----------------------------------------------------------------------------
\usepackage[hyphens]{url}
\usepackage[dvips]{hyperref}
\hypersetup{
colorlinks,
linktoc=all,
linktocpage=true,
citecolor=blue,
breaklinks=true,
filecolor=blue,
linkcolor=blue,
urlcolor=blue
}
\usepackage[anythingbreaks]{breakurl}
%----------------------------------------------------------------------------
\definecolor{azulo}{RGB}{0,163,243}