I’m new and I don’t know many things about Latex.
I want to do a table like in photo, is it impossible with Latex?
Thank's
Graphics, Figures & Tables ⇒ Not so simple table
Not so simple table
- Attachments
-
- pinakas 001.jpg (51.61 KiB) Viewed 1404 times
NEW: TikZ book now 40% off at Amazon.com for a short time.

- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Not so simple table
This graphic can be created by means of the pgf/tikZ package. Take a look at this example.
Could similar be done with pstricks.
Best regards and welcome to the board
Thorsten¹
Code: Select all
\documentclass{minimal}
\usepackage{tikz}
\usetikzlibrary{decorations.pathreplacing}
\pagestyle{empty}
\begin{document}
\begin{tikzpicture}[thick,decoration=brace]
\draw(0,0) grid (4,4);
\draw(0,4) node[anchor=base east] {$AB$};
\draw(0.5,4.6) node {$CD$};
\foreach \x/\xtext in {0.5/00,1.5/01,2.5/10,3.5/11}
\draw (\x,4.2) node {\xtext};
\foreach \y/\ytext in {0.5/11,1.5/10,2.5/01,3.5/00}
\draw (-0.3,\y) node {\ytext};
\foreach \x/\y in {0/0,1/0,3/0,1/2,0/3,1/3,3/3}
\draw (\x.5,\y.5) node {1};
\foreach \x/\y in {2/0,0/1,1/1,2/1,3/1,0/2,2/2,3/2,2/3}
\draw (\x.5,\y.5) node {0};
\draw[very thin] (0.2,1.2) rectangle (3.8,1.8);
\draw[very thin] (2.2,0.2) rectangle (2.8,3.8);
\draw[very thin] (0.15,1.15)--(0.85,1.15)--(0.85,2.85)--(0.15,2.85);
\draw[very thin] (3.85,1.15)--(3.15,1.15)--(3.15,2.85)--(3.85,2.85);
\draw[thin,decorate] (-0.5,0)--(-0.5,2) node[midway,left] {$A$};
\draw[thin,decorate] (4.1,3)--(4.1,1) node[midway,right] {$B$};
\draw[thin,decorate] (2,4.4)--(4,4.4) node[midway,above] {$C$};
\draw[thin,decorate] (3,-0.1)--(1,-0.1) node[midway,below] {$D$};
\end{tikzpicture}
\end{document}
Best regards and welcome to the board
Thorsten¹
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10