Graphics, Figures & TablesSpacing after horizontal Table Rule

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
pemfir
Posts: 23
Joined: Sun Aug 12, 2012 11:30 pm

Spacing after horizontal Table Rule

Post by pemfir »

I have the following table, and spacing is messed up. the horizontal lines are too close to the text. i can not add vertical space prior to \hline, in the row that says , "vehicle parameter". Thank you for suggestions.

Code: Select all

\documentclass[10pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}

\begin{document}

\begin{table}[ht]
\renewcommand{\arraystretch}{1.0}
\caption{Experimentally established prior knowledge [21]} % title of Table
\centering % used for centering table
\begin{tabular}{ccc|ccc} 
\hline\hline
\multicolumn{3}{c}{Prior distribution of  average road grade (degrees)} & \multicolumn{3}{|c}{Prior distribution of rolling resistance coefficient} \\ \hline 
Road grade & Mean & Standard deviation & Road conditions & Mean & Standard deviation \\  

Steep-Uphill & 6 & 3 & Sidewalk & 0.056 & 0.025 \\ 
Uphill & 4 & 2 & Asphalt & 0.062 & 0.026 \\ 
Flat & 0 & 2 & Tile & 0.066 & 0.025 \\ 
Downhill & -4 & 2 & Grass & 0.099 & 0.025 \\ 
Steep-Downhill & -6 & 3 &  &  &  \\  [1ex] \hline  

\multicolumn{6}{c}{Vehicle Parameters}  \\ [1ex]  \hline
 & Mean & Standard deviation &  & Mean & Standard deviation \\[1ex] \hline
Internal Resistance & 0.22 & 0.003 & Sensors \& Electronics & 28.29 & 1.73 \\ \hline 
\end{tabular}
\end{table}[ht]

\end{document}
Last edited by Stefan Kottwitz on Sun Aug 12, 2012 11:51 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

mas
Posts: 226
Joined: Thu Dec 04, 2008 4:39 am

Spacing after horizontal Table Rule

Post by mas »

Adding the following helps you to achieve spacing in a row.

Code: Select all

\multicolumn{6}{c}{\vline height12pt width0pt\relax Vehicle Parameters}  \\ 
Regards.

OS: Debian/GNU Linux; LaTeX System : TeXLive; Editor : Vim
pemfir
Posts: 23
Joined: Sun Aug 12, 2012 11:30 pm

Re: Spacing after horizontal Table Rule

Post by pemfir »

Thank you so much it works great. Can you also give me a little brief intuition about the stuff you added, i do not want to just simply copy paste, and want to know the logic. Thanks
Post Reply