% ========================================================================
% © 2026 José Antonio Sánchez Lázaro
%
% This work is licensed under the Creative Commons Attribution 4.0
% International License (CC BY 4.0).
%
% Original deposit:
% Zenodo DOI: https://doi.org/10.5281/zenodo.16235702
% Date: 27 February 2026 (version v1.0.2.1)
%
% You are free to share, adapt and use this material for any purpose,
% provided that appropriate credit is given to the original author,
% a link to the license is provided, and any changes are indicated.
%
% Full license: https://creativecommons.org/licenses/by/4.0/
% Contact: research@darcysoft.com
% ========================================================================

\documentclass[twocolumn,preprintnumbers,amsmath,amssymb,superscriptaddress]{revtex4-2}


\usepackage{tabularray}
\UseTblrLibrary{booktabs}   % ← importante para que funcionen \toprule, \midrule, \bottomrule
\usepackage{graphicx}
\usepackage{fontspec}         % ← nuevo: esencial para LuaLaTeX / XeLaTeX
\usepackage{unicode-math}     % ← nuevo: matemáticas Unicode (muy recomendado)

% Fuentes recomendadas para física (elige una combinación que te guste)
\setmainfont{Libertinus Serif}     % o TeX Gyre Termes, STIX Two Text, etc.
\setsansfont{Libertinus Sans}
\setmonofont{JuliaMono}[Scale=MatchLowercase]
\setmathfont{Libertinus Math}      % muy legible y bonita para ecuaciones de física
% Alternativas populares:
% \setmathfont{STIX Two Math}
% \setmathfont{TeX Gyre Termes Math}
% \setmathfont{XITS Math}

\usepackage{listings}
\usepackage{siunitx}          % excelente con unicode-math
\usepackage{bookmark}
\usepackage{hyperref}
\usepackage{orcidlink}
\usepackage{xcolor}


\hypersetup{%
  colorlinks=true,
  linkcolor=blue,
  citecolor=blue,
  urlcolor=blue
}

% Configuración de listings (mejorada para LuaLaTeX)
\lstset{
  basicstyle=\footnotesize\ttfamily,
  breaklines=true,
  breakatwhitespace=true,
  language=Python,
  keywordstyle=\color{blue}\bfseries,
  stringstyle=\color{red},
  commentstyle=\color{green!50!black}\itshape,
  numbers=left,
  numberstyle=\tiny\color{gray},
  stepnumber=1,
  numbersep=5pt,
  showspaces=false,
  showstringspaces=false,
  showtabs=false,
  frame=single,
  tabsize=4,
  captionpos=b,
  escapeinside={(*@}{@*)},
  morekeywords={*,self,lambda,with}
}

% Tus definiciones (sin cambios)
\newcommand{\diag}[1]{\operatorname{diag}\left(#1\right)}
\newcommand{\tr}{\operatorname{tr}}
\DeclareMathOperator{\Area}{Area}

\AtBeginDocument{%
  \mathcode`~="8000
  \begingroup
    \catcode`~=\active
    \protected\gdef~{\sim}%
  \endgroup
}
\usepackage{fvextra}          % ← mejora el wrapping y Unicode en minted
\usepackage{newunicodechar}   % ← para que χ, ², μ, etc. se vean perfectos

% Caracteres Unicode comunes en código científico (se renderizan en modo math/text)
\newunicodechar{χ}{\ensuremath{\chi}}
\newunicodechar{²}{\textsuperscript{2}}
\newunicodechar{³}{\textsuperscript{3}}
\newunicodechar{μ}{\ensuremath{\mu}}
\newunicodechar{α}{\ensuremath{\alpha}}
\newunicodechar{β}{\ensuremath{\beta}}
\newunicodechar{λ}{\ensuremath{\lambda}}
\newunicodechar{π}{\ensuremath{\pi}}

\usepackage{minted}

\setminted{
  fontsize=\small\ttfamily,      
  fontfamily=tt,                
  breaklines=true,
  breakanywhere=true,
  breakbytokenanywhere=true,      
  breakindent=0pt,
  breakbefore={/.:=,-_[]{}()<>|&^\%+\\},
  breakafter={/:=},
  breaksymbolleft={},
  breaksymbolright={},
  xleftmargin=2pt,
  xrightmargin=2pt,
  framesep=2pt,
  frame=single,
  linenos=left,
  numbersep=4pt,
  style=friendly,                
}

\begin{document}
\input{sections/01_title_abstract.tex}
\input{sections/02_introduction.tex}
\input{sections/03_formalism.tex}
\input{sections/04_emergent_phenomena.tex}
\input{sections/05_cosmology.tex}
\input{sections/06_predictions_conclusions.tex}



\appendix

\input{appendices/A_rigorous_derivations.tex}
\input{appendices/B_jacobian_pathintegral.tex}
\input{appendices/C_simulation_codes.tex}

\section{References}
The following references encompass foundational works in relativity, quantum gravity, and cosmology, as well as contemporary studies up to 2025 on observational data from JWST, LIGO, and other instruments. They cover key topics including spacetime geometry, black holes, Lorentz invariance violations, the arrow of time, unification theories, and the information paradox.

% Bib Format migration pending: manual .tex references in Sec. References, to be replaced by .bib and BibTeX in future versions.
% \nocite{*}
% \bibliographystyle{apsrev4-2}  
% \bibliography{main_unified_4d_euclidean_spacetime_theory}             
\input{references_manual.tex}
\end{document}
