Journal Archive — Page 2
How to Change Fonts in LaTeX (fontspec & packages)
To change fonts in LaTeX, load a font package like lmodern or newtxtext with pdfLaTeX, or use fontspec with XeLaTeX/LuaLaTeX to load any system OpenType font.
Headers & Footers in LaTeX with fancyhdr
To customize headers and footers in LaTeX, load the fancyhdr package, set the page style to fancy, and define left/center/right content for each. Full setup inside.
Insert PDF Pages into a LaTeX Document (pdfpages)
To insert PDF pages into LaTeX, load the pdfpages package and use \includepdf[pages=-]{file.pdf}. Select pages, add them to the TOC, and scale to the layout.
How to Add Code Listings in LaTeX (listings & minted)
To add syntax-highlighted code in LaTeX, use the listings package or minted (which calls Pygments). Set the language, import files, and caption code blocks.
Cross-Referencing in LaTeX with \label and \ref
To cross-reference in LaTeX, mark targets with \label{key} and cite with \ref{key} for the number or \pageref{key} for the page. cleveref adds the type word.
Custom Commands & Macros in LaTeX (\newcommand)
Define custom commands in LaTeX with \newcommand to save typing and keep notation consistent. Add arguments, defaults, and environments — full guide inside.