schlcht / microtype

The microtype package
https://ctan.org/pkg/microtype
LaTeX Project Public License v1.3c
81 stars 4 forks source link

microtype breaks beamer commands like \textbf #38

Open FrankMittelbach opened 3 months ago

FrankMittelbach commented 3 months ago

Description

If a \textbf<..>{...} overlay is used at the beginning of an \item it fails and prints the <..> instead

Minimal example demonstrating the issue

\documentclass{beamer}

% ----------------------------------------------------------------------
% Packages
% ----------------------------------------------------------------------

\usepackage[T1]{fontenc}

\usepackage[verbose]{microtype}  
%\microtypesetup{nopatch=item}

\begin{document}

\begin{frame}{Overlays}{test}

  \begin{itemize}
  \item
    \only<1>{Ok} or not
  \item
    \textbf<2>{Fail!} or not
  \end{itemize}

\end{frame}

\end{document}

Dropping the item patch makes it work again.

FrankMittelbach commented 3 months ago

It may not be just the \item case (because microtype actively looks for commands like \textbfin certain situations, but that was the one in which I encountered the problem. (btw, difficult to trace because putting a tracingcommand in front of \textbf made the problem go away :-) )

schlcht commented 1 day ago

Thanks, I think it's fixed in dev now. (But who devises such a syntax!) \color is not supported yet, but at least won't throw any errors.

FrankMittelbach commented 1 day ago

you mean the <...> in beamer? In theory, I think it was a rather nice idea but ... I think there are worse syntax decisions in beamer such as accepting different numbers of mandatory arguments