mirror of
https://github.com/zadam/trilium.git
synced 2025-11-09 16:08:58 +01:00
docs(user): fix wrong page for documentation
This commit is contained in:
parent
cedd1c4789
commit
e4cd946ea8
@ -4,7 +4,6 @@
|
||||
<figcaption>Screenshot of the note contextual menu indicating the “Export as PDF”
|
||||
option.</figcaption>
|
||||
</figure>
|
||||
|
||||
<h2>Printing</h2>
|
||||
<p>This feature allows printing of notes. It works on both the desktop client,
|
||||
but also on the web.</p>
|
||||
@ -60,9 +59,9 @@ class="admonition note">
|
||||
orientation, size. However, there are a few <a class="reference-link"
|
||||
href="#root/_help_zEY4DaJG4YT5">Attributes</a> to adjust some of the settings:</p>
|
||||
<ul>
|
||||
<li>To print in landscape mode instead of portrait (useful for big diagrams
|
||||
<li data-list-item-id="e059818dc4b086a895efa23fdde670cb0">To print in landscape mode instead of portrait (useful for big diagrams
|
||||
or slides), add <code>#printLandscape</code>.</li>
|
||||
<li>By default, the resulting PDF will be in Letter format. It is possible
|
||||
<li data-list-item-id="ebb801d5830e9662602ce85e96e351ee5">By default, the resulting PDF will be in Letter format. It is possible
|
||||
to adjust it to another page size via the <code>#printPageSize</code> attribute,
|
||||
with one of the following values: <code>A0</code>, <code>A1</code>, <code>A2</code>, <code>A3</code>, <code>A4</code>, <code>A5</code>, <code>A6</code>, <code>Legal</code>, <code>Letter</code>, <code>Tabloid</code>, <code>Ledger</code>.</li>
|
||||
</ul>
|
||||
@ -76,9 +75,9 @@ class="admonition note">
|
||||
href="#root/_help_4TIF1oA4VQRO">Options</a> and assigning a key combination
|
||||
for:</p>
|
||||
<ul>
|
||||
<li><em>Print Active Note</em>
|
||||
<li class="ck-list-marker-italic" data-list-item-id="ed834da40ebe17dd104c66956579e8db8"><em>Print Active Note</em>
|
||||
</li>
|
||||
<li><em>Export Active Note as PDF</em>
|
||||
<li class="ck-list-marker-italic" data-list-item-id="e12469c162de60af8653a92238f286176"><em>Export Active Note as PDF</em>
|
||||
</li>
|
||||
</ul>
|
||||
<h2>Constraints & limitations</h2>
|
||||
@ -86,27 +85,58 @@ class="admonition note">
|
||||
supported when printing, in which case the <em>Print</em> and <em>Export as PDF</em> options
|
||||
will be disabled.</p>
|
||||
<ul>
|
||||
<li>For <a class="reference-link" href="#root/_help_6f9hih2hXXZk">Code</a> notes:
|
||||
<li data-list-item-id="ecbc8f07fc543357dbe65e874d2812923">For <a class="reference-link" href="#root/_help_6f9hih2hXXZk">Code</a> notes:
|
||||
<ul>
|
||||
<li>Line numbers are not printed.</li>
|
||||
<li>Syntax highlighting is enabled, however a default theme (Visual Studio)
|
||||
<li data-list-item-id="e5a65e990187f7457b1ef3b90b3efca65">Line numbers are not printed.</li>
|
||||
<li data-list-item-id="ed32da7175b6215d5c1461029b85310b6">Syntax highlighting is enabled, however a default theme (Visual Studio)
|
||||
is enforced.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>For <a class="reference-link" href="#root/_help_GTwFsgaA0lCt">Collections</a>:
|
||||
<li data-list-item-id="e2336e670a5137a961dbaa520180f1ca3">For <a class="reference-link" href="#root/_help_GTwFsgaA0lCt">Collections</a>:
|
||||
<ul>
|
||||
<li>Only <a class="reference-link" href="#root/_help_zP3PMqaG71Ct">Presentation View</a> is
|
||||
<li data-list-item-id="e2dfe21a479e4e4574d70e3c818d3580c">Only <a class="reference-link" href="#root/_help_zP3PMqaG71Ct">Presentation</a> is
|
||||
currently supported.</li>
|
||||
<li>We plan to add support for all the collection types at some point.</li>
|
||||
<li data-list-item-id="eb710e8646deac11a960fc762ff059ffc">We plan to add support for all the collection types at some point.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Using <a class="reference-link" href="#root/_help_AlhDUqhENtH7">Custom app-wide CSS</a> for
|
||||
<li data-list-item-id="e92e4035db060328f92b290f201746687">Using <a class="reference-link" href="#root/_help_AlhDUqhENtH7">Custom app-wide CSS</a> for
|
||||
printing is not longer supported, due to a more stable but isolated mechanism.
|
||||
<ul>
|
||||
<li>We plan to introduce a new mechanism specifically for a print CSS.</li>
|
||||
<li data-list-item-id="e8ceb3650a468052a8728a40f05ba8ba9">We plan to introduce a new mechanism specifically for a print CSS.</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<h2>Customizing the print CSS</h2>
|
||||
<p>As an advanced use case, it's possible to customize the CSS used for printing
|
||||
such as adjusting the fonts, sizes or margins. Note that <a class="reference-link"
|
||||
href="#root/pOsGYCXsbNQG/pKK96zzmvBGf/_help_AlhDUqhENtH7">Custom app-wide CSS</a> will
|
||||
not work for printing.</p>
|
||||
<p>To do so:</p>
|
||||
<ul>
|
||||
<li data-list-item-id="e9888834b45670c7ab11c0f229e38e32f">Create a CSS <a href="#root/pOsGYCXsbNQG/KSZ04uQ2D1St/_help_6f9hih2hXXZk">code note</a>.</li>
|
||||
<li
|
||||
data-list-item-id="ea9e3983ea0c81ecc73c6cd73bcb3e400">On the note being printed, apply the <code>~printCss</code> relation to
|
||||
point to the newly created CSS code note.</li>
|
||||
<li data-list-item-id="ed4fdf9dd70c9770c03637eb4fb011654">To apply the CSS to multiple notes, consider using <a href="#root/pOsGYCXsbNQG/tC7s2alapj8V/zEY4DaJG4YT5/_help_bwZpz2ajCEwO">inheritable attributes</a> or
|
||||
<a
|
||||
class="reference-link" href="#root/pOsGYCXsbNQG/tC7s2alapj8V/_help_KC1HB96bqqHX">Templates</a>.</li>
|
||||
</ul>
|
||||
<p>For example, to change the font of the document from the one defined by
|
||||
the theme or the user to a serif one:</p><pre><code class="language-text-x-trilium-auto">body {
|
||||
--main-font-family: serif !important;
|
||||
--detail-font-family: var(--main-font-family) !important;
|
||||
}</code></pre>
|
||||
<p>To remark:</p>
|
||||
<ul>
|
||||
<li data-list-item-id="e0fcaa62313f3f428f8243c0631a578b3">Multiple CSS notes can be add by using multiple <code>~printCss</code> relations.</li>
|
||||
<li
|
||||
data-list-item-id="e0388e16113a44b8200aed433f680b795">If the note pointing to the <code>printCss</code> doesn't have the right
|
||||
note type or mime type, it will be ignored.</li>
|
||||
<li data-list-item-id="ec4c3f5dcee6428c4a5e409f1461c2433">If migrating from a previous version where <a class="reference-link"
|
||||
href="#root/pOsGYCXsbNQG/pKK96zzmvBGf/_help_AlhDUqhENtH7">Custom app-wide CSS</a>,
|
||||
there's no need for <code>@media print {</code> since the style-sheet is
|
||||
used only for printing.</li>
|
||||
</ul>
|
||||
<h2>Under the hood</h2>
|
||||
<p>Both printing and exporting as PDF use the same mechanism: a note is rendered
|
||||
individually in a separate webpage that is then sent to the browser or
|
||||
|
||||
@ -43,7 +43,7 @@
|
||||
<p>Since v0.99.2, it's no longer possible to use <code>#appCss</code> to customize
|
||||
the printing CSS, since the printing is now done in an isolated environment.</p>
|
||||
<p>However, it's still possible to customize the CSS via <code>~printCss</code>;
|
||||
see <a class="reference-link" href="#root/jdjRLhLV3TtI/yeqU0zo0ZQ83/_help_W0msUwLxm40d">Printing and exporting to PDF</a> for
|
||||
see <a class="reference-link" href="#root/pOsGYCXsbNQG/gh7bpGYxajRS/BFs8mudNFgCS/_help_NRnIZmSMc5sj">Printing & Exporting as PDF</a> for
|
||||
more information.</p>
|
||||
</aside>
|
||||
<h3>Per-workspace styles</h3>
|
||||
|
||||
@ -15,28 +15,4 @@ Syntax highlighting for code blocks is supported as well:
|
||||
|
||||
* It works by injecting a Highlight.js stylesheet into the print.
|
||||
* The theme used is hard-coded (the _Visual Studio Light theme_, at the time of writing) in order not to have a dark background in print.
|
||||
* <a class="reference-link" href="Syntax%20highlighting.md">Syntax highlighting</a> is handled by the content renderer.
|
||||
|
||||
## Customizing the print CSS
|
||||
|
||||
As an advanced use case, it's possible to customize the CSS used for printing such as adjusting the fonts, sizes or margins. Note that <a class="reference-link" href="#root/pOsGYCXsbNQG/pKK96zzmvBGf/AlhDUqhENtH7">Custom app-wide CSS</a> will not work for printing.
|
||||
|
||||
To do so:
|
||||
|
||||
* Create a CSS [code note](#root/pOsGYCXsbNQG/KSZ04uQ2D1St/6f9hih2hXXZk).
|
||||
* On the note being printed, apply the `~printCss` relation to point to the newly created CSS code note.
|
||||
* To apply the CSS to multiple notes, consider using [inheritable attributes](#root/pOsGYCXsbNQG/tC7s2alapj8V/zEY4DaJG4YT5/bwZpz2ajCEwO) or <a class="reference-link" href="#root/pOsGYCXsbNQG/tC7s2alapj8V/KC1HB96bqqHX">Templates</a>.
|
||||
|
||||
For example, to change the font of the document from the one defined by the theme or the user to a serif one:
|
||||
|
||||
```
|
||||
body {
|
||||
--main-font-family: serif !important;
|
||||
--detail-font-family: var(--main-font-family) !important;
|
||||
}
|
||||
```
|
||||
|
||||
To remark:
|
||||
|
||||
* Multiple CSS notes can be add by using multiple `~printCss` relations.
|
||||
* If migrating from a previous version where <a class="reference-link" href="#root/pOsGYCXsbNQG/pKK96zzmvBGf/AlhDUqhENtH7">Custom app-wide CSS</a>, there's no need for `@media print {` since the style-sheet is used only for printing.
|
||||
* <a class="reference-link" href="Syntax%20highlighting.md">Syntax highlighting</a> is handled by the content renderer.
|
||||
21
docs/User Guide/!!!meta.json
vendored
21
docs/User Guide/!!!meta.json
vendored
@ -4078,6 +4078,20 @@
|
||||
"value": "printing-and-pdf-export",
|
||||
"isInheritable": false,
|
||||
"position": 110
|
||||
},
|
||||
{
|
||||
"type": "relation",
|
||||
"name": "internalLink",
|
||||
"value": "bwZpz2ajCEwO",
|
||||
"isInheritable": false,
|
||||
"position": 120
|
||||
},
|
||||
{
|
||||
"type": "relation",
|
||||
"name": "internalLink",
|
||||
"value": "KC1HB96bqqHX",
|
||||
"isInheritable": false,
|
||||
"position": 130
|
||||
}
|
||||
],
|
||||
"format": "markdown",
|
||||
@ -11006,6 +11020,13 @@
|
||||
"value": "bx bxs-file-css",
|
||||
"isInheritable": false,
|
||||
"position": 50
|
||||
},
|
||||
{
|
||||
"type": "relation",
|
||||
"name": "internalLink",
|
||||
"value": "NRnIZmSMc5sj",
|
||||
"isInheritable": false,
|
||||
"position": 60
|
||||
}
|
||||
],
|
||||
"format": "markdown",
|
||||
|
||||
@ -64,11 +64,36 @@ Not all <a class="reference-link" href="../../Note%20Types.md">Note Types</a>
|
||||
* Line numbers are not printed.
|
||||
* Syntax highlighting is enabled, however a default theme (Visual Studio) is enforced.
|
||||
* For <a class="reference-link" href="../../Collections.md">Collections</a>:
|
||||
* Only <a class="reference-link" href="../../Collections/Presentation.md">Presentation View</a> is currently supported.
|
||||
* Only <a class="reference-link" href="../../Collections/Presentation.md">Presentation</a> is currently supported.
|
||||
* We plan to add support for all the collection types at some point.
|
||||
* Using <a class="reference-link" href="../../Theme%20development/Custom%20app-wide%20CSS.md">Custom app-wide CSS</a> for printing is not longer supported, due to a more stable but isolated mechanism.
|
||||
* We plan to introduce a new mechanism specifically for a print CSS.
|
||||
|
||||
## Customizing the print CSS
|
||||
|
||||
As an advanced use case, it's possible to customize the CSS used for printing such as adjusting the fonts, sizes or margins. Note that <a class="reference-link" href="../../Theme%20development/Custom%20app-wide%20CSS.md">Custom app-wide CSS</a> will not work for printing.
|
||||
|
||||
To do so:
|
||||
|
||||
* Create a CSS [code note](../../Note%20Types/Code.md).
|
||||
* On the note being printed, apply the `~printCss` relation to point to the newly created CSS code note.
|
||||
* To apply the CSS to multiple notes, consider using [inheritable attributes](../../Advanced%20Usage/Attributes/Attribute%20Inheritance.md) or <a class="reference-link" href="../../Advanced%20Usage/Templates.md">Templates</a>.
|
||||
|
||||
For example, to change the font of the document from the one defined by the theme or the user to a serif one:
|
||||
|
||||
```
|
||||
body {
|
||||
--main-font-family: serif !important;
|
||||
--detail-font-family: var(--main-font-family) !important;
|
||||
}
|
||||
```
|
||||
|
||||
To remark:
|
||||
|
||||
* Multiple CSS notes can be add by using multiple `~printCss` relations.
|
||||
* If the note pointing to the `printCss` doesn't have the right note type or mime type, it will be ignored.
|
||||
* If migrating from a previous version where <a class="reference-link" href="../../Theme%20development/Custom%20app-wide%20CSS.md">Custom app-wide CSS</a>, there's no need for `@media print {` since the style-sheet is used only for printing.
|
||||
|
||||
## Under the hood
|
||||
|
||||
Both printing and exporting as PDF use the same mechanism: a note is rendered individually in a separate webpage that is then sent to the browser or the Electron application either for printing or exporting as PDF.
|
||||
|
||||
@ -18,7 +18,7 @@ Adding a new _app CSS note_ or modifying an existing one does not immediately ap
|
||||
> [!TIP]
|
||||
> Since v0.99.2, it's no longer possible to use `#appCss` to customize the printing CSS, since the printing is now done in an isolated environment.
|
||||
>
|
||||
> However, it's still possible to customize the CSS via `~printCss`; see <a class="reference-link" href="#root/jdjRLhLV3TtI/yeqU0zo0ZQ83/W0msUwLxm40d">Printing and exporting to PDF</a> for more information.
|
||||
> However, it's still possible to customize the CSS via `~printCss`; see <a class="reference-link" href="../Basic%20Concepts%20and%20Features/Notes/Printing%20%26%20Exporting%20as%20PDF.md">Printing & Exporting as PDF</a> for more information.
|
||||
|
||||
### Per-workspace styles
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user