tikz.dev / tcolorbox Manual

The tcolorbox package

Libraries

21 Library poster

The main purpose of this library is to support creation of single page posters with tcolorboxes.

A tcbposter is a tikzpicture where tcolorboxes can be placed in a column oriented manner using \posterbox commands. This base concept is more or less copied from the great baposter package.

The raster library, see Section 16, can produce similar looking results and may be more appropriate depending on the actual project.

  • The raster library has a flow oriented concept, just like a conventional text flow. The text flow (box flow) is a merely endless ribbon which gets broken into lines (and paragraphs) and the lines are broken into pages. raster shapes the boxes to convenient sizes to fill lines and pages in a pleasant way.

  • The poster library supports a quite free placement of boxes inside a page. Basically, boxes are placed like nodes are placed inside a tikzpicture. In contrast to raster, this is a single page and not a flow of pages. The poster is divided into columns and rows. There is a more or less gentle force to use the columns (or spans of columns) for positioning and sizing while the row placement is completely optional.

The creation of this library was motivated by Ignasi.

Inside a tikzpicture there should be no embedded tikzpictures. This rule is violated by the poster library. Be aware that there may be some unwanted interactions between the main tikzpicture and the embedded ones inside the tcolorboxes.

The library is loaded by a package option or inside the preamble by:

This also loads the libraries skins, see Section 10, breakable, see Section 19, magazine, see Section 20, and fitting, see Section 22.

21.1 Overview
Compiled output
21.2 Main Poster Environment

Inside tcbposter, there are several predefined TikZ nodes. These nodes share a common /tcb/poster/prefix which is TCBPOSTER@ by default. This prefix is used to discriminate the poster nodes from local nodes of any embedded tikzpicture environment. You will never need this prefix using \posterbox and its placement options, but if you want to refer to a predefined node using pure TikZ code. The predefined nodes (shown without prefix) are:

  • poster: defines the bounding box of the poster (without the coverage).

  • top: top position plus row spacing

  • bottom: bottom position minus row spacing

  • middle: vertical middle position

  • col1, col2, …: bounding box of column 1, column 2, …

  • row1, row2, …: bounding box of row 1, row 2, …

Further nodes are defined using the /tcb/posterloc/name option.

Never use a tcbposter inside a tcbposter. But, if you do anyway, use a different /tcb/poster/prefix for the embedded poster or you surely get a total mess.

There are several properties inside a tcbposter which may be useful for advanced code (skip the following on first reading):

  • \tcbposterwidth: Width of the poster (without margins).

  • \tcbposterheight: Height of the poster (without margins).

  • \tcbpostercolspacing: Column distance.

  • \tcbposterrowspacing: Row distance.

  • \tcbpostercolumns: Column quantity.

  • \tcbposterrows: Row quantity.

  • \tcbpostercolwidth: Width of a column.

  • \tcbposterrowheight: Height of a row.

  • \tcbposterset{⟨options⟩}New: 2017-07-03

  • Sets options for every following tcbposter inside the current group. For example, the numbers for rows and columns may be defined for the whole document by this:

    See tcbposter for all feasible options.

21.3 Poster Settings
  • /tcb/posterset/poster={⟨option list⟩}(style, no default)New: 2017-07-03

  • This option can be applied inside tcbposter and \tcbposterset to set the given poster ⟨option list⟩, e. g.

    \tcbposterset{poster={width=20cm,height=15cm}}

    For the ⟨option list⟩, see the following keys.

  • /tcb/poster/rows=⟨number⟩(no default, initially 4)New: 2017-07-03

  • Sets the ⟨number⟩ of rows for a tcbposter.

  • /tcb/poster/colspacing=⟨length⟩(no default, initially 4mm)New: 2017-07-03

  • Sets ⟨length⟩ as distance between columns.

  • /tcb/poster/rowspacing=⟨length⟩(no default, initially 4mm)New: 2017-07-03

  • Sets ⟨length⟩ as distance between rows.

  • /tcb/poster/spacing=⟨length⟩(style, no default, initially 4mm)New: 2017-07-03

  • Sets ⟨length⟩ as distance between columns and rows.

  • /tcb/poster/showframe=true|false(default true, initially false)New: 2017-07-03

  • Displays a red auxiliary mesh as optical support during poster creation. Also, every /tcb/posterloc/name is displayed.

  • /tcb/poster/width=⟨length⟩(no default, initially \linewidth)New: 2017-07-03

  • Sets ⟨length⟩ as width of the poster. For a typical poster, this has not to be set manually. Especially, if /tcb/posterset/coverage is present, use coverage={width=⟨length⟩} instead to change the overall width.

  • /tcb/poster/height=⟨length⟩(no default, initially unset)New: 2017-07-03

  • Sets ⟨length⟩ as height of the poster. For a typical poster, this has not to be set manually, but is set automatically to an appropriate value. If /tcb/posterset/coverage is present, use only one if any option coverage={height=⟨length⟩} or poster={height=⟨length⟩}.

  • /tcb/poster/prefix=⟨name⟩(no default, initially TCBPOSTER@)New: 2017-07-03

  • ⟨name⟩ is set as prefix for any TikZ node which is generated automatically by the poster library. This encompasses predefined nodes like top, bottom, …, and nodes defined by using /tcb/posterloc/name. Also, see Section 21.2. For a typical poster, this value can stay as it is.

21.4 Coverage
  • /tcb/posterset/no coverage(style, no value, initially set)New: 2017-07-03

  • Removes the surrounding tcolorbox completely.

21.5 Common Box Settings
21.6 Font Scaling
21.7 Box Placement
  • /tcb/posterloc/span=⟨number⟩(no default, initially 1)New: 2017-07-03

  • Sets the width of the current box to span ⟨number⟩ columns. ⟨number⟩ is also allowed to be a real number like 0.5 or 1.7. See /tcb/posterloc/column and /tcb/posterloc/column* for examples.

  • /tcb/posterloc/fixed height(no value, initially 0pt)New: 2017-07-03

  • Sets the height of the current box span rows as denoted by /tcb/posterloc/rowspan. This can be used, if not /tcb/posterloc/row, but another height placement option is applied.

  • /tcb/posterloc/sequence=⟨sequence⟩(no default, initially unset)New: 2017-07-03

  • The box is broken into partial boxes. These partial boxes are placed following the given ⟨sequence⟩ of placements. The feasible syntax for the ⟨sequence⟩ is: ⟨column a⟩ between ⟨name a1⟩ and ⟨name a2⟩ then
    ⟨column b⟩ between ⟨name b1⟩ and ⟨name b2⟩ then
    ⟨column c⟩ between ⟨name c1⟩ and ⟨name c2⟩ then… Obviously, this places the first part box at ⟨column a⟩ between ⟨name a2⟩ and ⟨name a2⟩. The second box part is placed at ⟨column b⟩ between ⟨name b2⟩ and ⟨name b2⟩, and so on.

    Compiled output

    \begin{tcbposter}[
    poster = {showframe,height=6cm,spacing=2mm,rows=2},
    boxes = {beamer,colframe=blue!50!black,colback=blue!50,colupper=yellow!50},
    ]
    \posterbox[adjusted title=A]{name=A,column=1,below=top,span=2}{First box}
    \posterbox{name=B,column=2,above=bottom,span=2}{Second box}
    \posterbox[adjusted title=C,colframe=red!50!black,colback=red!50]{
    name=C, sequence=1 between A and bottom then
    2 between A and B then
    3 between top and B
    }{\lipsum[2]}
    \end{tcbposter}