4

I need to create table like this:

table with different borders

Is it possible, and if it is, how?

Thank you

1
  • have a look at the answer below
    – js bibra
    Oct 1 '20 at 1:28
8

With use of booktabs and tabular package (needed only one compilation for final result):

\documentclass{article}
\usepackage{booktabs, tabularx}
\newcolumntype{L}{>{\raggedright\arraybackslash}X}

\begin{document}

\noindent%
\begin{tabularx}{\linewidth}{LcL}
        \toprule[2pt]
        \midrule
\textbf{Some text}  && \textbf{Some text}   \\
Another text        && Another text         \\
    \cmidrule{1-1}  \cmidrule{3-3}
\textbf{Some text}  && \textbf{Some text}   \\
Another text        && Another text         \\
    \cmidrule{1-1}  \cmidrule{3-3}
\textbf{Some text}  && \textbf{Some text}   \\
Another text        && Another text         \\
        \midrule
        \bottomrule[2pt]
    \end{tabularx}

\end{document}

enter image description here

or

\documentclass{article}
\usepackage{ragged2e}
\usepackage{booktabs, tabularx}
\newcolumntype{L}{>{\hspace{0pt}\RaggedRight}X}

\usepackage{lipsum}
\begin{document}

\noindent%
\begin{tabularx}{\linewidth}{LcL}
        \toprule[2pt]
        \midrule
\textbf{Some text}  && \textbf{Some text}   \\
Another text        && Another text         \\
    \cmidrule{1-1}  \cmidrule{3-3}
\textbf{Some text}  && \textbf{Some text}   \\
Another text        && \lipsum[66]          \\
    \cmidrule{1-1}  \cmidrule{3-3}
\textbf{Some text}  && \textbf{Some text}   \\
Another text        && Another text         \\
        \midrule
        \bottomrule[2pt]
    \end{tabularx}

\end{document}

enter image description here

6

Something like this

enter image description here

\documentclass{article}
\usepackage{nicematrix}
\usepackage{calc}
\usepackage{booktabs}

\newcolumntype{P}[1]{>{\raggedright\arraybackslash}p{#1\textwidth-2\tabcolsep- 
 1.5\arrayrulewidth}}
\newcolumntype{Y}[1]{>{\centering\arraybackslash}p{#1\textwidth-2\tabcolsep- 
 1.5\arrayrulewidth}}


\begin{document}
    
    \noindent
    \begin{NiceTabular}{P{0.4}Y{.1}P{0.4}}[]
        \toprule[2pt]
        \toprule 
        \textbf{Level 1} && \textbf{Level 2}\\ 
    blah blah blah && long long line\\\cmidrule{1-1}  \cmidrule{3-3}
            \textbf{Level 1} && \textbf{Level 2}\\ 
    blah blah blah && long long line\\\cmidrule{1-1}  \cmidrule{3-3}
            \textbf{Level 1} && \textbf{Level 2}\\ 
    blah blah blah && long long line\\
        \bottomrule
        \bottomrule[2pt]
    \end{NiceTabular}
    
\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.