0

Do you know how can I force my table to be displayed under question 3 and not be displayed under question 5 (it's currently displayed under question 5)? I've put [htb] but that doesn't seem to be working.

\documentclass{article}
\usepackage{xcolor}
\usepackage{tabularray}

\begin{document} ... Question 3 : \begin{table}[htb] \small % \footnotesize \begin{tblr}{hlines={blue}, vlines={blue}, colspec = {c X[0.8, l] X[1.2, c]}, colsep = 3pt, row{1} = {c, font=\bfseries, fg=white, bg=blue}, row{2-Z} = {bg=blue!10} } X & Vulnerabilities \ \SetCell[r=2]{c} x1
& \textbf{Vuln 1 :} my first parapgraph... \ & \textbf{Vuln 2 :} my first parapgraph... \ \end{tblr} \end{table} .... Question 5 : \end{document}

JamesT
  • 3,169
Zokulko
  • 131
  • 2
    Don't use table if you do not want your tabular to float. Just use center or minipage and captionof (search around). The table environment really means "add material that will be labelled as a table and will float around". – Rmano Oct 08 '22 at 14:55
  • For an answer we need more context, If you replace .... with some longer text or paragraph, table will be placed after question 3. The same will happen, if after Question 3 you insert blank line. – Zarko Oct 08 '22 at 15:15
  • Try `\documentclass{article} \usepackage{xcolor}\usepackage{tabularray}\usepackage{lipsum} \begin{document} \lipsum[66]

    Question 3: \begin{table}[htb] \begin{tblr}{hlines={blue}, vlines={blue}, colspec={c Q[font=\bfseries,l] X[c]}, colsep=3pt, row{1}={c, font=\bfseries, fg=white, bg=blue}, row{2-Z}={bg=blue!10}} X & Vulnerabilities \ \SetCell[r=2]{c} x1 & Vuln 1: & my first parapgraph... \ & Vuln 2: & my second parapgraph... \ \end{tblr} \end{table}

    \lipsum[66]

    Question 5: \end{document}`

    – Zarko Oct 08 '22 at 15:22
  • @Rmano it works simply by using center, thanks ! unfortunately the issue is closed you can't write it as an answer... – Zokulko Oct 10 '22 at 18:46

0 Answers0