Multiline admonitions

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Multiline admonitions

maydb
There are five admonition style labels:  NOTE, TIP, IMPORTANT, CAUTION, WARNING. Currently I only find line breaks to extend multiline abilility.

```
NOTE: Rubies are red, +
Topazes are blue.
```

I also want to include some code snippets into admonitions, is it possible to do that?
Reply | Threaded
Open this post in threaded view
|

Re: Multiline admonitions

mojavelinux
Administrator
If you want to use block content in an admonition, you need to use the delimited block form:

[NOTE]
====
block

content

here
====


Best Regards,

-Dan

On Tue, Apr 21, 2020 at 2:03 AM maydb [via Asciidoctor :: Discussion] <[hidden email]> wrote:
There are five admonition style labels:  NOTE, TIP, IMPORTANT, CAUTION, WARNING. Currently I only find line breaks to extend multiline abilility.

```
NOTE: Rubies are red, +
Topazes are blue.
```

I also want to include some code snippets into admonitions, is it possible to do that?



If you reply to this email, your message will be added to the discussion below:
https://discuss.asciidoctor.org/Multiline-admonitions-tp7925.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML


--
Dan Allen | @mojavelinux | https://twitter.com/mojavelinux
Reply | Threaded
Open this post in threaded view
|

Re: Multiline admonitions

maydb
Thank you! I searched `note:` in https://asciidoctor.org/docs/user-manual and didn't find that tip. Then I found NOTE is called admonition in https://asciidoctor.org/docs/asciidoc-writers-guide/#admonitions. I didn't find block syntax in that Writer's Guide, then I'm too hurry to ask here. I should have searched `admonitions` in User Manual.
msc
Reply | Threaded
Open this post in threaded view
|

Re: Multiline admonitions

msc
In reply to this post by maydb


> On Apr 21, 2020, at 1:03, maydb [via Asciidoctor :: Discussion] <[hidden email]> wrote:
>
> There are five admonition style labels:  NOTE, TIP, IMPORTANT, CAUTION, WARNING. Currently I only find line breaks to extend multiline abilility.
>
> ```
> NOTE: Rubies are red, +
> Topazes are blue.
> ```
>
> I also want to include some code snippets into admonitions, is it possible to do that?
>

Multilines and paragraphs are possible:

[NOTE]
====
Whatever content you want.

A second paragraph.

And a third.
====

I expect you can put a code snippet inside too, though I have not tried it.

Regards

    -Mark