# [Tex/LaTex] How to create a table which has large amount of text with centralized text

tables

Sample image

What all should I do to create a table as shown in the figure

Using something like \multirow makes it very difficult for manually splitting the line

Using p{some cm} in table leaves other columns with single entries unformatted, licking the top rule of the cell..

How can these entries be centered in the cells

Tried something like

\begin{table}[!h]

\begin{center}

\caption{Summary .....}

\begin{tabularx}{0.30\textwidth}{|c|X|X|X|}

\hlne

\textbf{Author} & \textbf{Lot size} & \textwidth{Inventory Cost Item} & \textwidth{Carbon Emission \& Enviornmentall Cost} \\
\hline

some text   & some text & Order cost inventory holding cost & Carbon emission form logistic and wearhouse in linear in the order quantity \\ \hline

\end{table}

\end{center}

\end{tabularx}


The code you provided wasn't close to compilable: you had environments closing out of order, typos in commands, among other things.

Your question isn't totally clear, but I believe you're looking to vertically center the content of each row instead of having everything start at the top of the cell. You can achieve this with

\renewcommand{\tabularxcolumn}{m}


which sets the tabularx X column to use the m column type (vertically centered) instead of the default p column type (top aligned).

Other notes: don't use the center environment inside the table environment: this will add extra vertical spacing. Just putting \centering inside the table environment is sufficient. But that's not necessary in my example below, since the table spans the full \textwidth anyway.

I also added booktabs commands to the example below for better spacing and appearance of the table, and set the X columns \raggedright since it's hard to do full justification well in this narrow a column width:

\documentclass{article}
\usepackage{booktabs,tabularx}
\renewcommand{\tabularxcolumn}{m}

\begin{document}
\begin{table}
\caption{Summary\dots}
\begin{tabularx}{\textwidth}{c*{3}{>{\raggedright\arraybackslash}X}}
\toprule
Authors & Lot Size Model & Inventory Cost Terms
& Carbon Emission and Environmental Cost Terms \\
\midrule
some text & some text & Order cost inventory holding cost
& Carbon emission form logistic and warehouse is linear in the order quantity \\
\bottomrule
\end{tabularx}
\end{table}
\end{document}