1

I would like to have a table with \hlines fit inside of a tikzposter block, but the lines stretch outside of the block, as shown in the following image:

enter image description here

\documentclass[25pt, a0paper, portrait]{tikzposter}

\usepackage{tabularx}

\begin{document}

    \block{Kysymyspatterin kysymykset}{
        \begin{tabularx}{\textwidth}{c|p{0.4\textwidth}}
           Numero& Kysymys (3--9 määrällisiä, loput laadullisia) \\
           \hline\hline
           1& Text here\\
           \hline
           \end{tabularx}

    }

\end{document}

How could the length of the \hlines be limited to the width of the table? Changing the second column to the X type does nothign to alleviate the issue.

  • By NOT using tabularx if you don't have at least one X column. – Bernard Apr 10 at 15:44
2

Quite simple: use \linewidth instead of \textwidth

\documentclass[25pt, a0paper, portrait]{tikzposter}

\usepackage{tabularx}

\begin{document}

    \block{Kysymyspatterin kysymykset}{
        \begin{tabularx}{\linewidth}{c|X}
           Numero& Kysymys (3--9 määrällisiä, loput laadullisia) \\
           \hline\hline
           1& Text here\\
           \hline
           \end{tabularx}

    }

\end{document}

enter image description here

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.