You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: cemosis/modules/ROOT/pages/index.adoc
+2-92Lines changed: 2 additions & 92 deletions
Original file line number
Diff line number
Diff line change
@@ -24,8 +24,6 @@ Welcome to {cemosis} documentation! {cemosis} is a technological platform in mat
24
24
|===
25
25
26
26
27
-
28
-
29
27
[%header]
30
28
|===
31
29
2+^| Physics
@@ -35,94 +33,6 @@ Welcome to {cemosis} documentation! {cemosis} is a technological platform in mat
35
33
| Holo3 Polymap. Surface reconstruction using deflectometry. A collaboration with Holo3. |
36
34
|===
37
35
36
+
== UI Documentation for writers
38
37
39
-
== Doc Writer Documentation
40
-
41
-
=== Adding pseudocodes to documentation
42
-
43
-
The documentation embeds some algorithms written using `pseudocode.js` whose syntax is mostly compatible with latex package `algorithmic`.
44
-
45
-
The documentation and in particular the grammar is https://github.com/SaswatPadhi/pseudocode.js#grammar[here].
46
-
47
-
.Example of the pseudocode for the quicksort algorithm rendered by `pseudocode.js`
48
-
====
49
-
++++
50
-
<pre id="quicksort" style="display:hidden;">
51
-
% This quicksort algorithm is extracted from Chapter 7, Introduction to Algorithms (3rd edition)
52
-
\begin{algorithm}
53
-
\caption{Quicksort}
54
-
\begin{algorithmic}
55
-
\PROCEDURE{Quicksort}{$A, p, r$}
56
-
\IF{$p < r$}
57
-
\STATE $q = $ \CALL{Partition}{$A, p, r$}
58
-
\STATE \CALL{Quicksort}{$A, p, q - 1$}
59
-
\STATE \CALL{Quicksort}{$A, q + 1, r$}
60
-
\ENDIF
61
-
\ENDPROCEDURE
62
-
\PROCEDURE{Partition}{$A, p, r$}
63
-
\STATE $x = A[r]$
64
-
\STATE $i = p - 1$
65
-
\FOR{$j = p$ \TO $r - 1$}
66
-
\IF{$A[j] < x$}
67
-
\STATE $i = i + 1$
68
-
\STATE exchange
69
-
$A[i]$ with $A[j]$
70
-
\ENDIF
71
-
\STATE exchange $A[i]$ with $A[r]$
72
-
\ENDFOR
73
-
\ENDPROCEDURE
74
-
\end{algorithmic}
75
-
\end{algorithm}
76
-
</pre>
77
-
++++
78
-
====
79
-
80
-
[IMPORTANT]
81
-
====
82
-
In order to display it properly you have to add the following line at the top of the asciidoc file
83
-
.antora attribute page-pseudocode is an array of id of pseudocodes
84
-
----
85
-
:page-pseudocode: ["quicksort"]
86
-
----
87
-
88
-
If you have several pseudo-codes in a page e.g. `code1, code2, code3`, you have to list them all
89
-
----
90
-
:page-pseudocode: ["code1","code2","code3"]
91
-
----
92
-
====
93
-
94
-
.Original code in asciidoc
95
-
====
96
-
----
97
-
++++
98
-
<pre id="code2" style="display:hidden;">
99
-
% This quicksort algorithm is extracted from Chapter 7, Introduction to Algorithms (3rd edition)
100
-
\begin{algorithm}
101
-
\caption{Quicksort}
102
-
\begin{algorithmic}
103
-
\PROCEDURE{Quicksort}{$A, p, r$}
104
-
\IF{$p < r$}
105
-
\STATE $q = $ \CALL{Partition}{$A, p, r$}
106
-
\STATE \CALL{Quicksort}{$A, p, q - 1$}
107
-
\STATE \CALL{Quicksort}{$A, q + 1, r$}
108
-
\ENDIF
109
-
\ENDPROCEDURE
110
-
\PROCEDURE{Partition}{$A, p, r$}
111
-
\STATE $x = A[r]$
112
-
\STATE $i = p - 1$
113
-
\FOR{$j = p$ \TO $r - 1$}
114
-
\IF{$A[j] < x$}
115
-
\STATE $i = i + 1$
116
-
\STATE exchange
117
-
$A[i]$ with $A[j]$
118
-
\ENDIF
119
-
\STATE exchange $A[i]$ with $A[r]$
120
-
\ENDFOR
121
-
\ENDPROCEDURE
122
-
\end{algorithmic}
123
-
\end{algorithm}
124
-
</pre>
125
-
++++
126
-
----
127
-
====
128
-
38
+
The UI documentation for the doc writers is available xref:antora-ui-default:ROOT:index.adoc[here] including the xref:antora-ui-default:ROOT:cemosis/zeindex.adoc[Cemosis extensions]
0 commit comments