You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Line break command ignored within frame in beamerarticle #632
If I remove the frame environment, I correctly get
Of course the frame is there because my real example is from a larger presentation of which I am doing the article counterpart. Adding [fragile] does not help.
In the beamer version of the document, the line break is where I want it, but that may be by chance (it seems the line break happens "naturally" where LaTeX wants to put it, and not where I request it).
The article mode of beamer ignores \\, see texdoc beamer, sec. 21.2.1 "Starting the Article Mode":
There is one command whose behavior is a bit special in article mode: The line break command \\. Inside frames, this command has no effect in article mode, except if an overlay specification is present. Then it has the normal effect dictated by the specification. The reason for this behavior is that you will typically inserts lots of \\ commands in a presentation in order to get control over all line breaks. These line breaks are mostly superfluous in article mode. If you really want a line break to apply in all versions, say \\<all>. Note that the command \\ is often redefined by certain environments, so it may not always be overlay-specification-aware. In such a case you have to write something like \only<presentation>{\\}.
In tabularray,
the initial setting halign=j lets \\ to \@normalcr (see \__tblr_halign_command_j:, then \TblrAlignBoth), which is not altered by beamerarticle, so with haligh=j, \\ works inside tblr cells;
by setting halign=c (OP's columns={c, ...} is a shortcut), \\ is let to \@centercr (see \__tblr_halign_command_c:, then \TblrAlignCenter and \centering), which unfortunately is altered by beamerarticle, so with haligh=c, \\ is ignored inside tblr cells. One needs to use \\<all> or setting something like columns={preto={\let\\=\beamer@origbreakcenter}}.
Activity
ponte-vecchio commentedon Apr 26, 2026
I suspect there's an interplay between the value of the designated
wd, and the size of the font.Consider the following example that explores different font sizes and whether the
wdis given or not:Details
The following output is given:
muzimuzhi commentedon Apr 26, 2026
The
articlemode ofbeamerignores\\, seetexdoc beamer, sec. 21.2.1 "Starting the Article Mode":In
tabularray,halign=jlets\\to\@normalcr(see\__tblr_halign_command_j:, then\TblrAlignBoth), which is not altered bybeamerarticle, so withhaligh=j,\\works insidetblrcells;halign=c(OP'scolumns={c, ...}is a shortcut),\\is let to\@centercr(see\__tblr_halign_command_c:, then\TblrAlignCenterand\centering), which unfortunately is altered bybeamerarticle, so withhaligh=c,\\is ignored insidetblrcells. One needs to use\\<all>or setting something likecolumns={preto={\let\\=\beamer@origbreakcenter}}.tabularray/tabularray.sty
Lines 171 to 175 in 6fe650f
tabularray/tabularray.sty
Lines 56 to 69 in 6fe650f
Example
Output
ysalmon commentedon Apr 26, 2026
Thank you so much for this in-depth investigation !
Maybe this setting should be done by tblarray, as the rationale of beamerarticle's behaviour with line breaks does not apply within table cells.