princomp / princomp.github.io

Teaching material for the principles of computer programming using C#.
https://princomp.github.io/
Creative Commons Attribution 4.0 International
0 stars 1 forks source link

Integrate callouts? #2

Open aubertc opened 1 month ago

aubertc commented 1 month ago

Callouts are nice feature supported by quartz (and github) that turns

> [!NOTE]  
> Highlights information that users should take into account, even when skimming.

into

[!NOTE]
Highlights information that users should take into account, even when skimming.

or (more precisely) as

image

However, callouts are not supported by pandoc, so they are lost when converting to markdown. Even if those callouts were preserved, they would only be correctly rendered on the website, as pandoc cannot convert callouts for pdf, odt and docx documents.

A current workaround is to use a table, as follows:

| ⚠️ Warning                                                                                                                                                                                              |
|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| This is a warning. |

which is rendered as

⚠️ Warning
This is a warning.

or (more precisely) as image

Integrating callouts could be nice, and possible sources of inspiration includes:

aubertc commented 3 weeks ago

With https://github.com/princomp/princomp.github.io/commit/981ab064718bc2a05f196906b0a63ec6202d5dc8 the warning sign is properly integrated into the pdf outputs.