2

I try to use several latex template (Metropolis beamer theme, etc.) but I got the following error:

! Package keyval Error: breakatwhitespace undefined.

I think this error not from the package but from my latex. I've installed latex in my Ubuntu 16.04 using sudo apt-get install texlive-full

How to solve this error? Hope somebody here can help.

UPDATE

I got this error several times, it always involve theme / template. The newest happen when I try to compile Metropolis Beamer Theme. At this time, I even didn't write any code, I just follow the installation tutorial, and get error after trying to install using make install. Usually I just try to find in the templates/theme where is the breakatwhitspace and delete it.

breakatwhitespace I think included when using package listings and the theme/template author use lstset :

\usepackage{listings}
\lstset{
    ...
    breakatwhitespace=false,
    ...
}

the code below give the error (I copy paste the \usepackage{listings} and \lstset from Metropolis beamer template):

\documentclass{beamer}
\usepackage{listings}
\lstset{
    language=[LaTeX]{TeX},
    basicstyle=\ttfamily,
    keywordstyle=\color{mLightBrown}\bfseries,
    commentstyle=\color{mLightGreen},
    stringstyle=\color{mLightGreen},
    backgroundcolor=\color{mBackground},
    numbers=none,
    numberstyle=\tiny\ttfamily,
    stepnumber=2,
    showspaces=false,
    showstringspaces=false,
    showtabs=false,
    frame=none,
    framerule=1pt,
    tabsize=2,
    rulesep=5em,
    captionpos=b,
    breaklines=true,
    breakatwhitespace=false,
    framexleftmargin=0em,
    framexrightmargin=0em,
    xleftmargin=0em,
    xrightmargin=0em,
    aboveskip=1em,
    belowskip=1em,
    morekeywords={usetheme,institute,maketitle,@metropolis@titleformat,%
                  plain,setbeamercolor,metroset,setsansfont,setmonofont},
  }

\begin{document}
    \frame{\titlepage}  
\end{document}

UPDATE 2

The first few lines logs show my system version:

This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015/Debian) (preloaded format=pdflatex)
 restricted \write18 enabled
...
malioboro
  • 133
  • 8

2 Answers2

3

Well, your used TeX distribution Version 3.14159265-2.6-1.40.16 (TeX Live 2015/Debian) is a little bit old.

With my current MiKTeX pdfTeX, Version 3.14159265-2.6-1.40.18 (MiKTeX 2.9.6400 64-bit) I can compile your given code without errors!

I suggest you to update your system.

Are you short before a deadline? Then better do the update after the deadline, because it could be that you get more errors after the update (depends on your used code) ...

Mensch
  • 65,388
  • I've update it to This is pdfTeX, Version 3.14159265-2.6-1.40.18 (TeX Live 2017/Debian) (preloaded format=pdflatex) but it still give an error :( – malioboro Sep 12 '17 at 08:11
0

I've found this solution from this thread (even have different problem indication):

How to upgrade the package "listings" on Ubuntu?

and the problem is in fpc version. Solution is uninstall fp-utils-3.0.0:

sudo apt-get remove fp-utils-3.0.0
malioboro
  • 133
  • 8