Skip to content

Commit 40819bd

Browse files
authored
Enhance shortcuts and tips in article-edit.html
Updated shortcuts and tips section with additional notes on LaTeX articles and usage.
1 parent 6eb9522 commit 40819bd

1 file changed

Lines changed: 32 additions & 1 deletion

File tree

article-edit.html

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,38 @@
7676
<details class="extrainfo">
7777
<summary>Shortcuts and tips</summary>
7878
<div class="infocontent">
79-
<code> <b>Ctrl-S</b> (or Cmd-S): To save the article. <br/> <b>Ctrl-R</b> (or Cmd-R): To add references to the text. <br/> For more shortcuts <a href="https://github.com/ajaxorg/ace/wiki/Default-Keyboard-Shortcuts" target="_blank">click here</a>.<br/> For more information on the Markdown markup language, visit this <a href='https://www.markdownguide.org/basic-syntax/' target="_blank">Markdown Guide</a>.<br/><br/><i>Note 1</i>: You can insert an image from your media library into the body of the article with an expression like this: <b>{{ img('image-id.jpg', a, {width: 725, height: 400, title: true, caption: true, style: 'float: right', version: 'small'}) }}</b>. Remark: You can enter a <i>string</i> in the <i>title/caption</i> attribute if you want to use a text other than the one defined in the image record. For example: <b>{{ img('image-id.jpg', {title: 'My tooltip'}, a) }}</b>.<br/><br/><i>Note 2</i>: You can use the <i>declare</i> function within the Twig code to change some template settings without having to change it for all the other articles. For example, <b>{{ declare('timeline-label', 'Events', a) }}</b> changes the label of the list of events displayed on the <i>Analysis</i> page, which now displays the text "Events" instead of "Timeline". To change the label of the "Key elements", type <b>{{ declare('key-elements-label', 'New text', a) }}</b>. For the "Related Analyses" label, type <b>{{ declare('related-analyses-label', 'New text', a) }}</b>.<br/><br/><i>Note 3</i>: To insert a code snippet into the head of the article, use <b>{{ declare("head-snippet", "&lt;script&gt;...&lt;/script&gt;", a) }}</b>. In the body, use <b>{{ declare("body-snippet", "&lt;script&gt;...&lt;/script&gt;", a) }}</b>. You can insert these codes (from notes 2 and 3) anywhere in your text, as they will not be displayed on the page.<br/><br/><i>Note 4</i>: To insert a note: <b>{{ note('My footnote', a) }}</b>.
79+
<code>
80+
<b>Ctrl-S</b> (or Cmd-S): To save the article. <br/>
81+
<b>Ctrl-R</b> (or Cmd-R): To add references to the text. <br/>
82+
For more shortcuts <a href="https://github.com/ajaxorg/ace/wiki/Default-Keyboard-Shortcuts" target="_blank">click here</a>.<br/>
83+
For more information on the Markdown markup language, visit this <a href='https://www.markdownguide.org/basic-syntax/' target="_blank">Markdown Guide</a>.<br/>
84+
<br/>
85+
<i>Note 1</i>: You can insert an image from your media library into the body of the article with an expression like this:
86+
<b>{{ img('image-id.jpg', a, {width: 725, height: 400, title: true, caption: true, style: 'float: right', version: 'small'}) }}</b>.
87+
Remark: You can enter a <i>string</i> in the <i>title/caption</i> attribute if you want to use a text other than the one defined in the image record.
88+
For example: <b>{{ img('image-id.jpg', {title: 'My tooltip'}, a) }}</b>.<br/>
89+
<br/>
90+
<i>Note 2</i>: You can use the <i>declare</i> function within the Twig code to change some template settings without having to change it for all the other articles.
91+
For example, <b>{{ declare('timeline-label', 'Events', a) }}</b> changes the label of the list of events displayed on the <i>Analysis</i> page, which now displays the text "Events" instead of "Timeline".
92+
To change the label of the "Key elements", type <b>{{ declare('key-elements-label', 'New text', a) }}</b>.
93+
For the "Related Analyses" label, type <b>{{ declare('related-analyses-label', 'New text', a) }}</b>.<br/>
94+
<br/>
95+
<i>Note 3</i>: To insert a code snippet into the head of the article, use <b>{{ declare("head-snippet", "&lt;script&gt;...&lt;/script&gt;", a) }}</b>.
96+
In the body, use <b>{{ declare("body-snippet", "&lt;script&gt;...&lt;/script&gt;", a) }}</b>.
97+
You can insert these codes (from notes 2 and 3) anywhere in your text, as they will not be displayed on the page.<br/>
98+
<br/>
99+
<i>Note 4</i>: To insert a note: <b>{{ note('My footnote', a) }}</b>.<br/>
100+
<br/>
101+
<i>Note 5</i>: If you want to create a <b>LaTeX article</b>, you can use the LaTeX commands shown in the Sections of this <a href="https://latex.js.org/playground.html" target="_blank">page</a>, but there are some limitations:
102+
<ul>
103+
<li>You can't create comments (%)</li>
104+
<li>To write math formulas, leave the $ or $$ on their own line. For example: <br/>$$<br/>f(x) = x + 1<br/>$$</li>
105+
<li>To insert a LaTeX command, don't put spaces between the command and its braces, and don't break the command across lines. For example: \text{Example}</li>
106+
<li>Don't use HTML in the article (only Markdown, Twig, and LaTeX/TeX). </li>
107+
<li>Don't use: \! \, \: or \; </li>
108+
</ul>
109+
<i>Note 6</i>: You don't need to write raw LaTeX to create a <b>LaTeX article</b>. Basic Markdown is automatically converted to LaTeX, references become footnotes, images are inserted, and the summary becomes the abstract.<br/>
110+
<i>Note 7</i>: LaTeX articles are not rendered in the preview window.<br/>
80111
</code></div>
81112
</details>
82113
</div>

0 commit comments

Comments
 (0)