Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert to no MathJax #68

Merged
merged 2 commits into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ ENUM_VALUES_PER_LINE = 1
TREEVIEW_WIDTH = 250
EXT_LINKS_IN_WINDOW = NO
FORMULA_FONTSIZE = 10
USE_MATHJAX = YES
USE_MATHJAX = NO
MATHJAX_FORMAT = HTML-CSS
MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
MATHJAX_EXTENSIONS =
Expand Down
13 changes: 0 additions & 13 deletions docs/pages/developer_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ If you want to cite a piece literature in your documentation, add
a respective BibTeX citation to `docs/cpp/references.bib` and use `\cite name_of_citation` to
cite the document.


### Drawing circuits
As the elements of the svZeroDSolver are often represented
in the form of electrical circuits, we use [CircuiTikZ](https://ctan.org/pkg/circuitikz?lang=en)
Expand All @@ -101,18 +100,6 @@ To start a CircuitTikZ drawing use the following command:
\end{circuitikz}
\f]
```
We currently use MathJax, which only supports [a couple of LaTeX packages](https://docs.mathjax.org/en/latest/input/tex/extensions/index.html). In our `Doxyfile`, this is set as `USE_MATHJAX = YES`. The equations look nicer than without MathJax. Unfortunately, CircuiTikZ is currently not supported by MathJax. Thus, we store all current schematics already compiled in `docs/png`.

If you are adding new schematics, you can follow these steps:
1. Set `USE_MATHJAX = NO` in `docs/Doxyfile`
2. Locally build Doxygen (see next section)
3. Copy `png` output from `docs/build/latex` to `docs/png`
4. Include image with `\image html FILENAME_dark.png` in `.h`/`.cpp` Doxygen
5. Set `USE_MATHJAX = YES` in `docs/Doxyfile`
6. Locally build Doxygen again
7. Check if LaTeX and schematic look nice
8. Commit your changes and new `png`


### Build
The documentation is automatically built in the GitHub CI/CD and published
Expand Down
Binary file removed docs/png/blood_vessel.png
Binary file not shown.
Binary file removed docs/png/blood_vessel_dark.png
Binary file not shown.
Binary file removed docs/png/blood_vessel_junction.png
Binary file not shown.
Binary file removed docs/png/blood_vessel_junction_dark.png
Binary file not shown.
Binary file removed docs/png/blood_vessel_junction_individual.png
Binary file not shown.
Binary file removed docs/png/blood_vessel_junction_individual_dark.png
Binary file not shown.
Binary file removed docs/png/closed_loop_coronary_b_c.png
Binary file not shown.
Binary file removed docs/png/closed_loop_coronary_b_c_dark.png
Binary file not shown.
Binary file removed docs/png/closed_loop_r_c_r_b_c.png
Binary file not shown.
Binary file removed docs/png/closed_loop_r_c_r_b_c_dark.png
Binary file not shown.
Binary file removed docs/png/flow_reference_b_c.png
Binary file not shown.
Binary file removed docs/png/flow_reference_b_c_dark.png
Binary file not shown.
Binary file removed docs/png/junction.png
Binary file not shown.
Binary file removed docs/png/junction_dark.png
Binary file not shown.
Binary file removed docs/png/open_loop_coronary_b_c.png
Binary file not shown.
Binary file removed docs/png/open_loop_coronary_b_c_dark.png
Binary file not shown.
Binary file removed docs/png/pressure_reference_b_c.png
Binary file not shown.
Binary file removed docs/png/pressure_reference_b_c_dark.png
Binary file not shown.
Binary file removed docs/png/resistance_b_c.png
Binary file not shown.
Binary file removed docs/png/resistance_b_c_dark.png
Binary file not shown.
Binary file removed docs/png/resistive_junction.png
Binary file not shown.
Binary file removed docs/png/resistive_junction_dark.png
Binary file not shown.
Binary file removed docs/png/windkessel_b_c.png
Binary file not shown.
Binary file removed docs/png/windkessel_b_c_dark.png
Binary file not shown.
27 changes: 13 additions & 14 deletions src/model/BloodVessel.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,19 @@
*
* Models the mechanical behavior of a bloodvessel with optional stenosis.
*
* \image html blood_vessel_dark.png
* \f[
* \begin{circuitikz} \draw
* node[left] {$Q_{in}$} [-latex] (0,0) -- (0.8,0);
* \draw (1,0) node[anchor=south]{$P_{in}$}
* to [R, l=$R$, *-] (3,0)
* to [R, l=$S$, -] (5,0)
* (5,0) to [L, l=$L$, -*] (7,0)
* node[anchor=south]{$P_{out}$}
* (5,0) to [C, l=$C$, -] (5,-1.5)
* node[ground]{};
* \draw [-latex] (7.2,0) -- (8,0) node[right] {$Q_{out}$};
* \end{circuitikz}
* \f]
*
* ### Governing equations
*
Expand Down Expand Up @@ -129,19 +141,6 @@
* * `3` Stenosis coefficient
*
*/
// * \f[
// * \begin{circuitikz} \draw
// * node[left] {$Q_{in}$} [-latex] (0,0) -- (0.8,0);
// * \draw (1,0) node[anchor=south]{$P_{in}$}
// * to [R, l=$R$, *-] (3,0)
// * to [R, l=$S$, -] (5,0)
// * (5,0) to [L, l=$L$, -*] (7,0)
// * node[anchor=south]{$P_{out}$}
// * (5,0) to [C, l=$C$, -] (5,-1.5)
// * node[ground]{};
// * \draw [-latex] (7.2,0) -- (8,0) node[right] {$Q_{out}$};
// * \end{circuitikz}
// * \f]
class BloodVessel : public Block {
public:
/**
Expand Down
57 changes: 27 additions & 30 deletions src/model/BloodVesselJunction.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,36 @@
* Models a junction with one inlet and arbitrary outlets using
* modified blood vessel elements between each inlet and outlet pair.
*
* \image html blood_vessel_junction_dark.png
* \f[
* \begin{circuitikz}
* \draw node[left] {$Q_\text{in}$} [-latex] (0,0) -- (0.8,0);
* \draw (1,0.1) node[anchor=south]{$P_\text{in}$};
* \draw (1,0) to [short, *-] (2.5,0.75);
* \draw (1,0) to [short, *-] (2.5,-0.75);
* \draw (2.5,0.75) node[anchor=south]{} to [generic, l_=$BV_{1}$, -*]
* (4.5,0.75); \draw (2.4,0.75) node[anchor=south]{}; \draw (4.6,0.75)
* node[anchor=south] {$P_{out,1}$}; \draw (2.5,-0.75) node[anchor=south]{}
to
* [generic, l^=$BV_{2}$, -*] (4.5,-0.75); \draw (2.4,-0.75)
* node[anchor=north]{}; \draw (4.6,-0.75) node[anchor=north]
* {$P_{out,2}$}; \draw [-latex] (4.7,0.75) -- (5.5,0.75) node[right]
* {$Q_{out,1}$}; \draw [-latex] (4.7,-0.75) -- (5.5,-0.75) node[right]
* {$Q_{out,2}$}; \end{circuitikz}
* \f]
*
* Each blood vessel is modelled as:
*
* \image html blood_vessel_junction_individual_dark.png
* \f[
* \begin{circuitikz} \draw
* node[left] {$Q_\text{in}$} [-latex] (0,0) -- (0.8,0);
* \draw (1,0) node[anchor=south]{$P_\text{in}$}
* to [R, l=$R$, *-] (3,0)
* to [R, l=$S$, -] (5,0)
* (5,0) to [L, l=$L$, -*] (7,0)
* node[anchor=south]{$P_\text{out}$};
* \draw [-latex] (7.2,0) -- (8,0) node[right] {$Q_\text{out}$};
* \end{circuitikz}
* \f]
*
* ### Governing equations
*
Expand Down Expand Up @@ -117,34 +142,6 @@
* * `i+2*num_outlets` Stenosis coefficient for inner blood vessel `i`
*
*/
// * \f[
// * \begin{circuitikz}
// * \draw node[left] {$Q_\text{in}$} [-latex] (0,0) -- (0.8,0);
// * \draw (1,0.1) node[anchor=south]{$P_\text{in}$};
// * \draw (1,0) to [short, *-] (2.5,0.75);
// * \draw (1,0) to [short, *-] (2.5,-0.75);
// * \draw (2.5,0.75) node[anchor=south]{} to [generic, l_=$BV_{1}$, -*]
// * (4.5,0.75); \draw (2.4,0.75) node[anchor=south]{}; \draw (4.6,0.75)
// * node[anchor=south] {$P_{out,1}$}; \draw (2.5,-0.75) node[anchor=south]{}
// to
// * [generic, l^=$BV_{2}$, -*] (4.5,-0.75); \draw (2.4,-0.75)
// * node[anchor=north]{}; \draw (4.6,-0.75) node[anchor=north]
// * {$P_{out,2}$}; \draw [-latex] (4.7,0.75) -- (5.5,0.75) node[right]
// * {$Q_{out,1}$}; \draw [-latex] (4.7,-0.75) -- (5.5,-0.75) node[right]
// * {$Q_{out,2}$}; \end{circuitikz}
// * \f]
//
// * \f[
// * \begin{circuitikz} \draw
// * node[left] {$Q_\text{in}$} [-latex] (0,0) -- (0.8,0);
// * \draw (1,0) node[anchor=south]{$P_\text{in}$}
// * to [R, l=$R$, *-] (3,0)
// * to [R, l=$S$, -] (5,0)
// * (5,0) to [L, l=$L$, -*] (7,0)
// * node[anchor=south]{$P_\text{out}$};
// * \draw [-latex] (7.2,0) -- (8,0) node[right] {$Q_\text{out}$};
// * \end{circuitikz}
// * \f]
class BloodVesselJunction : public Block {
public:
// Inherit constructors
Expand Down
31 changes: 15 additions & 16 deletions src/model/ClosedLoopCoronaryBC.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,21 @@ enum class Side { LEFT, RIGHT, NONE };
* @brief Closed loop coronary boundary condition (connected to other blocks on
* both sides).
*
* \image html closed_loop_coronary_b_c_dark.png
* \f[
* \begin{circuitikz} \draw
* node[left] {$Q_{in}$} [-latex] (0,0) -- (0.8,0);
* \draw (1,0) node[anchor=south]{$P_{in}$}
* to [R, l=$R_a$, *-] (3,0)
* to [R, l=$R_{am}$, -] (5,0)
* to [R, l=$R_v$, *-*] (7,0)
* node[anchor=south]{$P_{out}$}
* (5,0) to [C, l=$C_{im} \;V_{im}$, -*] (5,-1.5)
* node[left]{$P_{im}$}
* (3,0) to [C, l=$C_a$, -*] (3,-1.5)
* node[left]{$P_a$};
* \draw [-latex] (7.2,0) -- (8.0,0) node[right] {$Q_{out}$};
* \end{circuitikz}
* \f]
*
* ### Governing equations
*
Expand Down Expand Up @@ -102,21 +116,6 @@ enum class Side { LEFT, RIGHT, NONE };
* * `4` Cim
*
*/
// * \f[
// * \begin{circuitikz} \draw
// * node[left] {$Q_{in}$} [-latex] (0,0) -- (0.8,0);
// * \draw (1,0) node[anchor=south]{$P_{in}$}
// * to [R, l=$R_a$, *-] (3,0)
// * to [R, l=$R_{am}$, -] (5,0)
// * to [R, l=$R_v$, *-*] (7,0)
// * node[anchor=south]{$P_{out}$}
// * (5,0) to [C, l=$C_{im} \;V_{im}$, -*] (5,-1.5)
// * node[left]{$P_{im}$}
// * (3,0) to [C, l=$C_a$, -*] (3,-1.5)
// * node[left]{$P_a$};
// * \draw [-latex] (7.2,0) -- (8.0,0) node[right] {$Q_{out}$};
// * \end{circuitikz}
// * \f]
class ClosedLoopCoronaryBC : public Block {
public:
explicit ClosedLoopCoronaryBC(int id, const std::vector<int> &param_ids,
Expand Down
25 changes: 12 additions & 13 deletions src/model/ClosedLoopRCRBC.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,18 @@
* Models the mechanical behavior of a Windkessel boundary condition that is
* connected to other blocks on both sides.
*
* \image html closed_loop_r_c_r_b_c_dark.png
* \f[
* \begin{circuitikz} \draw
* node[left] {$Q_{in}$} [-latex] (0,0) -- (0.8,0);
* \draw (1,0) node[anchor=south]{$P_{in}$}
* to [R, l=$R_p$, *-] (3,0)
* to [R, l=$R_d$, *-*] (5,0)
* node[anchor=south]{$P_{out}$}
* (3,0) to [C, l=$C$, *-] (3,-1.5)
* node[ground]{$P_{C}$};
* \draw [-latex] (5.2,0) -- (6.0,0) node[right] {$Q_{out}$} ;
* \end{circuitikz}
* \f]
*
* ### Governing equations
*
Expand Down Expand Up @@ -97,18 +108,6 @@
* * `2` Distal resistance
*
*/
// * \f[
// * \begin{circuitikz} \draw
// * node[left] {$Q_{in}$} [-latex] (0,0) -- (0.8,0);
// * \draw (1,0) node[anchor=south]{$P_{in}$}
// * to [R, l=$R_p$, *-] (3,0)
// * to [R, l=$R_d$, *-*] (5,0)
// * node[anchor=south]{$P_{out}$}
// * (3,0) to [C, l=$C$, *-] (3,-1.5)
// * node[ground]{$P_{C}$};
// * \draw [-latex] (5.2,0) -- (6.0,0) node[right] {$Q_{out}$} ;
// * \end{circuitikz}
// * \f]
class ClosedLoopRCRBC : public Block {
public:
// Inherit constructors
Expand Down
15 changes: 7 additions & 8 deletions src/model/FlowReferenceBC.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,13 @@
*
* Applies a prescribed flow to a boundary.
*
* \image html flow_reference_b_c_dark.png
* \f[
* \begin{circuitikz} \draw
* node[left] {$\hat{Q}$} [-latex] (0,0) -- (0.8,0);
* \draw (1,0) node[anchor=south]{$P$} to [short, *-] (1.2,0) ;
* \draw [-latex] (1.4,0) -- (2.2,0) node[right] {$Q$};
* \end{circuitikz}
* \f]
*
* ### Governing equations
*
Expand Down Expand Up @@ -72,13 +78,6 @@
* * `0` Flow
*
*/
// * \f[
// * \begin{circuitikz} \draw
// * node[left] {$\hat{Q}$} [-latex] (0,0) -- (0.8,0);
// * \draw (1,0) node[anchor=south]{$P$} to [short, *-] (1.2,0) ;
// * \draw [-latex] (1.4,0) -- (2.2,0) node[right] {$Q$};
// * \end{circuitikz}
// * \f]
class FlowReferenceBC : public Block {
public:
// Inherit constructors
Expand Down
25 changes: 12 additions & 13 deletions src/model/Junction.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,18 @@
* Models a junction with arbitrary inlets and outlets. Across all inlets and
* outlets of the junction, mass is conserved and pressure is continuous.
*
* \image html junction_dark.png
* \f[
* \begin{circuitikz}
* \draw node[left] {$Q_{in}$} [-latex] (0,0) -- (0.8,0);
* \draw (1,0) node[anchor=south]{$P_{in}$} to [short, *-*] (3.0,0);
* \draw (3,0) node[anchor=south]{} to [short, -*] (4.5,1.0);
* \draw (4.3,1.1) node[anchor=south] {$P_{out,1}$};
* \draw (3,0) node[anchor=south]{} to [short, -*] (4.5,-1.0);
* \draw (4.3,-1.1) node[anchor=north] {$P_{out,2}$};
* \draw [-latex] (4.65,1.1) -- (5.25,1.5) node[right] {$Q_{out,1}$};
* \draw [-latex] (4.65,-1.1) -- (5.25,-1.5) node[right] {$Q_{out,2}$};
* \end{circuitikz}
* \f]
*
* ### Governing equations
*
Expand Down Expand Up @@ -74,18 +85,6 @@
* \quad \mathrm{with} \quad i \neq j \f]
*
*/
// * \f[
// * \begin{circuitikz}
// * \draw node[left] {$Q_{in}$} [-latex] (0,0) -- (0.8,0);
// * \draw (1,0) node[anchor=south]{$P_{in}$} to [short, *-*] (3.0,0);
// * \draw (3,0) node[anchor=south]{} to [short, -*] (4.5,1.0);
// * \draw (4.3,1.1) node[anchor=south] {$P_{out,1}$};
// * \draw (3,0) node[anchor=south]{} to [short, -*] (4.5,-1.0);
// * \draw (4.3,-1.1) node[anchor=north] {$P_{out,2}$};
// * \draw [-latex] (4.65,1.1) -- (5.25,1.5) node[right] {$Q_{out,1}$};
// * \draw [-latex] (4.65,-1.1) -- (5.25,-1.5) node[right] {$Q_{out,2}$};
// * \end{circuitikz}
// * \f]
class Junction : public Block {
public:
using Block::Block;
Expand Down
29 changes: 14 additions & 15 deletions src/model/OpenLoopCoronaryBC.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,20 @@
/**
* @brief Open loop coronary boundary condition based on \cite kim_coronary.
*
* \image html open_loop_coronary_b_c_dark.png
* \f[
* \begin{circuitikz} \draw
* node[left] {$Q_{in}$} [-latex] (0,0) -- (0.8,0);
* \draw (1,0) node[anchor=south]{$P_{in}$}
* to [R, l=$R_a$, *-] (3,0)
* to [R, l=$R_{am}$, -] (5,0)
* to [R, l=$R_v$, *-*] (7,0)
* node[anchor=south]{$P_{v}$}
* (5,0) to [C, l=$C_{im} \;V_{im}$, -*] (5,-1.5)
* node[left]{$P_{im}$}
* (3,0) to [C, l=$C_a$, -*] (3,-1.5)
* node[left]{$P_a$};
* \end{circuitikz}
* \f]
*
* ### Governing equations
*
Expand Down Expand Up @@ -91,20 +104,6 @@
* * `6` Pv
*
*/
// * \f[
// * \begin{circuitikz} \draw
// * node[left] {$Q_{in}$} [-latex] (0,0) -- (0.8,0);
// * \draw (1,0) node[anchor=south]{$P_{in}$}
// * to [R, l=$R_a$, *-] (3,0)
// * to [R, l=$R_{am}$, -] (5,0)
// * to [R, l=$R_v$, *-*] (7,0)
// * node[anchor=south]{$P_{v}$}
// * (5,0) to [C, l=$C_{im} \;V_{im}$, -*] (5,-1.5)
// * node[left]{$P_{im}$}
// * (3,0) to [C, l=$C_a$, -*] (3,-1.5)
// * node[left]{$P_a$};
// * \end{circuitikz}
// * \f]
class OpenLoopCoronaryBC : public Block {
public:
// Inherit constructors
Expand Down
17 changes: 8 additions & 9 deletions src/model/PressureReferenceBC.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,14 @@
*
* Applies a predefined pressure at a boundary.
*
* \image html pressure_reference_b_c_dark.png
* \f[
* \begin{circuitikz}
* \draw (1,0) node[anchor=south]{$P$} to [short, *-] (1.2,0) ;
* \draw [-latex] (1.4,0) -- (2.2,0) node[right] {$Q$};
* \draw (1,0) to [short, l=, *-] (1,-1)
* node[ground]{$\hat{P}$};
* \end{circuitikz}
* \f]
*
* ### Governing equations
*
Expand Down Expand Up @@ -72,14 +79,6 @@
* * `0` Pressure
*
*/
// * \f[
// * \begin{circuitikz}
// * \draw (1,0) node[anchor=south]{$P$} to [short, *-] (1.2,0) ;
// * \draw [-latex] (1.4,0) -- (2.2,0) node[right] {$Q$};
// * \draw (1,0) to [short, l=, *-] (1,-1)
// * node[ground]{$\hat{P}$};
// * \end{circuitikz}
// * \f]
class PressureReferenceBC : public Block {
public:
// Inherit constructors
Expand Down
Loading
Loading