1

Beginner here with an issue on a simple presentation using beamer

\documentclass{beamer}

\begin{document}
\begin{frame}
  \tau \epsilon \chi
\end{frame}
\end{document}

The above fails with the message "! Missing $ inserted." and waits for me to do something when converting to pdf. I have tried adding the instruction \usepackage[utf8]{inputenc} and also \usepackage[greek]{babel}. I have not seen references either to needing to use any other package. What is exactly I am missing?

1
  • 2
    Welcome to TeX.SX. You have to write $\tau \epsilon \chi$ to make it work, because these commands are only valid in math mode. Commented Sep 19, 2017 at 5:48

2 Answers 2

7

You need to put mathematics inside math-mode, which you do by enclosing it in $...$, for in-line equations, or \[...\] for displayed equations:

\documentclass{beamer}

\begin{document}
\begin{frame}
  $\tau \epsilon \chi$

 For displayed equations:
 \[ \tau \epsilon \chi \]

\end{frame}
\end{document}
1
  • Thank you, that works. Clearly I missed something when reading about LaTeX Commented Sep 19, 2017 at 5:50
4

From your question, I suggest \tau \epsilon \chi as text you want to typeset.

This solution allows your greek text to fit nicely into text:

\documentclass{beamer}
\usepackage[LGR,T1]{fontenc}
\newcommand{\textgreek}[1]{\begingroup\fontencoding{LGR}\selectfont#1\endgroup}
\begin{document}
    \begin{frame}
        This \textgreek{teq} fits nicely in some text.

        This $\tau \epsilon \chi$ fits not so nice.
    \end{frame}
\end{document}

rendering

Reference for the encoding: page 36

If you want to stick to the names of the greek letters, you could use the textgreek package, e.g.

\documentclass{beamer}
\usepackage{textgreek}
\begin{document}
    \begin{frame}
        This \texttau \textepsilon \textchi~fits nicely in some text.

        This $\tau \epsilon \chi$ fits not so nicely.
    \end{frame}
\end{document}

to produce the same result.

2
  • I think I did try to use textgreek. But somehow it failed for me. I will try again, as is possible that I was getting things mixed up Commented Sep 19, 2017 at 15:07
  • Even if you use textgreek, you have to use \texttau instead of \tau and so on.
    – jaytar
    Commented Sep 19, 2017 at 15:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .