5

I want to add the pdf slides into a lyx document. That means: for each page in pdf document insert it to the lyx document and seperate it from other slides. I need it for adding notes to lectures.

In Microsoft PowerPoint I can add to each slide notes. I need the same thing in Lyx.

3
  • 1
    Welcome to TeX.SX. Is this a presentation created with beamer in LyX, or an externally created PDF? – Torbjørn T. Nov 25 '13 at 17:24
  • it is an externall. – Nimo Nov 27 '13 at 16:25
  • I shall shamelessly promote my own, but related, answer: tex.stackexchange.com/a/146920/18228 :) – Herr K. Nov 30 '13 at 1:02
7

I don't understand exactly what you want to achieve, so there are two parts to this answer.

pdfpages

This technique will let you distribute all the pages of a PDF across as many pages as necessary of a LyX document. I don't know if it's possible to add notes within LyX next to each page/slide, for that purpose the other technique (see below) would be better, though it is more tedious.

  1. Insert --> File --> External material, choose the PDF you want to include, and set the template to PDFPages

    enter image description here

  2. Go to the second tab, LaTeX and LyX options. Say you want to have three slides per page, then you can add the following in the Option box:

    pages=-,nup=1x3,frame,delta=0 1cm,offset=-5cm 0,width=.8\linewidth
    
    • pages=- says to include all the pages in the PDF.
    • nup=1x3 says to organize the pages in 1 column and 3 rows per page.
    • frame draws a thin black frame around each slide.
    • delta=0 1cm adds space between each slide, 0 between columns (there is just one, so none is needed), 1cm between rows.
    • offset=-5cm 0 shifts all the slides 5cm to the left (negative x-direction). The default is to place the slides in the middle of the page, this pushes them to the left, making room for notes on the right.
    • width=.8\linewidth reduces the size of each slide a little.

The result would look something like this (three pages, with a total of nine slides):

enter image description here

Adding a single page from a PDF as a graphic

To add a specific page from a PDF, choose Insert --> Graphics or click the button on the toolbar, as usual when inserting images. Choose your PDF, go to the LaTeX and LyX options tab, and add page=N, where N is the page number, in the LaTeX options box:

enter image description here

You could for example use a two column (long)table or a pair of minipages to add notes next to the image(s).

1
  • the major issue with these two methods though is that lyx showes only the first page in the preview. using clipping becomes a nightmare... – Sparkler Dec 9 '14 at 16:50
1

Burst the PDF file into seperate PDFs (one per page) and include them as an image to your document separately. Insert page breaks if needed.

For example, if you have pdftk installed, you can run the following command in the terminal:

pdftk yourSlides.pdf burst 

This will create a couple of files "pg_0001.pdf", "pg_0002.pdf", etc., which you can include as images when using pdflatex.

6
  • Why should one spit the PDF into seperate files? LaTeX can easily emebed specific pages of a PDF. – Martin Schröder Nov 26 '13 at 11:38
  • I am searching for a code that do it. – Nimo Nov 27 '13 at 16:25
  • @MartinSchröder: In order to allow the OP to use the "insert image" feature of LyX. Inserting specific pages of a PDF file will probably require inserting custom LaTeX commands. – DCTLib Nov 28 '13 at 16:32
  • @Ruedi: I don't do Lyx - you mean Lyx can not embed a specific page of a multi-page pdf? – Martin Schröder Nov 28 '13 at 16:35
  • 2
    @MartinSchröder Yes it can. Rudie: Insert --> Graphics, choose the multipage PDF, under LaTeX and LyX options write page=10 in the LaTeX options box to include the tenth page of the PDF. – Torbjørn T. Nov 28 '13 at 23:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.