2

I'm having a problem with horizontal lines, \multicolumn and \cdashline.

As you can see in my MWE, I use \multicolumn to put section headings which I close by \cdashline but the vertical lines don't begin after the \cdashline. I don't understand how to fix this problem!

\documentclass[pagesize,12pt,bibtotoc,pointlessnumbers, normalheadings, twoside]{book}
\usepackage[twoside=true]{geometry}
\usepackage{longtable}
\usepackage{array, makecell, multirow, tabularx}
\usepackage{arydshln}
\usepackage{booktabs}

\begin{document}
\section{I verbi e i loro tempi (1)}\index{Verbi!Tempi verbali|see {Infissi}}
    \begin{longtable}[]{@{}
            p{.18\linewidth}
            >{\itshape}p{.26\linewidth}|
            p{.18\linewidth}
            >{\itshape}p{.26\linewidth}@{}}
        \multicolumn{4}{c}{Infisso \textbf{-LI-} Passato semplice o remoto}\\
        \bottomrule
        \cdashline{1-4}[.4pt/1pt]
        Ni-\textbf{li}-vaa&Indossai&Tu-\textbf{li}-vaa&Indossammo\\
        U-\textbf{li}-vaa &Indossasti& M-\textbf{li}-vaa &Indossaste\\
        A-\textbf{li}-vaa &Indoss\`{o}&Wa-\textbf{li}-vaa &Indossarono\\
        \bottomrule
        \multicolumn{4}{c}{Infisso \textbf{-NA-} Presente: azione~in corso di svolgimento}\\
        \cdashline{1-4}[.4pt/1pt]      
        Ni-\textbf{na}-vaa &Sto indossando& Tu- 
         \textbf{na}-vaa&Stiamo indossando\\
        U-\textbf{na}-vaa &Stai indossando& M-\textbf{na}-vaa&State indossando\\
        A-\textbf{na}-vaa &Sta indossando& WA-\textbf{na}-vaa&Stanno indossando\\
        \bottomrule
        \multicolumn{4}{c}{Infisso \textbf{-A-} Presente: tempo imprecisato}\\
        \cdashline{1-4}[.4pt/1pt]      
        N-\textbf{a}-vaa &Indosso&Tw-\textbf{a}-vaa &Indossiamo\\
        W-\textbf{a}-vaa &Indossi& Mw-\textbf{a}-vaa &Indossate\\
        \textbf{a}-vaa &Indossa& W-\textbf{a}-vaa &Indossano\\
        \bottomrule
        \multicolumn{4}{c}{Infisso \textbf{-TA-} Futuro}\\
        \cdashline{1-4}[.4pt/1pt]      
        Ni-\textbf{ta}-vaa &Indosser\`{o} &Tu-\textbf{ta}-vaa &Indosseremo\\
        U-\textbf{ta}-vaa &Indosserai & M-\textbf{ta}-vaa &Indosserete\\
        A-\textbf{ta}-vaa &Indosser\`{a} & WA-\textbf{ta}-vaa&Indosseranno\\
        \bottomrule
        \multicolumn{4}{c}{Infisso \textbf{-ME-} Cambiamento di stato}\\
        \cdashline{1-4}[.4pt/1pt]      
        Ni-\textbf{me}-vaa &Ho indossato&Tu-\textbf{me}-vaa & Abbiamo indossato\\
        U-\textbf{me}-vaa &Hai indossato& M-\textbf{me}-vaa &Avete indossato\\
        A-\textbf{me}-vaa & Ha indossato& WA-\textbf{me}-vaa &Hanno indossato\\
        \bottomrule
        \multicolumn{4}{c}{Prefisso \textbf{HU-} Abituale}\\
        \cdashline{1-4}[.4pt/1pt]      
        \textbf{Hu}-vaa & Indosso, Indossa, ecc. &\textbf{Hu}-vaa &Indosso, Indossa, ecc. \\
        \bottomrule
        \multicolumn{4}{c}{\textbf{Pref.-}Radice\textbf{-E} Congiuntivo}\\
        \cdashline{1-4}[.4pt/1pt]      
        Ni-va-\textbf{e}&(che) io indossi&Tu-va- 
        \textbf{e}&(che) noi indossiamo\\
        U-va-\textbf{e}&(che) tu indossi& M-va-\textbf{e}&(che) voi indossiate\\
        A-va-\textbf{e}&(che) egli indossi& WA-va- 
        \textbf{e}&(che) essi indossino\\
        \bottomrule
        \caption{I verbi e i loro tempi semplici}
    \end{longtable}
    \label{verbi-tempi-semplici}
  \end{document}

Example

2 Answers 2

1

Looking at your MWE, the issue seems to be with the \bottomrule command. Indeed, as mentioned by Bernard's answer here, there is a compatibility issue between booktabs and using vertical rules . A simple hack would be to replace your \bottomrule commands with \hrule commands.

So the longtable in your MWE would be (note that I replaced the first bottom rule by a top rule, as in your MWE it was overlapping with the first dotted line):

\begin{longtable}[]{@{}
        p{.18\linewidth}
        >{\itshape}p{.26\linewidth}|
        p{.18\linewidth}
        >{\itshape}p{.26\linewidth}@{}}
        \hline
    \multicolumn{4}{c}{Infisso \textbf{-LI-} Passato semplice o remoto}\\
    %\bottomrule
    \cdashline{1-4}[.4pt/1pt]  
    Ni-\textbf{li}-vaa&Indossai&Tu-\textbf{li}-vaa&Indossammo\\
    U-\textbf{li}-vaa &Indossasti& M-\textbf{li}-vaa &Indossaste\\
    A-\textbf{li}-vaa &Indoss\`{o}&Wa-\textbf{li}-vaa &Indossarono\\
    \hline
    \multicolumn{4}{c}{Infisso \textbf{-NA-} Presente: azione~in corso di svolgimento}\\
    \cdashline{1-4}[.4pt/1pt]      
    Ni-\textbf{na}-vaa &Sto indossando& Tu- 
     \textbf{na}-vaa&Stiamo indossando\\
    U-\textbf{na}-vaa &Stai indossando& M-\textbf{na}-vaa&State indossando\\
    A-\textbf{na}-vaa &Sta indossando& WA-\textbf{na}-vaa&Stanno indossando\\
    \hline
    \multicolumn{4}{c}{Infisso \textbf{-A-} Presente: tempo imprecisato}\\
    \cdashline{1-4}[.4pt/1pt]      
    N-\textbf{a}-vaa &Indosso&Tw-\textbf{a}-vaa &Indossiamo\\
    W-\textbf{a}-vaa &Indossi& Mw-\textbf{a}-vaa &Indossate\\
    \textbf{a}-vaa &Indossa& W-\textbf{a}-vaa &Indossano\\
    \hline
    \multicolumn{4}{c}{Infisso \textbf{-TA-} Futuro}\\
    \cdashline{1-4}[.4pt/1pt]      
    Ni-\textbf{ta}-vaa &Indosser\`{o} &Tu-\textbf{ta}-vaa &Indosseremo\\
    U-\textbf{ta}-vaa &Indosserai & M-\textbf{ta}-vaa &Indosserete\\
    A-\textbf{ta}-vaa &Indosser\`{a} & WA-\textbf{ta}-vaa&Indosseranno\\
    \hline
    \multicolumn{4}{c}{Infisso \textbf{-ME-} Cambiamento di stato}\\
    \cdashline{1-4}[.4pt/1pt]      
    Ni-\textbf{me}-vaa &Ho indossato&Tu-\textbf{me}-vaa & Abbiamo indossato\\
    U-\textbf{me}-vaa &Hai indossato& M-\textbf{me}-vaa &Avete indossato\\
    A-\textbf{me}-vaa & Ha indossato& WA-\textbf{me}-vaa &Hanno indossato\\
    \hline
    \multicolumn{4}{c}{Prefisso \textbf{HU-} Abituale}\\
    \cdashline{1-4}[.4pt/1pt]      
    \textbf{Hu}-vaa & Indosso, Indossa, ecc. &\textbf{Hu}-vaa &Indosso, Indossa, ecc. \\
    \hline
    \multicolumn{4}{c}{\textbf{Pref.-}Radice\textbf{-E} Congiuntivo}\\
    \cdashline{1-4}[.4pt/1pt]      
    Ni-va-\textbf{e}&(che) io indossi&Tu-va- 
    \textbf{e}&(che) noi indossiamo\\
    U-va-\textbf{e}&(che) tu indossi& M-va-\textbf{e}&(che) voi indossiate\\
    A-va-\textbf{e}&(che) egli indossi& WA-va- 
    \textbf{e}&(che) essi indossino\\
    \hline
    \caption{I verbi e i loro tempi semplici}
\end{longtable}

Result

1
  • Thank you very much. Commented Oct 20, 2021 at 13:27
0

Here is a solution with {NiceTabular} of nicematrix (however, a tabular constructed by {NiceTabular} can't be broken on several pages unlike {longtable}).

\documentclass[pagesize,12pt,bibtotoc,pointlessnumbers, normalheadings, twoside]{book}
\usepackage[twoside=true]{geometry}
\usepackage{arydshln}
\usepackage{booktabs}
\usepackage{nicematrix}

\begin{document}
\section{I verbi e i loro tempi (1)}\index{Verbi!Tempi verbali|see {Infissi}}


\begin{table}
    \begin{NiceTabular}[]{@{}
            p{.18\linewidth}
            >{\itshape}p{.26\linewidth}|
            p{.18\linewidth}
            >{\itshape}p{.26\linewidth}@{}}
        \bottomrule
        \Block{1-4}{Infisso \textbf{-LI-} Passato semplice o remoto}\\
        \cdashline{1-4}[.4pt/1pt]
        Ni-\textbf{li}-vaa&Indossai&Tu-\textbf{li}-vaa&Indossammo\\
        U-\textbf{li}-vaa &Indossasti& M-\textbf{li}-vaa &Indossaste\\
        A-\textbf{li}-vaa &Indoss\`{o}&Wa-\textbf{li}-vaa &Indossarono\\
        \bottomrule
        \Block{1-4}{Infisso \textbf{-NA-} Presente: azione~in corso di svolgimento}\\
        \cdashline{1-4}[.4pt/1pt]      
        Ni-\textbf{na}-vaa &Sto indossando& Tu- 
         \textbf{na}-vaa&Stiamo indossando\\
        U-\textbf{na}-vaa &Stai indossando& M-\textbf{na}-vaa&State indossando\\
        A-\textbf{na}-vaa &Sta indossando& WA-\textbf{na}-vaa&Stanno indossando\\
        \bottomrule
        \Block{1-4}{Infisso \textbf{-A-} Presente: tempo imprecisato}\\
        \cdashline{1-4}[.4pt/1pt]      
        N-\textbf{a}-vaa &Indosso&Tw-\textbf{a}-vaa &Indossiamo\\
        W-\textbf{a}-vaa &Indossi& Mw-\textbf{a}-vaa &Indossate\\
        \textbf{a}-vaa &Indossa& W-\textbf{a}-vaa &Indossano\\
        \bottomrule
        \Block{1-4}{Infisso \textbf{-TA-} Futuro}\\
        \cdashline{1-4}[.4pt/1pt]      
        Ni-\textbf{ta}-vaa &Indosser\`{o} &Tu-\textbf{ta}-vaa &Indosseremo\\
        U-\textbf{ta}-vaa &Indosserai & M-\textbf{ta}-vaa &Indosserete\\
        A-\textbf{ta}-vaa &Indosser\`{a} & WA-\textbf{ta}-vaa&Indosseranno\\
        \bottomrule
        \Block{1-4}{Infisso \textbf{-ME-} Cambiamento di stato}\\
        \cdashline{1-4}[.4pt/1pt]      
        Ni-\textbf{me}-vaa &Ho indossato&Tu-\textbf{me}-vaa & Abbiamo indossato\\
        U-\textbf{me}-vaa &Hai indossato& M-\textbf{me}-vaa &Avete indossato\\
        A-\textbf{me}-vaa & Ha indossato& WA-\textbf{me}-vaa &Hanno indossato\\
        \bottomrule
        \Block{1-4}{Prefisso \textbf{HU-} Abituale}\\
        \cdashline{1-4}[.4pt/1pt]      
        \textbf{Hu}-vaa & Indosso, Indossa, ecc. &\textbf{Hu}-vaa &Indosso, Indossa, ecc. \\
        \bottomrule
        \Block{1-4}{\textbf{Pref.-}Radice\textbf{-E} Congiuntivo}\\
        \cdashline{1-4}[.4pt/1pt]      
        Ni-va-\textbf{e}&(che) io indossi&Tu-va- 
        \textbf{e}&(che) noi indossiamo\\
        U-va-\textbf{e}&(che) tu indossi& M-va-\textbf{e}&(che) voi indossiate\\
        A-va-\textbf{e}&(che) egli indossi& WA-va- 
        \textbf{e}&(che) essi indossino\\
        \bottomrule
    \end{NiceTabular}
\caption{I verbi e i loro tempi semplici}
\end{table}
    \label{verbi-tempi-semplici}
\end{document}

You need several compilations (because nicematrix uses PGF/Tikz nodes under the hood).

Output of the above code

You must log in to answer this question.

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