The following code utilizes the tcolorbox
package to create a template of a round rectangle gamebox
. A simple \foreach
statement prints gamebox with the strings Lv. 0
to Lv. 103
printed on them. I nulled before
and overrode after
to \hfill
so that the boxes are well-aligned, making it easy to cut them. \noindent
was included in the loop to prevent the first line's indentation.
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[a4paper,landscape,left=0.7cm,right=0.7cm,top=0.5cm,bottom=0.5cm]{geometry}
\usepackage{tcolorbox}
\tcbuselibrary{most}
\usepackage{tikz}
\title{}
\author{}
\begin{document}
\newtcbox{\gamebox} {
fontupper=\fontsize{0.7cm}{0.7cm}\selectfont\bfseries,
width=3cm,
boxrule=0.1cm,
height=1.5cm,
halign=center,
valign=center,
before=,
after=\hfill,
tcbox width=forced center
}
\foreach \i in {0,...,103} {
\noindent
\gamebox{Lv. \i}
}
\end{document}
However the last line(96 to 103) of the PDF output is a bit off. Regardless of how I adjust the page margins and box sizes, the last line seems to have a slightly smaller \hfill
than the others, and the difference becomes noticeable in the latter columns. Does LaTeX
reserve space for the end of the last line by default? If so how can I disable this function to get a perfect 8x13 placement?