[Tex/LaTex] tikzposter text justification in blocks

tikz-pgftikzposter

I have started to use the tikzposter class and I wonder why the text inside blocks is flushed left by default instead of justified. How can I change the text alignment in blocks to be fully justified?

Best Answer

basically you don't like line 426 which says

        {\large\color{blockbodyfgcolor}#3}

If it said

        {\large\rightskip\z@skip\spaceskip\z@\xspaceskip\z@ 
                               \color{blockbodyfgcolor}#3\par}

then you would get justified text (and fix the \par issue of your other question. It's a bit inconvenient to patch that you could just edit a local, renamed, copy and use that instead, or simpler just put

       \rightskip0pt
       \spaceskip0pt
       \xspaceskip0pt

at the start of your block entry, and

     \par

at the end. (The need for \par is a bug in the class file really, so you could report that)

If you do want to patch it, egreg suggests:

\documentclass{tikzposter}
\usepackage{xpatch}
\makeatletter
\xpatchcmd{\block}
  {\large\color{blockbodyfgcolor}#3}
  {\large\rightskip\z@skip
   \spaceskip\z@\xspaceskip\z@
   \color{blockbodyfgcolor}#3\par}
  {}{}
\makeatother

which would save editing a local copy of the class.