tikzposter 中的不同块高度

tikzposter 中的不同块高度

在所附的代码示例中,我创建了 2 列和 2 行的块(见下图)。第一列和第一行(标记为“Test1a”)的高度比其他四个块要短。

该图说明尽管所有块都具有相同的设置,但一个块的高度却不同

我认为我在“设置”中遗漏了一些东西。

代码如下:

\documentclass[usenames,dvipsnames,a0paper, subcolspace = 3 mm, colspace = 3 mm, landscape, innermargin = 3 mm,  margin = 7 mm, blockhorizontalspace = 5 mm, blockverticalspace = 5 mm, 25 pt]{tikzposter}


\usetheme{Envelope} % See Section 5 (Rätt okej!)
\usecolorstyle[colorPalette=BrownBlueOrange]{Germany}

\tikzposterlatexaffectionproofoff

\begin{document}

\makeatletter
    \setlength{\TP@blocktop}{.495\textheight}
\makeatother

\settitle{ }

\begin{columns}
    \column{0.5}
    \colorlet{blockbodybgcolor}{MidnightBlue!100}
    \block[bodyoffsetx = 0 mm, bodyoffsety=-2cm,bodyverticalshift = 0 mm,bodyinnersep = 3 mm,titleinnersep = 0em,roundedcorners=0]{}{\color{white} \flushleft  \fontsize{60pt}{60pt}\selectfont Test1a}

    \column{0.5}
    \colorlet{blockbodybgcolor}{MidnightBlue!100}
    \block[bodyoffsetx = 0 mm, bodyoffsety=-2cm,bodyverticalshift = 0 mm,bodyinnersep = 3 mm,titleinnersep = 0em,roundedcorners=0]{}{\color{white} \flushleft  \fontsize{60pt}{60pt}\selectfont Test1b}
\end{columns}

\begin{columns}
    \column{0.3}
    \colorlet{blockbodybgcolor}{MidnightBlue!100}
    \block[bodyoffsetx = 0 mm, bodyoffsety=-2cm,bodyverticalshift = 0 mm,bodyinnersep = 3 mm,titleinnersep = 0em,roundedcorners=0]{}{\color{white} \flushleft  \fontsize{60pt}{60pt}\selectfont Test2a}

    \column{0.7}
    \colorlet{blockbodybgcolor}{MidnightBlue!100}
    \block[bodyoffsetx = 0 mm, bodyoffsety=-2cm,bodyverticalshift = 0 mm,bodyinnersep = 3 mm,titleinnersep = 0em,roundedcorners=0]{}{\color{white} \flushleft  \fontsize{60pt}{60pt}\selectfont Test2b}
\end{columns}

\end{document} 

有人可以帮我一下吗?

先感谢您!

答案1

不知道具体原因,但是它可以\raggedright代替\flushleft

不相关的事情:

  • 没有blockhorizontalspace类别选项,因此您的设置不起作用。

  • 您无需\color{white}在任何地方添加,只需设置\colorlet{blockbodyfgcolor}{white}

在此处输入图片描述

\documentclass[
  usenames,
  dvipsnames,
  a2paper, 
  subcolspace = 3 mm,
  colspace = 3 mm,
  landscape,
  innermargin = 3 mm,
  margin = 7 mm,
%  blockhorizontalspace = 5 mm, % this is not a valid option, doesn't do anything
  blockverticalspace = 5 mm, 
  25 pt]{tikzposter}


\usetheme{Envelope} % See Section 5 (Rätt okej!)
\usecolorstyle[colorPalette=BrownBlueOrange]{Germany}

\tikzposterlatexaffectionproofoff

\begin{document}

\makeatletter
    \setlength{\TP@blocktop}{.495\textheight}
\makeatother

\settitle{ }
\colorlet{blockbodybgcolor}{MidnightBlue!100}
\colorlet{blockbodyfgcolor}{white} % color of text, no need for \color{white} everywhere
\begin{columns}
    \column{0.5}
    \block[bodyoffsetx = 0 mm,
           bodyoffsety=-2cm,
           bodyverticalshift = 0 mm,
           bodyinnersep = 3 mm,
           titleinnersep = 0em,
           roundedcorners=0]{}{\raggedright\fontsize{60pt}{60pt}\selectfont Test1a}

    \column{0.5}
    \block[bodyoffsetx = 0 mm,
           bodyoffsety=-2cm,
           bodyverticalshift = 0 mm,
           bodyinnersep = 3 mm,
           titleinnersep = 0em,
           roundedcorners=0]{}{\raggedright\fontsize{60pt}{60pt}\selectfont Test1b}
\end{columns}

\begin{columns}
    \column{0.3}
    \block[bodyoffsetx = 0 mm,
           bodyoffsety=-2cm,
           bodyverticalshift = 0 mm,
           bodyinnersep = 3 mm,
           titleinnersep = 0em,
           roundedcorners=0]{}{\raggedright\fontsize{60pt}{60pt}\selectfont Test2a}

    \column{0.7}
    \block[bodyoffsetx = 0 mm,
           bodyoffsety=-2cm,
           bodyverticalshift = 0 mm,
           bodyinnersep = 3 mm,
           titleinnersep = 0em,
           roundedcorners=0]{}{\raggedright \fontsize{60pt}{60pt}\selectfont Test2b}
\end{columns}

\end{document} 

相关内容