Skip to content

Commit

Permalink
Minor improvements to math
Browse files Browse the repository at this point in the history
  • Loading branch information
sesquideus committed Jan 9, 2025
1 parent 9c44537 commit dd88299
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
8 changes: 6 additions & 2 deletions core/latex/math.tex
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,8 @@
\DeclareMathOperator{\sinc}{sinc}
% Haversine
\DeclareMathOperator{\hav}{hav}
% Error function
\DeclareMathOperator{\erf}{erf}

% Evaluation at point
\NewDocumentCommand{\Eval}{m m O{}}{\left.#1\right|_{#2}^{#3}}
Expand All @@ -282,7 +284,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% STATISTICS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Distribution #1 of variable #2 with parameters #3
\NewDocumentCommand{\Distribution}{m m m}{#1\left(#2 \mid #3\right)}
\NewDocumentCommand{\Distribution}{m o m}{#1\left(\IfNoValueTF{#2}{}{#2 \mid}#3\right)}

% Statistics
\NewDocumentCommand{\ExpectedChevrons}{m}{\left<#1\right>}
Expand All @@ -294,8 +296,10 @@
\NewDocumentCommand{\Binomial}{m m}{\binom {#1} {#2}}

% Text with spaces on both sides
\NewDocumentCommand{\Text}{m}{\ \text{#1}\ }
% Text with quad spaces on both sides
\NewDocumentCommand{\QText}{m}{\quad\text{#1}\quad}
% Text with double spaces on both sides
% Text with double quad spaces on both sides
\NewDocumentCommand{\QQText}{m}{\qquad\text{#1}\qquad}

% Shorthands for floor and ceiling functions
Expand Down
1 change: 1 addition & 0 deletions core/latex/siunitx.tex
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
\DeclareSIUnit{\parsec}{pc}
\DeclareSIUnit{\lightyear}{ly}
\DeclareSIUnit{\watthour}{Wh}
\DeclareSIUnit{\jansky}{Jy}
\DeclareSIUnit{\upmag}{\kern-0.25em\ensuremath{^\mathrm{m}}}
\DeclareSIUnit{\mag}{mag}
\DeclareSIUnit{\rpm}{rpm}
Expand Down
2 changes: 1 addition & 1 deletion modules/scholar/templates/homework-base.jtt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
\titleformat{\section}[block]{\Huge\bfseries\centering}{}{0pt}{}
\titleformat{\subsection}[hang]{\Large\bfseries\vspace{4mm}\vspace*{-4mm}}{\arabic{section}.\arabic{subsection}\quad}{0pt}{}
\titleformat{\subsubsection}[hang]{\bfseries}{\arabic{section}.\arabic{subsection}\alph{subsubsection}\quad}{0pt}{}[]
\titleformat{\paragraph}[hang]{\bfseries}{}{0pt}{}[]
\titleformat{\paragraph}[hang]{\it\bfseries}{}{0pt}{}[]
\titlespacing{\section}{0pt}{6mm}{2mm}
\titlespacing{\subsection}{0pt}{0mm}{0mm}
\titlespacing{\subsubsection}{0pt}{2mm}{0pt}
Expand Down

0 comments on commit dd88299

Please sign in to comment.