인덱스에 대한 하이퍼텍스트 링크

인덱스에 대한 하이퍼텍스트 링크

나는 학생들에게 배포하기 위해 수업 노트를 작성하고 있는데, 하이퍼텍스트 패키지는 색인을 링크로 만드는 작업을 수행합니다. 또한 모든 페이지에 첫 번째 페이지로 연결되는 바닥글을 설정했습니다. 여기서 섹션 헤더는 각 섹션의 시작 부분으로 연결됩니다.

하지만 왼쪽의 각 페이지 상단에 있는 섹션 제목이 목차의 해당 섹션에 대한 링크가 되기를 바랍니다. 코드에서 ToC에 의해 생성된 위치에 대한 링크를 생성하는 방법을 모르겠습니다. 현재 해당 섹션 제목은 모두 ToC의 시작 부분에 연결되어 있으며 이는 통과 가능하지만 ToC 전체의 시작 부분 대신 해당 섹션에 연결하는 것을 선호합니다. 어떤 조언이라도 감사하겠습니다.

다음은 대부분의 콘텐츠에 하위 파일을 사용하는 기본 파일 전체입니다.


\documentclass[11pt, letterpaper]{article}

\usepackage{subfiles} % these are for splitting the sections into individual files.
\usepackage{refcount}
\usepackage{xr}
\usepackage{titlesec}
\newcommand{\sectionbreak}{\clearpage}

\usepackage[head=14pt]{ geometry}
\usepackage{fancyhdr}
\pagestyle{fancy}
\lhead{Mathematical Methods of Physics}                
\usepackage[parfill]{parskip}
\setlength{\parindent}{15pt}
\usepackage{graphicx}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{indentfirst}
\usepackage[shortlabels]{enumitem}
\usepackage{soul}
\usepackage{setspace}
\usepackage{cite,latexsym}
\usepackage{url}
\usepackage{caption}
\usepackage{nicefrac}

\usepackage{hyperref}
\hypersetup
{
  colorlinks   = true,    % Colours links instead of ugly boxes
  urlcolor     = purple,  % Colour for external hyperlinks
  linkcolor    = blue,    % Colour of internal links
  citecolor    = red      % Colour of citations
}

\usepackage{fancyhdr}

\pagestyle{fancy}

\lhead{\hyperref[ToCL]{\leftmark}}
\rhead{\rightmark}
\rfoot{\hyperref[firstpage]{Mathematical Methods of Physics}}
\cfoot{}
\lfoot{\thepage}



