I'm a problem when using the package tabularx.
Here is how I use the table:
\documentclass{report}
\usepackage{tabularx}
\usepackage[margin=3.5cm]{geometry}
\begin{document}
\noindent \begin{tabular}[H]{|l|c|c|c|}
\hline
Simple text & A simple long text maybe very long or not i dont know c: & Simple text & Another simple long text maybe very long or not i dont know c:\\
\hline
\end{tabular}
\bigskip
\noindent\begin{tabularx}{\textwidth}{|c|X|X|X|}
\hline
Simple text & A simple long text maybe very long or not i dont know c: & Simple text & Another simple long text maybe very long or not i dont know c:\\
\hline
\end{tabularx}
\end{document}
I was using the the regular taular but I need to have auto linebreak. I get theses long space when he breaks line. How can I have normal space ?
Thanks in advance, MYT.
SOLUTION by leandriis
The 'long spaces' are due to X columns being based on justified p columns. To get rid of them you could define your own column type as follows:
\newcolumntype{Y}{>{\raggedright\arraybackslash}X}

Xcolumns being based on justifiedpcolumns. To get rid of them you could define your own column type as follows:\newcolumntype{Y}{>{\raggedright\arraybackslash}X}. I don't understand the part about the margin. If I use your MWE, the table spreads from the left to the right margin as expected. You can check that by including\usepackage{showframe}. – leandriis Feb 02 '18 at 07:59\begin{tabular}[H]tabular does not have an H option (it just ignores unknown options rather than give an error) – David Carlisle Feb 02 '18 at 10:44