Skip to content

Commit 283a7b8

Browse files
committed
add hint for doc writer about the cemosis doc ui #2
1 parent 9fdb145 commit 283a7b8

File tree

1 file changed

+2
-92
lines changed

1 file changed

+2
-92
lines changed

cemosis/modules/ROOT/pages/index.adoc

Lines changed: 2 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ Welcome to {cemosis} documentation! {cemosis} is a technological platform in mat
2424
|===
2525

2626

27-
28-
2927
[%header]
3028
|===
3129
2+^| Physics
@@ -35,94 +33,6 @@ Welcome to {cemosis} documentation! {cemosis} is a technological platform in mat
3533
| Holo3 Polymap. Surface reconstruction using deflectometry. A collaboration with Holo3. |
3634
|===
3735

36+
== UI Documentation for writers
3837

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

Comments
 (0)