Graphics, Figures & TablesSkip Separator in new Line of Table

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
wannabegeek
Posts: 10
Joined: Wed Mar 30, 2011 8:43 am

Skip Separator in new Line of Table

Post by wannabegeek »

Hi all,

I am making a table with tabular. I want to skip the row separator in select lines but I haven't seen or figured out a way to do this.

I do not want a separator associated with 'Export', 'Coregistration', etc...
I left all my code inplace and commented, in case any of my optional packcages
disrupt normal behavior.

TIA !

wbg

Code: Select all

\documentclass[letterpaper,12pt]{article}
%\usepackage{graphicx}
%\usepackage{courier}
%\usepackage{amsmath}
%\usepackage[left=2cm,top=2.0cm,bottom=1.5cm, right=2cm,nohead,nofoot]{geometry}
%\usepackage{float}
%\usepackage{parskip}
%\usepackage{url}

%\newcommand{\dis}{\displaystyle}
%\newcommand{\del}{\partial}
%\newcommand{\pd}[2]{\frac{\partial #1}{\partial #2}}
%\newcommand{\degree}{^\circ}
%\newcommand{\s}{\text{ }} %one space in math mode
%\newcommand{\tab}{\hspace*{0.5 cm}}
%\newcommand{\sml}{\tiny}
%\newcommand{\med}{\scriptsize}
%\newcommand{\norm}{\normalsize}

%\setlength{\parskip}{0.5cm}
%\setlength{\footskip}{1.0cm}

\begin{document}
\begin{center}\textbf{Output Summary}\end{center}
\vspace*{2cm}

\begin{table}[H]
\centering
\begin{tabular}{l @{  ................................................  }l }
\vspace*{3mm }
\begin{med}\emph{Theoretical Name}\end{med} & \begin{med}\emph{Filename}\end{med} \\ 
Export %NO SEP HERE% \\\\      

$PWI_{scaled}$ & ScaledPWI.nii  \\
$M_{blood}$    & Mblood.nii     \\\\


Coregistration  %NO SEP HERE%                     \\\\

$T2_{rT1}$   &   T2-rT1.nii             \\
$M_{rT1-blood}$  & Mblood-rT1.nii       \\
$PWI_{rT1-scaled}$ & ScaledPWI-rT1.nii  \\\\


EpiCorrection  %NO SEP HERE%               \\\\

$M_{rT1-blood-dist-corr}$ & MBlood-rT1-EpiCorr.nii        \\
$PWI_{rT1-scaled-dist-corr}$ & ScaledPWI-rT1-EpiCorr.nii  \\
Transform files & v.nhdr                                  \\\\  


PVCorrection   %NO SEP HERE%                                           \\\\

$Mask_{gm-wm}$  & /T1/GmWm-Mask.nii \\
$PWI_{PVC}$ &  ScaledPWI-rT1-EpiCorr-PVC.nii   \\
$M_{blood-PVC}$ & Mblood-rT1-EpiCorr-PVC.nii   \\
$CBF_{Normalized}$ & ScaledPWI-rT1-EpiCorr-PVC-Norm.nii
\end{tabular}

\end{table}
\end{document}

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Skip Separator in new Line of Table

Post by localghost »

An adequate problem description would contain a minimal example that is compilable as provided. So, next time please check your examples for functionality and minimal content. People are rarely motivated to find out the code that is missing to make examples compilable.

Regarding the problem you should not use a double \\ to insert a blank line. You are better with adding some additional space by the optional argument like \\[2ex].

Code: Select all

\documentclass[12pt]{article}
\usepackage[T1]{fontenc}
\usepackage[left=2cm,top=2.0cm,bottom=1.5cm,right=2cm,noheadfoot]{geometry}

\begin{document}
  \begin{center}\textbf{Output Summary}\end{center}
  \begin{table}[!ht]
    \centering
    \begin{tabular}{l@{ ................................ }l}
      \emph{Theoretical Name} & \emph{Filename} \\
      Export %NO SEP HERE% \\\\  
      $PWI_{scaled}$ & ScaledPWI.nii  \\
      $M_{blood}$& Mblood.nii \\[2ex]
      Coregistration  %NO SEP HERE% \\\\
      $T2_{rT1}$   &   T2-rT1.nii \\
      $M{rT1-blood}$  & Mblood-rT1.nii   \\
      $PWI_{rT1-scaled}$ & ScaledPWI-rT1.nii  \\[2ex]
      EpiCorrection  %NO SEP HERE%   \\\\
      $M_{rT1-blood-dist-corr}$ & MBlood-rT1-EpiCorr.nii\\
      $PWI_{rT1-scaled-dist-corr}$ & ScaledPWI-rT1-EpiCorr.nii  \\
      Transform files & v.nhdr  \\[2ex]
      PVCorrection   %NO SEP HERE%   \\\\
      $Mask_{gm-wm}$  & /T1/GmWm-Mask.nii \\
      $PWI_{PVC}$ &  ScaledPWI-rT1-EpiCorr-PVC.nii   \\
      $M_{blood-PVC}$ & Mblood-rT1-EpiCorr-PVC.nii   \\
      $CBF_{Normalized}$ & ScaledPWI-rT1-EpiCorr-PVC-Norm.nii
    \end{tabular}
  \end{table}
\end{document}

Thorsten
wannabegeek
Posts: 10
Joined: Wed Mar 30, 2011 8:43 am

Skip Separator in new Line of Table

Post by wannabegeek »

Thanks Thorsten for your interest...

The code below is minminal and tested.

I have never heard of the [2ex] option but not surprised, since the most basic TeX functions are typically not researched or well understood by myself and others.


Because I am advancing a line, it seems that I am stuck with the line separator.

I tried \newline inside the tabular but that didn't work....I really thought it would have. If there is not a concrete way to turn off the line separator on a given line then I suppose I need a trick.

TIA again!

wbg

Code: Select all

\documentclass[letterpaper,12pt]{article}

\begin{document}

\begin{table}
\centering
\begin{tabular}{l @{  ................................................  }l }

Export  \\[2ex]  % no line sep here   

$PWI_{scaled}$ & ScaledPWI.nii  \\
$M_{blood}$    & Mblood.nii     \\[2ex]


Coregistration                     \\[2ex] % no line sep here

$T2_{rT1}$   &   T2-rT1.nii             \\
$M_{rT1-blood}$  & Mblood-rT1.nii       \\
$PWI_{rT1-scaled}$ & ScaledPWI-rT1.nii  \\[2ex]


EpiCorrection                 \\[2ex] % no line sep here

$M_{rT1-blood-dist-corr}$ & MBlood-rT1-EpiCorr.nii        \\
$PWI_{rT1-scaled-dist-corr}$ & ScaledPWI-rT1-EpiCorr.nii  \\
Transform files & v.nhdr                                  \\[2ex]


PVCorrection                                    \\[2ex] % no line sep here

$Mask_{gm-wm}$  & /T1/GmWm-Mask.nii \\
$PWI_{PVC}$ &  ScaledPWI-rT1-EpiCorr-PVC.nii   \\
$M_{blood-PVC}$ & Mblood-rT1-EpiCorr-PVC.nii   \\
$CBF_{Normalized}$ & ScaledPWI-rT1-EpiCorr-PVC-Norm.nii
\end{tabular}

\end{table}
\end{document}
wannabegeek
Posts: 10
Joined: Wed Mar 30, 2011 8:43 am

Skip Separator in new Line of Table

Post by wannabegeek »

Fixed it !

I was thinking that the column separator was triggered at the \\.
Once I realized that I needed to code the text as a single column, I
was able to google to the right answer.

Code: Select all

\usepackage{multirow}
\multicolumn{2}{l}{/Export} \\[1.5ex]  
I hope this helps someone else in the future.

wbg
Post Reply