[Tex/LaTex] Creating a table fitting one column of a two column style page (same problem)

tablestwo-column

I have the exact same problem presented in: Creating a table fitting one column of a two column style page. However, the solution there presented does not work for me. The table don't even appear.
So, I want to put a table in just one of the columns, exactly behind the text. I have the following code:

\documentclass[twoside]{article}
\usepackage[hmarginratio=1:1,top=32mm,columnsep=25pt]{geometry}
\usepackage{multicol}
\begin{document}
\begin{multicols}{2}

 Among the risk factors (...). Table \ref{T1} lists some of them.

\begin{table}[b]
\centering
\caption{My caption}
\label{T1}
\resizebox{\columnwidth}{!}{%
\begin{tabular}[b]{l}
\hline
 High LDL cholesterol \\
 Cigarette smoking\\
 Hypertension (BP$\geq 140/90 mmH$g or on  antihypertensive medication)\\
 Low HDL cholesterol ($<1.0 mmol/L$) \\
 Diabetes mellitus \\
 Family history of premature CHD \\
 Age (men$\geq 45$ years; women$\geq 55$ years)\\
 Lifestyle risk factors\\
 Obesity (BMI$\geq 30Kg/m^{2}$)\\
 Physical inactivity \\
 Atherogenic diet\\
 Emerging risk factors \\
 Lipoprotein (a)  \\
 Prothrombotic factors \\
 Proinflammatory factors \\
 Impaired fasting glucose \\
 Subclinical atherosclerosis \\
 \hline
 \end{tabular}
 }
 \end{table}

 \end{multicols}
 \end{document}

I have also tried this:

\begin{table}[b]
\centering
\caption{My caption}
\label{T1}
\begin{tabular}[b]{l}
\hline
 High LDL cholesterol \\
 Cigarette smoking\\
 Hypertension (BP$\geq 140/90 mmH$g or on  antihypertensive medication)\\
 Low HDL cholesterol ($<1.0 mmol/L$) \\
 Diabetes mellitus \\
 Family history of premature CHD \\
 Age (men$\geq 45$ years; women$\geq 55$ years)\\
 Lifestyle risk factors\\
 Obesity (BMI$\geq 30Kg/m^{2}$)\\
 Physical inactivity \\
 Atherogenic diet\\
 Emerging risk factors \\
 Lipoprotein (a)  \\
 Prothrombotic factors \\
 Proinflammatory factors \\
 Impaired fasting glucose \\
 Subclinical atherosclerosis \\
 \hline
 \end{tabular}
 \end{table}

What am I doing wrong?

Best Answer

As stated in the comments, you can not use a normal float in the multicols-environment. You have to use their starred versions, in your case table*. You can of course put the table-environment outside the multicols-environment. Please check the multicol manual.

In either case, the table won't be put in one of the columns, hence it makes no sense, to use the \resizebox-command, to scale it to width. I removed it in my solution. If you insist on it, you'll have to load the graphics- or graphicx-package, too.

This will work from within multicols:

\documentclass[twoside]{article}
\usepackage[hmarginratio=1:1,top=32mm,columnsep=25pt]{geometry}
\usepackage{lipsum} %% in order to produce some more blindtext.
\usepackage{multicol} %% To use two columns equally filled

\begin{document}
\begin{multicols}{2}

  \lipsum[1-2]
  Among the risk factors (...). Table \ref{T1} lists some of them.

  \begin{table*}[b]
    \centering
    \caption{My caption}
    \label{T1}
      \begin{tabular}{l}
        \hline
        High LDL cholesterol \\
        Cigarette smoking\\
        Hypertension (BP$\geq 140/90 mmH$g or on  antihypertensive medication)\\
        Low HDL cholesterol ($<1.0 mmol/L$) \\
        Diabetes mellitus \\
        Family history of premature CHD \\
        Age (men$\geq 45$ years; women$\geq 55$ years)\\
        Lifestyle risk factors\\
        Obesity (BMI$\geq 30Kg/m^{2}$)\\
        Physical inactivity \\
        Atherogenic diet\\
        Emerging risk factors \\
        Lipoprotein (a)  \\
        Prothrombotic factors \\
        Proinflammatory factors \\
        Impaired fasting glucose \\
        Subclinical atherosclerosis \\
        \hline
      \end{tabular}
  \end{table*}

\end{multicols}
\end{document}

I personally prefer this approach:

\documentclass[twoside]{article}
\usepackage[hmarginratio=1:1,top=32mm,columnsep=25pt]{geometry}
\usepackage{graphicx}
\usepackage{lipsum}
\usepackage{multicol} %% To use two columns equally filled
\usepackage{booktabs} %% for better lines in tables.


\begin{document}
\section{First Section}
\begin{multicols}{2}
  \lipsum[1-2]
  Among the risk factors (...). Table \ref{T1} lists some of them.
\end{multicols}

\begin{table}[b]
  \centering
  \caption{My caption}
  \label{T1}
  \begin{tabular}{l}
    \toprule
    High LDL cholesterol \\
    Cigarette smoking\\
    Hypertension (BP$\geq 140/90 mmH$g or on  antihypertensive medication)\\
    Low HDL cholesterol ($<1.0 mmol/L$) \\
    Diabetes mellitus \\
    Family history of premature CHD \\
    Age (men$\geq 45$ years; women$\geq 55$ years)\\
    Lifestyle risk factors\\
    Obesity (BMI$\geq 30Kg/m^{2}$)\\
    Physical inactivity \\
    Atherogenic diet\\
    Emerging risk factors \\
    Lipoprotein (a)  \\
    Prothrombotic factors \\
    Proinflammatory factors \\
    Impaired fasting glucose \\
    Subclinical atherosclerosis \\
    \bottomrule
  \end{tabular}
\end{table}

\section{Second Section}
\begin{multicols}{2}  
  \lipsum[3-4]
\end{multicols}
\end{document}