1

I'm trying to make a simple-looking table with the booktabs package. I would like to make a multi column, followed by another cell. Right now I can't get to make the following cell, where I would like to write "Matas". It's in the first row, I have the trouble

I have tried to make the table set up as I would like it, with the normal table tools in LaTeX, so you guys could see, how I would like it to be.

Can anyone help me with this, please?

\documentclass[a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage[danish]{babel}
\usepackage{bm,mathtools}
\usepackage{parskip}
\usepackage{varioref}
\usepackage{graphicx}
\usepackage{booktabs}
\usepackage{icomma}
\begin{document}

\begin{tabular}{|c|c|c|c|}
\hline 
 & \multicolumn{2}{c}{Renskincare.com} & Matas \\ 
\hline 
 & Pund & DKK & DKK \\ 
\hline 
Cleansing Gel & 15 & 141,60 & 149,25 \\ 
\hline 
Gel Cream & 21 & 198,24 & 221,25 \\ 
\hline 
Shipping & 10 & 94,4 &  \\ 
\hline 
Valutakurser & 1 & 9,44 &  \\ 
\hline 
\end{tabular}

\begin{tabular}{lccr}
\hline
\multicolumn{3}{c}{Renskincare.com} \\

& Pund    & DKK & DKK \\
\hline
Cleansing Gel 150 mL &  15 & 141,60 & 149,25 \\
Gel Cream 50 mL      &  21 & 198,24 & 221,25 \\ 
Shipping             &  10 &  94,24 &        \\
Valutakurs           &   1 &   9,44 &        \\
\hline
\end{tabular}

\end{document}
7
  • 1
    what is your question? the code runs without error and Matas is in the 4th column , after the multicol cell. Also you have loaded booktabs but have not used any of its commands (you should not have vertical rules if you do use booktabs) Oct 27, 2014 at 12:18
  • @DavidCarlisle - The uploaded code contains two tables, the first one is fine, but it isn't very simple. So I have tried to make a more simple look table underneath where I can't figure out where to write "Matas" as in the first table. Thank you for taking time to help!
    – JMS
    Oct 27, 2014 at 12:22
  • Welcome to TeX.SX!
    – user31729
    Oct 27, 2014 at 12:25
  • just put & Matas before the first \\ as you have in the first table? or &\multicolumn{1}{c}{Matas}\\ if you want it centred in the otherwise right aligned column Oct 27, 2014 at 12:27
  • Thank you everyone! It works with the answer David Carlisle have wrote, but can I move Renskincare.com to just be a multicolumn over column 2 and 3?
    – JMS
    Oct 27, 2014 at 12:31

1 Answer 1

1

Seems like you are looking for

& % blank cell
\multicolumn{2}{c}{Renskincare.com}& % span 2 columns not 3
\multicolumn{1}{c}{Matas}% centre rather than right align the heading
\\

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .