# How to adjust table to fit column size?

In the following code, the table is scaled over the margin. I would like to adjust it and not resize the font of text inside table.

\newcommand{\CLASSINPUTbottomtextmargin}{25.4mm}
\newcommand{\CLASSINPUTtoptextmargin}{19.1mm}
\newcommand{\CLASSINPUToutersidemargin}{15.8mm}
\newcommand{\CLASSINPUTinnersidemargin}{17mm}
\setlength{\textfloatsep}{-5pt}
\documentclass[letterpaper,conference]{IEEEtran}

\usepackage{graphicx}
\usepackage{array,multirow,makecell}
\usepackage{forest}

\makeatletter
\newcolumntype{P}[1]{>{\centering\arraybackslash}p{#1}}

\setcellgapes{1pt}
\makegapedcells
\newenvironment{multicases}[1]

\title{The principal title: hello !}

\begin{document}
\maketitle
this is just a text.this is just a text.this is just a text.this is just a text.this is just   a text.this is just a text.this is just a text.this is just a text.this is just a text.this is  just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this   is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text. this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.

\begin{table}[h]
\begin{tabular}{|c|l|}
\hline
\textbf{\textit{notation}} & \multicolumn{1}{c|}{\textbf{\textit{Designation}}} \\    \hline
\textbf{1-this is just a text.}  & \textit{this is just a text.this is just a text.this is just a text.this is just a text.}   \\ \hline
\textbf{2-this is just a text.}  & \textit{this is just a text.this is just a text.this is just a text.this is just a text.}   \\ \hline
\textbf{3-this is just a text.}  & \textit{this is just a text.this is just a text.this is just a text.this is just a text.}    \\ \hline
\textbf{4-this is just a text.}  & \textit{this is just a text.this is just a text.this is just a text.this is just a text.}   \\ \hline
\textbf{5-this is just a text.}  & \textit{this is just a text.this is just a text.this is just a text.this is just a text.}   \\ \hline
\textbf{1-this is just a text.}  & \textit{this is just a text.this is just a text.this is just a text.this is just a text.}   \\ \hline
\textbf{2-this is just a text.}  & \textit{this is just a text.this is just a text.this is just a text.this is just a text.}   \\ \hline
\textbf{3-this is just a text.}  & \textit{this is just a text.this is just a text.this is just a text.this is just a text.}    \\ \hline
\textbf{4-this is just a text.}  & \textit{this is just a text.this is just a text.this is just a text.this is just a text.}   \\ \hline
\textbf{5-this is just a text.}  & \textit{this is just a text.this is just a text.this is just a text.this is just a text.}   \\ \hline
\textbf{1-this is just a text.}  & \textit{this is just a text.this is just a text.this is just a text.this is just a text.}   \\ \hline
\textbf{2-this is just a text.}  & \textit{this is just a text.this is just a text.this is just a text.this is just a text.}   \\ \hline
\textbf{3-this is just a text.}  & \textit{this is just a text.this is just a text.this is just a text.this is just a text.}    \\ \hline
\textbf{4-this is just a text.}  & \textit{this is just a text.this is just a text.this is just a text.this is just a text.}   \\ \hline
\textbf{5-this is just a text.}  & \textit{this is just a text.this is just a text.this is just a text.this is just a text.}   \\ \hline
\end{tabular}
\end{table}

\end{document}


Thank you

You can use tabularx.

\newcommand{\CLASSINPUTbottomtextmargin}{25.4mm}
\newcommand{\CLASSINPUTtoptextmargin}{19.1mm}
\newcommand{\CLASSINPUToutersidemargin}{15.8mm}
\newcommand{\CLASSINPUTinnersidemargin}{17mm}
\setlength{\textfloatsep}{-5pt}
\documentclass[letterpaper,conference]{IEEEtran}

\usepackage{array}
\usepackage{multirow}
\usepackage{makecell}
\usepackage{tabularx}

\setcellgapes{1pt}
\makegapedcells
% \newenvironment{multicases}[1]{\let\@ifnextchar\new@ifnextchar

\title{The principal title: hello !}

\begin{document}
\maketitle
this is just a text.this is just a text.this is just a text.this is just a text.this is just   a text.this is just a text.this is just a text.this is just a text.this is just a text.this is  just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this   is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text. this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.

\begin{table}[h]
\begin{tabularx}{\linewidth}{|>{\bfseries}c|>{\itshape}X|}
\hline
\textit{notation} &  \multicolumn{1}{c|}{\textbf{\textit{Designation}}} \\    \hline
1-this is just a text.  & this is just a text.this is just a text.this is just a text.this is just a text.   \\ \hline
2-this is just a text.  & this is just a text.this is just a text.this is just a text.this is just a text.   \\ \hline
3-this is just a text.  & this is just a text.this is just a text.this is just a text.this is just a text.    \\ \hline
4-this is just a text.  & this is just a text.this is just a text.this is just a text.this is just a text.   \\ \hline
5-this is just a text.  & this is just a text.this is just a text.this is just a text.this is just a text.   \\ \hline
1-this is just a text.  & this is just a text.this is just a text.this is just a text.this is just a text.   \\ \hline
2-this is just a text.  & this is just a text.this is just a text.this is just a text.this is just a text.   \\ \hline
3-this is just a text.  & this is just a text.this is just a text.this is just a text.this is just a text.    \\ \hline
4-this is just a text.  & this is just a text.this is just a text.this is just a text.this is just a text.   \\ \hline
5-this is just a text.  & this is just a text.this is just a text.this is just a text.this is just a text.   \\ \hline
1-this is just a text.  & this is just a text.this is just a text.this is just a text.this is just a text.   \\ \hline
2-this is just a text.  & this is just a text.this is just a text.this is just a text.this is just a text.   \\ \hline
3-this is just a text.  & this is just a text.this is just a text.this is just a text.this is just a text.    \\ \hline
4-this is just a text.  & this is just a text.this is just a text.this is just a text.this is just a text.   \\ \hline
5-this is just a text.  & this is just a text.this is just a text.this is just a text.this is just a text.   \\ \hline
\end{tabularx}
\end{table}

\end{document}


• Thank you so much
– Lee
May 26, 2020 at 11:49

You may also use tabular* or tabulary.

\newcommand{\CLASSINPUTbottomtextmargin}{25.4mm}
\newcommand{\CLASSINPUTtoptextmargin}{19.1mm}
\newcommand{\CLASSINPUToutersidemargin}{15.8mm}
\newcommand{\CLASSINPUTinnersidemargin}{17mm}
\setlength{\textfloatsep}{-5pt}
\documentclass[twocolumn]{article}

\usepackage{tabulary, caption}

\setlength{\extrarowheight}{1pt}

\title{The principal title: hello !}

\begin{document}
\maketitle
this is just a text.this is just a text.this is just a text.this is just a text.this is just   a text.this is just a text.this is just a text.this is just a text.this is just a text.this is  just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this   is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text. this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.

\begin{table}

\caption{Table with tabular*}

\begin{tabular*}{\columnwidth}{|@{\extracolsep{\fill}}>{\bfseries}c|>{\itshape}p{0.48\columnwidth}|}
\hline
\itshape Notation & \multicolumn{1}{c|}{\bfseries Designation} \\    \hline
1-this is just a text.  & this is just a text.this is just a text.this is just a text.this is just a text. \\ \hline
2-this is just a text.  & this is just a text.this is just a text.this is just a text.this is just a text. \\ \hline
3-this is just a text.  & this is just a text.this is just a text.this is just a text.this is just a text. \\ \hline
4-this is just a text.  & this is just a text.this is just a text.this is just a text.this is just a text. \\ \hline
5-this is just a text.  & this is just a text.this is just a text.this is just a text.this is just a text. \\ \hline
1-this is just a text.  & this is just a text.this is just a text.this is just a text.this is just a text. \\ \hline
2-this is just a text.  & this is just a text.this is just a text.this is just a text.this is just a text. \\ \hline
3-this is just a text.  & this is just a text.this is just a text.this is just a text.this is just a text. \\ \hline
4-this is just a text.  & this is just a text.this is just a text.this is just a text.this is just a text. \\ \hline
5-this is just a text.  & this is just a text.this is just a text.this is just a text.this is just a text. \\ \hline

\end{tabular*}
\end{table}

\begin{table}

\caption{Table with tabulary}
\begin{tabulary}{\columnwidth}{|>{\bfseries}c|>{\itshape}L|}

\hline
\itshape Notation & \multicolumn{1}{c|}{\bfseries Designation} \\    \hline
1-this is just a text.  & this is just a text.this is just a text.this is just a text.this is just a text. \\ \hline
2-this is just a text.  & this is just a text.this is just a text.this is just a text.this is just a text. \\ \hline
3-this is just a text.  & this is just a text.this is just a text.this is just a text.this is just a text. \\ \hline
4-this is just a text.  & this is just a text.this is just a text.this is just a text.this is just a text. \\ \hline
5-this is just a text.  & this is just a text.this is just a text.this is just a text.this is just a text. \\ \hline
1-this is just a text.  & this is just a text.this is just a text.this is just a text.this is just a text. \\ \hline
2-this is just a text.  & this is just a text.this is just a text.this is just a text.this is just a text. \\ \hline
3-this is just a text.  & this is just a text.this is just a text.this is just a text.this is just a text. \\ \hline
4-this is just a text.  & this is just a text.this is just a text.this is just a text.this is just a text. \\ \hline
5-this is just a text.  & this is just a text.this is just a text.this is just a text.this is just a text. \\ \hline

\end{tabulary}
\end{table}

\end{document}