Hi I am creating a table but am having trouble inserting a horizontal line at the base of my line. My code is:

\documentclass[11pt, oneside, a4paper]{book}

\usepackage[top=2cm, bottom=2cm, left=1.5in, right=2cm]{geometry}


\begin{tabular} { >{\centering\arraybackslash} m{4cm} | >{\centering\arraybackslash} m{4cm} | >{\centering\arraybackslash} m{2cm} | >{\centering\arraybackslash} m{2cm} }
\bfseries{Model} & \bfseries{Description} & \bfseries{x} & \bfseries{x} \\ \hline
x & x & x& x\\ 


when I take the \hline command out it works and appears to be the problem, how do I get the horizontal line to be drawn?

  • Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. – karlkoeller Sep 16 '13 at 15:53
  • Just a remark: use \textbf{Model} instead of \bfseries{Model}. \bfseries is a switch and has to be used like {\bfseries Model} – karlkoeller Sep 16 '13 at 16:26

There is no error in your code.

You just have to load the arydshln package after array and longtable, as stated in its manual:

Only one caution given to users of array (v2.3m or later) and longtable (v4.10 or later) packages, included in Standard LaTeX Tools Bundle, and colortab and colortbl package is that arydshln has to be loaded after array, longtable, colortab and/or colortbl done.

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.