🔧 Document Architecture Expectations

  • Custom Class File (.cls):
    • Should include all commonly used packages (listed below).
    • Must be self-contained, reusable across projects.
    • Load command.tex automatically via \AtBeginDocument{\input{command}}.
  • Command File (command.tex):
    • Contains all custom math commands, notation shortcuts, colorboxes, highlighting tools, etc.
    • All your macros, paired delimiters, math operators, environment styles must live here.

🎨 Styling Expectations

Fonts

  • Text Fonts:
    • Default: Meta’s Optimistic font.
    • Switchable options:
      • XCharter
      • Palatino (mathpazo)
    • Allow user to switch via macros: \useoptimistic, \usexcharter, \usepalatino.
  • Math Fonts:
    • Stick with current math setup (as in your mystyle.sty):
      • amsmath, amssymb, amsthm, bm, mathtools, etc.

Line Spacing & Readability

  • Match Meta’s line spacing: a bit wide (\setstretch{1.2}).
  • Easy-to-read layout suitable for research papers.

Page Geometry

  • Margins: 1in default, with tweaks:
    • Top: 1.1in
    • Bottom: 0.8in

📦 Package Requirements

The class should include (unless explicitly overridden):

  • Math: amsmath, amssymb, amsthm, mathtools, bm, optidef
  • Fonts: fontenc, XCharter, mathrsfs, dsfont
  • Spacing: microtype, setspace
  • Tables: booktabs, multirow, tabularx, makecell, nicematrix
  • Figures: graphicx, subcaption, float
  • References:
    • natbib with authoryear, sort&compress, round
    • cleveref with label styles for sections, equations, figures
  • Hyperref:
    \usepackage[colorlinks,
                pagebackref,
                linktoc=page,
                linkcolor=red!70!black,
                anchorcolor=red!70!black,
                citecolor=blue!70!black]{hyperref}
  • Miscellaneous: enumitem, algorithm, algorithmic, clipboard, acronym, dirtytalk, tablefootnote, tikz

🧮 Theorem and Proof Styles

  • Custom \newtheorem blocks for:
    • Theorem, Lemma, Proposition, Corollary, Definition, Claim, Assumption, Fact, Condition, etc.
  • Support for:
    • Numbered environments
    • Repeat theorem environments (rep...)
    • proofsketch environment
  • Custom \abstract redefinition to indent and format nicely.

📚 Reference and Labeling Tools

  • Refcheck + Showkeys integration:
    • Switch toggles \showlabeltrue/false, \refchecktrue/false
    • Custom wrappers for \cref, \Cref to cooperate with refcheck
    • Clean display of unused labels
  • autonum to only number referenced equations

📦 Custom Commands and Utilities (in command.tex)

  • Full math operator suite (\argmax, \diag, \trace, etc.)
  • Brackets and paired delimiters of all sizes
  • Indicator function via \mathds{1}
  • Highlight tools:
    • \mistake{}, \correct{}, \neutral{} + custom highlight color definitions
  • Box styles (tcolorbox/mdframed or TikZ) for emphasis:
    • highlightbox, warningbox, notebox, etc.
  • Vector, matrix, tensor bold macros:
    • Lowercase: \vb, \bm
    • Bold Greek: \balpha, \btheta, etc.
  • Decorated symbols:
    • \barx, \hatx, \tilx, with auto-generation across character sets

✅ Summary: Your Goals

You want a LaTeX template that:

  • Feels like Meta and DeepMind (clean, readable, polished)
  • Works like a personal toolkit (your math commands + flexibility)
  • Packages everything professionally (via .cls + command.tex)
  • Is future-proof and easy to reuse for:
    • arXiv preprints
    • Internal reports
    • Workshop papers