生成讲义目录

生成讲义目录

John WatrouS 对量子计算给出了精彩的注释:

https://cs.uwaterloo.ca/~watrous/QC-notes/

但是没有目录。我不需要确切的页码,但至少需要每个讲座的正确标题和正确的讲座顺序。

每个讲座都有单独的 pdf 文件。如何通过合并每个讲座的 pdf 文件来获取这些笔记的表格内容页面。

答案1

同一链接提供了一个包含所有讲座的集合以及相关页码的单个文件。(QC-notes.pdf

所有 22 个讲座都在一个文件中

  1. 作为一次性工作,ToC 是使用以下工具手动构建的:

\contentsline{unit}{text}{pagenumber}

  1. 为了操纵\contentline材料的组成方式, tocloft使用了包装。
  2. 为了匹配页面布局,geometry使用了该包。
  3. 使用该软件包 (139 页)QC-notes.pdf包含了包含讲座完整笔记的原始 pdf ( )。pdfpages
  4. 最终 pdf 文件的书签也是手动添加的(包 bookmark)。
  5. 最后,添加了封面和从作者网站摘录的最终许可说明。

C

% !TeX TS-program = pdflatex
    
\documentclass[oneside]{book}
\usepackage[letterpaper, left=1in, right= 1in, top=1in]{geometry} % set the margins
\usepackage{pdfpages}% import the pdf
\usepackage[open]{bookmark} % add bookmarks to the pdf file
    
\usepackage{tocloft}% configure the ToC
\setlength{\cftbeforechapskip}{3ex}      % vertical space before the title
\setlength{\cftchapindent}{1em }         % space before the numner (like Lecture 1:)
\setlength{\cftchapnumwidth}{6.5em }     % width of the chapter number box
\cftsetpnumwidth{4ex}                    % width of the page number box
\renewcommand{\cftchapfont}{\large}
\cftsetrmarg{6ex plus1fil}                  % avoid hyphens 

% to cover page
\title{\bfseries Quantum Computation \\ \bigskip \normalsize Lecture notes}
\date{\vfill Latest update: April 11, 2006}
\author{John Watrous \\ Professor (on leave), Institute for Quantum Computing\\ 
    and Cheriton School of Computer Science\\   
    University of Waterloo}

\pagestyle{empty}

\begin{document}

\maketitle % cover page
    
\noindent{\bfseries{\huge Contents}\hfill Page  \vspace*{3ex}\par }

    % build the ToC
\contentsline {chapter}{\numberline {Lecture 1:}Overview of quantum information}{1}{}
\contentsline {chapter}{\numberline {Lecture 2:}Overview of quantum information (continued)}{6}{}
\contentsline {chapter}{\numberline {Lecture 3:}Superdense coding; quantum circuits, and partial measurements}{14}{}
\contentsline {chapter}{\numberline {Lecture 4:}Quantum Teleportation; Deutsch's Algorithm}{22}{}
\contentsline {chapter}{\numberline {Lecture 5:}A simple searching algorithm; the Deutsch-Jozsa algorithm}{28}{}
\contentsline {chapter}{\numberline {Lecture 6:}Simon's algorithm}{34}{}    
\contentsline {chapter}{\numberline {Lecture 7:}Arithmetic/number--theoretic problems; reversible computation}{39}{}
\contentsline {chapter}{\numberline {Lecture 8:}Phase estimation}{48}{}
\contentsline {chapter}{\numberline {Lecture 9:}Phase estimation (continued); the quantum Fourier transform }{55}{}
\contentsline {chapter}{\numberline {Lecture 10:}Order finding}{61}{}
\contentsline {chapter}{\numberline {Lecture 11:}Order finding (continued); reducing factoring to order finding}{66}{}
\contentsline {chapter}{\numberline {Lecture 12:}Grover's Algorithm}{70}{}
\contentsline {chapter}{\numberline {Lecture 13:}Grover’s Algorithm (continued)}{76}{}
\contentsline {chapter}{\numberline {Lecture 14:}Quantum information revisited}{81}{}
\contentsline {chapter}{\numberline {Lecture 15:}Quantum information revisited (continued)}{88}{}
\contentsline {chapter}{\numberline {Lecture 16:}Quantum error correction}{94}{}
\contentsline {chapter}{\numberline {Lecture 17:}General quantum errors; CSS codes}{102}{}
\contentsline {chapter}{\numberline {Lecture 18:}Quantum Key Distribution}{109}{}
\contentsline {chapter}{\numberline {Lecture 19:}Impossibility of Quantum Bit Commitment}{115}{}
\contentsline {chapter}{\numberline {Lecture 20:}Bell inequalities and nonlocality}{120}{}
\contentsline {chapter}{\numberline {Lecture 21:}Quantum communication complexity}{126}{}
\contentsline {chapter}{\numberline {Lecture 22:}Quantum communication complexity}{133}{}
\contentsline {chapter}{\numberline {About}}{140}{}

% addign the bookmarks <<<<<<<<<<<<<<<
\bookmark[page=1]{Cover}
\bookmark[page=2]{Contents}
\bookmark[page=3]{Lecture 1: Overview of quantum information}
\bookmark[page=8]{Lecture 2: Overview of quantum information (continued)}
\bookmark[page=16]{Lecture 3: Superdense coding; quantum circuits, and partial measurements}
\bookmark[page=24]{Lecture 4: Quantum Teleportation; Deutsch's Algorithm}
\bookmark[page=30]{Lecture 5: A simple searching algorithm; the Deutsch-Jozsa algorithm}
\bookmark[page=36]{Lecture 6: Simon's algorithm}
\bookmark[page=41]{Lecture 7: Arithmetic/number-theoretic problems; reversible computation}
\bookmark[page=50]{Lecture 8: Phase estimation}
\bookmark[page=57]{Lecture 9: Phase estimation (continued); the quantum Fourier transform}
\bookmark[page=63]{Lecture 10: Order finding }
\bookmark[page=68]{Lecture 11: Order finding (continued); reducing factoring to order finding }
\bookmark[page=72]{Lecture 12: Grover's Algorithm }
\bookmark[page=78]{Lecture 13: Grover’s Algorithm (continued)}
\bookmark[page=83]{Lecture 14: Quantum information revisited}
\bookmark[page=90]{Lecture 15: Quantum information revisited (continued)}
\bookmark[page=96]{Lecture 16: Quantum error correction}
\bookmark[page=104]{Lecture 17: General quantum errors; CSS codes}
\bookmark[page=111]{Lecture 18: Quantum Key Distribution}
\bookmark[page=117]{Lecture 19: Impossibility of Quantum Bit Commitment}
\bookmark[page=122]{Lecture 20: Bell inequalities and nonlocality}
\bookmark[page=128]{Lecture 21: Quantum communication complexity}
\bookmark[page=135]{Lecture 22: Quantum communication complexity }
\bookmark[page=142]{About}

\mainmatter

\includepdf[pages=-]{QC-notes}

\chapter*{About} % license page
\parindent 0pt
\sffamily \Large
These lecture notes may be used and distributed freely, for individual study or by course instructors. They may not be sold.

These are ancient lecture notes for an introductory undergraduate course on quantum computing taught at the University of Calgary in Spring 2006. They are not being maintained.

Latest update: April 11, 2006 \bigskip

\copyright2006 John Watrous 

\end{document}

选项

这是另一种变体,用于hyperref创建书签以及目录中的链接(新);并用于pdfpages生成目录(像以前一样手动检索讲座标题和页码)

\includepdf使用addtotoc={page number,section,level,heading,label}(此处使用 section=chapter,level =0)

d

% !TeX TS-program = pdflatex
    
\documentclass[oneside]{book}
\usepackage[letterpaper,left=1in,right= 1in,top=1in]{geometry} % set the margins
\usepackage{pdfpages}% import the pdf and make ToC
    
\usepackage{tocloft}% configure the ToC
\setlength{\cftbeforechapskip}{2ex}      % vertical space before the title
\renewcommand\cftchappresnum{Lecture~}
\setlength{\cftchapindent}{3ex }         % space before the number (like Lecture 1:)
\setlength{\cftchapnumwidth}{6.5em }     % width of the chapter number box
\cftsetpnumwidth{4ex}                    % width of the page number box
\renewcommand{\cftchapfont}{\large}
\cftsetrmarg{6ex plus1fil}                  % avoid hyphens 

% to cover page
\title{\bfseries Quantum Computation \\ \bigskip \normalsize Lecture notes}
\date{\vfill Latest update: April 11,2006}
\author{John Watrous \\ Professor (on leave),Institute for Quantum Computing\\  
    and Cheriton School of Computer Science\\   
    University of Waterloo}



\usepackage[plainpages=false,pdfpagelabels,bookmarksopen]{hyperref} % bookmarks and links in ToC

\begin{document}
\frontmatter
\maketitle % cover page     
    
\tableofcontents
\thispagestyle{empty}
\mainmatter

 %add pdf and build the ToC     
\includepdf[pages=-,
pagecommand={},
addtotoc={%
1,chapter,0,Overview of quantum information,Lec:1,
6,chapter,0,Overview of quantum information (continued),Lec:2,
14,chapter,0,Superdense coding; quantum circuits; and partial measurements,Lec:3,
22,chapter,0,Quantum Teleportation; Deutsch's Algorithm,Lec:4,
28,chapter,0,A simple searching algorithm; the Deutsch-Jozsa algorithm,Lec:5,
36,chapter,0,Simon's algorithm,Lec:6,
39,chapter,0,Arithmetic/number--theoretic problems; reversible computation,Lec:7,
48,chapter,0,Phase estimation,Lec:8,
55,chapter,0,Phase estimation (continued) ; the quantum Fourier transform,Lec:9,
61,chapter,0,Order finding,Lec:10,
66,chapter,0,Order finding (continued) ;  reducing factoring to order finding,Lec:11,
70,chapter,0,Grover's Algorithm,Lec:12,
76,chapter,0,Grover’s Algorithm (continued),Lec:13,
81,chapter,0,Quantum information revisited,Lec:14,
88,chapter,0,Quantum information revisited (continued),Lec:15,
94,chapter,0,Quantum error correction,Lec:16,
102,chapter,0,General quantum errors; CSS codes,Lec:17,
109,chapter,0,Quantum Key Distribution,Lec:18,
115,chapter,0,Impossibility of Quantum Bit Commitment,Lec:19,
120,chapter,0,Bell inequalities and nonlocality,Lec:20,
126,chapter,0,Quantum communication complexity,Lec:21,
133,chapter,0,Quantum communication complexity,Lec:22
}]{QC-notes.pdf}
    
\chapter*{About} % license page
\addcontentsline{toc}{chapter}{About}
\parindent 0pt
\sffamily \Large
These lecture notes may be used and distributed freely,for individual study or by course instructors. They may not be sold.

These are ancient lecture notes for an introductory undergraduate course on quantum computing taught at the University of Calgary in Spring 2006. They are not being maintained.

Latest update: April 11,2006 \bigskip

\copyright2006 John Watrous 

\end{document}

相关内容