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.

I want to add text beside the \hline line in order to structure my table more accurately. The following picture illustrates what I want, the code represents the table. Anyone has some ideas? I'd appreciate a lot.

enter image description here

\begin{table}[htbp]\centering
    \renewcommand{\arraystretch}{1.3}
    \caption[..]{..} \label{tab:trigger}

    \begin{tabular}{l | r}  

    \multicolumn{1}{c|}{\textbf{PARAMETER}}     &   \multicolumn{1}{c}{\textbf{VALUE}}      \\ 
    \hline \hline

    STA window                  &       $\SI{5}{s}$         \\
    LTA window                  &       $\SI{100}{s}$       \\
    Trigger level               &       4.4                 \\
    De-trigger level            &       1.5                 \\
    \hline

    Filter                      &       $3-15$ Hz           \\
    Pre-event time              &       $\SI{60}{s}$        \\
    Extract duration            &       $\SI{120}{s}$       \\
    Minimum trigger duration    &       $\SI{5.8}{s}$       \\
    Freeze LTA window           &       no                  \\

    \end{tabular}
\end{table}
share|improve this question
    
Rather than on the side, I suggest putting the text as a supplementary row after the rule: \multicolumn{2}{c}{text here}. Avoid the vertical rule, that serves no purpose, and all will be well. –  egreg Jul 16 at 12:44

2 Answers 2

up vote 6 down vote accepted

Please always post complete documnents showing all packages used (your example required siunitx)

\documentclass{article}
\usepackage{siunitx}
\begin{document}
\begin{table}[htbp]\centering
    \renewcommand{\arraystretch}{1.3}
    \caption[..]{..} \label{tab:trigger}

    \begin{tabular}{l | r}  

    \multicolumn{1}{c|}{\textbf{PARAMETER}}     &   \multicolumn{1}{c}{\textbf{VALUE}}      \\ 
    \hline \hline

    STA window                  &       $\SI{5}{s}$         \\
    LTA window                  &       $\SI{100}{s}$       \\
    Trigger level               &       4.4                 \\
    De-trigger level            &       1.5%       
\smash{\raisebox{-8pt}{\rlap{\quad here!!}}}          \\
    \hline
    Filter                      &       $3-15$ Hz           \\
    Pre-event time              &       $\SI{60}{s}$        \\
    Extract duration            &       $\SI{120}{s}$       \\
    Minimum trigger duration    &       $\SI{5.8}{s}$       \\
    Freeze LTA window           &       no                  \\

    \end{tabular}
\end{table}

\end{document}
share|improve this answer
    
Thank you for this answer. I'll consider your suggestions for the next time. :) –  Johngoldenboy Jul 16 at 12:36

I believe that the text should be in a supplementary row below the rule: just remove the vertical rule, which serves no purpose. I added also the analog for the first table chunk.

\documentclass{article}
\usepackage{siunitx,booktabs}
\sisetup{range-phrase=--}

\begin{document}

\begin{tabular}{l r}
\toprule
\multicolumn{1}{c}{\textbf{PARAMETER}} &
\multicolumn{1}{c}{\textbf{VALUE}} \\ 

\midrule
\multicolumn{2}{c}{First part} \\

STA window               & \SI{5}{s}           \\
LTA window               & \SI{100}{s}         \\
Trigger level            & 4.4                 \\
De-trigger level         & 1.5                 \\

\midrule
\multicolumn{2}{c}{Second part} \\

Filter                   & \SIrange{3}{15}{Hz} \\
Pre-event time           & \SI{60}{s}          \\
Extract duration         & \SI{120}{s}         \\
Minimum trigger duration & \SI{5.8}{s}         \\
Freeze LTA window        & no          \\

\bottomrule
\end{tabular}

\end{document}

enter image description here

Note that you don't need $...$ around \SI{...}{...} and that in ranges the unit should be repeated, so the input is not mistaken for “three minus fifteen hertz”.

Compare it to the output of David's answer

enter image description here

share|improve this answer
    
Very nice suggestions,thank you for that. Actually, it matches my desires even more. :) –  Johngoldenboy Jul 16 at 13:28

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.