matze / mtheme

A modern LaTeX Beamer theme
6.44k stars 845 forks source link

Many \newlength errors using newly upgrated MacTeX 2017 #293

Closed xiehao closed 7 years ago

xiehao commented 7 years ago

Today I upgraded MacTeX 2017 by brew-cask, and the simple example below (just the sample code in README) cannot be compiled.

\documentclass{beamer}
\usetheme{metropolis}           % Use metropolis theme
\title{A minimal example}
\date{\today}
\author{Matthias Vogelgesang}
\institute{Centre for Modern Beamer Themes}
\begin{document}
  \maketitle
  \section{First Section}
  \begin{frame}{First Frame}
    Hello, world!
  \end{frame}
\end{document}

And the error message is listed below:

This is XeTeX, Version 3.14159265-2.6-0.99998 (TeX Live 2017) (preloaded format=xelatex 2017.9.12)  12 SEP 2017 19:46
entering extended mode
 restricted \write18 enabled.
 %&-line parsing enabled.
**mtheme-test-test.tex
(./mtheme-test-test.tex
LaTeX2e <2017-04-15>
Babel <3.12> and hyphenation patterns for 84 language(s) loaded.
(/usr/local/texlive/2017/texmf-dist/tex/latex/beamer/beamer.cls
Document Class: beamer 2017/08/22 v3.43 A class for typesetting presentations
(/usr/local/texlive/2017/texmf-dist/tex/latex/beamer/beamerbasemodes.sty
(/usr/local/texlive/2017/texmf-dist/tex/latex/etoolbox/etoolbox.sty
Package: etoolbox 2017/01/02 v2.4 e-TeX tools for LaTeX (JAW)
\etb@tempcnta=\count79
)
\beamer@tempbox=\box26
\beamer@tempcount=\count80
\c@beamerpauses=\count81

...

Package: beamerouterthememetropolis 2015/12/04 Metropolis outer theme

! Argument of \newlength has an extra }.
<inserted text> 
                \par 
l.131 \newlength
                {\@metropolis@frametitlestrut}
I've run across a `}' that doesn't seem to match anything.
For example, `\def\a#1{...}' and `\a}' would produce
this error. If you simply proceed now, the `\par' that
I've just inserted will cause me to report a runaway
argument that might be the root of the problem. But if
your `}' was spurious, just type `2' and it will go away.

Runaway argument?
! Paragraph ended before \newlength was complete.
<to be read again> 
                   \par 
l.131 \newlength
                {\@metropolis@frametitlestrut}
I suspect you've forgotten a `}', causing me to apply this
control sequence to too much text. How can we recover?
My plan is to forget the whole thing and hope for the best.

! Package beamerouterthememetropolis Error: Patching frame title failed.

See the beamerouterthememetropolis package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.131 \newlength
                {\@metropolis@frametitlestrut}
\par 

! Undefined control sequence.
l.131 \newlength{\@metropolis@frametitlestrut
                                             }
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

\metropolis@progressinheadfoot=\skip63

! LaTeX Error: \@metropolis@frametitlestrut undefined.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.154 \@metropolis@outer@setdefaults

Try typing  <return>  to proceed.
If that doesn't work, type  X <return>  to quit.

)

...

The pdf file is generated correctly, and these errors do not happen using TeXLive 2017 on Linux.

matze commented 7 years ago

Unfortunately, I do not own a Mac so I cannot reproduce this at the moment. But maybe someone else can chime in …

benjamin-weiss commented 7 years ago
Package: beamerouterthememetropolis 2015/12/04 Metropolis outer theme

It looks like you have an old corrupted metropolis theme installed somewhere.

xiehao commented 7 years ago

@benjamin-weiss Thanks for your help! I check the verbose output and find that it indeed points to an older-version theme file. After I delete it, everything goes fine. I think this issue should be closed.

WenyinWei commented 4 years ago

Yes, I agree with @xiehao , I deleted the .sty file from which bugs arised. And everything goes well now.