Last update: 2026-01-22
Download a summary slide deck, auto-generated by NotebookLM.
A short video overview, auto-generated by NotebookLM is available at the bottom of this page.
main.tex and write the entire content in it (i.e., do not split each section into a separate file).intro.tex and experiment.tex; do not use generic names like section1.tex and do not include orders in the file names like 1-intro.tex. The order should be specified in the main document, not fixed by the file name. The main document main.tex then include / input these part files, using \input (or in certain cases, \include or \includeonly).preamble.tex and \input it in the main file.figs or figures (lowercase letters, no spaces) and include them from that folder.\input it in the main document.Line breaks: these rules are created to work well with version control, like git.
%% everytime between two consecutive sentences/lines.\begin{environment}, \[.\\ should terminate a line.\\.Labeling: Name a label (of a section, figure, table, etc.) with a prefix, followed by a colon, followed by a short but descriptive name: <prefix>:<name>. Use the standard prefixes in the table below.
fig:figure1 is bad (what is figure 1?) while fig:rmse-room-temp is good (it’s a plot of the RMSE of the room temperature predictions).: or - to separate scopes, use - instead of _ for a space, and never include spaces in labels.sec:overview:dnn or sec:overview-dnn for a subsection on DNN within the larger section “Overview”, and fig:rmse-room-temp instead of fig:rmse_room_temp or fig:rmse room temp (the last one is really bad, don’t use spaces in label identifiers).eq:equation1 but use eq:system-model for the system model, eq:mpc-objective (or eq:mpc:objective) and eq:mpc-state-constraint (or eq:mpc:state-constraint) for the objective function subequation and the state constraint subequation, respectively, of an MPC problem.| Prefix | For |
|---|---|
eq: | equations |
sec: | section, subsection, subsubsection, paragraph, subparagraph |
fig: | figures |
tab: | tables |
alg: | algorithms |
lst: | code listing |
| Example | Good/Bad | Why? |
|---|---|---|
fig:figure1 | Bad | Generic, unclear |
fig:rmse-room-temp | Good | Clear, specific |
fig:rmse_room_temp, fig:rmse room temp | Bad | Use _ or spaces |
sec:overview:dnn, sec:overview-dnn | Good | Clear, specific |
~ in front of each reference or citation command, unless the reference/citation is the subject of a sentence or starts a sentence. Example: The authors of~\cite{paper}, a method is proposed in~\cite{paper}, see Figure~\ref{figure}.\eqref{}, not (\ref{}), for equations.cleveref and use the command \cref, which automatically determines the type of the reference and uses the correct name for it. For example: \cref{fig:myfig} produces equivalently Figure~\ref{fig:myfig}.A macro should improve clarity, consistency, and maintainability, especially in collaborative writing. They are not meant to save keystrokes or encode personal shorthand.
A new command is appropriate only if at least one applies:
\textblue{text} instead of repeatedly typing \textcolor{blue}{text}) to mark many changes in the document.\CovMatrix, \LossFn). If the notation changes, redefine the macro, no need to search-and-replace the document.If none apply, do not define a macro.
Do not define macros for:
\tb for \textbf)\mb for \mathbf, \tb for \textbf, \td for \tilde, \bb for \cite)\newcommand{\bitem}{\begin{itemize}}). An environment is not a macro/command.Encode meaning, not appearance alone: Macros should represent what something is, not merely how it looks, unless the formatting itself carries meaning and is consistently used. Good name: \newcommand{\CovMatrix}{\Sigma}. Less good name: \newcommand{\bSigma}{\boldsymbol{\Sigma}}.
Intuitive, descriptive, and guessable: Prefer clarity over brevity. Avoid cryptic abbreviations and personal shorthand. Readability and maintainability matter more than brevity. A collaborator should be able to infer the meaning from the name.
\textblue{...}, \CovMatrix,
\LossFunction.\tb{...}, \mb, \lam, \ba, \ea.Follow LaTeX conventions: it’s easier to read and understand. Examples:
\textSomething like \textblue.\CovMatrix, \LossFcn\DeclareMathOperator and standard names, like \argmin instead of \amn, \diag instead of \dg.Never override standard commands: Do not redefine or shadow/alias existing commands (like \bb for \cite, \lam for \lambda, \td for \tilde, etc.). This causes confusion and subtle bugs, especially across packages.
Use \newcommand: Use \newcommand to avoid accidental redefinitions. Use \renewcommand only when intentional and clearly documented. Avoid \def.
Be consistent and reuse when possible: Learn and use the lab’s standard package icpslab.sty instead of defining your own duplicates. Do not create multiple macros for the same concept.
Centralize and document macros: For each document, put all custom macros in one file like defs.tex and include it in the main document. Add a brief comment if a macro may be less intuitive to understand. Delete unused macros.
% Covariance matrix (notation may change)
\newcommand{\CovMatrix}{\Sigma}
% Standard math notation
\DeclareMathOperator{\argmin}{arg\,min}
% Consistent typography, Easy to change globally
\newcommand{\PINN}{\textsc{PINN}}
% Semantic (not arbitrary styling), Clear purpose
\newcommand{\revchange}[1]{\textcolor{blue}{#1}}
% Clear meaning, easy to read, easy to change globally
\newcommand{\StateVector}{\bm{x}}
\newcommand{\StateSet}{\mathcal{X}}
\newcommand{\NoiseVar}{\sigma^2}
% Saves minimal typing; Cryptic; Less readable
\newcommand{\lra}{\leftrightarrow}
% Overrides a standard command; ambiguous; saves minimal typing
\newcommand{\mb}{\mathbf}
\newcommand{\tb}{\textbf}
\newcommand{\td}{\tilde}
\newcommand{\non}{\nonumber}
% Cryptic; no semantic meaning (instead, name it \warning{})
\newcommand{\tcr}{\textcolor{red}}
% Overrides a standard environment; unclear
\newcommand{\bitem}{\begin{itemize}}
Use either latexdiff (for automatic marking, useful if used with a version control system) or the changes package (for manual marking, useful for multiple authors). Using the changes package requires more effort and must use it right from the beginning, while using the latexdiff tool is easier and needs little planning (just revise as usual then create the diff).
Another way is to manually color the text pieces to mark for changes, using the xcolor package and commands like \textcolor and \color.