1

I have two poster in tikzposter and would like to hang them next to each other. Each poster has three blocks. I would like similiar blocks to have the same position on both posters. How can this be achieved?

Thank you for your time.

EDIT: code extract:

\documentclass[25pt, a0paper, portrait, margin=0mm, innermargin=15mm, blockverticalspace=15mm, colspace=15mm, subcolspace=8mm]{tikzposter}
\usepackage[utf8]{inputenc}
\useblockstyle{Basic}
\begin{document}
\begin{frame}[t]
\block{Title A}{Content A}
\block{Title B}{Content B} 
\block{Title B}{Content C}
\end{frame}
\end{document}

On both posters, the contents of the blocks have different lengths. The problem is to make them the same height (or the same position for that matter).

Torbjørn T.
  • 206,688
Spezi
  • 75

1 Answers1

3

Here is a solution.

New command \mtblock{Title 1}{Poster 1 content}{Title 2}{Poster 2 content} that save content and measure height of block

One .tex file, to be compiled with \firsttrue for poster 1. and without it or \firstfalse for poster 2.

\documentclass[25pt, a0paper, portrait, margin=0mm, innermargin=15mm, blockverticalspace=15mm, colspace=15mm, subcolspace=8mm]{tikzposter}
\usepackage[utf8]{inputenc}
\useblockstyle{Basic}

\usepackage{lipsum}% just for the example

\newif\iffirst
\newlength\htblockbox
\newbox\blockbox

\newcommand{\mtblock}[4]{%
\block{\iffirst #1\else #3\fi}{%
\setbox\blockbox\vbox{#2}%
\setlength{\htblockbox}{\ht\blockbox}%
\setbox\blockbox\vbox{#4}%
\ifdim\htblockbox<\ht\blockbox
\setlength{\htblockbox}{\ht\blockbox}%
\fi
\parbox[t][\htblockbox][c]{\linewidth}{\iffirst #2\else #4\fi}}}

\title{Block height}
\author{User}



\begin{document}
\maketitle

%\firsttrue     %uncomment for poster 1: A,B,C
\begin{frame}[t]
\mtblock{Title 1}{Poster 1 content}{Title 2}{Poster 2 content}
\mtblock{Title A}{\lipsum[1]}{Title AA}{\lipsum[1-2]}
\mtblock{Title B}{\lipsum[1]}{Title BB}{\lipsum[1-2]}
\mtblock{Title C}{\lipsum[1-2]}{Title CC}{\lipsum[1]}
\end{frame}

\end{document}
touhami
  • 19,520
  • I pasted your code into two documents but uncommented the \firsttrue in one of them. I then removed the lipsum command in one of the blocks, to see if it would work. After compiling both documents, the block without the lipsum command was empty. It was however not the same size or position as the corresponding block on the other poster. I am not sure, if I have made a mistake, but the code does not seem to work. – Spezi May 14 '16 at 20:19
  • my idea is to use only one .tex file to produce two pdfs one with \firsttrue and one without it – touhami May 14 '16 at 20:24
  • Ah, I see. That works. However, for some reason the top half of the poster remains empty. – Spezi May 14 '16 at 20:57
  • I will try to see what happen, but this not related to \mtblock there is something wrong in your example. – touhami May 14 '16 at 21:09
  • I tried your code in another editor. Still the same result. Even though I made no modification whatsoever. I just pasted the code. – Spezi May 14 '16 at 21:14
  • @Spezi I mean the problem happen if you replace Content in your first code with some long text like \lipsum[1]. – touhami May 14 '16 at 21:56
  • @Spezi You need to add \maketitle command after \begin{document} – touhami May 14 '16 at 22:00