0

I don't know either to make one big table and sub each cell or make two tabular beside each other?

enter image description here

  • 3
    You should look here: Tip on how to make a visually good table and start by reading the booktabs package documentation. Then you will remove almost all the lines from your table and make it look much more professional. – Alan Munn Aug 1 '15 at 2:07
  • And it will be easier to make ;). If it is one table, make one table. If it is really two, make two and ensure they are separated. There doesn't seem any reason not to do the obvious in this case. – cfr Aug 1 '15 at 2:13
  • Thank you for the document I am going to start their pdf, the problem is that I did complex tables twice so the experience is not so good yet and for both cases I had to ignore things that I didn't like in the tables and that's why I thought to ask before starting. – Mour_Ka Aug 1 '15 at 2:23
  • Well, now you've asked ;). – cfr Aug 1 '15 at 3:23
4

Possibly something like this but you should look at siunitx, too for columns of figures.

\documentclass{article}
\usepackage{booktabs,array}

\begin{document}
\begin{tabular}{ccccccc}
  \toprule
  \multicolumn{3}{c}{R=1} && \multicolumn{3}{c}{R=2}\\\cmidrule{1-3}\cmidrule{5-7}
  Speed & Time Delay & Distance && Speed & Time Delay & Distance\\
  km/h & s & m  && km/h & s & m\\\midrule
  a & b & c && d & e & f \\
  g & h & i && j & k & l\\
  \bottomrule
\end{tabular}
\end{document}

tabular

I would not split Time Delay over 2 lines unless you really have to, which seems unlikely.

7

Your table is actually fairly complex, so I'm not sure it's straightforward to come up with a "least complex way" to typeset it.

To reduce the table's complexity, and in recognition of the fact that one column ("Speed") is common to both the "R=1" and "R=5" parts, I would reduce the total number of columns from 6 to 5. To improve the table's readability, I would (a) structure the header carefully (including using a separate row for the respective units) and (b) typeset the numbers using the formatting facilities of the siunitx package.

enter image description here

\documentclass[12pt]{article}
\usepackage{booktabs,siunitx}
\sisetup{per-mode = symbol, round-mode=places}
\begin{document}

\centering
\begin{tabular}{@{} S[table-format=3.0] @{\qquad}
               *{2}{S[table-format=2.1, 
                      round-precision=1,
                      round-integer-to-decimal]
                    S[table-format=3.2, 
                      round-precision=2,
                      round-integer-to-decimal]} @{}}
\toprule
{Speed} & 
\multicolumn{2}{c}{$R=1$} & \multicolumn{2}{c}{$R=5$}\\
\cmidrule(rl){2-3} \cmidrule(l){4-5}
& {Time} & {Distance} & {Time} & {Distance}\\
& {Delay} & & {Delay}\\
{(\si{\kilo\meter\per\hour})} 
& {(\si{\second})} & {(\si{\meter})}  
& {(\si{\second})} & {(\si{\meter})}\\
\midrule
75 & 3.5 & 46.04 & 3.5 & 46.04\\
100 & 5.2 & 89.07 & 5 & 83.54 \\
{\dots}\\
175 & 9.7 & 265.19 & 9.9 & 274.9 \\
200 & 11.2 & 341.8  & 11.3 & 347.15\\
\bottomrule
\end{tabular}
\end{document}
  • You should also divide by the unit. bipm.org/en/publications/si-brochure/section5-3.html – MaxNoe Aug 1 '15 at 6:30
  • @MaxNoe - What do you mean by "divide by the unit" in the present context? I'm afraid I may be missing something that's probably quite simple. Currently, the unit of measurement are "km/h" for column 1, "s" (seconds) for columns 2 and 4, and "m" (meters) for columns 3 and 5. Are you maybe proposing that the unit of measurement for column 1 be changed from "km/h" to "m/s"? Please advise. – Mico Aug 1 '15 at 6:44
  • Speed / (km/h) , Distance / m etc. Have a look into the link I posted. – MaxNoe Aug 1 '15 at 7:07
  • @MaxNoe - I think there are (at least!) two equally valid typographic ways for displaying the units. The one you're referring to places the symbol for the variable in question and the symbol(s) for the associated units next to each other, separated by a / (slash) symbol. The other one, used both in the OP's code and in my answer -- places the units in a separate row, surrounded by parentheses. I don't think it's workable to combine the two display methods. – Mico Aug 1 '15 at 9:07
  • There is just one semantically correct way. Which is requested by the BIPM internationally and by a couple of organizations locally (e.g. DIN in Germany). A physical quantity, like the velocity v is a product of its numerical value (e.g. 75) and its unit (e.g. km/h): v = {v} · [v]. The content in the cell is the numerical value, so the quantity divided by its unit and thus velocity / kmh¯¹ or velocity / (km/h) or velocity / \frac{km}{h}. It's clearly stated in the link I provided. – MaxNoe Aug 1 '15 at 9:13

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.