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: index.html
+79-15Lines changed: 79 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -143,7 +143,7 @@ <h1>Code snippet for the document header.</h1>
143
143
144
144
<section>
145
145
<h1>Side comments</h1>
146
-
<p>This section describes how to add a <strong>side comment</strong>. Side comments typically show parenthetical content considered part of the main flow, like qualifying remarks directly related to the section.<small>Side comments are related to the paragraph, therefore they usually appear right or below the text of the paragraph.<imgsrc="./media/ga.jpg" alt="Example of an image in a side comment.">.</small></p>
146
+
<p>This section describes how to add a <strong>side comment</strong>. Side comments typically show parenthetical content considered part of the main flow, like qualifying remarks directly related to the section.<small>Side comments are related to the paragraph, therefore they usually appear right or below the text of the paragraph.</small></p>
147
147
<p>A side comment should be inserted within the paragraph of a section, it will appear at the right of the paragraph and vertically aligned with it, or just below the paragraph on smaller screens.</p>
148
148
<figure>
149
149
<pre><code><section>
@@ -163,11 +163,11 @@ <h1>Code snippet of a side comment.</h1>
163
163
164
164
<section>
165
165
<h1id="images-and-videos">Images and videos</h1>
166
-
<p>Both images and videos are displayed within the <code><figure></code>element, possibly supplied with a caption. The <code><figure></code>element is supposed to be positioned near the paragraph where the image (or video) is mentioned. The <code><figcaption></code> element can contain a heading and one or more paragraphs.</p>
166
+
<p>Images and videos are displayed using the <code><img></code>and <code><video></code>elements. If a caption is needed, wrap images and videos within the <code><figure></code> element. The <code><figcaption></code> element can contain a heading and one or more paragraphs.</p>
167
167
<figure>
168
-
<imgsrc="./media/voronoi.jpg">
168
+
<imgstyle="width: 100%" src="./media/image.png">
169
169
<figcaption>
170
-
<p>Voronoi based artwork, written in GLSL.</p>
170
+
<p>Artwork based on Perlin noise, written in GLSL.</p>
171
171
</figcaption>
172
172
</figure>
173
173
<figure>
@@ -185,17 +185,11 @@ <h1 id="images-and-videos">Images and videos</h1>
185
185
</section></code></pre>
186
186
<figcaption>
187
187
<h1>Code snippet of an image, with a descriptive caption.</h1>
188
-
<p>The <code><figure></code> element may be avoided if there is no need for a caption, in such a case the <code><img></code> element is a child of the <code><section></code> element. The article header may contain a picture as well, which will be full width.</p>
188
+
<p>The <code><figure></code> element may be avoided if there is no need for a caption, in such a case the <code><img></code> element is a child of the <code><section></code> element. The default width is 600px, authors can use inline style declarations to customise the width, as described in section <strong><ahref="#customisations">Customisations</a></strong>.</p>
189
189
</figcaption>
190
190
</figure>
191
191
<h2>Videos</h2>
192
192
<p>Exactly the same HTML code snippet is used for displaying videos, with the obvious difference of using the <code><video></code> element in place of the <code><img></code> element, as shown below.</p>
<p>Basic smoke effect emerging from a Perlin noise, written in GLSL.</p>
197
-
</figcaption>
198
-
</figure>
199
193
<figure>
200
194
<pre><code><section>
201
195
<h1>...</h1>
@@ -211,7 +205,7 @@ <h2>Videos</h2>
211
205
</section></code></pre>
212
206
<figcaption>
213
207
<h1>Code snippet of a video with a caption.</h1>
214
-
<p>As with images, videos can be inserted in the article header.</p>
208
+
<p>As with images, videos can be inserted in the article header and have a default width of 600px.</p>
215
209
</figcaption>
216
210
</figure>
217
211
</section>
@@ -328,7 +322,7 @@ <h1>Tables</h1>
328
322
</section></code></pre>
329
323
<figcaption>
330
324
<h1>Code snippet of a table.</h1>
331
-
<p>The <code><thead></code> element defines the head of the table columns, instead, the <code><tbody></code> element is used for the table body. Note that, differently from images and videos, there is an extra <code><div></code> container wrapping the <code><table></code> element.</p>
325
+
<p>The <code><thead></code> element defines the head of the table columns, instead, the <code><tbody></code> element is used for the table body. Note that, differently from images and videos, there is an extra <code><div></code> container wrapping the <code><table></code> element. The default width is 600px, authors can use inline style declarations to customise the table width, as described in section <strong><ahref="#customisations">Customisations</a></strong>.</p>
332
326
</figcaption>
333
327
</figure>
334
328
</section>
@@ -387,6 +381,7 @@ <h1>Code snippet of code listings.</h1>
387
381
<p>Wrap the <code><code></code> element within the <code><pre></code> element to add multiple lines of code.</p>
388
382
</figcaption>
389
383
</figure>
384
+
<p>As with images, videos and tables, the default width is 600px. You can use inline declarations to customise the width, for example setting 100% width with <code><pre style="width: 100%"></code>. See section <strong><ahref="#customisations">Customisations</a></strong> for more details.</p>
390
385
<h2>Example 1</h2>
391
386
<figureid="listing1">
392
387
<pre><code>const f = n => n ? n * f(n - 1) : 1;</code></pre>
@@ -495,7 +490,7 @@ <h2>Example 3</h2>
495
490
<h1>Maxwell's equations in vacuum.</h1>
496
491
<p>The equations can be reduced to the standard wave equation $$
$$ providing the theoretical background for the electromagnetic waves <cite><ahref="#ref-3">[3]</a></cite>.</p>
493
+
$$ providing the theoretical background for the electromagnetic waves <cite><ahref="#ref-3">[3]</a></cite>.</p>
499
494
</figcaption>
500
495
</figure>
501
496
<figure>
@@ -510,10 +505,79 @@ <h1>Maxwell's equations in vacuum.</h1>
510
505
</p>
511
506
</figure></code></pre>
512
507
<figcaption>
513
-
<p>Use TeX functions for more sophisticated math typesetting.</p>
508
+
<p>Use TeX functions for more sophisticated math typesetting. Use the <code><figure></code> element if a caption is needed. The default width of the <code><p></code> element whitin the <code><figure></code> element is 600px. Authors can use inline style declarations to customise the width for larger formulas, as described in section <strong><ahref="#customisations">Customisations</a></strong>.</p>
514
509
</figcaption>
515
510
</figure>
516
511
</section>
512
+
513
+
<section>
514
+
<h1id="customisations">Customisations</h1>
515
+
<p>Rapido focuses on semantic HTML, providing a default style for a variety of HTML elements. Being CSS classes out of scope, authors looking for a different style must opt for a customisation.</p>
516
+
<p>You may change the default CSS rules or write new rules that have precedence over the default ones. As usual, this is possible both with <strong>inline declarations</strong> and <strong>stylesheets</strong>. The following examples show some common customisations.
517
+
</p>
518
+
<figure>
519
+
<pre><code><head>
520
+
...</code>
521
+
<mark><code> <style>
522
+
article.rapido {
523
+
font-family: "Helvetica Neue";
524
+
}
525
+
.rapido code {
526
+
font-family: "Iosevka";
527
+
}
528
+
</style></code></mark>
529
+
<code></head></code></pre>
530
+
<figcaption>
531
+
<h1>Font families.</h1>
532
+
<p>You can easily change the default font families, both for code and normal text.</p>
533
+
</figcaption>
534
+
</figure>
535
+
<figure>
536
+
<pre><code><head>
537
+
...</code>
538
+
<mark><code> <style>
539
+
.rapido code {
540
+
color: rgba(0, 0, 255, 1);
541
+
}
542
+
.rapido pre > mark > code {
543
+
border-left: 2px solid rgba(0, 0, 255, 1);
544
+
background: rgba(0, 0, 255, 0.05);
545
+
}
546
+
.rapido mark {
547
+
background: rgba(0, 0, 255, 0.1);
548
+
}
549
+
</style></code></mark>
550
+
<code></head></code></pre>
551
+
<figcaption>
552
+
<h1>Font colour on code snippets.</h1>
553
+
<p>The default colour is blue, authors are encouraged to choose the colour that better adapts to the pre-existing style if any.</p>
<h1>Full-width images, videos, tables and code snippets.</h1>
563
+
<p>The default width is 600 pixels, you can assign to an image a bigger or smaller width than the default one. Full width equals to 944 pixels.</p>
564
+
</figcaption>
565
+
</figure>
566
+
<figure>
567
+
<pre><code><head>
568
+
...</code>
569
+
<mark><code> <style>
570
+
.rapido .full-width {
571
+
width: 100%;
572
+
}
573
+
</style></code></mark>
574
+
<code></head></code></pre>
575
+
<figcaption>
576
+
<p>Full-width images can be obtained also defining an apposite CSS class, which can be used with <code><img src="..." class="full-width"></code>. On the same way it can be used with videos (<code><video></code>), code snippets (<code><pre></code>) and tables (<code><div></code>).</p>
0 commit comments