2

I am using tabular and trying to left align text in cells completely to the border of the table. Which parameters do I have to use to delete these white space?

enter image description here Code

\documentclass[a4paper]{article}    
\usepackage{longtable}  
\usepackage{multirow,makecell,array}
\begin{document}
\begin{table}[h!]
   \begin{tabular}{|L{12cm}C{4cm}}
       \textbf{Home address}:  &    \\
       \textbf{Personal E-mail}: &  \\
       \textbf{Mobile phone}:  &    \\
       \textbf{Skype}:  &   \\
       \textbf{Citizenship}:  & \\
   \end{tabular}
  \end{table}
\end{document}
  • Please add a MWE (start with \documentclass and ending with \end{document} of how you already obtained the above image / document. – albert Jun 11 '18 at 10:48
  • 4
    \begin{tabular}{|@{}l ...}. – Bernard Jun 11 '18 at 10:48
1

You can use the alignment operator: @{<LaTeXCode>}. You can replace <LaTeXCode> with any latex code that should be used to separate the column. There is a default setting that is set to some width, but I can't seem to figure it out. Anyways, here is a modified version of your code that removes the space.

That is: I put in, before the first l, an empty specifier: @{}.

\documentclass[a4paper]{article}
\begin{document}
\begin{table}[h!]
    \begin{tabular}{|@{}ll}
        \textbf{Home address}:    & Home address    \\
        \textbf{Personal E-mail}: & Personal E-mail \\
        \textbf{Mobile phone}:    & Mobile phone    \\
        \textbf{Skype}:           & Skype           \\
        \textbf{Citizenship}:     & Citizenship     \\
    \end{tabular}
\end{table}
\end{document}

You can experiment with this: try inserting e.g. @{=} between some of the letters, or @{\hskip 4em}.

Note that I don't know how you defined your L and C, so I just replaced them with ll (both left adjusted). I also removed the width specification in your alignment parameters. Also, I removed the unused packages.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.