I'm working on a presentation with Latex {beamer}. I have the following problem:
When I use the itemize command on a slide in conjunction with \visible<2->{text} Latex counts a new page for each item. That's why I have something like 17/11 on my presentation.
Does one know how to solve this problem?
With \thispagestyle{empty} I solve the problem only temporarily and not satisfactorily
If I understood correctly, you may not want a new page (slide) for each item in each itemize environment in your presentation, for example if you have to print your slides. In this case, you may switch from
\documentclass{beamer}
to
\documentclass[handout]{beamer}
before compiling again and print your output pdf file (whose page count will now be the same or smaller). The handout option is discussed in section 4.6 of this Beamer User Guide.
Don't show the page number, but use the frame number instead:
\documentclass{beamer}
%\setbeamertemplate{footline}[page number]
\setbeamertemplate{footline}[frame number]
\begin{document}
\begin{frame}
\begin{itemize}
\item text text
\item text \visible<2->{text}
\end{itemize}
\end{frame}
\end{document}
Related
Hello I am new at beamer (overleaf), so I have learned very much, so I would like to change the design of the numeration in table of contents. I mean with that (see picture attached):
I would like to change to a square, or simply the number. Anyone knows others styles? I am using the \usetheme{CambridgeUS}.
You can set the sections/subsections in toc template to change to e.g. a square or plain numbered sections:
\documentclass{beamer}
\usetheme{CambridgeUS}
\setbeamertemplate{sections/subsections in toc}[square]
%\setbeamertemplate{sections/subsections in toc}[sections numbered]
\begin{document}
\section{title}
\begin{frame}
\tableofcontents
\end{frame}
\end{document}
it's my first post here, so please don't mind, if I'm doing something wrong.
I'm using the default beamer theme and changed some colors, like the color of the itemize bullets. Therefore, there are many lines like \setbeamercolor{item}{fg=MyColor} in the preamble. Now, I noticed that this in particular overrides the default coloring of the bullets when using an alert action like \item<alert#1-> An alerted item. On my slides, there is only the color of the text, but not of the bullet changed to red.
I wonder if nobody already came across this issue, but I found nothing after hours of searching, especially stack overflow or reddit.
I hope that I don't do anything obviously wrong...
Your help would be greatly appreciated, so thanks in advance :)
Yes, to this point this is a copy of my post on reddit, because I though, this is probably the better place to ask for help.
What I already tried:
using \AtBeginEnvironment{alertenv}{\setbeamercolor{itemize item}{fg=red}} of the etoolbox package
this works at first sight, but the bullet color is then changed without taking overlay specifications into account, so something like \item<alert#2-> An alerted item results in a red bullet also in the first overlay
Here's my MWE:
\documentclass{beamer}
% to demonstrate the faulty behaviour I put this in the document body, usually it would be here in the preamble
% \setbeamercolor{item}{fg=cyan}
% try uncommenting these lines to see the faulty behaviour with overlay specifications
% \AtBeginEnvironment{alertenv}{\setbeamercolor{itemize item}{fg=red}}
% \AtBeginEnvironment{alertenv}{\setbeamercolor{itemize subitem}{fg=red}}
% \AtBeginEnvironment{alertenv}{\setbeamercolor{itemize subsubitem}{fg=red}}
\begin{document}
\begin{frame}{MWE Beamer item color}
\begin{columns}
\begin{column}{0.5\textwidth}
\begin{itemize}
\item A default neutral item
\item<alert#2-> An alerted item
\end{itemize}
\end{column}
\setbeamercolor{item}{fg=cyan}
\begin{column}{0.5\textwidth}
\begin{itemize}
\item A default neutral item
\item<alert#2-> An alerted item
\end{itemize}
\end{column}
\end{columns}
\end{frame}
\end{document}
You can work around the problem like this:
\documentclass{beamer}
\setbeamercolor{item}{fg=cyan}
\addtobeamertemplate{alerted text begin}{\setbeamercolor{item}{fg=alerted text.fg}}{}
\begin{document}
\begin{frame}{MWE Beamer item color}
\begin{columns}
\begin{column}{0.5\textwidth}
\begin{itemize}
\item A default neutral item
\item<alert#2-> An alerted item
\end{itemize}
\end{column}
\begin{column}{0.5\textwidth}
\begin{itemize}
\item A default neutral item
\item<alert#2-> An alerted item
\item A default neutral item
\end{itemize}
\end{column}
\end{columns}
\end{frame}
\end{document}
(if you are using this colour for more elements, it is usually easier to change the structure colour or directly redefine beamer#blendedblue)
Update:
This issue was fixed in https://github.com/josephwright/beamer/commit/53c13cbe1f48918703f93f310c209c5e3f7f44f5
Starting with beamer v3.65 the above workaround should no longer be necessary.
I just started learning Latex and I have this code in which I first define a figure which is a photo and then I want to have items in my PDF file.
But the output file isn't so and it first shows the items and then the photo! even though I have [!h] statement too.
\documentclass[12pt]{report}
\begin{document}
\begin{figure}[!h]
\centering
\includegraphics[width= 90mm]{./class.jpg}
\caption{pic1}
\end{figure}
\begin{enumerate}
\item first option with number
\item second option with number
\end{enumerate}
\end{document}
What I do is to use the package float and change !h for H
\documentclass[12pt]{report}
\usepackage{float}
\begin{document}
\begin{figure}[H]
\centering
\includegraphics[width= 90mm]{./class.jpg}
\caption{pic1}
\end{figure}
\begin{enumerate}
\item first option with number
\item second option with number
\end{enumerate}
\end{document}
This forces latex to place the image right in the position you put it.
When I compile your code with \usepackage{graphicx}, and using a generic image, I first get the image, then the item list. Usually LaTeX will force the image onto the next empty page, if the image is too large (the width may fit, but possibly the height is off?). Maybe try playing with \includegraphics[scale=0.8].
When compiling a LaTeX document, I get two pages numbered at "1": the front page and the first of the table of contents. Here's a MWE:
\documentclass[12pt,a4paper]{report}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{hyperref}
\title{Title}
\begin{document}
\maketitle
\tableofcontents
\chapter{Chapter one}
\end{document}
When compiling this (using simply pdflatex file.tex), I get this:
But when I remove the line \usepackage{hyperref}, page numbers are fine. Note that I need this package to have links to pages in my table of contents, but maybe there's a better way to do so. What is happening here ? How do I get normal page numbers ?
Thanks in advance.
\maketitle under the report class sets the page number to 1 on the title page, but also restarts it from 1 for the following page. That's why you achieve a virtual page number 1 for the title, followed by an actual page number one for the ToC. I emphasize virtual here because \maketitle sets the title on an empty page style so that nothing is printed in the header/footer. However, these page numbers still appear in the toolbar when viewed in Adobe Acrobat.
One way around it would be to manually change the page display to something more appropriate just for the title page. For example, let's make the title page be called T:
\documentclass{report}
\usepackage{hyperref}
\title{Title}
\author{Author}
\begin{document}
\begingroup
\renewcommand{\thepage}{T}
\maketitle % Page T
\endgroup
\tableofcontents % Page 1
\chapter{A chapter} % Page 2
\end{document}
I am new to latex and I wrote the below tex code on Texmaker editor.
What I want to do is to add the "University" section without any numbering preceeding it and to be centered horizontally, because when I run the code I find that the word "University" is displayed but it is preceeded by a number and I do not want to display any number preceeding that word.
code:
\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{graphicx}
\usepackage{kpfonts}
\author{Anan}
\pagestyle{plain}
\begin{document}
\section{University}
\end{document}
\section*{\centering University}
% * removes numbering for _this_ \section instance,
% \centering within environment centres the title.
Note however, that this is a local solution, and that it's better practice (and easier for you to make later document-global changes) to re-define the \section, \subsection, ... environments using the titlesec package, as is described well in Alan Munn:s answer in the following tex.stackexchange thread:
https://tex.stackexchange.com/questions/8546/section-heading-centering-problem
All you have to do is to edit your line 9:
\section{University}
this way:
\section*{\centering University}
since the command \section* produces unnumbered sections.
Further, if you want to to include an unnumbered section to your table of contents, you can add
\addcontentsline{toc}{section}{University}
(this time without \centering) just after. The resulting code:
\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{graphicx}
\usepackage{kpfonts}
\author{Anan}
\pagestyle{plain}
\begin{document}
\tableofcontents
\section*{\centering University}
\addcontentsline{toc}{section}{University}
Text.
\end{document}