Consider the following example:
\documentclass[twoside, 10pt]{book}
\usepackage[
paperwidth=6in,
paperheight=9in,
tmargin=0.75in,
bmargin=0.75in,
inner=0.75in,
outer=0.75in
]{geometry}
\usepackage{calc}
\usepackage{tikz}
\usepackage{etoolbox}
\usepackage{transparent}
\usepackage{tikzpagenodes}
\usepackage[table]{xcolor}
\usetikzlibrary{calc}
\usetikzlibrary{fadings}
\usetikzlibrary{shadows.blur}
\usetikzlibrary{matrix}
\pagestyle{empty}
\begin{document}
\tikz[remember picture, overlay]{
\node[
circle,
fill = black,
font = \sffamily\fontsize{24}{24}\bf\selectfont\color{white},
anchor = west,
minimum size = 1.5cm,
outer sep = 0pt
] at (current page text area.center) (numb) {I};
\node[
anchor = east,
inner sep = 0pt,
outer sep = 0pt,
font = \sffamily\fontsize{48}{48}\selectfont
] at ($(numb.west) + (-0.5cm, 0cm)$) {
This is part
};
}
\end{document}
which gives the following output:
Currently the west of the first node is centered on the page. Instead of that, how to horizontally center the center of the two nodes (as if it were only one big node) with the center of the page text area? (I am searching for a command inside the tikz environment, not a global \begin{center} \end{center}
to wrap the tikz figure.) In other words, the end result should be to have "This is part I" horizontally centered on the text area of the page.
xcolor
becausetikz
loadsxcolor
. Move\usepackage[table]{xcolor}
to before\usepackage{tikz}
. – Torbjørn T. Oct 13 '17 at 12:03