1

Can anyone help me move this table to the middle in overleaf? I've tried to look every where online but I can't seem to find the answer.

Here is the code to my table if it help:

\begin{table}[h!]

\caption{Variables and Parameters in SIR}

\centering

\begin{tabular}{c c c}

\hline\hline

S & Susceptibility stage for humans and mosquitoes \\

I & Infection stage for humans and mosquitoes\\

R & Recovered stage for humans\\

\alpha & Transmission rate of human becoming infected\\

\beta & Removal rate parasites from human  \\

\gamma & The rate which recovered individuals return to the susceptible statue due to loss of immunity\\

\epsilon & Probability of transmission of infection from a infected human to a susceptible mosquito, given that a contact between the two occurs \\

\delta & Probability of transmission of infection from a recovered human
to a susceptible mosquito, given that a contact between the two occurs. \\

\zeta & Transmission rate of mosquito becoming infected\\

\eta & Probability of transmission of infection from an infectious mosquito to a susceptible human, given that a contact between the two occurs.\\

\hline 

\end{tabular}

\end{table}

Here is how my table looks: enter image description here

6
  • Welcome to TeX.SE!! You can insert \hspace*{-<<value>>cm} just before \begin{tabular} and try different values changing <<value>> to, for example 5 (so -5cm). – manooooh Dec 1 '18 at 1:02
  • Your table is too wide to fit margins. There are various solutions, but please post a minimal compilable code – Bernard Dec 1 '18 at 1:07
  • @Bernard okay, give me a sec. – CSmajor Dec 1 '18 at 1:12
  • actual coded is added. – CSmajor Dec 1 '18 at 1:16
  • 1
    If the proposed solution in the linked duplicate does not answer your question, then it'll be answered by My table doesn't fit; what are my options? – Werner Dec 1 '18 at 1:52
0

one way to to fit your table in \textwidth is break long text in second column into more lines. for example as show the following image of table:

enter image description here

mwe for above table is:

\documentclass{article}
\usepackage{booktabs, makecell, tabularx}
\usepackage[skip=1ex]{caption}

\begin{document}
    \begin{table}[h!]
    \caption{Variables and Parameters in SIR}
    \centering
    \setcellgapes{2pt}
    \makegapedcells
\begin{tabularx}{\linewidth}{>{$}l<{$}X}
    \toprule
S           & Susceptibility stage for humans and mosquitoes \\
I           & Infection stage for humans and mosquitoes\\
R           & Recovered stage for humans\\
\alpha      & Transmission rate of human becoming infected\\
\beta       & Removal rate parasites from human  \\
\gamma      & The rate which recovered individuals return to the susceptible statue due to loss of immunity\\
\epsilon    & Probability of transmission of infection from a infected human to a susceptible mosquito, given that a contact between the two occurs \\
\delta      & Probability of transmission of infection from a recovered human
to a susceptible mosquito, given that a contact between the two occurs. \\
\zeta       & Transmission rate of mosquito becoming infected\\
\eta        & Probability of transmission of infection from an infectious mosquito to a susceptible human, given that a contact between the two occurs.\\
    \bottomrule
\end{tabularx}
    \end{table}
\end{document}

Not the answer you're looking for? Browse other questions tagged or ask your own question.