There's just THIS TEXT NEEDS TO BE ALIGNED text on one page of my book that's preceded by some vspace value. There's also some WITH THIS TEXT text on another page that's preceded by some vspace value, TEXT BEFORE TEXT THAT NEEDS TO BE ALIGNED text of a different size and an example-image-c image.
I need THIS TEXT NEEDS TO BE ALIGNED and WITH THIS TEXT to be exactly at the same distance from the page's top so, if both pages are stacked together, both texts would be properly aligned to each other.
In my current code I assigned ex values to texts, vspaces and even to the image's height. I hoped that by equaling the total numbers of vertical values of all elements that precede both texts, I'll have the needed texts properly aligned (at the same distance from the page's top), but they're not! What am I doing wrong? Does \begin{titlepage} on one of the pages add some space I am not aware about?
% !TEX TS-program = LuaLaTeX
\documentclass[11pt,twoside,openany]{book}
\pagestyle{plain}
\usepackage[english, russian]{babel}
\usepackage{fontspec}
\setmainfont{EB Garamond}[
SmallCapsFont={EB Garamond SC},
SmallCapsFeatures={Letters=SmallCaps},
Ligatures=TeX,
]
\usepackage{microtype}
\usepackage[shortcuts]{extdash}
\usepackage[pagewise]{lineno}
\usepackage[
paperwidth=6in,
paperheight=9in,
inner=15mm,
top=15mm,
outer=20mm,
bottom=22mm,
heightrounded,
]{geometry}
\usepackage{lipsum}
\setlength{\parskip}{0pt}
\usepackage{graphicx}
\usepackage[dvipsnames]{xcolor}
\usepackage{titlesec}
\titleclass{\chapter}{straight}
\titleformat{\chapter}[display]{\filcenter\normalfont\large}{\thechapter.}{6pt}{}
\titlespacing*{\chapter}{0pt}{30pt}{10pt plus 10pt}
\begin{document}
\pagenumbering{gobble}
\frontmatter
% PAGE1
\vspace*{14ex}
\begin{center}
{\fontsize{4ex}{4ex}\bfseries{THIS TEXT NEEDS TO BE ALIGNED}\par} % TEXT THAT NEEDS TO BE ALIGNED
\end{center}
\vspace{9ex}
\AddToHook{shipout/background}{%
\put(0mm,-240mm){\ifnum\value{page}=0 \includegraphics[width=200mm,height=250mm,keepaspectratio]{example-image-a}\fi}
\put(60mm,-200mm){\ifnum\value{page}=0 \includegraphics[width=60mm,height=60mm,keepaspectratio]{example-image-b}\fi}
}
\clearpage
% TITLE PAGE
\begin{titlepage}
\centering
\vspace*{6ex}
{\scshape\fontsize{6ex}{6ex}{TEXT BEFORE TEXT THAT NEEDS TO BE ALIGNED}\par}
\begin{center}
\includegraphics[height=2ex,keepaspectratio]{example-image-c}
\end{center}
{\fontsize{4ex}{4ex}\bfseries{WITH THIS TEXT}\par} % TEXT THAT NEEDS TO BE ALIGNED
\vspace{9ex}
{\scshape\footnotesize{SOME RANDOM TEXT}\par}
\vspace{3ex}
{\scshape\footnotesize{SOME RANDOM TEXT}\par}
\vspace{9ex}
{\large SOME RANDOM TEXT\par}
\vspace{50ex}
{\footnotesize SOME RANDOM TEXT\par}
\vspace{0ex}
{\footnotesize SOME RANDOM TEXT\par}
\vspace{0ex}
{\footnotesize SOME RANDOM TEXT\par}
\vspace{0ex}
\vfill
\title{SOME TITLE}
\author{SOME AUTHOR}
\date{}
\end{titlepage}
\clearpage
\mainmatter
\pagenumbering{arabic}
\chapter{CHAPTER ONE}
\lipsum[1-1]
\end{document}

\switchcolumn*before the text starts. – John Kormylo Apr 15 '22 at 04:12