TransWikia.com

XeLaTeX giving me many gibberish errors when trying to compile beamer presentation

TeX - LaTeX Asked by Yavor on May 24, 2021

I am writing a beamer presentation and when I try to compile it with running xelatex chessboxing.tex chessboxing.pdf, everything goes fine until here:

! Missing $ inserted.
<inserted text>
                $
l.41 end{frame}

?

! LaTeX Error: Command $ invalid in math mode.

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

l.41 end{frame}

?

! LaTeX Error: Command ttfamily invalid in math mode.

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

l.41 end{frame}

?
! Missing } inserted.
<inserted text>
                }
l.41 end{frame}

?
! Missing endgroup inserted.
<inserted text>
                endgroup
l.41 end{frame}

?
! Missing endgroup inserted.
<inserted text>
                endgroup
l.41 end{frame}

?
! Undefined control sequence.
Url@FormatString ...ndafter UrlLeft Url@String
                                                  UrlRight m@th $
l.41 end{frame}

?
! Extra }, or forgotten $.
<recently read> }

l.41 end{frame}

?
! Missing $ inserted.
<inserted text>
                $
l.41 end{frame}

?
! Missing } inserted.
<inserted text>
                }
l.41 end{frame}

?
! Missing } inserted.
<inserted text>
                }
l.41 end{frame}

?
! Too many }'s.
beamer@doifinframe ...2.0}, от Wikimedia Commons}
                                                   end {beamer@frameslide}
l.41 end{frame}

?

! LaTeX Error: begin{document} ended by end{beamer@framepauses}.

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

l.41 end{frame}

?
! Extra endgroup.
<recently read> endgroup

l.41 end{frame}

?
! Too many }'s.
endbeamer@frameslide ...amer@framepauses}egroup
                                                  ifx beamer@frametitle @...
l.41 end{frame}

?
! Undefined control sequence.
endbeamer@frameslide ...box else beamer@zoomer
                                                  fi beamer@undolabels be...
l.41 end{frame}

?

! LaTeX Error: begin{document} ended by end{beamer@frameslide}.

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

l.41 end{frame}

?
! Extra endgroup.
<recently read> endgroup

l.41 end{frame}

?

I just press enter and it compiles, but then my presentation hase some issues. Also, I checked some of the errors and they all seem like gibberish. Here is my LaTeX file:

documentclass[bulgarian]{beamer}
usepackage{hyperref}
usepackage{enumitem}
usepackage{blindtext}
usepackage{babel}
babelfont{rm}{FreeSans}
setmainfont{FreeSans}
setsansfont{FreeSans}
setmonofont{FreeMono}
usetheme{Bergen}
usecolortheme{seagull}
title{Шахбокс}
author{Явор Узунов 5А клас}
begin{document}
begin{frame}
frametitle{Шахбокс}
Шахбоксът е хибриден спорт. В него се играе бокс и шах. Хубав е, защото развива и мозъка, и здравословното тяло.
includegraphics{/home/yav/Schachboxen1.jpg}

{tiny"Schachboxen1.jpg" от WCBO, CC BY 3.0 DE url{https://creativecommons.org/licenses/by/3.0/de/deed.en}, от Wikimedia Commons}
end{frame}



begin{frame}
frametitle{Правила}
% section[Section]{Рундове и печелене}
Има 6 рунда бърз шах и 5 рунда бокс. Започва се с шаха. Обявява се победа при:
begin{itemize}[noitemsep]
item нокаут
item мат
item свършване на времето на играч в бърз шах (9 минути)
item по преценка на съдията
item отказ от участие
end{itemize}
Ако шахматните игри завършат с равен резултат, побеждава този, който има повече точки в бокса, а ако и там е равно, печели този, който е играл с черните фигур>
% section[Section]{Класове по тежест}
includegraphics[height=2cm]{/home/yav/Chess_Boxing_2007_(3).jpg}includegraphics[height=2cm]{/home/yav/Chess_Boxing_2007_(4).jpg}

{tiny Chess_Boxing_2007_(3).jpg и Chess_Boxing_2007_(4).jpg от Sascha Pohflepp, CC BY 2.0 url{https://creativecommons.org/licenses/by/2.0}, от Wikimedia Com>
end{frame}
end{document}

One Answer

A simpler test file is

documentclass{beamer}
usepackage{hyperref}

title{Шахбокс}
author{Явор Узунов 5А клас}
begin{document}



begin{frame}
Chess_Boxing_2007_(3).jpg и Chess_Boxing_2007_(4).jpg от 
end{frame}
end{document}

which produces the error that you show (only ever look at the first error, later errors are often spurious)

! Missing $ inserted.
<inserted text> 
                $
l.12 end{frame}
                
? 

That tells you that you have used some math constrict in text mode, so TeX has inserted a $ to get into math.

Admittedly due to the nature of beamer the error message is less than clear about where the error is. However 9 times out of 10 this is a _ which turns out to be the case here, however TeX can be persuaded to give more helpful message...

Add

errorcontextlines=100

to the document preamble and re-run

This time the error message is more verbose.

! Missing $ inserted.
<inserted text> 
                $
<to be read again> 
                   _
beamer@doifinframe ...n {beamer@frameslide}Chess_
                                                  Boxing_2007_(3).jpg и Ches...

iterate ...e {beamer@whichframes }beamer@donow 
                                                  ifbeamer@twoscreenstext ...

loop ...elax expandafter iterate fi }iterate 
                                                  let iterate relax 
beamer@howtotreatframe ...ame by 1relax repeat 
                                                  beamer@writeslidentry be...
l.13 end{frame}
                
? 

Note the line break after Chess_ showing that TeX was processing text up to that point at the point it made the error. That is, it is exactly highlighting the bad input.

Answered by David Carlisle on May 24, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP