# TikZposter leaves a gap in empty innerblock title

As an example, I've included a TikZPoster block I've created below. Notice the white gaps in between the blue innerblocks. Normally, the innerblock background colors alternate between blue and white, meaning that white innerblocks appear larger. I've concluded that this white gap is an artifact of having no innerblocktitle, because if I draw nothing over it looks like this:

\draw[draw=none, fill=innerblockbodybgcolor]
(innerblockbody.south west) rectangle (innerblockbody.north east);


In contrast, if I do draw over the the title area the gap goes away (but the innerblock's contents are not visually centered anymore):

\draw[draw=none, fill=innerblockbodybgcolor]
(innerblockbody.south west) rectangle (innerblocktitle.north east);


This space is worthless for me as I have other means of creating text separation. The gap is still visible whenever I use \useinnerblockstyle{Minimal} (or the Basic class, for that matter) and \useblockstyle{Basic}. How can I disable it? It takes up unnessecary room and makes images appear off-center if I try to fill the space up as in my last provided image.

MWE:

\documentclass[25pt, a0paper, portrait, margin=0pt, innermargin=40pt, colspace=50pt, blockverticalspace=50pt]{tikzposter}

% dummy text generation
\usepackage{lipsum}

% based on "Minimal" blockstyle
\defineblockstyle{Minimal2}{
titlewidthscale=1, bodywidthscale=1, titlecenter,
titleoffsetx=0pt, titleoffsety=0pt, bodyoffsetx=0pt, bodyoffsety=0pt,
bodyverticalshift=0pt, roundedcorners=6, linewidth=0.42cm,
titleinnersep=1cm, bodyinnersep=0.00cm}
{
\begin{scope}[line width=\blocklinewidth, rounded corners=\blockroundedcorners]
% title rectangle
\draw[draw=none, fill=blue]
(blocktitle.south west) rectangle (blocktitle.north east);
% box outline
\draw[color=blue, fill=none]
(blockbody.south west) rectangle (blocktitle.north east);
\end{scope}
}

% based on "Minimal" innerblockstyle
\defineinnerblockstyle{MinimalInner}{
titlewidthscale=1, bodywidthscale=1, titlecenter,
titleoffsetx=0pt, titleoffsety=-0pt, bodyoffsetx=0pt, bodyoffsety=90pt,
bodyverticalshift=0pt, roundedcorners=0, linewidth=0.0cm,
titleinnersep=0pt, bodyinnersep=25pt
}{
\begin{scope}[line width=\innerblocklinewidth, rounded corners=\innerblockroundedcorners]
\ifInnerblockHasTitle %
\draw[draw=none, fill=blue]
(innerblockbody.south west) rectangle (innerblocktitle.north east);
\else
\draw[draw=none, fill=blue]
(innerblockbody.south west) rectangle (innerblockbody.north east);
\fi
\end{scope}
}

\begin{document}

\usebackgroundstyle{Default}
\useblockstyle{Minimal2}
\useinnerblockstyle{MinimalInner}

\block{BLOCKTITLE}{\innerblock{}{\lipsum[1]} \innerblock{}{\lipsum[1]}}

\end{document}

• Welcome to TeX.SX! It would be nice to have a Minimal Working Example (that is a code snippet which can be compiled and shows your problem). As such, it is a bit difficult to reproduce your issue. Aug 23 '18 at 18:33
• I've added a MWE that shows the gaps I want to get rid of. Aug 23 '18 at 19:26
• Is there any reason why you don’t just write \draw[color=blue, fill=blue] (blockbody.south west) rectangle (blocktitle.north east); to fill the whole block body with your desired background color and not just each single innerblock? Aug 23 '18 at 19:37
• Yes, as stated in my question, I normally alternate the innerblock backgrounds between white and blue. The images just serve as a clear demonstration of the gaps that appear. Aug 23 '18 at 19:39
• I see. This is really strange. You could use titleoffsety=-10pt in \defineinnerblockstyle as a workaround. Aug 23 '18 at 19:52

The problem you describe probably comes from the fact that, in the tikzposter document class, a node called innerblocktitle is defined at the position where the inner block title should appear. This node, however, is always defined, even if the inner block title is empty. The bug here is, that nodes have an inner sep by default, which is obviously causing this strange space you notive.

In the code below, I use the package xpatch to append the style inner sep=0pt to this node. This removes the spacing. Further, in order to minimise the tiny space between adjacent inner blocks (which I assume is due to rounding errors), you may want to add a blue border around the inner blocks in the same color as the background.

\documentclass[25pt, a0paper, portrait, margin=0pt, innermargin=40pt, colspace=50pt, blockverticalspace=50pt]{tikzposter}

% dummy text generation
\usepackage{lipsum}

\usepackage{xpatch}
\makeatletter
\xpatchcmd{\innerblock}{\node[minimum width=\TP@innerblocktitlewidth, minimum height=\TP@innerblocktitleheight, anchor=center] (innerblocktitle)}{\node[inner sep=0pt, minimum width=\TP@innerblocktitlewidth, minimum height=\TP@innerblocktitleheight, anchor=center] (innerblocktitle)}{}{}
\makeatother

% based on "Minimal" blockstyle
\defineblockstyle{Minimal2}{
titlewidthscale=1, bodywidthscale=1, titlecenter,
titleoffsetx=0pt, titleoffsety=0pt, bodyoffsetx=0pt, bodyoffsety=0pt,
bodyverticalshift=0pt, roundedcorners=6, linewidth=10pt,
titleinnersep=1cm, bodyinnersep=0.00cm}
{
\begin{scope}[line width=\blocklinewidth, rounded corners=\blockroundedcorners]
% title rectangle
\fill[blue]
(blocktitle.south west) rectangle (blocktitle.north east);
% box outline
\draw[blue]
(blockbody.south west) rectangle (blocktitle.north east);
\end{scope}
}

% based on "Minimal" innerblockstyle
\defineinnerblockstyle{MinimalInner}{
titlewidthscale=1, bodywidthscale=1, titlecenter,
titleoffsetx=0pt, titleoffsety=0pt, bodyoffsetx=0pt, bodyoffsety=90pt,
bodyverticalshift=0pt, roundedcorners=0, linewidth=0.0cm,
titleinnersep=0pt, bodyinnersep=25pt
}{
\begin{scope}[line width=\innerblocklinewidth, rounded corners=\innerblockroundedcorners]
\ifInnerblockHasTitle%
\filldraw[blue]
(innerblockbody.south west) rectangle (innerblocktitle.north east);
\else
\filldraw[blue]
(innerblockbody.south west) rectangle (innerblockbody.north east);
\fi
\end{scope}
}

\begin{document}

\usebackgroundstyle{Default}
\useblockstyle{Minimal2}
\useinnerblockstyle{MinimalInner}

\block{BLOCKTITLE}{\innerblock{}{\lipsum[1]}\innerblock{}{\lipsum[1]}}

\end{document}

• I'm pretty sure the tiny space went away on it's own after your xpatch fix. Thank you! Aug 23 '18 at 21:32