Document Classesbeamer | Insert PDF and XLS Files

Information and discussion about specific document classes and how to create your own document classes.
paulosousa
Posts: 90
Joined: Sun Jun 24, 2012 8:48 pm

beamer | Insert PDF and XLS Files

Post by paulosousa »

Hello,

I am trying to insert PDF and XLS files into beamer presentation. The idea is in slide / frame 4 I need to put
  • a 'link' to open a certain PDF file and then get back to presentation
  • a 'link' to open a certain XLS file and then get back to presentation
  • a 'link' to open a certain internet page and then get back to presentation (do not work clicking on it)
Is this possible? How can I do it?

Code: Select all

\documentclass[11pt, compress, spanish]{beamer}
\usepackage{beamerthemeshadow}
\usepackage[spanish]{babel}
\usepackage[applemac]{inputenc}
\usepackage{amsmath,amssymb,amsfonts,textcomp,setspace,graphicx,lipsum,hanging,url}
\usepackage[bottom]{footmisc}
\usepackage[none]{hyphenat}

\usetheme{Warsaw}

\expandafter\def\expandafter\insertshorttitle\expandafter{%
  \insertshorttitle\hfill%
  \insertframenumber\,/\,\inserttotalframenumber}
  
\setbeamertemplate{footnote}{%
 \hangpara{0.25cm}{1}%
 \makebox[0.25cm][l]{\insertfootnotemark}\footnotesize\insertfootnotetext\par%
}

\renewcommand*{\footnoterule}{}

\title{TITLE}
\subtitle{...}
\author{name of author}
\institute {...}
\date{\footnotesize{29 enero 2013}}

\begin{document}
\setbeamertemplate{caption}[numbered]
\frame{\titlepage}
\frame{\tableofcontents}

\section{Introducción}
\begin{frame}
\frametitle{Introducción}
...fazer a introdução
\end{frame}

\begin{frame}
\frametitle{Introducción}
\begin{block}{...}
\begin{itemize}
\item  (open the pdf file)
\item  (open the xls file)
\item  \url{http://www.google.com}
\end{itemize}
\end{block}
\end{frame}

\section{Referencias Bibliográficas}
\begin{frame}
\frametitle{Referencias Bibliográficas}
\begin{thebibliography}{6}
\bibitem{ref1} AUTOR (ano) {\em título} ...
\bibitem{ref2} AUTOR (ano) {\em título} ...
\bibitem{ref3} AUTOR (ano) {\em título} ...
\end{thebibliography}
\end{frame}

\end{document}

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

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

beamer | Insert PDF and XLS Files

Post by Stefan Kottwitz »

For links, hyperref is the best choice.

Regarding inserting XLS and other file formats, you could use Stefan
LaTeX.org admin
paulosousa
Posts: 90
Joined: Sun Jun 24, 2012 8:48 pm

beamer | Insert PDF and XLS Files

Post by paulosousa »

Hi Stefan,

well I tryed but no success

Code: Select all

\usepackage{amsmath,amssymb,amsfonts,textcomp,setspace,graphicx,lipsum,hanging,url,hyperref,embedfile}
this doesn't work

Code: Select all

\embedfile{Workbook1.xlsx}
when I click on the link returns to page 1 of presentation!

Code: Select all

\hyperref[GoogleDocs]{http://www.google.com}
Also tryed to put color for the link but no success

Could you please help me?
User avatar
Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

beamer | Insert PDF and XLS Files

Post by Stefan Kottwitz »

paulosousa wrote:

Code: Select all

\hyperref[GoogleDocs]{http://www.google.com}
This syntax would create a link to a reference made with \label{http://www.google.com}. This command would work in the way \hyperref{URL}{category}{name}{text} creating a link to URL#category.name.

However, I guess you would like to use the simpler \href:

Code: Select all

\href{http://www.google.com}{GoogleDocs}
Stefan
LaTeX.org admin
paulosousa
Posts: 90
Joined: Sun Jun 24, 2012 8:48 pm

beamer | Insert PDF and XLS Files

Post by paulosousa »

used your suggestion, but is suposed to open the wepage when I click it in the presentation? Did not work

I also need to open a pdf file and then return to the presentation but

Code: Select all

\embedfile{file.pdf}
did not work
and also

Code: Select all

\embedfile{Workbook1.xlsx}
did not work

do you have any suggestion?
User avatar
Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

beamer | Insert PDF and XLS Files

Post by Stefan Kottwitz »

Try attachfile2. The attaching operation is different to embedding.

Stefan
LaTeX.org admin
paulosousa
Posts: 90
Joined: Sun Jun 24, 2012 8:48 pm

beamer | Insert PDF and XLS Files

Post by paulosousa »

Stefan_K wrote:Try attachfile2. The attaching operation is different to embedding.

Stefan
Can't do it Stefan, I tryied but it does not work
do you have any idea to help me please?
User avatar
Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Re: beamer | Insert PDF and XLS Files

Post by Stefan Kottwitz »

I don't know what you tried, so I cannot say why it did not work. For general explanation I would have to repeat the manual first. Did you read it, and what did you try?

Stefan
LaTeX.org admin
paulosousa
Posts: 90
Joined: Sun Jun 24, 2012 8:48 pm

beamer | Insert PDF and XLS Files

Post by paulosousa »

Stefan_K wrote:I don't know what you tried, so I cannot say why it did not work. For general explanation I would have to repeat the manual first. Did you read it, and what did you try?

Stefan
1st
using

Code: Select all

\href{http://www.google.com}{GoogleDocs}
the webpage does not open? no action when clicking! Why?


2nd
to open an excel file and a pdf file I tried

Code: Select all

\attachfile{Workbook1.xlsx}

Paulo
User avatar
Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

beamer | Insert PDF and XLS Files

Post by Stefan Kottwitz »

Hi Paulo,
paulosousa wrote:using

Code: Select all

\href{http://www.google.com}{GoogleDocs}
the webpage does not open? no action when clicking! Why?
The syntax is correct. And it works for me, as in this example:

Code: Select all

\documentclass{article}
\usepackage{hyperref}
\begin{document}
\href{http://www.google.com}{GoogleDocs}
\end{document}
Perhaps try this small example first, before troubleshooting a big one. I also tried it in the document of your first post in this topic, i.e. inserting \usepackage{hyperref} and this line: it worked.

Links would be inactive if you would use the draft option. Another possibility is that your PDF viewer is not capable of opening links, or its security settings don't allow it. Which one do you use? Try a different one.
paulosousa wrote:to open an excel file and a pdf file I tried

Code: Select all

\attachfile{Workbook1.xlsx}
Similar to above, the syntax is correct. Also here, possible the PDF viewer program doesn't support attachments. You could tell more details, such as giving a full Infominimal working example and posting the .log and the .pdf file as attachments.

Stefan
LaTeX.org admin
Post Reply