tabla segmentada

tabla segmentada

ingrese la descripción de la imagen aquí

¿Puedo hacer este tipo de tabla en LaTeX?


Me gustaría aplicar las respuestas a esta tabla:

\documentclass[10pt]{article}

\usepackage[left=1cm,right=1.5cm,top=1cm, bottom=3.5cm]{geometry}

\begin{document}

\begin{tabular}{|l|l|l|}
\hline
text & text & text \\ 
\hline
text & text & text \\ 
\hline
text & text & text \\ 
\hline
text & text & text \\ 
\hline
text & text & text \\ 
\hline
text & text & text \\ 
\hline
text & text & text \\ 
\hline
text & text & text \\ 
\hline
text & text & text \\ 
\hline
text & text & text \\ 
\hline
text & text & text \\ 
\hline
text & text & text \\ 
\hline
\end{tabular}

\end{document}

Respuesta1

ingrese la descripción de la imagen aquí

Sintiendo que se parece más a una imagen, la codifiqué en TikZ:

\documentclass[tikz,border=2pt]{standalone}
\usetikzlibrary{positioning,calc}

\begin{document}
\begin{tikzpicture}[tp/.style={minimum height=6cm+2\pgflinewidth,minimum width=1cm,fill=white},line width=1pt]

\node[minimum size=6cm,inner sep=0pt,draw] (big) {};
\draw (big.180)--(big.0)(big.90)--(big.-90);

\node[tp] at ($(big.center)!.5!(big.0)$) {};
\node[tp] at ($(big.center)!.5!(big.180)$) {};
\node[tp,rotate=90] at ($(big.center)!.5!(big.90)$) {};
\node[tp,rotate=90] at ($(big.center)!.5!(big.-90)$) {};
\end{tikzpicture}
\end{document}

Además, ¡añadir texto no puede ser más fácil!

ingrese la descripción de la imagen aquí

Vea este ejemplo:

\documentclass[tikz,border=2pt]{standalone}
\usetikzlibrary{positioning,calc}
\begin{document}

\begin{tikzpicture}[BL/.style={draw=blue,line width=1cm,shorten >=-1pt,shorten <=-1pt},line width=1pt]

\node[minimum size=6cm,inner sep=0pt,draw] (big) {};
\draw (big.180)--(big.0)(big.90)--(big.-90);

\draw[BL]($(big.90)!.5!(big.135)$)--($(big.-90)!.5!(big.-135)$);
\draw[BL]($(big.90)!.5!(big.45)$)--($(big.-90)!.5!(big.-45)$);    
\draw[BL]($(big.180)!.5!(big.135)$)--node[pos=.25,fill=white]{Cell no. 11}node[pos=.75,fill=white]{Cell no. 12}($(big.0)!.5!(big.45)$);
\draw[BL]($(big.180)!.5!(big.-135)$)--node[pos=.25,fill=white]{Cell no. 21}node[pos=.75,fill=white]{Cell no. 22}($(big.0)!.5!(big.-45)$);

\end{tikzpicture}

\end{document}

Actualizar

En cuanto a la versión editada final de la pregunta, aquí hay otra TikZimplementación que acepta cualquier tamaño de tabla:

ingrese la descripción de la imagen aquí

\documentclass[10pt]{article}
\usepackage{tikz,colortbl}
\usetikzlibrary{positioning,calc}
\begin{document}

\newcommand{\mytable}[1]{\ifnum#1>0\hline\else\fi
text & text & text \\ \ifnum#1>0\hline\else\fi
text & text & text \\ \ifnum#1>0\hline\else\fi
text & text & text \\ \ifnum#1>0\hline\else\fi
text & text & text \\ \ifnum#1>0\hline\else\fi
text & text & text \\ \ifnum#1>0\hline\else\fi
text & text & text \\ \ifnum#1>0\hline\else\fi
text & text & text \\ \ifnum#1>0\hline\else\fi
text & text & text \\ \ifnum#1>0\hline\else\fi
text & text & text \\ \ifnum#1>0\hline\else\fi
text & text & text \\ \ifnum#1>0\hline\else\fi
text & text & text \\ \ifnum#1>0\hline\else\fi
text & text & text \\ \ifnum#1>0\hline\else\fi
}
\newcolumntype{W}{>{\color{white}}l}

\begin{tikzpicture}[shorten >=-1pt,shorten <=-1pt]
\node[draw,inner sep=0pt](table){%
\begin{tabular}{|W|W|W|}
\mytable{1}
\end{tabular}};

\foreach \x in {1,3,5}
\draw[white,line width=.3cm] ($(table.north west)!\x/6!(table.north east)$)--($(table.south west)!\x/6!(table.south east)$);
\foreach \x in {1,3,...,23}
\draw[white,line width=.1cm] ($(table.north west)!\x/24!(table.south west)$)--($(table.north east)!\x/24!(table.south east)$);

\setlength{\extrarowheight}{.4pt}
\node at (table.center){\noindent%
\begin{tabular}{lll}
\mytable{0}
\end{tabular}};    
\end{tikzpicture}

\end{document}

El primero \foreachrecorre los números impares desde 1hasta 2*#columns-1y el segundo \foreachrecorre los números impares desde 1hasta 2*#rows-1. Además, \x/6son múltiplos del ancho de media columna y \x/24son múltiplos del alto de media fila. Las filas de la tabla se ingresan en el \mytablecomando solo una vez.

Respuesta2

Aquí creo mi propia macro \Dcell[], que se utilizará como componente de un TABstack, para crear la tabla. Admito la posibilidad de agregar texto a los elementos con el argumento opcional to \Dcell. Hay 3 parámetros de usuario en la parte superior del archivo:

\rlwdel ancho de las reglas de las esquinas

\rllnla longitud de las reglas de las esquinas

\cellhgapel espacio vacío entre las dos reglas de las esquinas (el espacio vertical se ajusta automáticamente para mantener la celda cuadrada).

Obviamente, \cellhgap + 2\rllndebe exceder la entrada de texto más amplia.

Si bien hay un poco de configuración de preámbulo, el uso real es bastante trivial.

\documentclass{article} 
\usepackage{tabstackengine}
\def\rlwd{.4pt}
\def\rlln{3ex}
\def\cellhgap{3ex}
\def\cellfield{\dimexpr\cellhgap + 2\dimexpr\rlln}
\def\cellvgap{.5\dimexpr\cellhgap-\ht\strutbox\relax}
\setstackEOL{\cr}
\setstackgap{S}{-\rlwd}
\fixTABwidth{T}
\newcommand\Dcell[1][]{\protect\Dcellraw{#1}}
\newcommand\Dcellraw[1]{%
 \stackunder[\cellvgap]{%
  \stackon[\cellvgap]{\makebox[\cellfield]{\strut#1}}{%
    \rule[\dimexpr-\rlln+\rlwd\relax]{\rlwd}{\rlln}\rule{\rlln}{\rlwd}%
    \hspace{\cellhgap}%
    \rule{\rlln}{\rlwd}\rule[\dimexpr-\rlln+\rlwd\relax]{\rlwd}{\rlln}}%
 }{%
    \rule{\rlwd}{\rlln}\rule{\rlln}{\rlwd}%
    \hspace{\cellhgap}%
    \rule{\rlln}{\rlwd}\rule{\rlwd}{\rlln}%
 }\kern-\dimexpr\rlwd%
}
\begin{document}
\tabbedShortstack{
  \Dcell[xyz]&\Dcell\cr
  \Dcell[z]&\Dcell[abcdefg]
}
\end{document}

ingrese la descripción de la imagen aquí

información relacionada