Graphics, Figures & TablesAvoid vertical and hrizontal intersect in a table

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
Gho57bu57er
Posts: 1
Joined: Wed Aug 30, 2023 3:49 pm

Avoid vertical and hrizontal intersect in a table

Post by Gho57bu57er »

Hey! :D
I'm currently in the process of composing my master's thesis and striving to achieve a consistent formatting for all the tables. Is there a method to prevent the vertical lines from intersecting with the horizontal lines?

The appearance of my tables is somewhat similar to this:

Code: Select all

\documentclass{article}
\usepackage{tabularray}

\begin{document}

\begin{table}
\centering
\begin{tblr}{
  cells = {c},
  vline{2} = {-}{},
  hline{1-2,5} = {-}{},
}
Text & Text & Text & Text & Text \\
Text & Text & Text & Text & Text \\
Text & Text & Text & Text & Text \\
Text & Text & Text & Text & Text 
\end{tblr}
\end{table}

\end{document}
I've already made attempts to manipulate the `abovepos` and `belowpos` parameters.

Code: Select all

\documentclass{article}
\usepackage{tabularray}

\begin{document}

\begin{table}
\centering
\begin{tblr}{
  cells = {c},
  vline{2} = {-}{abovepos = -1, belowpos = -1},
  hline{1-2,5} = {-}{},
}
Text & Text & Text & Text & Text \\
Text & Text & Text & Text & Text \\
Text & Text & Text & Text & Text \\
Text & Text & Text & Text & Text 
\end{tblr}
\end{table}

\end{document}
However, this approach leads to the creation of gaps in places where horizontal lines are absent as well. Is there a way to eliminate these gaps?



Thanks,

Ghost

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
kaiserkarl13
Posts: 707
Joined: Tue Mar 25, 2008 5:02 pm

Avoid vertical and hrizontal intersect in a table

Post by kaiserkarl13 »

I'm not sure why you would want it this way, but...the booktabs package actually does this as an unintended side-effect.
Post Reply