Question: ```
\documentclass{beamer}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[utf8]{inputenc}

\begin{document}
\begin{frame}[fragile]{Angle Brackets}
\newcommand{\bbb}{\protect\textless\protect\textless\protect\textless}
\begin{semiverbatim}
Wrong:
a <<< b

Right:
a \bbb b
\end{semiverbatim}

\end{frame}
\end{document}

```

![angle brackets](https://i.imgur.com/UXNnQfu.png)

Why is this happening at all? In the beamer documentation it only says that `\`, `{`, and `}` are handled specially.

Also, I can't say that I like my solution very much. I'd rather be able to use `<<<` as is. Is my solution the only way to go here?

Answer: 
If the question is "how to prevent", an additional grouping will be enough:

```
\documentclass{beamer}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[utf8]{inputenc}

\begin{document}
\begin{frame}[fragile]{Angle Brackets}
\newcommand{\bbb}{\protect\textless\protect\textless\protect\textless}%} % corrected
\begin{semiverbatim}
Wrong:
a <{<}< b % here - PS

Right:
a \bbb b
\end{semiverbatim}

\end{frame}
\end{document}

```

![enter image description here](https://i.stack.imgur.com/K2ECp.png)
You can modify the definition of `semiverbatim`.

```
\documentclass{beamer}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[utf8]{inputenc}

\makeatletter
\def\semiverbatim{%
  \trivlist\item\relax
  \if@minipage\else
    \vskip\parskip
  \fi
  \leftskip\@totalleftmargin
  \rightskip\z@skip
  \parindent\z@
  \parfillskip\@flushglue
  \parskip\z@skip
  \@@par
  \@tempswafalse
  \def\par{%
    \if@tempswa
      \leavevmode\null\@@par\penalty\interlinepenalty
    \else
      \@tempswatrue
      \ifhmode
        \@@par\penalty\interlinepenalty
      \fi
    \fi}%
   \obeylines
   \def\verbatim@nolig@list{\do\<\do\>}%
   \verbatim@font\@noligs\catcode`\<=\active \catcode`\>=\active
   \let\org@prime'%
   \everymath\expandafter{\the\everymath\catcode`\'=12 \let'\org@prime}%
   \everydisplay\expandafter{\the\everydisplay\catcode`\'=12 \let'\org@prime}%
   \def\dospecials{\do\ \do\$\do\&\do\#\do\^\do\_\do\%\do\~\do\`\do\,\do\'\do\-}%
   \let\do\@makeother\dospecials
   \def\\{\char`\\}%
   \def\{{\char`\{}%
   \def\}{\char`\}}%
   \frenchspacing\@vobeyspaces
   \everypar\expandafter{\the\everypar\unpenalty}%
}
\makeatother

\begin{document}
\begin{frame}[fragile]{Angle Brackets}
\newcommand{\bbb}{\protect\textless\protect\textless\protect\textless}
\begin{semiverbatim}
Wrong:
a <<< b

Right:
a \bbb b
\end{semiverbatim}

\end{frame}
\end{document}

```

Maybe other characters need to be activated. I only disabled the `<<` and `>>` ligatures.

Unfortunately a simpler patch is not possible, but this redefinition of `semiverbatim` is very faithful to the original one.