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.

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

1 Answer 1

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .