3

I'm trying to reproduce this table :

enter image description here

As soon as I try to remove the borders/backgrounds of these cells, they become flat black areas (or inherit unwanted lines/backgrounds) whereas I want them to be totally “transparent”.

What I did :

\documentclass{article} \usepackage[T1]{fontenc} \usepackage{tabularray} \UseTblrLibrary{booktabs} % si besoin \begin{document} \begin{center} \begin{tblr}{ colspec = { Q[wd=3.3cm,l] Q[wd=2.4cm,c]Q[wd=2.4cm,c] Q[wd=2.4cm,c]Q[wd=2.4cm,c] Q[wd=2.4cm,c]Q[wd=2.4cm,c] Q[wd=2.4cm,c]Q[wd=2.4cm,c] }, hlines, vlines, row{1,2} = {font=\bfseries, c}, row{3} = {c}, % Masquage total (pas de bordure ni fond) de la ligne TOTAL sauf 5,6,7 cell{6}{1,2,3,4,8,9} = { bg=none, toprule=0pt, bottomrule=0pt, leftrule=0pt, rightrule=0pt, abovesep=0pt, belowsep=0pt, leftsep=0pt, rightsep=0pt, font=\normalsize, }, } \SetCell[c=9]{c}{Annexe des créances clients à compléter} \\ \SetCell[r=2]{c}{Clients} & \SetCell[c=2]{c}{Solde au 31/12/2024} & & \SetCell[c=2]{c}{Provisions} & & \SetCell[c=2]{c}{Réajustement} & & \SetCell[c=2]{c}{Pertes irrécouvrables} & \\ & TTC & HT & 2024 & 2023 & (+)DOT & (-)REP & HT & TVA \\ GHAZAL & & & & - & & & & \\ KAMAL & & & & - & & & & \\ % Ligne TOTAL : seules les colonnes 5, 6 et 7 sont visibles & & & & \textbf{TOTAL} & & & & \\ \end{tblr} \end{center} \end{document} 

The result :

enter image description here

2 Answers 2

2

For information, here is a way to create that table with {NiceTabular} of nicematrix.

In this environment, the key hvlines draws all the rules excepted in the "corners" computed by the key corners. Those corners are constructed from the empty cells and, since your tabular has many empty cells, I have specified some cells are not empty with the special command \NotEmpty.

\documentclass{article} \usepackage[french]{babel} \usepackage{geometry} \usepackage[T1]{fontenc} \usepackage{nicematrix} \begin{document} \begin{center} \small \renewcommand{\arraystretch}{1.4} \begin{NiceTabular}{l*{8}{X[c]}}[corners,hvlines] \RowStyle{\itshape} \Block{2-1}{Clients} & \Block{1-2}{Solde au 31/12/2024} && \Block{1-2}{Provisions} && \Block{1-2}{Réajustement} && \Block{1-2}{Pertes irrécouvrables} \\ & TTC & HT & 2024 & 2023 & ($+$)DOT & ($-$)REP & HT & TVA \\ GHAZAL \\ KAMAL &&&&&&&& \NotEmpty \\ & & & & TOTAL & \NotEmpty & \NotEmpty \\ \end{NiceTabular} \end{center} \end{document} 

Output of the previous code

3

You can use

hline{Z} = {1-4}{wd=0pt}, hline{Z} = {8-Z}{wd=0pt}, 

to specify that the last (Z) hline shall not be drawn (wd=0pt) for the column 1 to 4 and 8 to the last (Z).

Similarly,

vline{1-4} = {Z}{wd=0pt}, vline{9-Z} = {Z}{wd=0pt}, 

removes the vline 1 to 4 and 9 to the last (Z) in the last (Z) row.

Example (with the standalone class, as the table do not fit the page):

\documentclass[border=3pt]{standalone} \usepackage[T1]{fontenc} \usepackage{tabularray} \UseTblrLibrary{booktabs} % si besoin \begin{document} \begin{tblr}{ colspec = { Q[wd=3.3cm,l] *{8}{Q[wd=2.4cm,c]} }, hlines, vlines, row{1,2} = {font=\bfseries, c}, row{3} = {c}, % % Masquage total (pas de bordure ni fond) de la ligne TOTAL sauf 5,6,7 hline{Z} = {1-4}{wd=0pt}, hline{Z} = {8-Z}{wd=0pt}, vline{1-4} = {Z}{wd=0pt}, vline{9-Z} = {Z}{wd=0pt}, } \SetCell[c=9]{c}{Annexe des créances clients à compléter} \\ \SetCell[r=2]{c}{Clients} & \SetCell[c=2]{c}{Solde au 31/12/2024} & & \SetCell[c=2]{c}{Provisions} & & \SetCell[c=2]{c}{Réajustement} & & \SetCell[c=2]{c}{Pertes irrécouvrables} & \\ & TTC & HT & 2024 & 2023 & (+)DOT & (-)REP & HT & TVA \\ GHAZAL & & & & - & & & & \\ KAMAL & & & & - & & & & \\ % Ligne TOTAL : seules les colonnes 5, 6 et 7 sont visibles & & & & \textbf{TOTAL} & & & & \\ \end{tblr} \end{document} 

Example

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.