1

So here's a minimal code:

\documentclass[utf8]{beamer}

\usepackage{amsmath, amsthm, amssymb}

\begin{document} \section{$\frac{a}{b}$} \end{document}

I tried the solution from this answer: Equations in section heading/title

But it doesn't work either:

\documentclass[utf8]{beamer}

\usepackage{amsmath, amsthm, amssymb}

\begin{document} \section{\texorpdfstring{$\frac{a}{b}$}} \end{document}

This is the error message:

! Argument of \@firstoftwo has an extra }.
<inserted text>
                \par
l.6     \section{\texorpdfstring{$\frac{a}{b}$}}

Do you have an idea how I can add an little math environment into the sections?

TornaxO7
  • 248
  • 1
  • 9
  • 3
    \textorpdfstrig expects two arguments: first the TeX-related one, then the pdf bookmark one. You need e.g. \texorpdfstring{$\frac{a}{b}$}{a/b}. – campa Dec 18 '20 at 13:18
  • Oh bruh, I didn't knew that. Thank you! Could you please write that as an answer so I can tick this questions as answered? – TornaxO7 Dec 18 '20 at 13:22
  • 1
    I’m voting to close this question because itwas solved in the comments. – José Carlos Santos Sep 22 '22 at 08:29

0 Answers0