LyX ⇒ How to paginate sections of an inserted pdf-document
How to paginate sections of an inserted pdf-document
Each article has their sections and subsections.
I pretend that each section appears in the TOC with their respective page.
Previous to each article if I add this one,
\addcontentsline{toc}{section}{whatever you want to appear},
these sections appear in the TOC, but all the sections-subsections of the same article appear with the same page.
Is there any way to relate one section with the corresponding page?
How could I paginate the following example:
"Introduction of the chapter... (pp.1-6)
(start of pdf document)
section 1 (p. 7)
subsection 1.1 (p. 7)
subsection 1.2 (p. 8)
Section 2 (p. 8)
(...)"
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
-
- Posts: 126
- Joined: Sun Feb 13, 2011 8:36 pm
How to paginate sections of an inserted pdf-document
In the following example, I include pages 2 and 3 from the clsguide into a document with the sections showing up correctly in the TOC. However, usually the page numbering from the included PDF won't match and the result might be distracting.
Code: Select all
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{pdfpages}
\begin{document}
\tableofcontents
\section{Some Stuff of My Own}
Text I have written myself\dots
\subsection{Something Else}
More text I have written myself\dots
\clearpage
\addcontentsline{toc}{section}{Introduction \emph{(from the clsguide)}}
\addcontentsline{toc}{subsection}{Writeing classes and packages for \LaTeXe}
\includepdf[page=2]{clsguide}
\clearpage
\addcontentsline{toc}{subsection}{Overview}
\addcontentsline{toc}{subsection}{Further information}
\includepdf[page=3]{clsguide}
\section{Again my Own Stuff}
And my own text\dots
\end{document}
-
- Posts: 126
- Joined: Sun Feb 13, 2011 8:36 pm
How to paginate sections of an inserted pdf-document
Re: How to paginate sections of an inserted pdf-document
Thanks a lot, 5gon12eder.