I have been searching for some automated way of numbering the references on the same slide in beamer Madrid with biblatex. This works fine with \pause and \footcite{}. But when I have multiple bullets on the same slide (e.g. 5), and I want to cite for the last point, the problem is that the reference appears from the very first slide. I want that the reference appears only when the relevant slide appears (i.e. 5th one in this case)
\documentclass{beamer}
\mode<presentation>{\usetheme{Madrid}}
\usepackage[style=verbose]{biblatex}
\only<2->{...} etc. is one solution but I think it is a lot of manual work to update all numbers on the slide when, for instance, I need to remove (or add) one point with a reference.
Thanks.
You don't need to update any numbers if you use relative overlays instead of absolute numbers:
\documentclass{beamer}
\mode<presentation>{\usetheme{Madrid}}
\usepackage[style=verbose]{biblatex}
\addbibresource{biblatex-examples.bib}
\begin{document}
\begin{frame}
\begin{itemize}[<+->]
\item ABC \only<.->{\footcite{knuth:ct:a}}
\item XYZ \only<.->{\footcite{knuth:ct:b}}
\end{itemize}
\end{frame}
\end{document}
Related
Assume I have some sections within my latex-beamer presentation. Some of these sections contain subsections, others do not. So it looks very weird in the table of contents.
How can I suppress subsections in the table of contents?
To keep a specific subsection out of the index use:
\subsection*{...}
To remove all subsections from the TOC only, use: \tableofcontents[hideallsubsections] (added from another answer)
To hide subsections use the pretty self-explanatory:
\tableofcontents[hideallsubsections]
The same as in the other two answers can also be achieved using \setcounter{tocdepth}{1}, before (or after) \begin{document}: try to compile the following code, then delete or comment the line marked with %%% and compile again (once, or twice if necessary) to see the difference.
\documentclass{beamer}
\usetheme{Goettingen}
\setcounter{tocdepth}{1} %%%
\begin{document}
\frame{\tableofcontents}
\section{First}
\begin{frame}
A
\end{frame}
\section{Second}
\subsection{One only}
\begin{frame}
B
\end{frame}
\end{document}
At the same way as using \tableofcontents[hideallsubsections], the subsections disappear in the frame where the \tableofcontents is, but not in the sidebar (if present in the theme you use). The same, again, with local use of starred \subsection*{Subsection Title}.
I want to have the picture exactly in a specific position in my text. I use the commands below
\begin{enumerate}
\item T.D. Lee(1957 Physics Nobel Laureate)
\begin{figure}
\begin{center}
\includegraphics[scale=0.5]{TdLee.eps}
\end{center}
\end{figure}
I have many figures like this. What happens is that I see figures and items in different order. Can you let me know which latex command i should use in order to have the picture under or right to the each item?
Thanks
Kurt
To work with the standard float system, you might try the h positioner (as mentioned in another answer) but with the ! modifier as in
\begin{figure}[h!]
...
\end{figure}
There is even another H positioner, like h! but tries harder. It needs the package float
\usepackage{float}
...
\begin{figure}[H]
...
\end{figure}
but even that doesn't work many times. However since you are doing this in a list, trying to use a float might not be the best for you.
You might try to create a minipage to house the figure. Or perhaps the way to do what you want might be to omit the figure environment all together but keep the center one if you want it.
If you know exactly where you want the figure, don't use a float (that's what the "figure" environment is)...floats are there to.....wait for it.....float!
So if you know exactly where you want your figure, simply use \includegraphics:
\begin{enumerate}
\item T.D. Lee(1957 Physics Nobel Laureate)
\begin{center}
\includegraphics[scale=0.5]{TdLee.eps}
\end{center}
...
\end{enumerate}
You can also redefine the enumerate environment so that you do not have to surround each picture with a \begin{center}...\end{center} environment, but if you are interested in how to do that, I'll leave it for a separate question. (And unapologetically suggest that you ask it on the TeX Stack Exchange, where no TeX-related question is too small.)
Try the h placement specifier. From here:
\begin{figure}[h]
\centering
\includegraphics[scale=0.5]{TdLee.eps}
\end{figure}
It does not guarantee perfect placement, but it tries.
The following simple Latex description does not result
in the slide I want it to be.
\begin{frame}
\frametitle{Previous Work}
\begin{itemize}
\item [Hummer 1992] - First work in this area was conducted by Hummer
\item [Goldreich et at. 2002] - Theoretical work that focused more on the power characteristics of embedded systems
\end{itemize}
\end{frame}
The problem is, that the text within the square brackets is cuts off. So it should look
like this:
Hummer 1992 - First work in this area was conducted
by Hummer
Goldreich et al. 2002 - Theoretical work that focused more on
the power
But it looks like this:
r 1992 - First work in this area was conducted by Hummer
l. 2002 - Theoretical work that focused more on the power
Any idea how I can sort this out.
Thanks!
As progo said, the description environment fits better than itemize.
Additionally, you could improve the alignment using the optional parameter of the description environment, specifying the width of the widest label:
\begin{frame}
\frametitle{Previous Work}
\begin{description}[Goldreich et at. 2002]
\item [Hummer 1992] First work in this area was conducted by Hummer
\item [Goldreich et at. 2002] Theoretical work that focused more
on the power characteristics of embedded systems
\end{description}
\end{frame}
Output:
(source: texblog.net)
Btw. if you would like to know how to get rid of the "default" beamer warnings have a look at this blog post regarding beamer warnings.
The itemize environment is not meant to be used with long 'bullets'. Using the description environment does a better job (which also works in beamer as I checked), but it won't align the names and descriptions as you would like to sketch out.
There's always the tabular for doing exactly what you want.
I've been struggling with this. I wanted to insert an image and have it 'near' the text that discusses it, but have the text on that page wrap/flow around the image.
The image I've converted into eps format. I initially tried to use the figure environment (\begin{figure}...), but that merely placed the image at the top or bottom of the page without any text beside it, leaving a large portion of the page empty.
I did some digging on the web and identified the 'wrapfig' package, it seemed a likely solution, but I get a series of errors, and the image appears at the end of the document.
The errors:
Package wrapfig Warning: wrapfigure used inside a conflicting environment on input line 297.
Package wrapfig Warning: Stationary wrapfigure forced to float on input line 303.
Package wrapfig Warning: Stationary wrapfigure forced to float on input line 306.
Which continues for several lines.
What's odd is that one occasion, after compiling, the image appeared exactly where I wanted it, and then on the next it didn't.
[Added a minute or so later]
The latex code I have currently:
\begin{wrapfigure}{r}{0.2\textwidth}[h]
\begin{center}
\includegraphics[width=0.18\textwidth]{vec-perp.eps}
\end{center}
\caption{A}
\end{wrapfigure}
wrapfigure does not need the [h] specifier.
you need to include the wrapfigure package in your preamble:
\usepackage{wrapfig}
then, put the wrapfigure call above the text you want to wrap into, like this:
\begin{wrapfigure}{r or l}{width/height} \centering \includegraphics[width/height]{graphic.filename} \caption{foo} \end{wrapfigure}
a real world example:
\begin{wrapfigure}{r}{1.5in}
\centering
\includegraphics[width=1.5in]{smile.jpg}
\end{wrapfigure}
I just went through my document, commenting it out in sections, hoping to find the environment it was complaining about...in the process, I unintentionally introduced a blank line that I didn't have before. Apparently, the environment it was complaining about was the environment before the figure. I didn't have a blank line between the previous part, which was an itemize environment.
So...this, for example, is 'broken':
Ingredients for the Banana-Grape Bread Recipe
\begin{itemize}
\item Bananas
\item Grapes
\item Eggs
\end{itemize}
\begin{wrapfigure}{r}{0.2\textwidth}
\centering
\includegraphics[width=0.18\textwidth]{banana-grape.eps}
\caption{BananaGrape Bread}
\end{wrapfigure}
And inserting a empty line:
\end{itemize}
\begin{wrapfigure}{r}{0.2\textwidth}
Clears up my problems. Along the way I learned all sorts of things, yay! On the other hand, I'm pretty sure I don't have a clear understanding of environments yet. Time to spend some time reading, I reckon.
I am using the beamer document class in latex to make a presentation. I will have a number of back up slides which are there for offline viewing, reference etc. Beamer has a feature that shows the progress through the presentation as {page#}/{total pages} on each slide. I would really like it if {total pages} was equivalent to my total number of pages w/out counting the back up slides (I don't want to discourage my audience on the first page!). Does anyone know how this can be done?
This can now be achieved with the following option on all "backup" slides:
\begin{frame}[noframenumbering]{My Title}
\end{frame}
Source
This will cause the final number (e.g. 25/25) to be displayed on such pages.
As always, a matter of taste.
This can be done with the appendixnumberbeamer package. Just add \usepackage{appendixnumberbeamer} to the preamble and use \appendix before the first backup slide.
I have defined two commands to do this:
\newcommand{\beginbackup}{
\newcounter{framenumbervorappendix}
\setcounter{framenumbervorappendix}{\value{framenumber}}
}
\newcommand{\backupend}{
\addtocounter{framenumbervorappendix}{-\value{framenumber}}
\addtocounter{framenumber}{\value{framenumbervorappendix}}
}
You can then use \beginbackup and \backupend before and after your backup slide to adjust the number of slides.
For my beamer template I also like to add
\setbeamertemplate{footline}{
\leavevmode%
\hbox{%
\begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{author in head/foot}%
\usebeamerfont{author in head/foot}\insertshortauthor~~(\insertshortinstitute)
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{title in head/foot}%
\usebeamerfont{title in head/foot}\insertshorttitle
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,right]{date in head/foot}%
\usebeamerfont{date in head/foot}\insertshortdate{}\hspace*{2em}
\insertframenumber{} \hspace*{2ex} % hier hat's sich geändert
\end{beamercolorbox}}%
\vskip0pt%
}
in the definition of the \beginbackup command to hide to total page number in the backup slides, otherwise you'll get something like "24/18".
Using all this, your slides will be numbered like "x/Y" for all slides before the backup, where Y is the total number of slides before the first backup slide, and the backup slides will continue the numbering of the previous slides.
To manually fix the total frame count to a certain number, say 25, you could add the following command
\renewcommand{\inserttotalframenumber}{25}
right after the \begin{document} command.
You can also add the \appendix command right before the beginning of your backup slides, so that the corresponding sections/subsections do not appear in the table of contents/navigation structure.
It should be possible to tweak the renewcommand above so that it automatically uses the last frame number before the appendix, but I don't know how to do it.
Just insert
\renewcommand{\inserttotalframenumber}{\pageref{lastslide}}
after \begin{document}, and place the marker
\label{lastslide}
on your last slide.
You can put all of your backup slides in appendix and use the appendixnumberbeamer package.
\documentclass[12pt]{beamer}
\usepackage{appendixnumberbeamer}
\begin{document}
\begin{frame}{Frames that counts}
\end{frame}
\appendix
\begin{frame}{Backup slides}
\end{frame}
\end{document}
Fanfan, thanks for your answer, your answer steered me to this sty file that one can include in a beamer document class that will automatically count only the number of frames before the appendix, and then restart the a separate count for the appendix slides, pretty neat.
http://www.ensta.fr/~lelong/Latex/appendixnumberbeamer.sty
Thanks also to Jérôme LELONG for having this available online.
The great command \insertpresentationendpage will take care of your problem. Just place \appendix at the begin of your backup slides.
\documentclass[t]{beamer}
\usepackage[absolute,overlay]{textpos}
\setbeamertemplate{navigation symbols}{}
\def\insertpresentationendframe{\inserttotalframenumber}
\makeatletter
\g#addto#macro{\appendix}{\immediate\write\#auxout{\string\#writefile{nav}{\noexpand\headcommand{\noexpand\def\noexpand\insertpresentationendframe{\the\c#framenumber}}}}}
\makeatother
\setbeamertemplate{footline}{%
\begin{picture}(54,12.5)(0,0)
\put(0.9,0.52){%
\begin{minipage}[b][12.5mm][c]{112.5mm}
\raggedleft
\insertframenumber/\insertpresentationendframe
\end{minipage}
}
\end{picture}
}
\begin{document}
\begin{frame}
slide in the main part
\only<2>{blub}
\end{frame}
\appendix
\section*{Backup}
\begin{frame}
\frametitle{backup}
not counting in the total frame number
\end{frame}
\end{document}
Another possibility - which was recently added to beamer - is to use the appendixframenumber template:
\documentclass[t]{beamer}
\setbeamertemplate{footline}{
\hfill%
\usebeamercolor[fg]{page number in head/foot}%
\usebeamerfont{page number in head/foot}%
\setbeamertemplate{page number in head/foot}[appendixframenumber]%
\usebeamertemplate*{page number in head/foot}\kern1em\vskip2pt%
}
\begin{document}
\begin{frame}
slide in the main part
\only<2>{blub}
\end{frame}
\appendix
\section*{Backup}
\begin{frame}
\frametitle{backup}
not counting in the total frame number
\end{frame}
\end{document}