Reproducible on main (f2b8c31), independent of any branch.
beamer copies a [fragile] frame's body out verbatim, line by line, into \jobname.vrb and reads it back. The FIRST line of the body is handled by \beamer@processframefirstline#1#2^^M (beamerbaseverbatim.sty), which sanitises #1 and writes {\beamer@test\the\@temptokena}.
With certain outer themes, \@temptokena is EMPTY at that \write, so everything after the line's first control sequence is lost.
Reproduction
\documentclass{beamer}
\useoutertheme{split} % or infolines; or \usetheme{Berlin}/Madrid/Warsaw/Copenhagen
\begin{document}
\begin{frame}[fragile]
\textbf{gras}
suite
\end{frame}
\end{document}
texput.vrb receives:
| preamble |
texput.vrb |
| (none) |
\textbf{gras}\nsuite\n |
\usetheme{default}, \usetheme{Frankfurt}, \useoutertheme{miniframes} |
\textbf{gras}\nsuite\n |
\usecolortheme{dolphin}, \useinnertheme{rounded}, \usefonttheme{serif}, \usepackage{amsmath} |
\textbf{gras}\nsuite\n |
\useoutertheme{split}, \useoutertheme{infolines} |
\textbf\nsuite\n |
\usetheme{Berlin}, Madrid, Warsaw, Copenhagen |
\textbf\nsuite\n |
Only the FIRST line is affected — \beamer@processframeline writes later lines with \immediate\write…{#1} and they come through intact. A first line with no leading control sequence (PREMIERE{une}) is intact too.
What is known
Instrumented at the \write, both cases are identical except for the register:
sans thème : beamer@test=textbf toks10={gras} → \textbf{gras}
avec thème : beamer@test=textbf toks10= → \textbf
- The catcodes at write time are the same in both:
\=12, {=12, }=12, ^^M=12, \endlinechar=13.
\@temptokena is \toks10 in both, and \@temptokena{ESSAI{avec}}/\the\@temptokena round-trips correctly in both.
- The same path is taken in both:
\beamer@checkforverbatim sees opts=[fragile], \beamer@checkforfragile splits it the same way, \beamer@checktitleverbatim then \beamer@verbatimreadframe run, \beamer@frameenv does not.
\dospecials, \@makeother, \@onelevel@sanitize, \zap@space and \strip@prefix all have the same meaning in both.
\beamer@test = \textbf in both, which means #1 was the CONTROL SEQUENCE, not the character \ — so the line was tokenised with \ at catcode 0, before \let\do\@makeother\dospecials took effect. Yet the braces reached #2 as catcode-12 characters in the working case.
So the split is happening against a catcode regime that is neither fully before nor fully after the verbatim group's setup, and which of the two it is depends on the outer theme.
Why it matters
It is what stands between the engine and rendering verbatim-heavy talks: 1225 of the 10 047 talks in the corpus (12.2%) use [fragile], and the split/infolines themes are among the most common.
It also blocks the input-level work (#102): correcting the ORDER so the body is read back INSIDE the frame — which is what tex.web §537 prescribes — makes these talks worse, because the corrupt first line then swallows the next one where it can do damage. Measured over the same 200 talks, 16 up and 14 down, 1121 → 1031 pages. With the first line intact, that changes.
Reproducible on
main(f2b8c31), independent of any branch.beamer copies a
[fragile]frame's body out verbatim, line by line, into\jobname.vrband reads it back. The FIRST line of the body is handled by\beamer@processframefirstline#1#2^^M(beamerbaseverbatim.sty), which sanitises#1and writes{\beamer@test\the\@temptokena}.With certain outer themes,
\@temptokenais EMPTY at that\write, so everything after the line's first control sequence is lost.Reproduction
texput.vrbreceives:texput.vrb\textbf{gras}\nsuite\n\usetheme{default},\usetheme{Frankfurt},\useoutertheme{miniframes}\textbf{gras}\nsuite\n\usecolortheme{dolphin},\useinnertheme{rounded},\usefonttheme{serif},\usepackage{amsmath}\textbf{gras}\nsuite\n\useoutertheme{split},\useoutertheme{infolines}\textbf\nsuite\n\usetheme{Berlin},Madrid,Warsaw,Copenhagen\textbf\nsuite\nOnly the FIRST line is affected —
\beamer@processframelinewrites later lines with\immediate\write…{#1}and they come through intact. A first line with no leading control sequence (PREMIERE{une}) is intact too.What is known
Instrumented at the
\write, both cases are identical except for the register:\=12,{=12,}=12,^^M=12,\endlinechar=13.\@temptokenais\toks10in both, and\@temptokena{ESSAI{avec}}/\the\@temptokenaround-trips correctly in both.\beamer@checkforverbatimseesopts=[fragile],\beamer@checkforfragilesplits it the same way,\beamer@checktitleverbatimthen\beamer@verbatimreadframerun,\beamer@frameenvdoes not.\dospecials,\@makeother,\@onelevel@sanitize,\zap@spaceand\strip@prefixall have the same meaning in both.\beamer@test=\textbfin both, which means#1was the CONTROL SEQUENCE, not the character\— so the line was tokenised with\at catcode 0, before\let\do\@makeother\dospecialstook effect. Yet the braces reached#2as catcode-12 characters in the working case.So the split is happening against a catcode regime that is neither fully before nor fully after the verbatim group's setup, and which of the two it is depends on the outer theme.
Why it matters
It is what stands between the engine and rendering verbatim-heavy talks: 1225 of the 10 047 talks in the corpus (12.2%) use
[fragile], and the split/infolines themes are among the most common.It also blocks the input-level work (#102): correcting the ORDER so the body is read back INSIDE the frame — which is what tex.web §537 prescribes — makes these talks worse, because the corrupt first line then swallows the next one where it can do damage. Measured over the same 200 talks, 16 up and 14 down, 1121 → 1031 pages. With the first line intact, that changes.