I would like to automatically center a sentence within a Bclogo box; that is, I would like to place the sentence such that its center lies (technically) at the midpoint of the diagonal endpoints of the rectangular-shaped bclogo.
Based on how one might automatically center a divider in the TOC, I tried the following code:
\documentclass{book}
\usepackage{xcolor}
\usepackage[tikz]{bclogo}
\usetikzlibrary{calc,shapes.callouts,shapes.arrows}
\begin{document}
\thispagestyle{empty}
\Huge
\begin{center}
\begin{bclogo}[couleur=red!10, %couleur=blue!14, %couleur=blue!20,
epBord=3.5, arrondi=0, %logo=\bcplume, %\bclampe,marge=8,
logo= ,
%ombre=true, blur, couleurBord=blue!14, %couleurBord=blue!60,
barre=none, %barre=snake, tailleOndu=1.5
]{\hfil{This sentence is not centered.}\hfil}
\end{bclogo}
\end{center}
\end{document}
which produces
I have noticed, surprisingly to me, that if I replace \hfil
by \hfill
I get the following:
which looks pretty much like a goof horizontal centering, but clearly, not vertically centered.
In the past, I have spent a considerable amount of time trying to center a sentence by many manual trial-and-error adjustments; and so, I would like to pose the following question.
QUESTION: How may I center a sentence in the described Bclogo such that it is automatically both vertically and horizontally centered? Also, does anyone know why \hfil
does not do the job as it seems to when I have used it to center an item in a TOC: and also, why is the vertical centering so egregiously off when I use \hfill
?
Thank you.
\colorbox
?\centering
, not sure where that comes from yet