0

So I have this table, which has some empty space in it. How would I got about removing the separators there? Is it even possible with a regular table?

\begin{table}[h]
\centering
\begin{tabular}{|c|c|c|c||c|c|c|c|}
\hline
\ruby{き}{ki} & \ruby{きゃ}{kya} & \ruby{きゅ}{kyu} & \ruby{きょ}{kyo} &
\ruby{ぎ}{gi} & \ruby{ぎゃ}{gya} & \ruby{ぎゅ}{gyu} & \ruby{ぎょ}{gyo} \\
\hline
\ruby{し}{shi} & \ruby{しゃ}{sha} & \ruby{しゅ}{shu} & \ruby{しょ}{sho} &
\ruby{じ}{ji} & \ruby{じゃ}{ja} & \ruby{じゅ}{ju} & \ruby{じょ}{jo} \\
\hline
\ruby{ち}{chi} & \ruby{ちゃ}{cha} & \ruby{ちゅ}{chu} & \ruby{ちょ}{cho} &
\ruby{ぢ}{ji} & \ruby{ぢゃ}{ja} & \ruby{ぢゅ}{ju} & \ruby{ぢょ}{jo} \\
\hline
\ruby{に}{ni} & \ruby{にゃ}{nya} & \ruby{にゅ}{nyu} & \ruby{にょ}{nyo} &
\ruby{み}{mi} & \ruby{みゃ}{mya} & \ruby{みゅ}{myu} & \ruby{みょ}{myo} \\
\hline
\ruby{ひ}{hi} & \ruby{ひゃ}{hya} & \ruby{ひゅ}{hyu} & \ruby{ひょ}{hyo} &
\ruby{び}{bi} & \ruby{びゃ}{bya} & \ruby{びゅ}{byu} & \ruby{びょ}{byo} \\
\hline
 & & & &
\ruby{ぴ}{pi} & \ruby{ぴゃ}{pya} & \ruby{ぴゅ}{pyu} & \ruby{ぴょ}{pyo} \\
\hline
\ruby{り}{ri} & \ruby{りゃ}{rya} & \ruby{りゅ}{ryu} & \ruby{りょ}{ryo} & \multicolumn{1}{l|}{} & \multicolumn{1}{l|}{} & \multicolumn{1}{l|}{} & \multicolumn{1}{l|}{}\\
\hline
\end{tabular}
\caption{Hiragana Digraphs}
\end{table}

So turning this: From this Into this: enter image description here

I've tried multicolumn and such, but seem to be missing something.

1
  • 2
    Welcome to TeX.SE.
    – Mico
    Commented Jan 28, 2023 at 6:28

1 Answer 1

3

Welcome TeX.SE @tim-jager

Your separators are given by the vertical bars

\begin{tabular}{|c|c|c|c||c|c|c|c|}

You have some around your empty cells, just remove them from the format specification

\begin{tabular}{|c|c|c|c  c|c|c|c|}

Edit: didn't saw the images. You were not talking about the middle column but the last two rows.

\hline
 & & & 
& \ruby{ぴ}{pi} & \ruby{ぴゃ}{pya} & \ruby{ぴゅ}{pyu} & \ruby{ぴょ}{pyo} \\
\hline
\ruby{り}{ri} & \ruby{りゃ}{rya} & \ruby{りゅ}{ryu} & \ruby{りょ}{ryo} & 
\multicolumn{1}{l|}{} & \multicolumn{1}{l|}{} & \multicolumn{1}{l|}{} & \multicolumn{1}{l|}{}
\\
\hline

Give \multicolumn first argument the number of column to span over, and as second argument the formatting for the grouped columns, then as third argument your value (which is empty here)

\hline
\multicolumn{4}{|c|}{} % this cell will span over the four first columns...
& \ruby{ぴ}{pi} & \ruby{ぴゃ}{pya} & \ruby{ぴゅ}{pyu} & \ruby{ぴょ}{pyo} \\
\hline
\ruby{り}{ri} & \ruby{りゃ}{rya} & \ruby{りゅ}{ryu} & \ruby{りょ}{ryo} & 
\multicolumn{4}{|l|}{} % this cell will cover the four last columns...
\\
\hline
2
  • Thank you so much, it seems I didn't fully understand how multicolumn worked, this was perfect.
    – Tim Jager
    Commented Jan 29, 2023 at 13:41
  • You welcome @TimJager :) I've been in the same situation years ago.
    – gildux
    Commented Jan 29, 2023 at 22:36

You must log in to answer this question.

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