- LaTeX Cookbook
- Stefan Kottwitz
- 1340字
- 2021-07-09 21:24:59
Creating a large poster
We have seen informational or scientific posters at conferences or on the walls of universities or institutes. They mostly have certain characteristics in common:
- They have a large size, such as A2, A1, or even A0
- People may look at them from far away, but also from a very short distance
In consequence, we get some requirements for typesetting:
- The page layout dimensions should work with such a big size.
- We need a wide range of font sizes. We should be able to read while standing close, but we also need large, catchy headings.
- The poster should be partitioned into digestible blocks. Specifically, each block should not exceed the usual line width we know from body texts. Also, excessively wide lines will make it hard to focus and to skip back to the start of the next line. So, the lines in blocks should not be much wider than about 40 or 50 characters long.
- Blocks should have distinct headings.
- Graphical elements such as colors and lines can be used to divide the poster contents in parts.
- Images should be vector graphics or should have a high resolution.
In this recipe, we will create a poster of A0 size in landscape orientation. It will show some blocks containing the dummy text as a placeholder, math, and images. As sample images, we will take a flowchart from Chapter 9, Creating Graphics, and a plot from Chapter 10, Advanced Mathematics. There, you can find the source code. You can later replace the dummy text and other parts with your own content.
How to do it...
We will use the tikzposter
class. The document is structured in columns and blocks. Follow these steps:
- Begin with the
document
class. A0 is the default paper size. We state landscape orientation as the option:\documentclass[landscape]{tikzposter}
- Choose a theme, which provides a set of colors and decorations. We choose the blue
Wave
theme:\usetheme{Wave}
- Load the
lipsum
package to generate the dummy text:\usepackage{lipsum}
- For dividing wider blocks in text columns, we load the
multicol
package. On account of the large paper, we set the column separation and the separation line width to high values:\usepackage{multicol} \setlength{\columnsep}{4cm} \setlength{\columnseprule}{1mm}
- Define macros for repeated tasks, if desired. In our case, it will be a macro for including an image with an optional caption:
\newcommand*{\image}[2][]{% \begin{tikzfigure}[#1] \includegraphics[width=\linewidth]{#2} \end{tikzfigure}}
- Start the document:
\begin{document}
- Declare the author and title, and print it out:
\title{\LaTeX\ in Use} \author{John Doe} \maketitle
- Begin a set of columns:
\begin{columns}
- Start a column with a width of 65 percent of the available text width:
\column{.65}
- Define a block with the title
Workflow
in the first argument; the second argument containing dummy text and an image:\block{Workflow}{ \lipsum[1] \image[\LaTeX\ workflow]{flowchart} }
- Still in the first column, start a set of subcolumns:
\begin{subcolumns}
- The first subcolumn will take half of the available width, in this case, the width of the left column:
\subcolumn{.5}
- Create a block with a bulleted list and a mathematical equation to get a feeling of how it will look on a poster. We will also use a colored box and an inner block with a title for the equation:
\block{Mathematics}{ Take a coffee, then: \bigskip \coloredbox{\begin{itemize} \item State \item Proof \item Write in \LaTeX \end{itemize}} \bigskip \innerblock{Integral approximation}{ \[ \int_a^b f(x) dx \approx (b-a) \sum_{i=0}^n w_i f(x_i) \] } }
- Add a note, which will have a callout shape, pointing to the formula:
\note[targetoffsetx = 4.5cm, targetoffsety = -5cm, angle = -30, connection]{Weight function}
- Make another subcolumn, taking the other half of the available width. Insert a block filled with text and end the
subcolumns
environment:\subcolumn{.5} \block{Text}{\lipsum[1]} \end{subcolumns}
- Now that we are back to our main
column
environment, make another column, print a block with an image and some text, and then end thecolumns
environment:\column{.35} \block{Plotting functions}{ \image{plot} \lipsum[4] } \end{columns}
- As we ended the columns, a block will use the whole available width. To keep the text readable, we will now use the
multicol
package. We divide the text itself into columns using amulticolumn
environment with four columns:\block{Conclusion and outlook}{ \begin{multicols}{4} \lipsum[10-11] \end{multicols} }
- End the document:
\end{document}
- Compile the document, and take a look:
How it works...
The tikzposter
package supports large paper sizes, large fonts, and it takes care of block heights and spacing between columns. We, as users, just decided the relative column width.
Several class options are provided. You can add them to the \documentclass
command like we did with the preceding landscape
option. Let's take a look at the following:
- The paper size can be chosen with the
a0paper
,a1paper
, ora2paper
options. Thea0paper
option is the default. - The available font sizes are
12pt
,14pt
,17pt
,20pt
, and25pt
. The last one is the default. - You can select the orientation by using the
landscape
orportrait
command. Theportrait
option is the default. - The standard option
fleqn
for flush left equations is supported. - The standard option
leqno
for numbering the equation at the left-hand side is also supported.
You can adjust several lengths using different options. Give them as class options in the key=value
form with a measurement unit such as mm or cm:
margin
: This is the distance between the edge of the poster area and the edge of the paperinnermargin
: This is the distance from the outermost edge of the blocks to the edge of the postercolspace
: This is the horizontal distance between consecutive columnssubcolspace
: This is the horizontal distance between consecutive columns in a subcolumn environmentblockverticalspace
: This is the distance between the bottom of a block and the top of the next block
A sample call using the defaults will be as follows:
\documentclass[a0paper, portrait, 25pt, margin=0mm, innermargin=15mm, colspace=15mm, subcolspace=8mm, blockverticalspace=15mm]{tikzposter}
The tikzposter
package makes use of the very capable graphics language TikZ. We will see more of TikZ in Chapter 9, Creating Graphics. For now, the main benefit is that tikzposter
provides a lot of predefined styles and color schemes.
You can use a main layout style by using the \usetheme{name}
command. When this book came out, there were nine themes available:
Wave
: This can be seen in our preceding recipeDefault
(left) andBasic
(right): This is shown in the following image:Rays
(left) andSimple
(right), as shown in the following image:Envelope
(left) andBoard
(right), as shown in the following image:Autumn
(left) andDesert
(right), as shown in the following image:
Furthermore, there are predefined styles for color, title, background, notes, blocks, and inner blocks, which can be chosen and composed. There's support for creating further styles.
The commands, which you have seen previously, can be used without support options straight away. However, they can be customized using several options.
The full reference is available by typing the texdoc tikzposter
command in Command Prompt, and online at http://texdoc.net/pkg/tikzposter. You can find a style guide, a feature guide, and much more at https://bitbucket.org/surmann/tikzposter/downloads.
There's more...
One of the first poster classes is a0poster
. It actually supports the paper sizes A0, A1, A2, and A3. It provides font sizes from 12 pt up to 107 pt. Math formulas are printed in a suitable size. There's no specific support for graphics, color, or text placement. For this, you would need additional packages, such as TikZ.
In the recipe Creating a presentation, you saw the beamer
package as a presentation class. The beamerposter
package can be used together with it to produce presentations in poster size. It combines the beamer
package with the a0poster
code. So, you can produce large posters with a wide range of font sizes together with the beamer
package's color and graphics capabilities, such as the beamer
boxes with titles.
As mentioned previously, you can use the texdoc
command or the Internet site http://texdoc.net to access the documentation of the aforementioned classes and packages.
Another solution is provided by the baposter
template. It provides blocks with headings and positioning support. Furthermore, it offers a set of predefined styles. Its download and documentation are available at http://www.brian-amberg.de/uni/poster/.