LyX ⇒ Exporting only two pages to PDF
-
- Posts: 128
- Joined: Wed Jul 04, 2012 5:34 pm
Exporting only two pages to PDF
I only want to export two pages of my lyx file. Instead of viewing all 322 pages in pdflatex, I only want to view pages 84 and 236 how do I compile just those two pages?
Thanks
I'm using windows with LyX 2.0 and MiKTeX 2.9
I'm designing a book using the Koma-script class
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
- Stefan Kottwitz
- Site Admin
- Posts: 10335
- Joined: Mon Mar 10, 2008 9:44 pm
Exporting only two pages to PDF

Stefan
-
- Posts: 128
- Joined: Wed Jul 04, 2012 5:34 pm
Exporting only two pages to PDF
Code: Select all
\usepackage{pdfpages}
Then I entered
Code: Select all
\includepdf[pages={84,200}]{my_document.pdf}
http://texdoc.net/texmf-dist/doc/latex/ ... fpages.pdf
An example at the bottom of page 2 of this document would be helpful, because it's not very clear how I'm supposed to enter the command.
What did I do wrong?
I'm using windows with LyX 2.0 and MiKTeX 2.9
I'm designing a book using the Koma-script class
-
- Site Moderator
- Posts: 542
- Joined: Sat Sep 01, 2012 6:38 am
Exporting only two pages to PDF
In LyX, start a new document and go toinsipidtoast wrote:I started a new lyx file and enteredinto the preamble.Code: Select all
\usepackage{pdfpages}
Then I enteredas an ERT and it didn't work. I tried entering the same command in the document preamble, and it still didn't work. I'm guessing I wrote the command wrong.Code: Select all
\includepdf[pages={84,200}]{my_document.pdf}
http://texdoc.net/texmf-dist/doc/latex/ ... fpages.pdf
An example at the bottom of page 2 of this document would be helpful, because it's not very clear how I'm supposed to enter the command.
What did I do wrong?
Insert > File > External Material.
Then, under "Template", select "PDF Pages" and follow the instructions there.
Note that in LyX it will only show a thumbnail of the first page. The output will be fine though.
Scott
-
- Posts: 128
- Joined: Wed Jul 04, 2012 5:34 pm
Exporting only two pages to PDF
Thanks for your input. Those instructions, however, tell me even less than what the pdfpages pdf tells me.
That's where I need some clarification. If I just want to view pages 84 and 200 as their own pdf document then do I simply type as an ERT:
Code: Select all
pages={84,200}
In short, where and how do I enter the command?
I'm using windows with LyX 2.0 and MiKTeX 2.9
I'm designing a book using the Koma-script class
-
- Site Moderator
- Posts: 542
- Joined: Sat Sep 01, 2012 6:38 am
Exporting only two pages to PDF
See the attached example. It will pick pages 3 and 6 of the attached pdf by enteringinsipidtoast wrote:Scott,
Thanks for your input. Those instructions, however, tell me even less than what the pdfpages pdf tells me.
That's where I need some clarification. If I just want to view pages 84 and 200 as their own pdf document then do I simply type as an ERT:in the document just before the box for my pdf that I inserted.Code: Select all
pages={84,200}
In short, where and how do I enter the command?
Code: Select all
pages={3,6}
Scott
- Attachments
-
- screenshot
- pdfpages_example.png (35.06 KiB) Viewed 22580 times
-
- RJournal_2011-1_Wickham.pdf
- (151.86 KiB) Downloaded 378 times
-
- pdfpages_example.20.lyx
- (1.34 KiB) Downloaded 518 times
-
- Posts: 128
- Joined: Wed Jul 04, 2012 5:34 pm
Re: Exporting only two pages to PDF
YOu are the best!
I'm using windows with LyX 2.0 and MiKTeX 2.9
I'm designing a book using the Koma-script class
-
- Site Moderator
- Posts: 542
- Joined: Sat Sep 01, 2012 6:38 am
Re: Exporting only two pages to PDF
Note that pdftk is a great tool to have for these situations. I think it is available for Windows but not sure.
-
- Posts: 128
- Joined: Wed Jul 04, 2012 5:34 pm
Re: Exporting only two pages to PDF
I'm using windows with LyX 2.0 and MiKTeX 2.9
I'm designing a book using the Koma-script class
-
- Site Moderator
- Posts: 542
- Joined: Sat Sep 01, 2012 6:38 am
Exporting only two pages to PDF
Most advanced LaTeX users do not use LyX. The ones around here are very nice to go out of their way to give LyX-specific solutions. I am not an advanced LaTeX user but I used to like writing LaTeX directly in vim. I personally like using LyX better now because it makes LaTeX accessible to everyone and at the same time provides some advanced features for power-users. It's also extremely extensible, especially if you know C++ and/or Python, but even if you don't.insipidtoast wrote:It's weird, you know the lyx way of doing everything, whereas everyone else on here only knows latex code.
Scott