\documentclass[11pt,oneside]{memoir}
% Page layout
\usepackage{geometry}
\geometry{a4paper, left=2.7cm, right=2.7cm, top=4cm, bottom=3.5cm}
% Font setup
\usepackage[T1]{fontenc} % font encoding
\usepackage[tt=false, type1=true]{libertine} % main font (Linux Libertine)
\usepackage[varqu]{zi4} % monospace font (Inconsolata)
% Math and symbols
\usepackage{amsmath} % math formulas
\usepackage{amssymb} % math symbols
\usepackage{amsfonts} % math fonts
\usepackage[libertine]{newtxmath} % math font matching Libertine
\usepackage{xcolor} % colors
\usepackage{pifont} % special symbols, icons
% Content formatting
\usepackage{graphicx} % images
\usepackage{epsfig} % EPS figures
\usepackage{subcaption} % subfigures
\usepackage{tikz} % diagrams
\usepackage{float} % float positioning
\usepackage[edges]{forest} % trees
\usepackage{booktabs} % professional tables
\usepackage{multirow} % table rows spanning
\usepackage{colortbl} % table colors
\usepackage{siunitx} % units and numbers
\usepackage{caption} % caption formatting
\usepackage{algorithmic} % algorithms
\usepackage{fancyvrb} % verbatim environments
\usepackage[linesnumbered,algoruled,boxed,lined]{algorithm2e} % algorithms
\usepackage{enumitem} % customizable lists
\usepackage{soul} % highlighting and spacing
\usepackage{textcomp} % additional text symbols
\usepackage{csquotes} % context-sensitive quotes
\usepackage[normalem]{ulem} % underline and strike-through
% Typography enhancements
\usepackage{setspace} % line spacing control
\usepackage{microtype} % improved typography and hyphenation
\usepackage[english]{babel} % language-specific hyphenation
\usepackage{ragged2e} % better text justification
\usepackage{hyphenat} % hyphenation control
% % Hyphenation and line breaking settings
% \hyphenpenalty=10
% \exhyphenpenalty=10
% \doublehyphendemerits=5000
% \finalhyphendemerits=2500
% \adjdemerits=5000
% \tolerance=500
% \emergencystretch=1em
% \hbadness=500
% References and citations
\usepackage[numbers,sort&compress]{natbib} % citations with numbers
% Line numbering (for draft mode)
\usepackage[pagewise]{lineno}
% \linenumbers % uncomment for draft mode
% Hyperlinks and PDF setup
\usepackage[pagebackref=true]{hyperref}
\hypersetup{
citecolor=blue,
colorlinks=true,
linkcolor=blue,
filecolor=magenta,
urlcolor=blue!40!black,
pdftitle={Query Variants and LLM-Based Retrieval Enhancement},
pdfauthor={Kun Ran, Marwah Alaofi, Damiano Spina, Mark Sanderson},
pdfsubject={Minor Thesis - Kun Ran},
pdfkeywords={Query Variants, LLM, Information Retrieval, Search Effectiveness},
pdfpagemode=UseOutlines,
}
% Cross-references (must be after hyperref)
\usepackage{cleveref} % smart references
% Document structure settings
\setsecnumdepth{subsubsection} % number subsections
\setcounter{tocdepth}{3} % table of contents depth
% Custom commands and symbols
\newcommand\doubleplus{+\kern-1.3ex+\kern0.8ex} % ++ symbol
\def\BibTeX{{\rm B\kern-.05em{\sc i\kern-.025em b}\kern-.08em
T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}}
% Theorem environments
\newtheorem{thm}{Theorem}
\newtheorem{dfn}[thm]{Definition}
% Load custom macros and acronyms
\include{0_Preamble/Macros}
\include{0_Preamble/Acronyms}
\begin{document}
\frontmatter % roman page numbering, unnumbered chapters
\include{0_Preamble/Title}
\include{0_Preamble/Declaration}
\include{0_Preamble/Acknowledgements}
\include{0_Preamble/Summary}
% \include{0Preamble/Publications}
\mainmatter % arabic page numbering, numbered chapters
\include{0_Preamble/Lists}
\include{1_Chapters/abstract}
\include{1_Chapters/ch1-intro}
\include{1_Chapters/ch2-background}
\include{1_Chapters/ch3-methods}
\include{1_Chapters/ch4-results}
\include{1_Chapters/ch5-discussion}
\include{1_Chapters/ch6-conclusions}
\backmatter % unnumbered chapters
\newpage
\phantomsection
\bibliographystyle{ACM-Reference-Format}
\bibliography{99-refs}
\include{0Preamble/Appendix}
\end{document}