I'm trying to use LaTeX for lecture notes, but am having trouble implementing it the way I want to. For each lecture I will have access to a PDF file with presentation slides, where one slide corresponds to one page. I would like to be able to import these slides and put them at the top of my document's pages, and then have writing associated with that slide displayed below. During the lecture, I would write something like \slide{23}{Example text}
, to have "Example text" displayed below slide 23. I won't have something to write for every slide, so they will need to be added to the top of every page without my having to write \slide{24}{}
for instance, if I don't have anything to say about slide 24.
I'm a novice when it comes to LaTeX, so I don't know where to start for something like this, and would greatly appreciate some pointers or useful links. My general idea for how to proceed is this:
Get the number of pages of the pdf file to be imported with
\pdfximage{lecture_slides.pdf}
\the\pdflastximagepages
Note: I will be using pdflatex
, so this should work.
Define a command \slide{}{}
that takes a number and a string as mandatory arguments. The number is saved in a list that contains the number of all slides that have had text added to them.
Define a command \importslides{path}
, that counts the pages of the pdf file as mentioned above, then importing slides with \includegraphics[page number]{path}
. Presumably, I would use a for loop from 1 to the number of pages in the file for this. For every page, the command would have to check the list of slides with text, and if that particular slide is present in the list, add the string associated with it below the page.
Is this a good way to approach this problem? Does anyone have any recommendations on how to proceed, or where I can find information on how to do this kind of programming in LaTeX?
pdfpages
package and its\includepdf
command should be able to this, in a wrapper macro, preferably.