Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
docs(user): improve documentation on ligatures
Elian Doran7eccf4fbf068
diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Basic Concepts and Features/Themes/Personalizing the font.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Basic Concepts and Features/Themes/Personalizing the font.htmlindex 439805e02f..3a7dab295f 100644--- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Basic Concepts and Features/Themes/Personalizing the font.html+++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Basic Concepts and Features/Themes/Personalizing the font.html@@ -16,7 +16,7 @@them along with it.</p><p>The list of fonts contains the following items:</p><ul>- <li><strong>Generic fonts</strong>+ <li class="ck-list-marker-bold"><strong>Generic fonts</strong><ul><li><em>Theme defined</em> which uses the font that is embedded with the current <ahref="#root/_help_Wy267RK4M69c">theme</a>. For example on the default modern@@ -98,4 +98,13 @@<li>In the <a class="reference-link" href="#root/_help_oPVyFC7WL2Lp">Note Tree</a>,drag-and-drop the .zip file directly onto the newly created note and followthe steps from the previous section.</li>-</ol>\ No newline at end of file+</ol>+<h2>Programming ligatures</h2>+<p>Some fonts support programming ligatures, which will turn character combinations+ such as <code spellcheck="false">!=</code> into <code spellcheck="false">≠</code> or <code+ spellcheck="false">-></code> as <code spellcheck="false">→</code> in <a+ class="reference-link" href="#root/_help_QxEyIjRBizuC">Code blocks</a> and <a+ class="reference-link" href="#root/_help_6f9hih2hXXZk">Code</a> notes.</p>+<p>These are only a display affordance, so copying the text is not affected.+ Regardless, this feature can be disabled in Trilium by unchecking <em>Programming ligatures</em> in+ the font settings. </p>\ No newline at end of filediff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/Code.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/Code.htmlindex 9966c50398..94705fdea0 100644--- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/Code.html+++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/Code.html@@ -99,12 +99,12 @@is no possibility of adding new themes (at least for now), since the themesare defined in JavaScript and not at CSS level.</p></aside>-<h2>Ligatures</h2>+<h2>Programming ligatures</h2><p>If you see <code spellcheck="false">!=</code> displayed as <code spellcheck="false">≠</code> or <codespellcheck="false">-></code> as <code spellcheck="false">→</code> insidea code note, those are <em>font ligature</em>: the default monospace fontdraws certain character pairs as a single symbol. The underlying text is- not changed by Trilium (unlike text note which have <a class="reference-link"+ not changed by Trilium (unlike text notes which have <a class="reference-link"href="#root/_help_oI7GoyilXXAr">Automatic replacements</a>), and copyingit out gives you back <code spellcheck="false">!=</code> and <code spellcheck="false">-></code>.</p><p>This can be turned off with <a class="reference-link" href="#root/_help_4TIF1oA4VQRO">Options</a><em>→ Appearance → Fonts → Programming ligatures.</em>diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/Text/Developer-specific formatting/Code blocks.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/Text/Developer-specific formatting/Code blocks.htmlindex 33b304a54e..d31aa28951 100644--- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/Text/Developer-specific formatting/Code blocks.html+++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/Text/Developer-specific formatting/Code blocks.html@@ -28,15 +28,15 @@<h2>Exiting out of the code block</h2><ul><li>To exit out of a code block and enter a normal paragraph, move the cursor- at the end of the code block and press <kbd>Enter</kbd> twice.</li>+ at the end of the code block and press Enter twice.</li><li>Similarly, to insert a paragraph above the note block, move the cursor- at the beginning of the code block and press <kbd>Enter</kbd> twice.</li>+ at the beginning of the code block and press Enter twice.</li></ul><aside class="admonition note"><p>If you've pasted a code block with a more complex HTML structure, exiting- out of the code block by pressing <kbd>Enter</kbd> multiple times might not- work. In that case the best approach is to delete the code block entirely- and use <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>V</kbd> (paste as plain text).</p>+ out of the code block by pressing Enter multiple times might not work.+ In that case the best approach is to delete the code block entirely and+ use Ctrl+Shift+V (paste as plain text).</p></aside><h2>Syntax highlighting & color schemes</h2><p>Since TriliumNext v0.90.12, Trilium will try to offer syntax highlighting@@ -57,9 +57,10 @@value is currently not configurable. For <a class="reference-link"href="#root/_help_CoFPLs3dRlXc">Read-Only Notes</a>, this limitation isnot applied.</p>-<p>In order to configure this new feature, a section has been added in Options- → Appearance to control the syntax highlighting. There the color scheme- can be chosen, from a builtin selection of themes from Highlight.js.</p>+<p>In order to configure this new feature, a section has been added in <a+ class="reference-link" href="#root/_help_4TIF1oA4VQRO">Options</a> → <em>Appearance</em> to+ control the syntax highlighting. There the color scheme can be chosen,+ from a builtin selection of themes from Highlight.js.</p><ul><li>It is possible to disable the syntax highlighting for all the notes byselecting “No syntax highlighting” in the “Color scheme” option.</li>@@ -103,4 +104,19 @@check any of the items to add them to the list, or uncheck them to removethem from the list.</p><p>Note that the list of languages is not immediately refreshed, you'd have- to manually <a href="#root/_help_s8alTXmpFR61">refresh the application</a>.</p>\ No newline at end of file+ to manually <a href="#root/_help_s8alTXmpFR61">refresh the application</a>.</p>+<h2>Text replacements and ligatures</h2>+<p><a class="reference-link" href="#root/_help_oI7GoyilXXAr">Automatic replacements</a> are+ a feature of text notes which converts some character sequences into another+ and some of them interfere with programming text, such as the conversion+ of quotes. While in a code block, the automatic replacements <strong>are not effect</strong>.+ The only way the automatic replacements can interfere is if the text is+ typed/pasted before being put in a code block.</p>+<p>A different feature is <em>programming ligatures</em>, which is simply+ a display affordance which turns <code spellcheck="false">!=</code> into <code+ spellcheck="false">≠</code> or <code spellcheck="false">-></code> as <code+ spellcheck="false">→</code> . These come from the <a href="#root/_help_w4rMEhJsALlA">font</a>.+ The underlying text is not actually changed, and copying it out gives you+ back <code spellcheck="false">!=</code> and <code spellcheck="false">-></code>.</p>+<p>Ligatures can be disabled in <a class="reference-link" href="#root/_help_4TIF1oA4VQRO">Options</a><em>→ Appearance → Fonts → Programming ligatures.</em>+</p>\ No newline at end of filediff --git a/docs/User Guide/User Guide/Basic Concepts and Features/Themes/Personalizing the font.md b/docs/User Guide/User Guide/Basic Concepts and Features/Themes/Personalizing the font.mdindex ba9addadaf..e3af99aa89 100644--- a/docs/User Guide/User Guide/Basic Concepts and Features/Themes/Personalizing the font.md+++ b/docs/User Guide/User Guide/Basic Concepts and Features/Themes/Personalizing the font.md@@ -56,4 +56,10 @@ A large selection of fonts can be easily retrieved from Google Fonts, as follows4. Check that the list of fonts on the left side corresponds to your selection.5. Press _Download all_.6. In the <a class="reference-link" href="../UI%20Elements/Note%20Tree.md">Note Tree</a>, create a note where to store the new fonts.-7. In the <a class="reference-link" href="../UI%20Elements/Note%20Tree.md">Note Tree</a>, drag-and-drop the .zip file directly onto the newly created note and follow the steps from the previous section.\ No newline at end of file+7. In the <a class="reference-link" href="../UI%20Elements/Note%20Tree.md">Note Tree</a>, drag-and-drop the .zip file directly onto the newly created note and follow the steps from the previous section.++## Programming ligatures++Some fonts support programming ligatures, which will turn character combinations such as `!=` into `≠` or `->` as `→` in <a class="reference-link" href="../../Note%20Types/Text/Developer-specific%20formatting/Code%20blocks.md">Code blocks</a> and <a class="reference-link" href="../../Note%20Types/Code.md">Code</a> notes.++These are only a display affordance, so copying the text is not affected. Regardless, this feature can be disabled in Trilium by unchecking _Programming ligatures_ in the font settings.\ No newline at end of filediff --git a/docs/User Guide/User Guide/Note Types/Code.md b/docs/User Guide/User Guide/Note Types/Code.mdindex 937426bba3..3b116dcd2f 100644--- a/docs/User Guide/User Guide/Note Types/Code.md+++ b/docs/User Guide/User Guide/Note Types/Code.md@@ -68,8 +68,8 @@ Since Trilium 0.94.0 the colors of code notes can be customized by going <a cla> **Why are there only a few themes whereas the code block themes for text notes have a lot?**> The reason is that Code notes use a different technology than the one used in Text notes, and as such there is a more limited selection of themes. If you find a CodeMirror 6 (not 5) theme that you would like to use, let us know and we might consider adding it to the set of default themes. There is no possibility of adding new themes (at least for now), since the themes are defined in JavaScript and not at CSS level.-## Ligatures+## Programming ligatures-If you see `!=` displayed as `≠` or `->` as `→` inside a code note, those are _font ligature_: the default monospace font draws certain character pairs as a single symbol. The underlying text is not changed by Trilium (unlike text note which have <a class="reference-link" href="Text/Automatic%20replacements.md">Automatic replacements</a>), and copying it out gives you back `!=` and `->`.+If you see `!=` displayed as `≠` or `->` as `→` inside a code note, those are _font ligature_: the default monospace font draws certain character pairs as a single symbol. The underlying text is not changed by Trilium (unlike text notes which have <a class="reference-link" href="Text/Automatic%20replacements.md">Automatic replacements</a>), and copying it out gives you back `!=` and `->`.This can be turned off with <a class="reference-link" href="../Basic%20Concepts%20and%20Features/UI%20Elements/Options.md">Options</a>_→ Appearance → Fonts → Programming ligatures._\ No newline at end of filediff --git a/docs/User Guide/User Guide/Note Types/Text/Developer-specific formatting/Code blocks.md b/docs/User Guide/User Guide/Note Types/Text/Developer-specific formatting/Code blocks.mdindex a940543dab..462794cac4 100644--- a/docs/User Guide/User Guide/Note Types/Text/Developer-specific formatting/Code blocks.md+++ b/docs/User Guide/User Guide/Note Types/Text/Developer-specific formatting/Code blocks.md@@ -15,11 +15,11 @@ Note that this feature is meant for generally small snippets of code. For larger## Exiting out of the code block-* To exit out of a code block and enter a normal paragraph, move the cursor at the end of the code block and press <kbd>Enter</kbd> twice.-* Similarly, to insert a paragraph above the note block, move the cursor at the beginning of the code block and press <kbd>Enter</kbd> twice.+* To exit out of a code block and enter a normal paragraph, move the cursor at the end of the code block and press Enter twice.+* Similarly, to insert a paragraph above the note block, move the cursor at the beginning of the code block and press Enter twice.> [!NOTE]-> If you've pasted a code block with a more complex HTML structure, exiting out of the code block by pressing <kbd>Enter</kbd> multiple times might not work. In that case the best approach is to delete the code block entirely and use <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>V</kbd> (paste as plain text).+> If you've pasted a code block with a more complex HTML structure, exiting out of the code block by pressing Enter multiple times might not work. In that case the best approach is to delete the code block entirely and use Ctrl+Shift+V (paste as plain text).## Syntax highlighting & color schemes@@ -32,7 +32,7 @@ Interaction:Note that when editing a text note, syntax highlighting is automatically disabled if the code block is too big (somewhere around 500 lines). This value is currently not configurable. For <a class="reference-link" href="../../../Basic%20Concepts%20and%20Features/Notes/Read-Only%20Notes.md">Read-Only Notes</a>, this limitation is not applied.-In order to configure this new feature, a section has been added in Options → Appearance to control the syntax highlighting. There the color scheme can be chosen, from a builtin selection of themes from Highlight.js.+In order to configure this new feature, a section has been added in <a class="reference-link" href="../../../Basic%20Concepts%20and%20Features/UI%20Elements/Options.md">Options</a> → _Appearance_ to control the syntax highlighting. There the color scheme can be chosen, from a builtin selection of themes from Highlight.js.* It is possible to disable the syntax highlighting for all the notes by selecting “No syntax highlighting” in the “Color scheme” option.* Word wrapping is disabled by default, but can be configured from the same section.@@ -62,4 +62,12 @@ The code blocks feature shares the list of languages with the <a class="referenThe supported languages can be adjusted by going to <a class="reference-link" href="../../../Basic%20Concepts%20and%20Features/UI%20Elements/Options.md">Options</a>, then _Code Notes_ and looking for the _Available MIME types in the dropdown_ section. Simply check any of the items to add them to the list, or uncheck them to remove them from the list.-Note that the list of languages is not immediately refreshed, you'd have to manually [refresh the application](../../../Troubleshooting/Refreshing%20the%20application.md).\ No newline at end of file+Note that the list of languages is not immediately refreshed, you'd have to manually [refresh the application](../../../Troubleshooting/Refreshing%20the%20application.md).++## Text replacements and ligatures++<a class="reference-link" href="../Automatic%20replacements.md">Automatic replacements</a> are a feature of text notes which converts some character sequences into another and some of them interfere with programming text, such as the conversion of quotes. While in a code block, the automatic replacements **are not effect**. The only way the automatic replacements can interfere is if the text is typed/pasted before being put in a code block.++A different feature is _programming ligatures_, which is simply a display affordance which turns `!=` into `≠` or `->` as `→` . These come from the [font](../../../Basic%20Concepts%20and%20Features/Themes/Personalizing%20the%20font.md). The underlying text is not actually changed, and copying it out gives you back `!=` and `->`.++Ligatures can be disabled in <a class="reference-link" href="../../../Basic%20Concepts%20and%20Features/UI%20Elements/Options.md">Options</a>_→ Appearance → Fonts → Programming ligatures._\ No newline at end of file