Problems to fit a table into a column of a twocolumn environment

1,136

read the documentation of the multicol package. here is the relevant item from the "warnings" section:

Floats and marginpars not allowed inside multicols environment!

This message appears if you try to use the \marginpar command or an unstarred version of the figure or table environment. Such floats will disappear!

edit: as pointed out by david carlisle in a comment, it isn't necessary to wrap your table in a float. you can simply input the tabular structure in the location where you want the table to appear in the output.

Share:
1,136

Related videos on Youtube

Bianca Mertens
Author by

Bianca Mertens

Updated on August 01, 2022

Comments

  • Bianca Mertens
    Bianca Mertens over 1 year

    I'm trying to fit a table into one column of a twocolumn environment but everytime I try to fit it in just one column, it disappears. What should I do ?

    \documentclass[10pt,a4paper,final,twoside]{book}
    \usepackage{amsmath}
    \usepackage{amsfonts}
    \usepackage{amssymb}
    \usepackage{graphicx, array}
    \usepackage{lmodern}
    \usepackage{natbib}
    \usepackage{enumitem}
    \usepackage{xcolor}
    \usepackage{lipsum}
    \usepackage{slantsc}
    \usepackage{float}
    \usepackage[section]{placeins}
     \usepackage[final]{pdfpages}
     \usepackage[hidelinks]{hyperref}
    \usepackage[nottoc, notlof, notlot]{tocbibind}
    \usepackage{titling}
    \usepackage{setspace}
    \doublespacing
    \pagestyle{empty}
    \usepackage{polyglossia}
    \setmainlanguage{french}
    
    \usepackage{tabularx}
    \usepackage{multicol}
    \setlength{\columnsep}{1.5cm}
    \setlength{\columnseprule}{0.2pt}
    \usepackage[left=2.00cm, right=2.00cm, top=2.20cm, bottom=2.20cm]{geometry}
    
    \begin{document}
    \lipsum
    
    \begin{multicols}{2}
    \lipsum
    
    \begin{table}[htb]
    \resizebox{\columnwidth}{!}{%
    \begin{tabular}{ |c|c|c|c| }
     \hline \textbf{inf.} & \textbf{part. pass. it.} & \textbf{part. pass. lat.} & \textbf{derivé} \\  
     \hline bere & bevuto & bibitus & bevizione \\  
     \hline cedere & ceduto & cessus & cessione \\   
     \hline convenire & convenuto & conventus & convenzione \\   
     \hline intervenire  & intervenuto & interventus & intervenzione \\   
      \hline possedere & posseduto & possessus & possessione \\   
     \hline perdere & perduto & perditus & perdizione \\   
     \hline precedere & preceduto & praecessus & precessione \\    
     \hline procedere & proceduto & processus & processione \\  
     \hline premere & premuto & pressus & pressione \\   
     \hline ricevere & ricevuto & receptus & ricezione \\   
     \hline riflettere & riflettuto & reflexus & riflessione \\   
     \hline ripetere & ripetuto & repetitus & ripetizione \\  
     \hline ritenere & ripetuto & repetitus & ripetizione \\   
     \hline vendere & venduto & venditus & vendizione \\      
     \hline volere & voluto & -- & volizione \\
     \hline
    \end{tabular}
    }
    \end{table}
    
    \lipsum
    \end{multicols}
    \end{document}
    
    • David Carlisle
      David Carlisle over 7 years
      just remove the table environment as (a) it doesn't work and (b) you don't need it. Just use tabular
  • Bianca Mertens
    Bianca Mertens over 7 years
    So, what should I do to make this work ? Or do I have to leave it outside of the columns ?
  • Zarko
    Zarko over 7 years
    Why you use a figure environment? I don't see any reasonable reason for that (even caption is not used!). And, even if you use H option for table, put float into mini-page is bad habit and can cause unexpected problems.