[Tex/LaTex] Latex ignoring \textwidth in p{}-parameter for tabular

tablestextwidth

I want to create a document that allows to write into the names of new members joining our club.
As these entries are numbered, I figured I made a command generating a command ("entry" in my example) that generates these twopage columns.

To match the size of the page, I used p{0.[13]5\textwidth} in a tabular environment, but the sizes dont match. Even though the widths add up, the table does not match the size of the page, but is smaller.
I'm aware of this question(Tabular with p type columns to fill page width), but the solution did not help me, as it made the table even smaller.
Additionally, the ratios don't match the desired values at all.

I inserted my file below:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\usepackage{tabularx}
\usepackage{graphicx}
\usepackage{adjustbox}

\setlength{\parindent}{0cm}


\newcommand{\points}[1]{#1\dots}
\newcommand{\lmulcol}[2]{\multicolumn{#1}{|l|}{\points{#2}}}
\newcommand{\colfour}[1]{\lmulcol{4}{#1}}
\newcommand{\colthree}[1]{\lmulcol{3}{#1}}
\newcommand{\coltwo}[1]{\lmulcol{2}{#1}}
\newcommand{\colone}[1]{\points{#1}}



\newcommand{\entry}[1]{
\textbf{\Large{#1}}

\vspace{3em}
\begin{tabular}{|p{0.15\textwidth}|
                 p{0.35\textwidth}|
                 p{0.35\textwidth}|
                 p{0.15\textwidth}|}
%\begin{tabular}{|p{\dimexpr 0.15\linewidth-2\tabcolsep}|
%                 p{\dimexpr 0.35\linewidth-2\tabcolsep}|
%                 p{\dimexpr 0.35\linewidth-2\tabcolsep}|
%                 p{\dimexpr 0.15\linewidth-2\tabcolsep}|}
\colfour{Name:}\\
\colfour{Forename:}\\
\coltwo{Date of Birth:} & \coltwo{Place of Birth:}\\
\colone{Adress:} & \colthree{} \\
& \colthree{}\\

\hline

\colone{Reference1:} & \coltwo{} & \colone{Page}\\
\colone{References:} & \coltwo{1} & \colone{Page}\\
                     & \coltwo{2} & \colone{Page}\\
                     & \coltwo{3} & \colone{Page}\\
                     & \coltwo{4} & \colone{Page}\\

\end{tabular}
}


\begin{document}


\entry{601}

TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT 
TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT 
TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT 
TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT 
TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT 
TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT 
TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT 
TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT 
TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT 
TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT 
TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT 
TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT 
TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT
\end{document}

The block of TEXT is to show that textwidth is actually larger.
I also added the table as I get it:
I also added the table as I get it

Best Answer

The main issue is that almost all your p column width specifications were over-written by multicolumn{..}{l} settings so the table was set to the natural content width.

Here I add an extra line to show the difference if your real example could have more text then that solves it, otherwise you need to fiddle a bit more to hide the extra |

enter image description here

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\usepackage{tabularx}
\usepackage{graphicx}
\usepackage{adjustbox}

\setlength{\parindent}{0cm}

\newlength\mylen

\newcommand{\points}[1]{#1\dots}
\newcommand{\lmulcol}[2]{\multicolumn{#1}{|l|}{\points{#2}}}
\newcommand{\colfour}[1]{\lmulcol{4}{#1}}
\newcommand{\colthree}[1]{\lmulcol{3}{#1}}
\newcommand{\coltwo}[1]{\lmulcol{2}{#1}}
\newcommand{\colone}[1]{\points{#1}}



\newcommand{\entry}[1]{%
{\Large\textbf{\Large #1}\par}%\textbf{\Large{#1}}

\vspace{3em}

\setlength\mylen{\dimexpr\linewidth-8\tabcolsep-5\arrayrulewidth}
\begin{tabular}{|p{\dimexpr 0.15\mylen}|
                 p{\dimexpr 0.35\mylen}|
                 p{\dimexpr 0.35\mylen}|
                 p{\dimexpr 0.15\mylen}|}
\colfour{Name:}\\
\colfour{Forename:}\\
\coltwo{Date of Birth:} & \coltwo{Place of Birth:}\\
\colone{Adress:} & \colthree{} \\
& \colthree{}\\

\hline

\colone{Reference1:} & \coltwo{} & \colone{Page}\\
\colone{References:} & \coltwo{1} & \colone{Page}\\
                     & \coltwo{2} & \colone{Page}\\
                     & \coltwo{3} & \colone{Page}\\
                     & \coltwo{4} & \colone{Page}\\
\ &\ &\ &\ 
\end{tabular}
}


\begin{document}


\entry{601}

TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT 
TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT 
TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT 
TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT 
TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT 
TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT 
TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT 
TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT 
TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT 
TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT 
TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT 
TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT 
TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT
\end{document}
Related Question