# Can't compile pdf with latexmk when \only<handout> included / How to hide bullets in a beamer presentation

Can someone explain why the following beamer presentation compiles with pdflatex -interaction=nonstopmode but not with latexmk -pvc -pdf:

    \documentclass{beamer}
\usepackage[norsk]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{pgfpages}
\setbeameroption{show notes on second screen} %show notes or show notes on second screen or hide notes

\mode<presentation>
{
\usetheme{Frankfurt}
\setbeamercolor{frametitle}{fg=black, bg=white!80!black}
\setbeamercolor{item}{fg=black}
}

\title[Styrke]{Styrke}

\begin{document}

\begin{frame}
\titlepage
\end{frame}
\note[itemize]
{
\item 45 min lecture
\item 20 min upto interplay between nervous system and muscle in strength development
\item 10 min on research
\item 15 min on recommendations and practical tips
}

\begin{frame}
\frametitle{Ulike typer muskelbevegelser}
\begin{itemize}
\item Isometrisk (statisk)
\item Dynamisk
\begin{itemize}
\only<handout>{\item Konsentrisk}
\only<handout>{\item Eksentrisk}
\end{itemize}
\item Isokinetisk
\end{itemize}
\end{frame}
\note[itemize]{
\item Isometrisk (statisk)
\begin{itemize}
\item Spenning i muskelen uten bevegelser
\end{itemize}
\item Dynamisk
\begin{itemize}
\item Konsentrisk
\begin{itemize}
\item Muskelen utvikler kraft mens muskellengden minke
\end{itemize}
\item Eksentrisk
\begin{itemize}
\item Muskelen utvikler kraft mens muskellengden øker
\end{itemize}
\end{itemize}
\item Isokinetisk
\begin{itemize}
\item Utvikling av kraft i muskelen under jevn hastighet
\end{itemize}
}

\end{document}


It appears to have something to do with the \only command as putting \visible in its place allows it to compile with latexmk.

[EDIT] To clarify: I am trying to hide two bullet points in the slide from the presentation (\item Konsentrisk and \item Eksentrisk) but have them showing in the handout. If I use the \visible command it leaves a gap where the bullet points should be, which I do not want.

If I am not using\only correctly to do this, my question would therefore be; How can I remove bullet points from the presentation, without leaving a space and yet have them show in the handout?

• It fails in both cases, nonstopmode just makes it run through the code without stopping. -pvc does not pass nonstopmode. \item cannot be enclosed like this, then itemize cannot see them and it complains. Perhaps \item<handout> ... is what you are looking for. Sep 6, 2016 at 13:33
• \item<handout> ... is probably not what you are looking for, but there are methods to do what you want, see the beamer manual. Sep 6, 2016 at 13:35
• @daleif I must admit, I thought that this was what the manual recommended. Can you give me an idea what I should be looking for? Sep 6, 2016 at 19:04
• Not without knowing what exactly you are trying to do here? Perhaps rephrase the question into something more appropriate for the situation Sep 6, 2016 at 19:09
• @daleif I have attempted to edit the question to make it clearer what I am trying to achieve. Hopefully it makes more sense now. Sep 7, 2016 at 7:01

The main issue of the question is not whether or not latexmk cannot compile while pdflatex can. Neither can due to this error:

\only<handout>{\item Konsentrisk}


Here itemize cannot see the \item and this reports an error.

From further discussions, what is really needed here is a method to only add a sublist to an item whn in handout. Just using \item<handout> does not workwell as it leaves unwanted blank space in the output.

Since this in only for handout a viable method can be to use:

\mode<handout>{
\begin{itemize}
\item Konsentrisk
\item Eksentrisk
\end{itemize}
}