In beamer, the column environment accepts options, mostly for the vertical alignment of content in the columns. Currently, pandoc's latex writer gives the T option, hardwiring a top alignment. Beamer's default, though, is c unless the global t option is used.
One solution to give more flexibility would be to allow the following syntax in native divs:
::: {.column align=c}
:::
There are other options available to that environment though, in the beamer user guide:
The following ⟨options⟩ may be given:
•bwill cause the bottom lines of the columns to be vertically aligned.
•cwill cause the columns to be centered vertically relative to each other. Default, unless the global option t is used.
•onlytextwidthis the same as totalwidth=textwidth.
•twill cause the rst lines of the columns to be aligned. Default if global option t is used.
•Tis similar to the t option, but T aligns the tops of the rst lines while t aligns the so-called baselines of the rst lines. If strange things seem to happen in conjunction with the t option (for example if a graphic suddenly “drops down” with the t option instead of “going up,”), try using this option instead.
•totalwidth=⟨width⟩will cause the columns to occupy not the whole page width, but only ⟨width⟩, all told. Note that this means that any margins are ignored.
So maybe a syntax of:
::: {.column options=c}
:::
I'm not sure how to handle:
options=totalwidth=x)One possibility would be
::: {.column align=c}
:::
That would leave room for other options like totalwidth.
Please also allow absolute width sizes, i.e. something like {.column width=40mm} ....
Currently (Pandoc 2.1.1) this snippet
::: {.column width=40mm}
:::
would be translated to
\begin{column}{40mm\textwidth}
\end{column}
Relative width (like {.column width="40%"}) works perfectly, but there are cases where absolute measures are much more comfortable.
Any news?
The correct syntax for the column alignment option is yet unclear. Can we please clarfy this?
Note that the inner column environment only accepts a single option: a placement (b,c,t,T) to modify the vertical alignment for a particular column.
The outer columns environment defines the vertical alignment for all columns (unless overwritten for a particular column) and has additional options totalwidth=⟨width⟩ and onlytextwidth (the same as totalwidth=\textwidth).
I usually need columns spanning onlytextwidth instead of the whole page width, for example, when the beamer theme has some decoration in the margins. I do not know how to specify options for the outer columns environment, so I currently cannot use Pandoc's syntax for columns in Beamer.
Yes it would indeed be very practical to be able to add options to the column environment, such as onlytextwidth..
pandoc (2.9.2) writes \begin{columns}[T]. Here is a workaround if you need the columns to span onlytextwidth instead of the whole page:
Add the following to a file, columns.tex, say:
%% configure columns environment to use totalwidth=\textwidth only
\let\origcolumns\columns
\let\endorigcolumns\endcolumns
\renewenvironment{columns}[1][]{\origcolumns[onlytextwidth,#1]}{\endorigcolumns}
Include this file when converting to "beamer", e.g., via pandoc's argument --include-in-header columns.tex.
Most helpful comment
One possibility would be
That would leave room for other options like
totalwidth.