2

In the following code , describing a table. The second horizintal line, appears to smudge with line of text.

How can I correct that?

The yellow highlited

The question is, then: how do i increase the line spacing between the line and the text?

 \resheading{\textbf{ACADEMIC DETAILS} }\\[\lsep]
\vspace{5mm} \vfill
%\begin{table}[ht!]
%\begin{center}
\indent \begin{tabular}{ l @{\hskip 0.15in} l @{\hskip 0.20in} l @{\hskip 0.20in} l @{\hskip 0.20in} l }
\hline
\vspace{0.1mm}
\textbf{Year} &\textbf{Degree} & \textbf{Institute}   & \textbf{CGPA/\%} \\
\hline
2015- Present&B.Tech Electrical and Electronics Engineering & VIT Vellore  & 9.69 CGPA \\

2015 & 12th CBSE Board Examination & Kendriya Vidyalaya & 94.8\%\\

2013 & 10th CBSE Board Examination & Kendriya Vidyalaya & 10 CGPA\\
\hline
\end{tabular}
%\end{center}
%\end{table}
\vspace{2mm}

%\resheading{\textbf
  • 1
    Please make your code compilable (if possible), or at least complete it with \documentclass{...}, the required \usepackage's, \begin{document}, and \end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem. – Moriambar Apr 15 '17 at 19:37
  • 1
    And rework your table using booktabs. It provides nicer rules for exactly this problem. – Alan Munn Apr 15 '17 at 19:43
4

Another solution consists in defining a minimal vertical padding at the top and bottom of cells with the cellspace package:

\documentclass{article}

\usepackage[top=0.75in, bottom=0.75in, left=0.55in, right=0.85in]{geometry}

\usepackage{booktabs}
\usepackage{cellspace}
\setlength\cellspacetoplimit{4pt}
\setlength\cellspacebottomlimit{4pt}

\begin{document}

\centering
    \begin{tabular}{@{}*{4}{Sl}@{}}
        \toprule
        \textbf{Year} &\textbf{Degree} & \textbf{Institute} & \textbf{CGPA/\%}\\
        \midrule
        2015 -- present & B.Tech Electrical and Electronics Engineering & VIT Vellore & 9.69 CGPA\\
        2015 & 12th CBSE Board Examination & Kendriya Vidyalaya & 94.8\%\\
        2013 & 10th CBSE Board Examination & Kendriya Vidyalaya & 10 CGPA\\
        \bottomrule
    \end{tabular}

\end{document} 

enter image description here

3

As Alan Munn also suggested in his comment: Don't worry and let booktabs take care of your problem:

\documentclass{article}

\usepackage[top=0.75in, bottom=0.75in, left=0.55in, right=0.85in]{geometry}

\usepackage{booktabs}
\usepackage{tabularx}

\begin{document}

    \begin{tabularx}{\dimexpr\linewidth-15pt}{@{}lXll@{}}
        \toprule
        \textbf{Year} &\textbf{Degree} & \textbf{Institute} & \textbf{CGPA/\%}\\
        \midrule
        2015 -- present & B.Tech Electrical and Electronics Engineering & VIT Vellore & 9.69 CGPA\\
        2015 & 12th CBSE Board Examination & Kendriya Vidyalaya & 94.8\%\\
        2013 & 10th CBSE Board Examination & Kendriya Vidyalaya & 10 CGPA\\
        \bottomrule
    \end{tabularx}

\end{document}

enter image description here

  • This doesn't solve the problem of row spacing when there's no rule. – Bernard Apr 15 '17 at 22:38
  • @Bernard No it does not -- but I saw no hints in the question, that the spacing between the rows should be changed. – user36296 Apr 15 '17 at 23:01
2

Like this?

enter image description here

As suggested in Alan Munn in his comment, rules from booktabs package gives more vertical space around cells contents. Beside this the \arraystretch is increase and removed surplus manual spacing between columns.

{\renewcommand\arraystretch{1.2}
\begin{tabular}{ l l l l l }
\midrule
\textbf{Year} 
     & \textbf{Degree}  & \textbf{Institute}   & \textbf{CGPA/\%}   \\
\midrule
2015- Present
     & B.Tech Electrical and Electronics Engineering  
                        & VIT Vellore           & 9.69 CGPA         \\

2015 & 12th CBSE Board Examination 
                        & Kendriya Vidyalaya    & 94.8\%            \\

2013 & 10th CBSE Board Examination 
                        & Kendriya Vidyalaya    & 10 CGPA           \\
\midrule
\end{tabular}
}

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.