I have this K-Map written with the KvMap package, but I don't know how to center it properly:
\documentclass[a4paper,12pt]{article}
\usepackage[a4paper, margin=2cm]{geometry}
\usepackage[utf8]{inputenc}
\usepackage{kvmap}
\usetikzlibrary{backgrounds}
\begin{document}
\begin{center}
\begin{kvmap}
\kvlist{8}{4}{\phantom{0},\phantom{0},\phantom{0},\phantom{0},\phantom{0},\phantom{0},\phantom{0},\phantom{0},\phantom{0},\phantom{0},\phantom{0},\phantom{0},\phantom{0},\phantom{0},\phantom{0},\phantom{0},X,X,X,X,X,X,X,X,\phantom{0},1,1,\phantom{0},X,X,X,\phantom{0}}{Q_2, Q_1, Q_0 ,Q_4 , Q_3 }
\foreach \tikzn/\tikzi in {00/0, 10/1, 20/3, 30/2, 40/6, 50/7, 60/5, 70/4,
01/8, 11/9, 21/11, 31/10, 41/14, 51/15, 61/13, 71/12,
02/24, 12/25, 22/27, 32/26, 42/30, 52/31, 62/29, 72/28,
03/16, 13/17, 23/19, 33/18, 43/22, 53/23, 63/21, 73/20
}
{\node[font=\footnotesize,anchor=north east, inner sep=0.25pt] at (\tikzn.north east) {$\tikzi$};}
\begin{scope}[on background layer]
\fill[gray!30] (1,-2) rectangle (3,-4);
\fill[gray!30] (5,-2) rectangle (7,-4);
\end{scope}
\end{kvmap}
\end{center}
\end{document}
I would like to have the same space from the left and right side of the Kmap.
showframe
option togeometry
and by placing thekvmap
in an\fbox
. The table-like part might seem to be shifted to the right due to the numbers and the "Q3Q4" on the left.