1. Vedran Miletić
  2. beamer
  3. Issues
Issue #1 resolved

beamercolorbox: unexpected behavior

Nico Schlömer
created an issue


not really sure if this is a bug or not, but the behavior is somewhat unexpected to me: When invoking {{{ \begin{beamercolorbox}[leftskip=1cm,right]{} [...] \end{beamercolorbox} }}} the leftskip is entirely ignored. When doing {{{ \begin{beamercolorbox}[right,leftskip=1cm]{} [...] \end{beamercolorbox} }}} the text [...] is not set flush right.

Cheers, Nico

Comments (16)

  1. Vedran Miletić repo owner

    Those options seem to be in conflict, because:

    \define@key{beamercolbox}{right}[]{\def\beamer@colbox@ls{0pt plus1fill}\def\beamer@colbox@rs{0pt}}

    I have yet to think of an intelligent way to fix this.

  2. Nico Schlömer reporter

    Hm, that's too bad.

    Does that mean that the first argument is actually meant to be ignored, and that many things relied on this? Would it be desirable to fix this then, after all?

    For me it wouldn't really make a big difference if there was another way to get left/right skips and horizontal text alignment.

    Anyway, also the fix that forces you to put the skips first, and then the justification could potentially confuse users who don't know about this rule and happen to declare the arguments in the wrong order.

    In any case: nasty.


  3. Vedran Miletić repo owner

    Well, let's try this way: I have put in the code that supports this:

    1. left=2cm will put text flush left and adjust right skip to 2cm
    2. right=2cm will put text flush right and adjust left skip to 2cm
    3. center=2cm will center text and adjust both skips to 2cm

    I hope noone will ask for an asymetric margins in center :-)

    For now, this change will not be documented in user guide since I hope a better interface will eventually be come out, when I learn a bit more (La)TeX programming. But feel free to use it.

  4. Nico Schlömer reporter
    • changed status to open

    Does not work for me. The code

    \begin{beamercolorbox}[right=\leftskip]{frame title}%

    employs the skip, but sets the title flush left.

  5. Nico Schlömer reporter

    Same for me, but I just noticed that when putting a variable such as \leftskip as in

    \advance\leftskip by\ulogopadding%

    the theme will plot a literal "plus1fill". Bug?

  6. Joseph Wright

    Document behaviour of skips in beamercolorbox (fixes issue #1)

    While this is only a documentation fix, we have little other option. Till exposed the raw TeX lengths in the interface he chose, and to alter that now would break a lot of existing code. So the best we can do is note that there is an interaction: if you use "leftskip" or "rightskip" then you are on your own!


  7. Log in to comment