Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate callouts? #2

Open
aubertc opened this issue May 29, 2024 · 5 comments
Open

Integrate callouts? #2

aubertc opened this issue May 29, 2024 · 5 comments
Labels
enhancement New feature or request

Comments

@aubertc
Copy link
Contributor

aubertc commented May 29, 2024

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:

@jweeks2023 jweeks2023 added the enhancement New feature or request label Jun 6, 2024
@aubertc
Copy link
Contributor Author

aubertc commented Jun 12, 2024

With 981ab06 the warning sign is properly integrated into the pdf outputs.

@whmarsh87
Copy link

In many ways, the callout is just an integration of an image to that location, with the specific image being determined by which callout is used. Does pandoc have issues with inserted images? If not, we could just get a repository of images for the types of callouts and do them as follows:

![insertion of our callout image from our personal repository of images]
what is being called out

It would make it to where we would have to maintain our own group of images for callouts, but it might also make them more compatible with pandoc.

@whmarsh87
Copy link

Also, comparing the Quartz to the pandoc, I think the issue lies with where they want the !. In your Quartz example, it is within the brackets, [!], but pandoc has it prior to ![]

Screenshot 2024-12-21 165736

@aubertc
Copy link
Contributor Author

aubertc commented Jan 21, 2025

The ![]… syntax is for images, the syntax you are looking for comes from alerts, cf. https://pandoc.org/MANUAL.html#extension-alerts

@aubertc
Copy link
Contributor Author

aubertc commented Jan 21, 2025

pandoc has an extension for that but it doesn't look great in pdfs

Image

or in odt

Image

so I suggest we keep the "workaround" with the table, in pdf

Image

or odt

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants