I want to use a tikzposter block as a title with no content inside the block. I am currently using:
\block{Proposed trajectory}{}
Which gives me:
However, I would like to have no white bar at all, just a blue bar with the title.
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It only takes a minute to sign up.
Sign up to join this communityI want to use a tikzposter block as a title with no content inside the block. I am currently using:
\block{Proposed trajectory}{}
Which gives me:
However, I would like to have no white bar at all, just a blue bar with the title.
\documentclass{tikzposter}
\begin{document}
{
\colorlet{blockbodybgcolor}{blocktitlebgcolor}
\colorlet{blockbodyfgcolor}{white}
\block{}{\centering \bfseries \LARGE Proposed}
}
\end{document}
I think samcarter's answer makes the block a bit too big (If you want the banner to have the same hight as the banner on other blocks this will become a problem)
So I suggest defining a new block style:
\defineblockstyle{Justtitle}{
}{
\ifBlockHasTitle
\draw[color=framecolor, fill=blocktitlebgcolor,
rounded corners=\blockroundedcorners] (blocktitle.south west)
rectangle (blocktitle.north east);
\fi
}
and then using it before a banner only block, and using \useblockstyle{Default}
after the title only block.
An example:
\documentclass{tikzposter}
\defineblockstyle{Justtitle}{
}{
\ifBlockHasTitle
\draw[color=framecolor, fill=blocktitlebgcolor,
rounded corners=\blockroundedcorners] (blocktitle.south west)
rectangle (blocktitle.north east);
\fi
}
\begin{document}
\block{otherblock}{}
\useblockstyle{Justtitle}
\block{bob}{}
\useblockstyle{Default}
\block{normal again}{}
\end{document}
Returns:
Where the height of the bob is the same as that of the otherblock and the normal again banner.