1

I'm working with tikzposter and found this bizarre behavior of Table-style inner blocks. It looks like the vertical space before innerblocks is determined by the height of the title, even though the title in this style appears to the left of the innerblock's content. Does anyone have any idea why that might happen and how to fix it?

\documentclass{tikzposter}

\useinnerblockstyle{Table}

\begin{document}

\block{}{

    If the inner block has no title, spacing is right:

    \innerblock{}{No unnecessary spacing above inner block.}

    If the inner block has a single line title, spacing is off by one line:

    \innerblock{Title}{Spacing above inner block off by one line.}

    If the innerblock has has a two-line title, spacing is off by two lines:

    \innerblock{Two-line\\Title}{Spacing above inner block off by two lines.
    \\
    \ldots}

    If the innerblock has has a five-line title, spacing is off by five lines:

    \innerblock{Five\\line\\Title\\\ldots\\\ldots}{Spacing above inner block off by five lines.
        \\
        \ldots\\
        \ldots\\
        \ldots\\
        \ldots}

}

\end{document}

enter image description here

0

This occurs because the height of the title is used to position things, and when the title is next to the body, the extra height is not needed. After posting my initial answer, I realized that it's easier to just set the length \TP@innerblocktitleheight to zero also when the inner block has a title, which for example can be done with the xpatch package and its \xpatchcmd.

enter image description here

\documentclass[a2paper]{tikzposter}

\usepackage{xpatch}
\makeatletter
\xpatchcmd
{\innerblock}% patch this
{\setlength{\TP@innerblocktitleheight}{\ht\TP@innerblocktitlebox + \dp\TP@innerblocktitlebox +2\TP@innerblocktitleinnersep}}% by replacing this
{\setlength{\TP@innerblocktitleheight}{0pt}}%with this
{}{}
\makeatother
\useinnerblockstyle{Table}


\begin{document}

\block{}{

    If the inner block has no title, spacing is right:

    \innerblock{}{No unnecessary spacing above inner block.}

    If the inner block has a single line title, spacing is off by one line:

    \innerblock{Title}{Spacing above inner block off by one line.}

    If the innerblock has has a two-line title, spacing is off by two lines:

    \innerblock{Two-line\\Title}{Spacing above inner block off by two lines.
    \\
    \ldots}

    If the innerblock has has a five-line title, spacing is off by five lines:

    \innerblock{Five\\line\\Title\\\ldots\\\ldots}{Spacing above inner block off by five lines.
        \\
        \ldots\\
        \ldots\\
        \ldots\\
        \ldots}

}
\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.