3

My Code:

\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{vietnam}
\usepackage{amsmath,amssymb}
\usepackage{mathptmx} 
\usepackage{graphicx}
\usepackage[margin=2.1cm]{geometry}

\usepackage{tabls}
\usepackage{diagbox,pict2e}

\begin{document}

\begin{tabular}{|*{5}{c}|}
    \hline
    2007 & 2008 & 2009 & 2010 & 2011\\
    \hline
    08.04 & 23.03 & 12.04 & 04.04 & 24.04 \\
    27.05 & 11.05 & 31.05 & 23.05 & 12.06 \\
    \hline
\end{tabular}
\end{document}

The result:

enter image description here

How to the output file as the following:

enter image description here

Is the tabls package obsolete?

5

You can use the dirty hack of using \rule{depth}{width}{height} in particular row to change the appearance of the row itself.

\documentclass{article}
%https://tex.stackexchange.com/questions/232202/how-to-add-extra-space-inside-of-a-table
\begin{document}
    \begin{tabular}{|*{5}{c}|}
    \hline
    2007 & 2008 & 2009 & 2010 & 2011\rule[-2ex]{0pt}{6ex}\\
    \hline
    08.04 & 23.03 & 12.04 & 04.04 & 24.04 \rule[1ex]{0pt}{3ex}\\
    27.05 & 11.05 & 31.05 & 23.05 & 12.06 \rule[-2ex]{0pt}{3ex}\\
    \hline
\end{tabular}
\end{document}

with which you can get

enter image description here

Note: I dont know about the status regarding the package tabls. IMO, it should be a second question instead.

5

I'm not sure I understand your question 100%. Personally, I feel tables made with the booktabs package look more modern. Here's an example

\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{vietnam}
\usepackage{amsmath,amssymb}
\usepackage{mathptmx} 
\usepackage{graphicx}
\usepackage[margin=2.1cm]{geometry}

\usepackage{booktabs}
\usepackage{diagbox,pict2e}

\begin{document}

    \begin{tabular}{*{5}{c}}
        \toprule
        2007 & 2008 & 2009 & 2010 & 2011\\
        \midrule
        08.04 & 23.03 & 12.04 & 04.04 & 24.04 \\
        27.05 & 11.05 & 31.05 & 23.05 & 12.06 \\
        \bottomrule
    \end{tabular}
\end{document}

enter image description here

  • I think the OP also needs vertical bars. – Raaja Nov 23 '18 at 8:17
  • 1
    True. He also talks about something being obsolete, and I think there's little thing in the world which is more obsolete than vertical bars in a table. – G. Gare Nov 23 '18 at 8:20
  • thats mainly opinion based and is mainly of personal interests ;) – Raaja Nov 23 '18 at 8:22

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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