I'm not very familiar with beamer
presentations in LyX, but I will quote a passage from the beamer
manual, page 18-19 (emphasis mine):
\usepackage{pdfpages}
Commands like \includepdf
only work outside frames as they produce pages “by themselves.” You may also wish to say
\setbeamercolor{background canvas}{bg=}
when you use such a command since the background (even a white
background) will otherwise be printed over the image you try to
include. Example:
\begin{document}
\begin{frame}
\titlepage
\end{frame}
{
\setbeamercolor{background canvas}{bg=}
\includepdf{somepdfimages.pdf}
}
\begin{frame}
A normal frame.
\end{frame}
\end{document}
LyX doesn't use \begin{frame}
/\end{frame}
, it defines some custom commands instead (\lyxframe
/\lyxframeend
), but the same point applies I would guess: the \includepdf
cannot be inside a frame, so you have to place after a \lyxframeend
(EndFrame from the style menu), before the next \lyxframe
(BeginFrame from the style menu).
The second point requires an ERT. Create one with Ctrl + L (or Insert --> TeX code) just before the inserted PDF, and write
{\setbeamercolor{background canvas}{bg=}
in it. Add a second ERT just after, and add a closing brace, }
, in this. This is probably why the PDF didn't appear, because it is covered by the background colour. The braces are necessary to keep the redefinition of the background colour to that single slide.
Possible alternative, \includegraphics
Depending on what you're after, you can perhaps use the standard Insert --> Graphics to insert the page. In the LaTeX and LyX options you can add page=5
to insert page number 5 of the PDF. As this is inserted as an image, the header, footer etc. of your presentation will be visible.
The image logo.png
is much too large for the header, from the .log
file:
Package Fancyhdr Warning: \headheight is too small (12.0pt):
Make it at least 56.17505pt.
We now make it that large for the rest of the document.
This may cause the page layout to be inconsistent, however.
Also package geometry
throws a warnings:
Package geometry Warning: Over-specification in `h'-direction.
`width' (597.50787pt) is ignored.
Package geometry Warning: Over-specification in `v'-direction.
`height' (845.04684pt) is ignored.
Removing option scale
and adding headheight
fixes these issues:
\usepackage[a4paper, twoside,
hmargin={3.3cm, 2.7cm},
vmargin={2cm, 4.5cm},
headheight=56.17505pt,
headsep=0.5cm]{geometry}
The warning
pdfTeX warning (ext4): destination with the same identifier
(name{page.1}) has been already used, duplicate ignored
can be avoided by disabling page anchors for the title page:
\begin{document}
\hypersetup{pageanchor=false}
...
\maketitle
\hypersetup{pageanchor=true}
Best Answer
Unfortunately
-
is made into an active shorthand character by theczech
babel option, you can useJust before the pdf inclusion to make
-
safe again. Normally this is inside a group so-
will regain itsbabel
meaning, or you could use\shorthandon
to explicitly reset it.