Format commands

This commit is contained in:
2024-09-29 14:09:39 +02:00
parent d5956ad176
commit ab13ad3d9a

View File

@@ -1,7 +1,6 @@
%% Packages required
\usepackage[caption=false]{subfig} % Good looking subfigs
%% Abbreviations
\newcommand{\etal}{\textit{et al.}}
@@ -14,7 +13,6 @@
\newcommand{\vs}{\textit{vs.}\ }
%% Figures
% example: \fig[1]{universe}{The Universe}[Short title for list of figures]
% reference later with: \figref{universe}
@@ -94,15 +92,12 @@
}%
}
%% Footnotes
\newcommand{\footnoteurl}[1]{\footnote{\ \url{#1}}}
%% Lists
\renewcommand{\descriptionlabel}[1]{\hspace{\labelsep}\textit{#1}} % Use italics instead of bold for descriptions
%% Maths
\newcommand{\measure}[3]{$\mathrm{#1} = \qty{#2}{#3}$}
@@ -145,17 +140,16 @@
% From https://tex.stackexchange.com/a/95842
\newenvironment{conditions}{%
\par% maybe you want the list to start with a new line
\vspace{\abovedisplayskip}% some space before
\noindent% don't indent
\tabularx{\linewidth}{>{$}l<{$} @{${}={}$} X@{}}% three columns left-aligned; first one is math-mode, the middle is an equals sign, and the last one is normal
\par% maybe you want the list to start with a new line
\vspace{\abovedisplayskip}% some space before
\noindent% don't indent
\tabularx{\linewidth}{>{$}l<{$} @{${}={}$} X@{}}% three columns left-aligned; first one is math-mode, the middle is an equals sign, and the last one is normal
}{%
\endtabularx%
\par% maybe you want the list to end with a new line
\vspace{\belowdisplayskip}% some space after
\endtabularx%
\par% maybe you want the list to end with a new line
\vspace{\belowdisplayskip}% some space after
}
%% References
\renewcommand{\eqref}[1]{Eq.~\ref{eq:#1}}
\newcommand{\figref}[1]{Fig.~\ref{fig:#1}}
@@ -163,7 +157,6 @@
\newcommand{\tabref}[1]{Table~\ref{tab:#1}}
\newcommand{\footnotemarkrepeat}{\footnotemark[\value{footnote}]} % Repeat the last footnote mark
%% Structure
\newcommand{\chapterstartoc}[1]{\chapter*{#1}\addcontentsline{toc}{chapter}{#1}}
\newcommand{\chapterstarbookmark}[1]{\pdfbookmark[chapter]{#1}{#1}\chapter*{#1}}
@@ -176,7 +169,6 @@
\newcommand{\subsubsubsection}[1]{\paragraph*{\textit{#1}}}
%% Tables
% example:
% \begin{tab}{label}{Title}
@@ -206,7 +198,6 @@
\newcommand{\tabrow}[1]{#1 \\ \hline}
%% Other
\newcommand{\horizontalrule}{\par\noindent\rule{\textwidth}{0.4pt}} % Horizontal line
@@ -214,7 +205,6 @@
\def\convertto#1#2{\strip@pt\dimexpr #2*65536/\number\dimexpr 1#1} % Convert units. Usage: \convertto{cm}{1pt}. From: https://tex.stackexchange.com/a/8337
\makeatother
%% User studies
\newcommand{\factor}[1]{\textsc{#1}}
\newcommand{\level}[1]{\textsl{#1}}