1

I am trying to make my table fit the text. I tried \renewcommand{\tabcolsep}{0pt}, but it makes no difference. Your help is appreciated.

The following code:

    \begin{tabular}{lcl}
    \textsc{Date of Birth:} 30 May 1993 & \textsc{Phone:} +31 649 52**** 
    & \textsc{email:}  \href{mailto:K.***@student.***8.nl}{K.***@student.***8.nl} \\
 \end{tabular}
4
  • 1
    How do you mean "fit the text"? If it is the left alignment try {@{}lcl}. If that is not what you are looking for try to clarify the question. It often helps to give a minimal working example (MWE) that shows the problem.
    – StefanH
    Mar 14, 2017 at 8:39
  • By fitting the text I meant no white space between columns. Mar 14, 2017 at 8:41
  • This is a single-row tabular, which seems unnecessary. Secondly, if you don't want any spaces between the columns, then you don't need columns, really...
    – Werner
    Mar 14, 2017 at 9:21
  • For options, see My table doesn't fit; what are my options?
    – Werner
    Mar 14, 2017 at 9:22

1 Answer 1

1

You can override the spacing by the @ operator (find more on e.g. https://en.wikibooks.org/wiki/LaTeX/Tables). So by {l@{}c@{}l} you completely remove the inter column spaces. Probably you want some spaces, and then you can add it as for example {l@{\ }c@{\ }l}. In the nelow example I have also added one version where only one column is used. I do not really see the reason for three (as it is given in this example).

\documentclass{article}
\usepackage{hyperref}
\begin{document}

\begin{tabular}{l@{}c@{}l}
  \textsc{Date of Birth:} 30 May 1993 
  & \textsc{Phone:} +31 649 52**** 
  & \textsc{email:}  \href{mailto:K.***@student.***8.nl}{K.***@student.***8.nl} \\
\end{tabular}

\begin{tabular}{l@{\ }c@{\ }l}
  \textsc{Date of Birth:} 30 May 1993 
  & \textsc{Phone:} +31 649 52**** 
  & \textsc{email:}  \href{mailto:K.***@student.***8.nl}{K.***@student.***8.nl} \\
\end{tabular}

\begin{tabular}{c}
  \textsc{Date of Birth:} 30 May 1993
  \textsc{Phone:} +31 649 52**** 
  \textsc{email:}  \href{mailto:K.***@student.***8.nl}{K.***@student.***8.nl} \\
\end{tabular}

\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .