I have created a MWE where one can picture my issue.
\documentclass[12pt]{article}
\usepackage[
left =0cm,
right =0cm,
top =0cm,
bottom =0cm,
paperwidth = 521pt,
paperheight = 384pt
]{geometry}
\usepackage{lipsum}
\usepackage[skins, breakable, theorems]{tcolorbox}
\pagestyle{empty}
\newtcolorbox{Mybox}{
%enhanced,
arc = 0pt,
boxrule = 0pt,
colback = blue,
colupper = white,
top= 2pt,
bottom = 1pt
}
\begin{document}
\begin{Mybox}
Some small upper text.
\end{Mybox}
\lipsum[1]
\vspace*{\fill}%
\begin{Mybox}
Some small lower text.
\end{Mybox}
\end{document}
In the previous image, one can see that the top tcolorbox sticks perfectly to the top but the bottom one is not (quite). How can I fix this? Note the unusual geometry.
The geometry
package does not show any other spacing than bottom
so I should be able to reach the bottom of the page. Is that a flaw of the \vfill
then?
PS: I do not want to work with fancyhdr
here since I want something far more simple.
tcolorbox
and the optionafter=0pt
should be added toMybox
and this solves the problem. If any admin is around, should I delete my question then?\vspace
in this case here, and instead of\vspace{\fill}
you can use simply\vfill
(3) If beamer is not option, maybefancyhdr
to place boxes as header and footers? (4) You can also have a perfect bottom box without dealing with spaces with optionsfloat, floatplacement=b
. This option is only suitable if you have a good understanding of how floats behave.class
for presentation I am building. I'm avoiding Beamer because it is either too constraining or too difficult to use. (2) I corrected that in my answer. (3) I did not manage to makefancyhdr
work withtcolorbox
. Furthermore, I am not using complicated headers/footers so that I find my environments more convinient. (4) I did not thought of using floats and that could be a good idea! All the more thattcolorbox
allows one to treat the box as floats if one asks for it.