From 677267997f00435aa8f6e0a0b09044467806cd91 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20Hrb=C3=A1=C4=8D?= <david@hrbac.cz>
Date: Wed, 15 Feb 2017 11:03:13 +0100
Subject: [PATCH] Enable MathJax formulas

---
 README.md                         | 17 +++++++++++++++++
 docs.it4i/anselm/job-priority.md  |  6 ++++--
 docs.it4i/salomon/job-priority.md |  6 ++++--
 3 files changed, 25 insertions(+), 4 deletions(-)

diff --git a/README.md b/README.md
index cf8f9e087..d4662ef82 100644
--- a/README.md
+++ b/README.md
@@ -26,6 +26,23 @@ CentOS
 Mellanox
 ```
 
+## Math Formulas
+
+Formulas are made with:
+
+* https://facelessuser.github.io/pymdown-extensions/extensions/arithmatex/
+* https://www.mathjax.org/
+
+You can add formula to page like this:
+
+```
+$$
+MAX\_FAIRSHARE * ( 1 - \frac{usage_{Project}}{usage_{Total}} )
+$$
+```
+
+To enable the MathJX on page you need to enable it by adding line ```---8<--- "mathjax.md"``` at the end of file.
+
 ## Developemnt Environment
 
 ### MkDocs
diff --git a/docs.it4i/anselm/job-priority.md b/docs.it4i/anselm/job-priority.md
index 06c7e921d..30eba2bd0 100644
--- a/docs.it4i/anselm/job-priority.md
+++ b/docs.it4i/anselm/job-priority.md
@@ -26,7 +26,7 @@ Fair-share priority is used for ranking jobs with equal queue priority.
 
 Fair-share priority is calculated as
 
-![](../img/fairshare_formula.png)
+---8<--- "fairshare_formula.md"
 
 where MAX_FAIRSHARE has value 1E6,
 usage<sub>Project</sub> is cumulated usage by all members of selected project,
@@ -52,7 +52,7 @@ Eligible time can be seen as eligible_time attribute of job.
 
 Job execution priority (job sort formula) is calculated as:
 
-![](../img/job_sort_formula.png)
+---8<--- "job_sort_formula.md"
 
 ### Job backfilling
 
@@ -68,3 +68,5 @@ It means, that jobs with lower execution priority can be run before jobs with hi
     It is **very beneficial to specify the walltime** when submitting jobs.
 
 Specifying more accurate walltime enables better scheduling, better execution times and better resource usage. Jobs with suitable (small) walltime could be backfilled - and overtake job(s) with higher priority.
+
+---8<--- "mathjax.md"
diff --git a/docs.it4i/salomon/job-priority.md b/docs.it4i/salomon/job-priority.md
index 265afe544..5455a1ac4 100644
--- a/docs.it4i/salomon/job-priority.md
+++ b/docs.it4i/salomon/job-priority.md
@@ -26,7 +26,7 @@ Fair-share priority is used for ranking jobs with equal queue priority.
 
 Fair-share priority is calculated as
 
-![](../img/fairshare_formula.png)
+---8<--- "fairshare_formula.md"
 
 where MAX_FAIRSHARE has value 1E6,
 usage<sub>Project</sub> is cumulated usage by all members of selected project,
@@ -53,7 +53,7 @@ Eligible time can be seen as eligible_time attribute of job.
 
 Job execution priority (job sort formula) is calculated as:
 
-![](../img/job_sort_formula.png)
+---8<--- "job_sort_formula.md"
 
 ### Job backfilling
 
@@ -73,3 +73,5 @@ Specifying more accurate walltime enables better scheduling, better execution ti
 ### Job Placement
 
 Job [placement can be controlled by flags during submission](job-submission-and-execution/#job_placement).
+
+---8<--- "mathjax.md"
-- 
GitLab