Webservice User Guide
Author: Zhiyuan
20.Oct.24
Tutorials for user usage and Q&A sessions about web services.
- webservice overview
- Wiki of web services
- Math macro command for latex support in markdown
- Markdown Math Macro definition
webservice overview
If you have any advice or problems, feel free to leave comments under here or directly contact us.
Services
Our Service Portal :
https://hub.mai.informatik.tu-darmstadt.de/
Currently, we offer the following services to support our collaborative and organizational needs:
- Mattermost
Mattermost serves as the main communication platform, allowing teams to stay connected through chat channels and direct messages. - Gitlab
GitLab is our centralized code management and version control tool. It also integrates with Mattermost for authentication, enabling seamless single sign-on and enhanced security - Nextcloud
Nextcloud functions as our primary file storage and sharing solution, akin to Google Drive or Dropbox but self-hosted. It allows users to store, share, and collaboratively edit files. - Bookstack
BookStack is a wiki-like platform tailored for organizing and documenting knowledge within the team. This tool is perfect for building a structured knowledge base, where team members can share tutorials, write guides, and document best practices. - Keycloak
Keycloak provides unified identity and access management, allowing users to authenticate once and access multiple services withinMAI
group using a single set of credentials. It supplies mainly OIDC and SMAL authentification services. - Ldap
LDAP (Lightweight Directory Access Protocol) is not visble to users. It acts as a backend directory service, supporting the authentication and management of user credentials across systems. It functions in conjunction with Keycloak and other applications.
New user registeration
- Firstly you need to ask administrator to create a user for you, the following informations are needded:
- username (note, not able to be changed anymore)
- Lab Postion
- Once your account is created, you will receive the validation link in the corresponding Email.
You should update your password as well as profiles like last name, first name. - Once account is verified, you could go to keycloak management link Link, there you could update your profile.
Mattermost user migration
We have migraed mattermost data from AIML to If you are already the user in AIML, you need to check if there is lost dialogs.
-
check your dialog and profile, your profile like nickname, profile photo are lost,
-
Known issues:
reactions in reply
is lost by migrating. -
You need to manually migrate your focal board, just follow the following page,
export archive
(left page),import archive
(right page). (unfortunately some info likecreation time
,createdBy
Assignee
are lost)
Wiki of web services
Nextcloud:
- Q: what's the quota of my account?
A: Currently, each user has a 500 GB quota. We may review and adjust this quota in the future based on demand. - Q: Can I edit files locally on my machine?
A: Yes, you can download the Nextcloud desktop client from( link), and use it similarly to other cloud storage services. - Q: How can I share files with everyone in the lab?
A: There is a option is "Everyone" Group, you could Use the "Everyone" group to share files with all lab members. Additionally, you can place files in thetown-square
filder, which is visible to everyone. - Q: How do I share files?
A: Click on a file to access the sharing options, which include:- share with a group (recommended)
- share with a certain person on Nextcloud (recommended)
- share via link (not highly recommended since you could not well track the file change of external user)
- Q: Can I edite Office files(docx, pptx, etc) online in nextcloud?
A: Yes, currently we are using intergreated Collabora Office as backend. We are exploring additional options. - Q: Can I use nextcloud as Zotero storage backend?
A: Yes, although there are some issues that we are addressing. We will update the user guide accordingly. - Q: Will there be conflict while multiple people editing one file?
A: Generally, an editing lock is applied to files. If a file is being edited, it will be locked to prevent conflicts. - Q: Is there size limation for uploading file?
A: Yes, currently you could upload files that is maximum 100G. However, best practice is to split big file to seperate files likexxx.part1
,xxx.part2
,xxx.part3
to ensure best performance with nextcloud. Single file smaller than 5g or 10g is recommended. Example command would besplit -b 5g largefile output_prefix_
Bookstack
Mattermost
Our mattermost will be deployed as soon as possible.
- Q: Why am I unable to log in using Keycloak but have to login via Gitlab?
A: This a limitation of mattermost community version. For general SSO support, a commercial subscription is required. Using community version, we could only login via gitlab rather than keycloak. - Q: Does mattermost via gitlab use the same credential with keylcoak?
A: Yes, a single set of credentials works across all our services. - Q: Is there a mobile app?
A: Yes, you could download via this link. - Q: Is there limitation for sending files via Mattermost?
A: Yes, the maximum file size is 50 MB.
Gitlab
- Q: Why doesn't Gitlab log in redirect to Keycloak?
A: Gitlab uses LDAP as backend for credential. Since it will serve as "overley" between our credential management and mattermost. - Q: Can I set advanced featrues like CI/CD, gitlab pages, docker registery in gitlab?
A: CI/CD is enabled but not tested. gitlab pages and docker registery are not released yet. We could enable it if needed. - Q: Can I use
git lfs
to store binary files?
A: Yes, but generally it's not recommended to very huge store binary files. The default limitation is10 GB
. - Q: How are the groups managed in gitlab?
A: Generally groups will be associated to academic project, users could create groups by user thmeselves for academic project like projectlecture slides
. Under groups could create repo(in gitlab is called "project") like "lecture1", "lecture2". - Q: How the roles in gitlab are?
A: There are administrator, normal users, and external users. Wimis are normal users. Guests will be marked asexternal
. Normal users could manage their own groups and projects, external users could not view/create/edit projects/groups except explictely authentification. - Q: Shall I use ssh key for pull/push repo?
A: Yes, we plan to phase out username/password authentication for repository operations and require only SSH keys in the future.
Keycloak
- Q: Is there limitation for max failure login times?
A: Yes, maximum 10 times failed login. After that you could only successfully login 15mins later. Note: there will be no any information told you that your account is locked. - Q: Why I entered true username and password but I still cannot login?
A: If you failed to log more than 10 times, your account will be locked in 15 minutes. You could tried later. ( However, locked info will not be displayed in keycloak page, this is intentional to prevent username enumeration attacks). - Q: Can I change my username?
A: No, you could not. That's used for identification by authentification across different applications. - Q: What's the relationship of keycloak and LDAP?
A: LDAP and Keycloak function together as "user federation" services, with Keycloak providing OIDC and SAML authentication, and LDAP providing LDAP authentication. - Q: Can I change my EMail?
A: Yes, and it's recommended to use TU's EMail. - Q: Why does in Keycloak show that my password as
Created January 1, 1970 at 12:59 AM.
?
A: This is a known issue since user-fedoration with LDAP. - Q: Can I change password or profiles directly in other webservices like mattermost?
A: No, You must change credentials in Keycloak. - Q: Can new users directly register account?
A: No. In future we may consider an invitation based solution. - Q: What will be different by different lab position?
A: Permissions and visibility vary; users like 'guests' and 'students' typically have limited permissions across different services.
Math macro command for latex support in markdown
Number and Arrays
command | visualization | comment | |
---|---|---|---|
a |
$a$ | A scalar | |
\va |
$\va$ | A vector, additionally $\vzero, \vone, \vmu, \vnu, \vtheta$ for \vzero, \vone, \vmu, \vnu, \vtheta |
|
\mA |
$\mA$ | A matrix | |
\tA |
$\tA$ | A tensor | |
\mI_n |
$\mI_n$ | Identity matrix with $n$ rows and $n$ columns | |
\mI |
$\mI$ | Identity matrix with dimensionality implied by context | |
\ve^{(i)} |
$\ve^{(i)}$ | Standard basis vector $[0,\dots,0,1,0,\dots,0]$ with a 1 at position $i$ | |
\text{diag}(\va) |
$\text{diag}(\va)$ | A square, diagonal matrix with diagonal entries given by $\va$ | |
\ra |
$\ra$ | A scalar-valued random variable | |
\rva |
$\rva$ | A vector-valued random variables | |
\rmA |
$\rmA$ | A matrix-valued random varialbes |
Sets and Graphs
Command | Visualization | Comment |
---|---|---|
\sA |
$\sA$ | A set Note: the command covers sA to sZ but don't no sE since it's expectation |
\R |
$\R$ | The set of real numbers |
{0, 1} |
${0, 1}$ | The set containing 0 and 1 |
{0, 1, \dots, n} |
${0, 1, \dots, n}$ | The set of all integers between $0$ and $n$ |
[a, b] |
$[a, b]$ | The real interval including $a$ and $b$ |
(a, b] |
$(a, b]$ | The real interval excluding $a$ but including $b$ |
\sA \backslash \sB |
$\sA \backslash \sB$ | Set subtraction, i.e., the set containing the elements of $\sA$ not in $\sB$ |
\gG |
$\gG$ | A graph |
Indexing
Command | Visualization | Comment |
---|---|---|
\eva_i |
$\eva_i$ | Element $i$ of vector $\va$, with indexing starting at 1 |
\eva_{-i} |
$\eva_{-i}$ | All elements of vector $\va$ except for element $i$ |
\emA_{i,j} |
$\emA_{i,j}$ | Element $i, j$ of matrix $\mA$ |
\mA_{i, :} |
$\mA_{i, :}$ | Row $i$ of matrix $\mA$ |
\mA_{:, i} |
$\mA_{:, i}$ | Column $i$ of matrix $\mA$ |
\etA_{i, j, k} |
$\etA_{i, j, k}$ | Element $(i, j, k)$ of a 3-D tensor $\tA$ |
\tA_{:, :, i} |
$\tA_{:, :, i}$ | 2-D slice of a 3-D tensor |
\erva_i |
$\erva_i$ | Element $i$ of the random vector $\rva$ |
Linear Algebra Operators
Command | Visualization | Comment |
---|---|---|
\mA^\top |
$\mA^\top$ | Transpose of matrix $\mA$ |
\mA^+ |
$\mA^+$ | Moore-Penrose pseudoinverse of $\mA$ |
\mA \odot \mB |
$\mA \odot \mB$ | Element-wise (Hadamard) product of $\mA$ and $\mB$ |
\mathrm{det}(\mA) |
$\mathrm{det}(\mA)$ | Determinant of $\mA$ |
\sign(x) |
$\sign(x)$ | Sign of a variable $x$ |
\Tr \mA |
$\Tr(\mA)$ | Trace of a matrix A |
Calculus
Command | Visualization | Comment |
---|---|---|
\diff y / \diff x |
$\diff y / \diff x$ | Derivative of $y$ with respect to $x$ |
\frac{\partial y}{\partial x} |
$\frac{\partial y}{\partial x}$ | Partial derivative of $y$ with respect to $x$ |
\nabla_\vx y |
$\nabla_\vx y$ | Gradient of $y$ with respect to $\vx$ |
\nabla_\mX y |
$\nabla_\mX y$ | Matrix derivatives of $y$ with respect to $\mX$ |
\nabla_\tX y |
$\nabla_\tX y$ | Tensor containing derivatives of $y$ with respect to $\tX$ |
\frac{\partial f}{\partial \vx} |
$\frac{\partial f}{\partial \vx}$ | Jacobian matrix $\mJ \in \R^{m\times n}$ of $f: \R^n \rightarrow \R^m$ |
\nabla_\vx^2 f(\vx)\text{ or }\mH(f)(\vx) |
$\nabla_\vx^2 f(\vx)\text{ or }\mH(f)(\vx)$ | The Hessian matrix of $f$ at input point $\vx$ |
\int f(\vx) d\vx |
$\int f(\vx) d\vx$ | Definite integral over the entire domain of $\vx$ |
\int_\sS f(\vx) d\vx |
$\int_\sS f(\vx) d\vx$ | Definite integral with respect to $\vx$ over the set $\sS$ |
Probabilities
Command | Visualization | Comment |
---|---|---|
\ra \bot \rb |
$\ra \bot \rb$ | The random variables $\ra$ and $\rb$ are independent |
\ra \bot \rb \mid \rc |
$\ra \bot \rb \mid \rc$ | They are conditionally independent given $\rc$ |
P(\ra) |
$P(\ra)$ | A probability distribution over a discrete variable |
p(\ra) |
$p(\ra)$ | A probability distribution over a continuous variable, or a variable of unspecified type |
\ra \sim P |
$\ra \sim P$ | Random variable $\ra$ has distribution $P$ |
\E_{\rx \sim P} [ f(x) ] \text{ or } \E f(x) |
$\E_{\rx \sim P} [ f(x) ] \text{ or } \E f(x)$ | Expectation of $f(x)$ with respect to $P(\rx)$ |
\Var(f(x)) |
$\Var(f(x))$ | Variance of $f(x)$ under $P(\rx)$ |
\Cov(f(x), g(x)) |
$\Cov(f(x), g(x))$ | Covariance of $f(x)$ and $g(x)$ under $P(\rx)$ |
H(\rx) |
$H(\rx)$ | Shannon entropy of the random variable $\rx$ |
\KL(P \Vert Q) |
$\KL(P \Vert Q)$ | Kullback-Leibler divergence of $P$ and $Q$ |
\mathcal{N}(\vx ; \vmu , \mSigma) |
$\mathcal{N}(\vx ; \vmu , \mSigma)$ | Gaussian distribution over $\vx$ with mean $\vmu$ and covariance $\mSigma$ |
Functions
Command | Visualization | Comment |
---|---|---|
f: \sA \rightarrow \sB |
$f: \sA \rightarrow \sB$ | The function $f$ with domain $\sA$ and range $\sB$ |
f \circ g |
$f \circ g$ | Composition of the functions $f$ and $g$ |
f(\vx ; \vtheta) |
$f(\vx ; \vtheta)$ | A function of $\vx$ parametrized by $\vtheta$. Sometimes written as $f(\vx)$ to simplify notation |
\log x |
$\log x$ | Natural logarithm of $x$ |
\sigma(x) |
$\sigma(x)$ | Logistic sigmoid, $\displaystyle \frac{1}{1 + \exp(-x)}$ |
\zeta(x) |
$\zeta(x)$ | Softplus, $\log(1 + \exp(x))$ |
\Vert \vx \Vert_p |
$\Vert \vx \Vert_p$ | $L^p$ norm of $\vx$ |
\Vert \vx \Vert |
$\Vert \vx \Vert$ | $L^2$ norm of $\vx$ |
x^+ |
$x^+$ | Positive part of $x$, i.e., $\max(0,x)$ |
\bm{1}_\mathrm{condition} |
$\bm{1}_\mathrm{condition}$ | Is 1 if the condition is true, 0 otherwise |
Custom Commands special
Command | Visualization | Comment |
---|---|---|
\bm{#1} |
$\bm{x}$ | Bold symbol, e.g., $\boldsymbol{x}$ |
\sign |
$\sign$ | operator, Sign , $\operatorname{sign}$ |
\Tr |
$\Tr$ | operator Trace, $\operatorname{Tr}$ |
\E |
$\E$ | Expectation, $\mathbb{E}$ |
\KL |
$\KL$ | Kullback-Leibler divergence, $D_\mathrm{KL}$ |
\NormalDist |
$\NormalDist$ | Gaussian distribution, $\mathcal{N}$ |
\diag |
$\diag$ | Diagonal matrix, $\mathrm{diag}$ |
\Ls |
$\Ls$ | Loss function, $\mathcal{L}$ |
\R |
$\R$ | Real number set, $\mathbb{R}$ |
\emp |
$\emp$ | Empirical distribution, $\tilde{p}$ |
\lr |
$\lr$ | Learning rate, $\alpha$ |
\reg |
$\reg$ | Regularization coefficient, $\lambda$ |
\rect |
$\rect$ | Rectifier activation, $\mathrm{rectifier}$ |
\softmax |
$\softmax$ | Softmax function, $\mathrm{softmax}$ |
\sigmoid |
$\sigmoid$ | Sigmoid function, $\sigma$ |
\softplus |
$\softplus$ | Softplus function, $\zeta$ |
\Var |
$\Var$ | Variance, $\mathrm{Var}$ |
\standarderror |
$\standarderror$ | Standard error, $\mathrm{SE}$ |
\Cov |
$\Cov$ | Covariance, $\mathrm{Cov}$ |
\tran |
$\tran$ | Transpose operator, $^\top$ |
\inv |
$\inv$ | Inverse operator, $^{-1}$ |
\diff |
$\diff$ | Differential operator, $\mathrm{d}$ |
Reference
- Ian Goodfellow's ML book: https://github.com/goodfeli/dlbook_notation/blob/master/notation_example.pdf
- MathJax: https://docs.mathjax.org/en/latest/input/tex/macros.html
Markdown Math Macro definition
The latex command source
Click to unfold latex macro definition
Latex command definition source
\newcommand{\bm}[1]{\boldsymbol{#1}}
\newcommand{\sign}{\operatorname{sign}} % \DeclareMathOperator{\sign}{sign}
\newcommand{\Tr}{\operatorname{Tr}} % \DeclareMathOperator{\Tr}{Tr}
\newcommand{\E}{\mathbb{E}}
\newcommand{\KL}{D_\mathrm{KL}}
\newcommand{\NormalDist}{\mathcal{N}}
\newcommand{\diag}{\mathrm{diag}}
\newcommand{\Ls}{\mathcal{L}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\emp}{\tilde{p}}
\newcommand{\lr}{\alpha}
\newcommand{\reg}{\lambda}
\newcommand{\rect}{\mathrm{rectifier}}
\newcommand{\softmax}{\mathrm{softmax}}
\newcommand{\sigmoid}{\sigma}
\newcommand{\softplus}{\zeta}
\newcommand{\Var}{\mathrm{Var}}
\newcommand{\standarderror}{\mathrm{SE}}
\newcommand{\Cov}{\mathrm{Cov}}
\newcommand{\tran}{^\top}
\newcommand{\inv}{^{-1}}
\newcommand{\diff}{ \mathrm{d}}
% % Vectors
\newcommand{\vzero}{\bm{0}}
\newcommand{\vone}{\bm{1}}
\newcommand{\vmu}{\bm{\mu}}
\newcommand{\vnu}{\bm{\nu}}
\newcommand{\vtheta}{\bm{\theta}}
\renewcommand{\va}{\bm{a}}
\renewcommand{\vb}{\bm{b}}
% \newcommand{\va}{\bm{a}}
% \newcommand{\vb}{\bm{b}}
\newcommand{\vc}{\bm{c}}
\newcommand{\vd}{\bm{d}}
\newcommand{\ve}{\bm{e}}
\newcommand{\vf}{\bm{f}}
\newcommand{\vg}{\bm{g}}
\newcommand{\vh}{\bm{h}}
\newcommand{\vi}{\bm{i}}
\newcommand{\vj}{\bm{j}}
\newcommand{\vk}{\bm{k}}
\newcommand{\vl}{\bm{l}}
\newcommand{\vm}{\bm{m}}
\newcommand{\vn}{\bm{n}}
\newcommand{\vo}{\bm{o}}
\newcommand{\vp}{\bm{p}}
\newcommand{\vq}{\bm{q}}
\newcommand{\vr}{\bm{r}}
\newcommand{\vs}{\bm{s}}
\newcommand{\vt}{\bm{t}}
\newcommand{\vu}{\bm{u}}
\newcommand{\vv}{\bm{v}}
\newcommand{\vw}{\bm{w}}
\newcommand{\vx}{\bm{x}}
\newcommand{\vy}{\bm{y}}
\newcommand{\vz}{\bm{z}}
% % Random variables
% % old latex command \rm is overwritten, now should use `\textrm` or `\mathrm`
% \newcommand{\reta}{{\textnormal{$\eta$}}}
\newcommand{\ra}{{\textnormal{a}}}
\newcommand{\rb}{{\textnormal{b}}}
\newcommand{\rc}{{\textnormal{c}}}
\newcommand{\rd}{{\textnormal{d}}}
\newcommand{\re}{{\textnormal{e}}}
\newcommand{\rf}{{\textnormal{f}}}
\newcommand{\rg}{{\textnormal{g}}}
\newcommand{\rh}{{\textnormal{h}}}
\newcommand{\ri}{{\textnormal{i}}}
\newcommand{\rj}{{\textnormal{j}}}
\newcommand{\rk}{{\textnormal{k}}}
\newcommand{\rl}{{\textnormal{l}}}
\renewcommand{\rm}{{\textnormal{m}}} % note \rm is old command
\newcommand{\rn}{{\textnormal{n}}}
\newcommand{\ro}{{\textnormal{o}}}
\newcommand{\rp}{{\textnormal{p}}}
\newcommand{\rq}{{\textnormal{q}}}
\newcommand{\rr}{{\textnormal{r}}}
\newcommand{\rs}{{\textnormal{s}}}
\newcommand{\rt}{{\textnormal{t}}}
\newcommand{\ru}{{\textnormal{u}}}
\newcommand{\rv}{{\textnormal{v}}}
\newcommand{\rw}{{\textnormal{w}}}
\newcommand{\rx}{{\textnormal{x}}}
\newcommand{\ry}{{\textnormal{y}}}
\newcommand{\rz}{{\textnormal{z}}}
% % Random vectors % TODO, greek vector valued random variables and vectors are same
\newcommand{\rvepsilon}{\bm{\epsilon}}
\newcommand{\rvtheta}{\bm{\theta}}
\newcommand{\rva}{\mathbf{a}}
\newcommand{\rvb}{\mathbf{b}}
\newcommand{\rvc}{\mathbf{c}}
\newcommand{\rvd}{\mathbf{d}}
\newcommand{\rve}{\mathbf{e}}
\newcommand{\rvf}{\mathbf{f}}
\newcommand{\rvg}{\mathbf{g}}
\newcommand{\rvh}{\mathbf{h}}
\newcommand{\rvi}{\mathbf{i}}
\newcommand{\rvj}{\mathbf{j}}
\newcommand{\rvk}{\mathbf{k}}
\newcommand{\rvl}{\mathbf{l}}
\newcommand{\rvm}{\mathbf{m}}
\newcommand{\rvn}{\mathbf{n}}
\newcommand{\rvo}{\mathbf{o}}
\newcommand{\rvp}{\mathbf{p}}
\newcommand{\rvq}{\mathbf{q}}
\newcommand{\rvr}{\mathbf{r}}
\newcommand{\rvs}{\mathbf{s}}
\newcommand{\rvt}{\mathbf{t}}
\newcommand{\rvu}{\mathbf{u}}
\newcommand{\rvv}{\mathbf{v}}
\newcommand{\rvw}{\mathbf{w}}
\newcommand{\rvx}{\mathbf{x}}
\newcommand{\rvy}{\mathbf{y}}
\newcommand{\rvz}{\mathbf{z}}
% % Elements of random vectors
\newcommand{\erva}{{\textnormal{a}}}
\newcommand{\ervb}{{\textnormal{b}}}
\newcommand{\ervc}{{\textnormal{c}}}
\newcommand{\ervd}{{\textnormal{d}}}
\newcommand{\erve}{{\textnormal{e}}}
\newcommand{\ervf}{{\textnormal{f}}}
\newcommand{\ervg}{{\textnormal{g}}}
\newcommand{\ervh}{{\textnormal{h}}}
\newcommand{\ervi}{{\textnormal{i}}}
\newcommand{\ervj}{{\textnormal{j}}}
\newcommand{\ervk}{{\textnormal{k}}}
\newcommand{\ervl}{{\textnormal{l}}}
\newcommand{\ervm}{{\textnormal{m}}}
\newcommand{\ervn}{{\textnormal{n}}}
\newcommand{\ervo}{{\textnormal{o}}}
\newcommand{\ervp}{{\textnormal{p}}}
\newcommand{\ervq}{{\textnormal{q}}}
\newcommand{\ervr}{{\textnormal{r}}}
\newcommand{\ervs}{{\textnormal{s}}}
\newcommand{\ervt}{{\textnormal{t}}}
\newcommand{\ervu}{{\textnormal{u}}}
\newcommand{\ervv}{{\textnormal{v}}}
\newcommand{\ervw}{{\textnormal{w}}}
\newcommand{\ervx}{{\textnormal{x}}}
\newcommand{\ervy}{{\textnormal{y}}}
\newcommand{\ervz}{{\textnormal{z}}}
% % Random matrices
\newcommand{\rmA}{{\mathbf{A}}}
\newcommand{\rmB}{{\mathbf{B}}}
\newcommand{\rmC}{{\mathbf{C}}}
\newcommand{\rmD}{{\mathbf{D}}}
\newcommand{\rmE}{{\mathbf{E}}}
\newcommand{\rmF}{{\mathbf{F}}}
\newcommand{\rmG}{{\mathbf{G}}}
\newcommand{\rmH}{{\mathbf{H}}}
\newcommand{\rmI}{{\mathbf{I}}}
\newcommand{\rmJ}{{\mathbf{J}}}
\newcommand{\rmK}{{\mathbf{K}}}
\newcommand{\rmL}{{\mathbf{L}}}
\newcommand{\rmM}{{\mathbf{M}}}
\newcommand{\rmN}{{\mathbf{N}}}
\newcommand{\rmO}{{\mathbf{O}}}
\newcommand{\rmP}{{\mathbf{P}}}
\newcommand{\rmQ}{{\mathbf{Q}}}
\newcommand{\rmR}{{\mathbf{R}}}
\newcommand{\rmS}{{\mathbf{S}}}
\newcommand{\rmT}{{\mathbf{T}}}
\newcommand{\rmU}{{\mathbf{U}}}
\newcommand{\rmV}{{\mathbf{V}}}
\newcommand{\rmW}{{\mathbf{W}}}
\newcommand{\rmX}{{\mathbf{X}}}
\newcommand{\rmY}{{\mathbf{Y}}}
\newcommand{\rmZ}{{\mathbf{Z}}}
% % Elements of random matrices
\newcommand{\ermA}{{\textnormal{A}}}
\newcommand{\ermB}{{\textnormal{B}}}
\newcommand{\ermC}{{\textnormal{C}}}
\newcommand{\ermD}{{\textnormal{D}}}
\newcommand{\ermE}{{\textnormal{E}}}
\newcommand{\ermF}{{\textnormal{F}}}
\newcommand{\ermG}{{\textnormal{G}}}
\newcommand{\ermH}{{\textnormal{H}}}
\newcommand{\ermI}{{\textnormal{I}}}
\newcommand{\ermJ}{{\textnormal{J}}}
\newcommand{\ermK}{{\textnormal{K}}}
\newcommand{\ermL}{{\textnormal{L}}}
\newcommand{\ermM}{{\textnormal{M}}}
\newcommand{\ermN}{{\textnormal{N}}}
\newcommand{\ermO}{{\textnormal{O}}}
\newcommand{\ermP}{{\textnormal{P}}}
\newcommand{\ermQ}{{\textnormal{Q}}}
\newcommand{\ermR}{{\textnormal{R}}}
\newcommand{\ermS}{{\textnormal{S}}}
\newcommand{\ermT}{{\textnormal{T}}}
\newcommand{\ermU}{{\textnormal{U}}}
\newcommand{\ermV}{{\textnormal{V}}}
\newcommand{\ermW}{{\textnormal{W}}}
\newcommand{\ermX}{{\textnormal{X}}}
\newcommand{\ermY}{{\textnormal{Y}}}
\newcommand{\ermZ}{{\textnormal{Z}}}
% % Elements of vectors
\newcommand{\evalpha}{{\alpha}}
\newcommand{\evbeta}{{\beta}}
\newcommand{\evepsilon}{{\epsilon}}
\newcommand{\evlambda}{{\lambda}}
\newcommand{\evomega}{{\omega}}
\newcommand{\evmu}{{\mu}}
\newcommand{\evpsi}{{\psi}}
\newcommand{\evsigma}{{\sigma}}
\newcommand{\evtheta}{{\theta}}
\newcommand{\eva}{{a}}
\newcommand{\evb}{{b}}
\newcommand{\evc}{{c}}
\newcommand{\evd}{{d}}
\newcommand{\eve}{{e}}
\newcommand{\evf}{{f}}
\newcommand{\evg}{{g}}
\newcommand{\evh}{{h}}
\newcommand{\evi}{{i}}
\newcommand{\evj}{{j}}
\newcommand{\evk}{{k}}
\newcommand{\evl}{{l}}
\newcommand{\evm}{{m}}
\newcommand{\evn}{{n}}
\newcommand{\evo}{{o}}
\newcommand{\evp}{{p}}
\newcommand{\evq}{{q}}
\newcommand{\evr}{{r}}
\newcommand{\evs}{{s}}
\newcommand{\evt}{{t}}
\newcommand{\evu}{{u}}
\newcommand{\evv}{{v}}
\newcommand{\evw}{{w}}
\newcommand{\evx}{{x}}
\newcommand{\evy}{{y}}
\newcommand{\evz}{{z}}
% %% Matrix
\newcommand{\mBeta}{{\bm{\beta}}}
\newcommand{\mPhi}{{\bm{\Phi}}}
\newcommand{\mLambda}{{\bm{\Lambda}}}
\newcommand{\mSigma}{{\bm{\Sigma}}}
\newcommand{\mA}{{\bm{A}}}
\newcommand{\mB}{{\bm{B}}}
\newcommand{\mC}{{\bm{C}}}
\newcommand{\mD}{{\bm{D}}}
\newcommand{\mE}{{\bm{E}}}
\newcommand{\mF}{{\bm{F}}}
\newcommand{\mG}{{\bm{G}}}
\newcommand{\mH}{{\bm{H}}}
\newcommand{\mI}{{\bm{I}}}
\newcommand{\mJ}{{\bm{J}}}
\newcommand{\mK}{{\bm{K}}}
\newcommand{\mL}{{\bm{L}}}
\newcommand{\mM}{{\bm{M}}}
\newcommand{\mN}{{\bm{N}}}
\newcommand{\mO}{{\bm{O}}}
\newcommand{\mP}{{\bm{P}}}
\newcommand{\mQ}{{\bm{Q}}}
\newcommand{\mR}{{\bm{R}}}
\newcommand{\mS}{{\bm{S}}}
\newcommand{\mT}{{\bm{T}}}
\newcommand{\mU}{{\bm{U}}}
\newcommand{\mV}{{\bm{V}}}
\newcommand{\mW}{{\bm{W}}}
\newcommand{\mX}{{\bm{X}}}
\newcommand{\mY}{{\bm{Y}}}
\newcommand{\mZ}{{\bm{Z}}}
% \DeclareMathAlphabet{\mathsfit}{\encodingdefault}{\sfdefault}{m}{sl}
% \SetMathAlphabet{\mathsfit}{bold}{\encodingdefault}{\sfdefault}{bx}{n}
% \newcommand{\tens}[1]{\bm{\mathsfit{#1}}}
% in mathjax use mathsf insteadly
\newcommand{\tens}[1]{ \bm{\mathit{\mathsf{#1}}} }
% % Tensor
\newcommand{\tA}{{\tens{A}}}
\newcommand{\tB}{{\tens{B}}}
\newcommand{\tC}{{\tens{C}}}
\newcommand{\tD}{{\tens{D}}}
\newcommand{\tE}{{\tens{E}}}
\newcommand{\tF}{{\tens{F}}}
\newcommand{\tG}{{\tens{G}}}
\newcommand{\tH}{{\tens{H}}}
\newcommand{\tI}{{\tens{I}}}
\newcommand{\tJ}{{\tens{J}}}
\newcommand{\tK}{{\tens{K}}}
\newcommand{\tL}{{\tens{L}}}
\newcommand{\tM}{{\tens{M}}}
\newcommand{\tN}{{\tens{N}}}
\newcommand{\tO}{{\tens{O}}}
\newcommand{\tP}{{\tens{P}}}
\newcommand{\tQ}{{\tens{Q}}}
\newcommand{\tR}{{\tens{R}}}
\newcommand{\tS}{{\tens{S}}}
\newcommand{\tT}{{\tens{T}}}
\newcommand{\tU}{{\tens{U}}}
\newcommand{\tV}{{\tens{V}}}
\newcommand{\tW}{{\tens{W}}}
\newcommand{\tX}{{\tens{X}}}
\newcommand{\tY}{{\tens{Y}}}
\newcommand{\tZ}{{\tens{Z}}}
% % Graph
\newcommand{\gA}{{\mathcal{A}}}
\newcommand{\gB}{{\mathcal{B}}}
\newcommand{\gC}{{\mathcal{C}}}
\newcommand{\gD}{{\mathcal{D}}}
\newcommand{\gE}{{\mathcal{E}}}
\newcommand{\gF}{{\mathcal{F}}}
\newcommand{\gG}{{\mathcal{G}}}
\newcommand{\gH}{{\mathcal{H}}}
\newcommand{\gI}{{\mathcal{I}}}
\newcommand{\gJ}{{\mathcal{J}}}
\newcommand{\gK}{{\mathcal{K}}}
\newcommand{\gL}{{\mathcal{L}}}
\newcommand{\gM}{{\mathcal{M}}}
\newcommand{\gN}{{\mathcal{N}}}
\newcommand{\gO}{{\mathcal{O}}}
\newcommand{\gP}{{\mathcal{P}}}
\newcommand{\gQ}{{\mathcal{Q}}}
\newcommand{\gR}{{\mathcal{R}}}
\newcommand{\gS}{{\mathcal{S}}}
\newcommand{\gT}{{\mathcal{T}}}
\newcommand{\gU}{{\mathcal{U}}}
\newcommand{\gV}{{\mathcal{V}}}
\newcommand{\gW}{{\mathcal{W}}}
\newcommand{\gX}{{\mathcal{X}}}
\newcommand{\gY}{{\mathcal{Y}}}
\newcommand{\gZ}{{\mathcal{Z}}}
% % Sets
\newcommand{\sA}{{\mathbb{A}}}
\newcommand{\sB}{{\mathbb{B}}}
\newcommand{\sC}{{\mathbb{C}}}
\newcommand{\sD}{{\mathbb{D}}}
% % Don't use a set called E, because this would be the same as our symbol
% % for expectation.
\newcommand{\sF}{{\mathbb{F}}}
\newcommand{\sG}{{\mathbb{G}}}
\newcommand{\sH}{{\mathbb{H}}}
\newcommand{\sI}{{\mathbb{I}}}
\newcommand{\sJ}{{\mathbb{J}}}
\newcommand{\sK}{{\mathbb{K}}}
\newcommand{\sL}{{\mathbb{L}}}
\newcommand{\sM}{{\mathbb{M}}}
\newcommand{\sN}{{\mathbb{N}}}
\newcommand{\sO}{{\mathbb{O}}}
\newcommand{\sP}{{\mathbb{P}}}
\newcommand{\sQ}{{\mathbb{Q}}}
\newcommand{\sR}{{\mathbb{R}}}
\newcommand{\sS}{{\mathbb{S}}}
\newcommand{\sT}{{\mathbb{T}}}
\newcommand{\sU}{{\mathbb{U}}}
\newcommand{\sV}{{\mathbb{V}}}
\newcommand{\sW}{{\mathbb{W}}}
\newcommand{\sX}{{\mathbb{X}}}
\newcommand{\sY}{{\mathbb{Y}}}
\newcommand{\sZ}{{\mathbb{Z}}}
% % Entries of a matrix
\newcommand{\emSigma}{{\Sigma}}
\newcommand{\emLambda}{{\Lambda}}
\newcommand{\emA}{{A}}
\newcommand{\emB}{{B}}
\newcommand{\emC}{{C}}
\newcommand{\emD}{{D}}
\newcommand{\emE}{{E}}
\newcommand{\emF}{{F}}
\newcommand{\emG}{{G}}
\newcommand{\emH}{{H}}
\newcommand{\emI}{{I}}
\newcommand{\emJ}{{J}}
\newcommand{\emK}{{K}}
\newcommand{\emL}{{L}}
\newcommand{\emM}{{M}}
\newcommand{\emN}{{N}}
\newcommand{\emO}{{O}}
\newcommand{\emP}{{P}}
\newcommand{\emQ}{{Q}}
\newcommand{\emR}{{R}}
\newcommand{\emS}{{S}}
\newcommand{\emT}{{T}}
\newcommand{\emU}{{U}}
\newcommand{\emV}{{V}}
\newcommand{\emW}{{W}}
\newcommand{\emX}{{X}}
\newcommand{\emY}{{Y}}
\newcommand{\emZ}{{Z}}
% % entries of a tensor
% % Same font as tensor, without \bm wrapper
% \newcommand{\etens}[1]{\mathsfit{#1}}
\newcommand{\etens}[1]{ \mathit{\mathsf{#1}} }
\newcommand{\etLambda}{{\etens{\Lambda}}}
\newcommand{\etA}{{\etens{A}}}
\newcommand{\etB}{{\etens{B}}}
\newcommand{\etC}{{\etens{C}}}
\newcommand{\etD}{{\etens{D}}}
\newcommand{\etE}{{\etens{E}}}
\newcommand{\etF}{{\etens{F}}}
\newcommand{\etG}{{\etens{G}}}
\newcommand{\etH}{{\etens{H}}}
\newcommand{\etI}{{\etens{I}}}
\newcommand{\etJ}{{\etens{J}}}
\newcommand{\etK}{{\etens{K}}}
\newcommand{\etL}{{\etens{L}}}
\newcommand{\etM}{{\etens{M}}}
\newcommand{\etN}{{\etens{N}}}
\newcommand{\etO}{{\etens{O}}}
\newcommand{\etP}{{\etens{P}}}
\newcommand{\etQ}{{\etens{Q}}}
\newcommand{\etR}{{\etens{R}}}
\newcommand{\etS}{{\etens{S}}}
\newcommand{\etT}{{\etens{T}}}
\newcommand{\etU}{{\etens{U}}}
\newcommand{\etV}{{\etens{V}}}
\newcommand{\etW}{{\etens{W}}}
\newcommand{\etX}{{\etens{X}}}
\newcommand{\etY}{{\etens{Y}}}
\newcommand{\etZ}{{\etens{Z}}}
The command in markdown are defined as follows in mathJax
Click to unfold latex macro definition
<script>
window.MathJax = {
tex: {
inlineMath: [['$', '$']],
displayMath: [['$$', '$$']],
macros: {
// General commands
bm: ["\\boldsymbol{#1}", 1],
sign: "\\operatorname{sign}",
Tr: "\\operatorname{Tr}",
E: "\\mathbb{E}",
KL: "D_{\\mathrm{KL}}",
NormalDist: "\\mathcal{N}",
diag: "\\mathrm{diag}",
Var: "\\mathrm{Var}",
Cov: "\\mathrm{Cov}",
standarderror: "\\mathrm{SE}",
diff: "\\mathrm{d}",
tran: "^{\\top}",
inv: "^{-1}",
rect: "\\mathrm{rectifier}",
softmax: "\\mathrm{softmax}",
sigmoid: "\\sigma",
softplus: "\\zeta",
R: "\\mathbb{R}",
emp: "\\tilde{p}",
lr: "\\alpha",
reg: "\\lambda",
Ls: "\\mathcal{L}",
// Added missing bold Greek matrices
mBeta: "\\bm{\\beta}",
mPhi: "\\bm{\\Phi}",
mLambda: "\\bm{\\Lambda}",
mSigma: "\\bm{\\Sigma}",
// Random Greek vector
rvepsilon: "\\bm{\\epsilon}",
// Greek Vectors
vzero: "\\bm{0}",
vone: "\\bm{1}",
vmu: "\\bm{\\mu}",
vnu: "\\bm{\\nu}",
vtheta: "\\bm{\\theta}",
va: "\\bm{a}", vb: "\\bm{b}", vc: "\\bm{c}", vd: "\\bm{d}", ve: "\\bm{e}",
vf: "\\bm{f}", vg: "\\bm{g}", vh: "\\bm{h}", vi: "\\bm{i}", vj: "\\bm{j}",
vk: "\\bm{k}", vl: "\\bm{l}", vm: "\\bm{m}", vn: "\\bm{n}", vo: "\\bm{o}",
vp: "\\bm{p}", vq: "\\bm{q}", vr: "\\bm{r}", vs: "\\bm{s}", vt: "\\bm{t}",
vu: "\\bm{u}", vv: "\\bm{v}", vw: "\\bm{w}", vx: "\\bm{x}", vy: "\\bm{y}", vz: "\\bm{z}",
// Random vectors
rva: "\\mathbf{a}", rvb: "\\mathbf{b}", rvc: "\\mathbf{c}", rvd: "\\mathbf{d}", rve: "\\mathbf{e}",
rvf: "\\mathbf{f}", rvg: "\\mathbf{g}", rvh: "\\mathbf{h}", rvi: "\\mathbf{i}", rvj: "\\mathbf{j}",
rvk: "\\mathbf{k}", rvl: "\\mathbf{l}", rvm: "\\mathbf{m}", rvn: "\\mathbf{n}", rvo: "\\mathbf{o}",
rvp: "\\mathbf{p}", rvq: "\\mathbf{q}", rvr: "\\mathbf{r}", rvs: "\\mathbf{s}", rvt: "\\mathbf{t}",
rvu: "\\mathbf{u}", rvv: "\\mathbf{v}", rvw: "\\mathbf{w}", rvx: "\\mathbf{x}", rvy: "\\mathbf{y}", rvz: "\\mathbf{z}",
// Random variables (single letters)
ra: "{\\textnormal{a}}", rb: "{\\textnormal{b}}", rc: "{\\textnormal{c}}", rd: "{\\textnormal{d}}", re: "{\\textnormal{e}}",
rf: "{\\textnormal{f}}", rg: "{\\textnormal{g}}", rh: "{\\textnormal{h}}", ri: "{\\textnormal{i}}", rj: "{\\textnormal{j}}",
rk: "{\\textnormal{k}}", rl: "{\\textnormal{l}}", rm: "{\\textnormal{m}}", rn: "{\\textnormal{n}}", ro: "{\\textnormal{o}}",
rp: "{\\textnormal{p}}", rq: "{\\textnormal{q}}", rr: "{\\textnormal{r}}", rs: "{\\textnormal{s}}", rt: "{\\textnormal{t}}",
ru: "{\\textnormal{u}}", rv: "{\\textnormal{v}}", rw: "{\\textnormal{w}}", rx: "{\\textnormal{x}}", ry: "{\\textnormal{y}}", rz: "{\\textnormal{z}}",
// Matrices (bold)
mA: "\\bm{A}", mB: "\\bm{B}", mC: "\\bm{C}", mD: "\\bm{D}", mE: "\\bm{E}",
mF: "\\bm{F}", mG: "\\bm{G}", mH: "\\bm{H}", mI: "\\bm{I}", mJ: "\\bm{J}",
mK: "\\bm{K}", mL: "\\bm{L}", mM: "\\bm{M}", mN: "\\bm{N}", mO: "\\bm{O}",
mP: "\\bm{P}", mQ: "\\bm{Q}", mR: "\\bm{R}", mS: "\\bm{S}", mT: "\\bm{T}",
mU: "\\bm{U}", mV: "\\bm{V}", mW: "\\bm{W}", mX: "\\bm{X}", mY: "\\bm{Y}", mZ: "\\bm{Z}",
// Random Matrices
rmA: "\\mathbf{A}", rmB: "\\mathbf{B}", rmC: "\\mathbf{C}", rmD: "\\mathbf{D}", rmE: "\\mathbf{E}",
rmF: "\\mathbf{F}", rmG: "\\mathbf{G}", rmH: "\\mathbf{H}", rmI: "\\mathbf{I}", rmJ: "\\mathbf{J}",
rmK: "\\mathbf{K}", rmL: "\\mathbf{L}", rmM: "\\mathbf{M}", rmN: "\\mathbf{N}", rmO: "\\mathbf{O}",
rmP: "\\mathbf{P}", rmQ: "\\mathbf{Q}", rmR: "\\mathbf{R}", rmS: "\\mathbf{S}", rmT: "\\mathbf{T}",
rmU: "\\mathbf{U}", rmV: "\\mathbf{V}", rmW: "\\mathbf{W}", rmX: "\\mathbf{X}", rmY: "\\mathbf{Y}", rmZ: "\\mathbf{Z}",
// Elements of random matrices
ermA: "{\\textnormal{A}}", ermB: "{\\textnormal{B}}", ermC: "{\\textnormal{C}}", ermD: "{\\textnormal{D}}",
ermE: "{\\textnormal{E}}", ermF: "{\\textnormal{F}}", ermG: "{\\textnormal{G}}", ermH: "{\\textnormal{H}}",
ermI: "{\\textnormal{I}}", ermJ: "{\\textnormal{J}}", ermK: "{\\textnormal{K}}", ermL: "{\\textnormal{L}}",
ermM: "{\\textnormal{M}}", ermN: "{\\textnormal{N}}", ermO: "{\\textnormal{O}}", ermP: "{\\textnormal{P}}",
ermQ: "{\\textnormal{Q}}", ermR: "{\\textnormal{R}}", ermS: "{\\textnormal{S}}", ermT: "{\\textnormal{T}}",
ermU: "{\\textnormal{U}}", ermV: "{\\textnormal{V}}", ermW: "{\\textnormal{W}}", ermX: "{\\textnormal{X}}",
ermY: "{\\textnormal{Y}}", ermZ: "{\\textnormal{Z}}",
// Elements of vectors (Greek)
evalpha: "\\alpha",
evbeta: "\\beta",
evepsilon: "\\epsilon",
evlambda: "\\lambda",
evomega: "\\omega",
evmu: "\\mu",
evpsi: "\\psi",
evsigma: "\\sigma",
evtheta: "\\theta",
// Elements of vectors (Latin)
eva: "a", evb: "b", evc: "c", evd: "d", eve: "e",
evf: "f", evg: "g", evh: "h", evi: "i", evj: "j",
evk: "k", evl: "l", evm: "m", evn: "n", evo: "o",
evp: "p", evq: "q", evr: "r", evs: "s", evt: "t",
evu: "u", evv: "v", evw: "w", evx: "x", evy: "y", evz: "z",
// Matrix elements
emSigma: "\\Sigma",
emLambda: "\\Lambda",
emA: "A", emB: "B", emC: "C", emD: "D", emE: "E",
emF: "F", emG: "G", emH: "H", emI: "I", emJ: "J",
emK: "K", emL: "L", emM: "M", emN: "N", emO: "O",
emP: "P", emQ: "Q", emR: "R", emS: "S", emT: "T",
emU: "U", emV: "V", emW: "W", emX: "X", emY: "Y", emZ: "Z",
// Tensors
tens: ["\\bm{\\mathsf{#1}}",1],
tA: "\\tens{A}", tB: "\\tens{B}", tC: "\\tens{C}", tD: "\\tens{D}", tE: "\\tens{E}",
tF: "\\tens{F}", tG: "\\tens{G}", tH: "\\tens{H}", tI: "\\tens{I}", tJ: "\\tens{J}",
tK: "\\tens{K}", tL: "\\tens{L}", tM: "\\tens{M}", tN: "\\tens{N}", tO: "\\tens{O}",
tP: "\\tens{P}", tQ: "\\tens{Q}", tR: "\\tens{R}", tS: "\\tens{S}", tT: "\\tens{T}",
tU: "\\tens{U}", tV: "\\tens{V}", tW: "\\tens{W}", tX: "\\tens{X}", tY: "\\tens{Y}", tZ: "\\tens{Z}",
// Graph (calligraphic)
gA: "\\mathcal{A}", gB: "\\mathcal{B}", gC: "\\mathcal{C}", gD: "\\mathcal{D}", gE: "\\mathcal{E}",
gF: "\\mathcal{F}", gG: "\\mathcal{G}", gH: "\\mathcal{H}", gI: "\\mathcal{I}", gJ: "\\mathcal{J}",
gK: "\\mathcal{K}", gL: "\\mathcal{L}", gM: "\\mathcal{M}", gN: "\\mathcal{N}", gO: "\\mathcal{O}",
gP: "\\mathcal{P}", gQ: "\\mathcal{Q}", gR: "\\mathcal{R}", gS: "\\mathcal{S}", gT: "\\mathcal{T}",
gU: "\\mathcal{U}", gV: "\\mathcal{V}", gW: "\\mathcal{W}", gX: "\\mathcal{X}", gY: "\\mathcal{Y}", gZ: "\\mathcal{Z}",
// Sets
sA: "\\mathbb{A}", sB: "\\mathbb{B}", sC: "\\mathbb{C}", sD: "\\mathbb{D}",
sF: "\\mathbb{F}", sG: "\\mathbb{G}", sH: "\\mathbb{H}", sI: "\\mathbb{I}", sJ: "\\mathbb{J}",
sK: "\\mathbb{K}", sL: "\\mathbb{L}", sM: "\\mathbb{M}", sN: "\\mathbb{N}", sO: "\\mathbb{O}",
sP: "\\mathbb{P}", sQ: "\\mathbb{Q}", sR: "\\mathbb{R}", sS: "\\mathbb{S}", sT: "\\mathbb{T}",
sU: "\\mathbb{U}", sV: "\\mathbb{V}", sW: "\\mathbb{W}", sX: "\\mathbb{X}", sY: "\\mathbb{Y}", sZ: "\\mathbb{Z}"
}
}
};
</script>
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml-full.js"></script>