Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.
    \begin{center}
\begin{tabular}{|p{3.35cm}||p{5cm}|l|}
\hline
\thead{Område} & \thead{Positive konsekvenser} & \thead{Negative konsekvenser} \\
\hline \hline
\textbf{Arbejdsfordeling} & Et nyt slags produkt giver næsten altid ny arbejdskraft & \\
\hline
\textbf{Infrastruktur} &  & \\
\hline
\textbf{De fysiske ressourcer} &  & \\
\hline
\textbf{Den offentlige sektor} &  & \\
\hline
\textbf{NGO'er} &  & \\
\hline
\textbf{Befolkningens levevilkår} &  & \\
\hline
\end{tabular}
    \end{center}   

And it produces this output:

Table

How do I get the text in the left column aligned like the middle column row 2? I use the {p{xcm}} command but i don't know how to align it as with "c", "l" and "r".

share|improve this question

2 Answers 2

up vote 4 down vote accepted

Is that something like that you want? I suppose you loaded the makecell package in your preamble. I added using hhline for better-looking \hlines and vlines (although only horizontal lines, as suggested by the booktabs package look still better). I also loaded ragged2e to have reasonable hyphenation in column, and cellspace for a less tight vertical spacing in tables.

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{makecell, ragged2e}%
\renewcommand*\theadfont{\bfseries}
\usepackage{cellspace}
\setlength\cellspacetoplimit{4pt}
\setlength\cellspacebottomlimit{4pt}
\usepackage{hhline}
\newcommand\myhline{\hhline{|-||-|-|}}

\begin{document}

\begin{center}
\begin{tabular}{| >{\RaggedRight\bfseries}S{p{3.35cm}}||p{5cm}|l|}
\myhline
\thead{Område} & \thead{Positive konsekvenser} & \thead{Negative konsekvenser} \\
\hhline{:=::=:=:}
Arbejdsfordeling & Et nyt slags produkt giver næsten altid ny arbejdskraft & \\
\myhline
Infrastruktur &  & \\
\myhline
De fysiske ressourcer &  & \\
\myhline
Den offentlige sektor &  & \\
\myhline
NGO'er &  & \\
\myhline
Befolkningens levevilkår &  & \\
\myhline
\end{tabular}
\end{center}

\end{document} 

enter image description here

share|improve this answer
    
Thank you!!! :) –  RandomDude May 11 at 19:09

No need of complicated settings:

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[danish]{babel}

\usepackage{array,ragged2e,booktabs}

\begin{document}

\begin{center}
\begin{tabular}{
  @{}
  >{\RaggedRight\bfseries}p{3cm}
  >{\RaggedRight}p{4cm}
  l
  @{}
 }
\toprule
\multicolumn{1}{c}{\bfseries Område} & 
  \multicolumn{1}{c}{\bfseries Positive konsekvenser} &
  \multicolumn{1}{c}{\bfseries Negative konsekvenser} \\
\midrule
Arbejdsfordeling & Et nyt slags produkt giver næsten altid ny arbejdskraft & \\
\addlinespace
Infrastruktur &  & \\
\addlinespace
De fysiske ressourcer &  & \\
\addlinespace
Den offentlige sektor &  & \\
\addlinespace
NGO'er &  & \\
\addlinespace
Befolkningens levevilkår &  & \\
\bottomrule
\end{tabular}
\end{center}

\end{document} 

enter image description here

If you really want a ruled table (which you don't, trust me), use the features by hhline. But never ever use double rules.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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