\DeclareGraphicsRule{.tif}{png}{.png}{`convert #1 `dirname #1`/`basename #1 .tif`.png}
\renewcommand{\abstractname}{}
\addtolength{\topmargin}{-0.25in}
\addtolength{\textheight}{1.25in}

\graphicspath{ {./graphics/} }

\setul{4pt}{.4pt}
\newcommand{\tabletitle}[1]{\caption*{\ul{#1}}}
\newcommand{\<}{\:\!}
\newcommand{\bull}{\, \vcenter{\hbox{\tiny$\bullet$}} \,} % middle sized dot, between \cdot and \bullet, in math mode
\newcommand{\inv}{\:\!{\text -}1}
\newcommand{\dd}{\mathrm{d}}
\newcommand{\dx}{\mathrm{d}x}
\newcommand{\ddx}{\dfrac{\mathrm{d}}{\mathrm{d} x} \,}
\newcommand{\pd}[1]{\dfrac{\partial}{\partial{#1}}}
\newcommand{\ppd}[2]{\dfrac{\partial{#1}}{\partial{#2}}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\C}{\mathbb{C}}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\I}{\mathbb{I}} % capitol letter i, for identity element or matrix
\newcommand{\ee}{\, \mathrm{e}}
\newcommand{\ves}[1]{\skew{-2} \vec{#1}}
\newcommand{\px}{\partial_x}
\newcommand{\py}{\partial_y}
\newcommand{\pz}{\partial_z}


\title{Mathematical Methods of Physics}
\author{Martin F. Melhus}
\date{\today}

\parindent=0pt
\begin{document}
\label{firstpage}
\phantomsection

\begin{center}

{\huge Mathematical Methods of Physics}

\vspace{6pt}

Physics 309, section A

Fall 2019
\end{center}

\vspace{12pt}

Physics 309 covers the mathematical methods of physics.  The class meets three hours a week, at times to be arranged.  The instructor is Professor Martin Melhus.  Dr.\ Melhus's office is in Kirkbride Hall, room 246, and his campus phone extension is 4377. Dr.\ Melhus will post his schedule and office hours outside his office; he is also available outside these hours by appointment.

The textbook is \emph{Mathematical Methods for Physics and Engineering}, by Riley, Hobson, and Bence, 3$^{rd}$ edition, Cambridge University Press.  References to the text in these notes will simply be page numbers in square brackets [ ].

The class is divided into several sections, each addressing a different topic.  Those topics are:

\begin{enumerate}[1.]
\item \hyperref[sec01]{Fundamentals}
\item \hyperref[sec02]{Vector Calculus} (Differentiation) % only chapters written so far
\item Calculus of Variations
\item Generalized Integration
\item Complex Variables
\item Matrices, Linear Algebra, Vector Spaces, and Function Spaces
\item Ordinary Differential Equations (Overview)
\item Partial Differential Equations\\[6pt]
(if time permits)
\item Special Functions
\item Tensors
\end{enumerate}

\vspace{6pt}
There will be one oral midterm approximately three fifths of the way through the semester, and a written take home final exam due during finals week.  The instructor may also add a second oral exam as part of the final exam if it is deemed necessary.

Homework will be assigned approximately bi-weekly, with due dates stated as part of the assignment.  Grading for the class will be as follows (subject to modification by the professor):

\begin{table}[h]
\begin{center}
\begin{tabular}{l l l}
Homework & $\quad$ & 40\%\\[3pt]
Participation & & 10\%\\[3pt]
Midterm Exam & & 20\%\\[3pt]
Final Exam & & 30\%\\
\end{tabular}
\end{center}
\end{table}

\thispagestyle{empty}
\phantomsection

\tableofcontents

\label{ToCL}

\pagenumbering{roman}
\clearpage

\pagenumbering{arabic}
\setcounter{page}{1}

\subfile{N-01}

\subfile{N-02}

%\subfile{N-03}

\end{document}

섹션 1의 시작 부분은 다음과 같습니다.

\documentclass[main]{subfiles}

\ifcsname preamble@file\endcsname
  \externaldocument[main-]{main}
  \setcounter{page}{\getpagerefnumber{main-n01m}}
\fi

\begin{document}
\label{n01}

\section{Fundamentals}
\label{sec01}

We begin the course by examining the fundamental mathematical principles that we already know, insuring that we understand them to sufficient depth to build a complete and coherent mathematical structure upon them.  Much of this section should be well understood by the student; the professor feels that, despite this, it is best to formalize that understanding.


\subsection{Equality}
The idea of equality is so fundamental to mathematics that we must begin by defining the concept of equality, with the following three statements [1064]:

\begin{table}[h]
\begin{center}
\begin{tabular}{l l l}
Reflexive principle & $\quad $ &$a = a$\\[1mm]
Symmetry principle & & If $a = b$ then $b = a$\\[1mm]
Transitive principle & & If $a = b$ and $b = c$ then $a = c$
\end{tabular}
\end{center}
\end{table}

These principles allow us to understand what constitutes the mathematical concept we call `equals'.  These ideas are so deeply ingrained in our mathematical thinking that we often do not consider them, but simply use them appropriately.  The ideas that they represent, that a thing is equal to itself, that if a first thing is equal to a second then perforce the second thing is equal to the first, and so forth, are fundamental, but need to be examined critically and formalized.


\subsubsection{Inequalities}

In addition to equals, $=$, we have a number of other symbols that express a relation between elements of sets.  The more commonly used ones are listed below, and explained.

(and so on, ....)

답변1

확인 \hypertarget하고 \hyperlink. 모든 링크에는 이름이 할당되어 있으며 일반적으로 aux 파일을 보면 찾을 수 있습니다. 최악의 경우 PDF를 ASCII 파일로 열고 /Names.

\documentclass{article}
\usepackage[colorlinks]{hyperref}
\begin{document}
\tableofcontents

\section{name}

This should also link to the \hyperlink{section.1}{section}.
\end{document}

관련 정보