Feb 18, 2025
Generic LaTeX Document Template
This is a generic LaTeX title header that I like to use for my documents.
\documentclass{article}
\usepackage[left=1in, right=1in, top=1in, bottom=1in]{geometry}
\usepackage{titling}
\usepackage{unicode-math}
\usepackage{fontspec}
\setromanfont{TeX Gyre Termes}
\setsansfont{TeX Gyre Heros}
\setmonofont{TeX Gyre Cursor}[Ligatures=NoCommon]
\setmathfont{TeX Gyre Termes Math}
\setmathfont{TeX Gyre Termes Math}[version = bold, FakeBold = 2.0]
\makeatletter
\newcommand*{\topic}[1]{\gdef\@topic{#1}}
\newcommand*{\@topic}{}
\newcommand*{\subtopic}[1]{\gdef\@subtopic{#1}}
\newcommand*{\@subtopic}{}
\def\@maketitle{
{
\large\noindent
{\LARGE\textbf{\@title}} \bigskip \\
\textbf{\@topic} \strut\hfill \textbf{\@author} \\
\textbf{\@subtopic} \strut\hfill \@date
}
\noindent\rule{\textwidth}{1pt}
\bigskip
\noindent
}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhead{}
\fancyhead[L]{\thetitle}
\fancyhead[R]{\textit{\theauthor}}
\renewcommand{\headrulewidth}{1pt}
\makeatother
\usepackage{hyperref}
\usepackage{xurl}
\usepackage{paralist}
\usepackage{booktabs}