docs(user): fix wrong page for documentation

This commit is contained in:
Elian Doran
2025-11-07 17:31:50 +02:00
parent cedd1c4789
commit e4cd946ea8
6 changed files with 93 additions and 41 deletions

View File

@@ -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",

View File

@@ -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.

View File

@@ -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 &amp; Exporting as PDF</a> for more information.
### Per-workspace styles