1

Using the \hhline command i found some imperfection in the double line. How can i fix it?

Imperfection

Imperfection

Table

\documentclass[11pt]{amsart}
\usepackage{amssymb}
\usepackage{hhline}                 
\usepackage{siunitx}
\sisetup{output-decimal-marker={.}, group-separator={\,}}
\usepackage{eurosym}
\usepackage{dcolumn}                
\usepackage{multirow}



\begin{document}

\begin{table}[htbp]
\begin{center}
\begin{tabular}{|lr|lr l|} \hline


H       & 5             & $W_N$ & 250       & \si{\gram}        \\
L       & 26            & $W_L$ & 241       & \si{\gram}        \\
P       & \num{3000}    & $C_u$ & 3E{-4}    & \euro/\si{\gram}  \\
$n_C$   & \num{142506}  & $c_0$ & 2E-01     & \euro/pack        \\
$\delta$& 1             & $c_1$ & 5E-01     & \euro/h           \\
\hhline{=====}


&   \multicolumn{2}{c}{$r.s_{std}$} &   \multicolumn{2}{c|}{$r.s_{iter}$} \\

\hhline{=====}

Media(W)    &   \multicolumn{2}{D{.}{.}{3.4}}{245.9463}                                                 &   \multicolumn{2}{D{.}{.}{3.4}|}{245.9459}\\
DevStd(W)   &   \multicolumn{2}{D{.}{.}{3.4}}{3.9932}                                                   &   \multicolumn{2}{D{.}{.}{3.4}|}{3.9939}\\
\emph{f.o}  &   \multicolumn{2}{D{.}{.}{3.4}}{0.27395}                                                  &   \multicolumn{2}{D{.}{.}{3.4}|}{0.27395}\\
$n_B$       &   \multicolumn{2}{D{.}{.}{3.4}}{3000}                                                     &   \multicolumn{2}{D{.}{.}{3.4}|}{3000}\\
$t_{tot}$   &   \multicolumn{2}{D{.}{.}{3.4}}{2612.22}                                                  &   \multicolumn{2}{D{.}{.}{3.4}|}{6906.10}\\

\hhline{=====}

Config.     &   \multicolumn{2}{c}{10 20 40 50 200}                                                     &   \multicolumn{2}{c|}{40 130 130 220 220}\\ \hline

\end{tabular}
\begin{footnotesize}
\caption{Confronto $r.s_{std}$ Vs $r.s_{iter}$ [$C_u > 0$]}
\label{tab:Confronto_rs_C_mag_0}
\end{footnotesize} 
\end{center}
\end{table}

\end{document} 
3
  • Hi! You obviously use quite a lot of additional packages. Wouldn't you please mind to convert the code snippet to a Minimal Working Example? Thanks!
    – yo'
    Oct 24, 2013 at 9:22
  • 2
    Are readers supposed to understand that r.s_{std} refers to the column underneath it? Well, with that table format they won't understand. In Italian one says “Confronto tra A e B”, not “Confronto A Vs B”. If you prefer to use Itanglish, at least write “vs” (lowercase).
    – egreg
    Oct 24, 2013 at 9:27
  • Now the example is working ;) @egreg If you have any sort of suggestions for the table style i'm all ears!
    – gmeroni
    Oct 24, 2013 at 9:30

1 Answer 1

2

I've never seen that command, but I'd replace that with two \hline commands, like this:

\hline
\hline

image, lines work

I've changed the style of the table a little bit, in case you don't mind a different solution. The changes I did are:

  1. Inserted booktabs and removed all of the vertical lines except one in the upper table.
  2. Fixed the caption using the suggestion from this answer (FIY, now it's actually footnotesize, earlier the command wasn't working) and I have shifted it a little bit below.
  3. Changed the caption according to egreg's suggestion (I agree with him on that one).

Doubt: are they two distinct tables? If the r.s std is referring to the lower part, then you should consider adding some whitespace or trying a different solution, as in splitting the tables. Let me know if you want something of that sort.

table 2

Here is the code (I have written notes for my additions in the code itself):

\documentclass[11pt]{amsart}
\usepackage{amssymb}
\usepackage{hhline}                 
\usepackage{siunitx}
\sisetup{output-decimal-marker={.}, group-separator={\,}}
\usepackage{eurosym}
\usepackage{dcolumn}                
\usepackage{multirow}
\usepackage{booktabs}
\usepackage{caption} % Allows to set the caption font size

\begin{document}

\begin{table}[htbp]
    \captionsetup{font=footnotesize} % Set the caption font size
\begin{center}
\begin{tabular}{lr| lr l}

\toprule

H       & 5             & $W_N$ & 250       & \si{\gram}        \\
L       & 26            & $W_L$ & 241       & \si{\gram}        \\
P       & \num{3000}    & $C_u$ & 3E{-4}    & \euro/\si{\gram}  \\
$n_C$   & \num{142506}  & $c_0$ & 2E-01     & \euro/pack        \\
$\delta$& 1             & $c_1$ & 5E-01     & \euro/h           \\

\bottomrule

&   \multicolumn{2}{c}{$r.s_{std}$} &   \multicolumn{2}{c}{$r.s_{iter}$} \\

\midrule

Media(W)    &   \multicolumn{2}{D{.}{.}{3.4}}{245.9463}                                                 &   \multicolumn{2}{D{.}{.}{3.4}}{245.9459}\\
DevStd(W)   &   \multicolumn{2}{D{.}{.}{3.4}}{3.9932}                                                   &   \multicolumn{2}{D{.}{.}{3.4}}{3.9939}\\
\emph{f.o}  &   \multicolumn{2}{D{.}{.}{3.4}}{0.27395}                                                  &   \multicolumn{2}{D{.}{.}{3.4}}{0.27395}\\
$n_B$       &   \multicolumn{2}{D{.}{.}{3.4}}{3000}                                                     &   \multicolumn{2}{D{.}{.}{3.4}}{3000}\\
$t_{tot}$   &   \multicolumn{2}{D{.}{.}{3.4}}{2612.22}                                                  &   \multicolumn{2}{D{.}{.}{3.4}}{6906.10}\\

\midrule % automatically provides a little space before and after it (up and down)

Config.     &   \multicolumn{2}{c}{10 20 40 50 200}                                                     &   \multicolumn{2}{c}{40 130 130 220 220}\\

\bottomrule

\end{tabular}
\vspace{10pt} % a little space to shift the caption down
\caption{Confronto tra $r.s_{std}$ e $r.s_{iter}$ [$C_u > 0$]}
\label{tab:Confronto_rs_C_mag_0}
\end{center}
\end{table}

\end{document} 
2
  • Thanks for the corrections! They are not two distinct tables. the upper part contains the parameters for a simulation (aka input), the lower part (from r.s std to the end) contain the output. Did you have in mind a better approach to display all the data?
    – gmeroni
    Oct 24, 2013 at 10:08
  • @gmeroni Honestly not really. I haven't done something like this before as far as I remember. :D If I get some idea, I'll let you know!
    – Alenanno
    Oct 24, 2013 at 10:12

You must log in to answer this question.

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