0

I have a problem with borders in multirow. I would really appraciate someones help.

My code:

\begin{tabular}{ | m{2cm} | m{3.2cm}|| m{2cm}| m{3.2cm}|} 
\hline
Linia & Energia teor. [eV] & Linia & Energia teor. [eV] \\
\hline
\hline
Cr~$K_{\alpha 1}$  & 5~405.5384(71) & \multirow{2}{2cm}{Cr~$K_{\alpha}$} &  \multirow{2}{3.2cm}{5405.5384(71)} \\ 
Cr~$K_{\alpha 2}$ & 5~413.88(42)    \\
\hline
Cr~$K_{\beta 1}$ & 5~940.74(92) & \multirow{2}{2cm}{Cr~$K_{\beta}$} & \multirow{2}{3.2cm}{5414.8045(71)} \\
Cr~$K_{\beta1}$ & 5~947.10(100) \\
\hline
Fe~$K_{\alpha 1}$  &  6 391.0264(99)  & \multirow{2}{*}{Fe~$K_{\alpha}$} & \multirow{2}{*}{6391.0264(99)}   \\
Fe~$K_{\alpha 2}$& 6~403.13(43)\\
\hline
Fe~$K_{\beta 1}$ & 77~053.23(100)& \multirow{2}{2cm}{Fe~$K_{\beta}$} &  \multirow{2}{3.2cm}{6404.0062(99)}\\
Fe~$K_{\beta 2}$ & 7~059.9(11)\\
\hline
Ni~$K_{\alpha 1}$  & 7 461.0343(45) & \multirow{2}{2cm}{Ni~$K_{\alpha}$} &  multirow{2}{3.2cm}{7461.0343(45)}\\
Ni~$K_{\alpha 2}$& 7~477.72(44) \\
\hline
Ni~$K_{\beta 1}$  & 8~262.4(11)  & \multirow{2}{2cm}{Ni~$K_{\beta}$} & \multirow{2}{3.2cm}{7478.2521(45)}\\
Ni~$K_{\beta 2}$ & 8~267.6(11)\\
\hline 
\end{tabular}

my_lable

2
  • 1
    Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.
    – Community Bot
    May 11, 2022 at 10:08
  • 1
    Welcome to TeX.SE :) Please provide a MWE (that compiles without errors) and state your question or desired output.
    – user263192
    May 11, 2022 at 11:03

2 Answers 2

2

With the package tabularray, it's the first time i use. Many example of this site.

enter image description here

    \documentclass{article}
    \usepackage{tabularray}
    \begin{document}

    \begin{tblr}{
            vlines,
            colspec = {X[l,wd=2cm] X[l,wd=3.2cm] | X[l,wd=2cm] X[l,wd=3.2cm]},
        }
        \hline
    Linia             & Energia teor. [eV] & Linia                             & Energia teor. [eV]              \\
        \hline
        \hline
        Cr~$K_{\alpha 1}$ & 5~405.5384(71)     & \SetCell[r=2]{m}{Cr~$K_{\alpha}$} & \SetCell[r=2]{m}{5405.5384(71)} \\
        Cr~$K_{\alpha 2}$ & 5~413.88(42)     &&\\
        \hline
    \end{tblr}
    \end{document}
1

Without a minimum working example, I had to guess what packages you used.

You simply need to add the "empty" cells in the lines after multirow

\documentclass{article}
\usepackage{multirow,array}
\usepackage{amsmath}
\begin{document}
\begin{tabular}{ | m{2cm} | m{3.2cm}|| m{2cm}| m{3.2cm}|} 
\hline
Linia & Energia teor. [eV] & Linia & Energia teor. [eV] \\
\hline
\hline
Cr~$K_{\alpha 1}$  & 5~405.5384(71) & \multirow{2}{2cm}{Cr~$K_{\alpha}$} &  \multirow{2}{3.2cm}{5405.5384(71)} \\ 
Cr~$K_{\alpha 2}$ & 5~413.88(42) & & \\
\hline
Cr~$K_{\beta 1}$ & 5~940.74(92) & \multirow{2}{2cm}{Cr~$K_{\beta}$} & \multirow{2}{3.2cm}{5414.8045(71)} \\
Cr~$K_{\beta1}$ & 5~947.10(100) & &\\
\hline
Fe~$K_{\alpha 1}$  &  6 391.0264(99)  & \multirow{2}{*}{Fe~$K_{\alpha}$} & \multirow{2}{*}{6391.0264(99)}   \\
Fe~$K_{\alpha 2}$& 6~403.13(43) & &\\
\hline
Fe~$K_{\beta 1}$ & 77~053.23(100)& \multirow{2}{2cm}{Fe~$K_{\beta}$} &  \multirow{2}{3.2cm}{6404.0062(99)}\\
Fe~$K_{\beta 2}$ & 7~059.9(11) & &\\
\hline
Ni~$K_{\alpha 1}$  & 7 461.0343(45) & \multirow{2}{2cm}{Ni~$K_{\alpha}$} &  \multirow{2}{3.2cm}{7461.0343(45)}\\
Ni~$K_{\alpha 2}$& 7~477.72(44) & & \\
\hline
Ni~$K_{\beta 1}$  & 8~262.4(11)  & \multirow{2}{2cm}{Ni~$K_{\beta}$} & \multirow{2}{3.2cm}{7478.2521(45)}\\
Ni~$K_{\beta 2}$ & 8~267.6(11) & &\\
\hline 
\end{tabular}
\end{document}

In a LaTeX table, if you don't write the delimiter, the cell won't be drawn. It consider you want the line to end at this cell, and don't need the rest of the line.

hope it helps

You must log in to answer this question.

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