Problem using numbered callouts from code blocks

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

Problem using numbered callouts from code blocks

joster
This is one of my absolute favourite features of asciidoctor--I use it for config file documentation all the time--but there's one thing I have trouble with. Often, I'd like to be able to put an admonition in the middle of the callout list, but when I do, it breaks the list. Let me give an example:

[source,yaml]
----
key1: value1 // <1>
key2: value2 // <2>
key3: value3 // <3>
----
<1> Explanation of value 1.

IMPORTANT: Some warning.

[start=2]
<2> Explanation of value 2.
<3> Explanation of value 3.

The [start=2] appears to get ignored, and a new list starts at 1, rendering the documentation nonsensical. Is there any way around this?
Reply | Threaded
Open this post in threaded view
|

Re: Problem using numbered callouts from code blocks

LightGuardjp
Try doing:

----
<1> Explanation of value 1
+
IMPORTANT: Some warning.
+
<2> ...
----

On Wed, Sep 30, 2015 at 5:50 AM, joster [via Asciidoctor :: Discussion] <[hidden email]> wrote:
This is one of my absolute favourite features of asciidoctor--I use it for config file documentation all the time--but there's one thing I have trouble with. Often, I'd like to be able to put an admonition in the middle of the callout list, but when I do, it breaks the list. Let me give an example:

[source,yaml]
----
key1: value1 // <1>
key2: value2 // <2>
key3: value3 // <3>
----
<1> Explanation of value 1.

IMPORTANT: Some warning.

[start=2]
<2> Explanation of value 2.
<3> Explanation of value 3.

The [start=2] appears to get ignored, and a new list starts at 1, rendering the documentation nonsensical. Is there any way around this?


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Problem-using-numbered-callouts-from-code-blocks-tp3774.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--
Reply | Threaded
Open this post in threaded view
|

Re: Problem using numbered callouts from code blocks

joster
That (along with variants on that theme like adding EOL markers at the end of the admonition as well, etc.) results in the admonition block, including all its text, not being rendered at all. It just silently gets dropped, without even a warning on compile.
Reply | Threaded
Open this post in threaded view
|

Re: Problem using numbered callouts from code blocks

LightGuardjp
Okay, try a + like I did above and use the block style admonition. I know this works in lists.

On Wed, Sep 30, 2015 at 8:24 AM, joster [via Asciidoctor :: Discussion] <[hidden email]> wrote:
That (along with variants on that theme like adding EOL markers at the end of the admonition as well, etc.) results in the admonition block, including all its text, not being rendered at all. It just silently gets dropped, without even a warning on compile.


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Problem-using-numbered-callouts-from-code-blocks-tp3774p3776.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--
Reply | Threaded
Open this post in threaded view
|

Re: Problem using numbered callouts from code blocks

joster
You mean like this?

----
<1> Explanation of value 1
+
[IMPORTANT]
Some warning.
+
<2> ...
----

That also gets silently dropped, when I try it. Have you been able to get it to work? I'm running the latest release:

$ asciidoctor --version
Asciidoctor 1.5.2 [http://asciidoctor.org]
Runtime Environment (ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-darwin14]) (lc:UTF-8 fs:UTF-8 in:- ex:UTF-8)
Reply | Threaded
Open this post in threaded view
|

Re: Problem using numbered callouts from code blocks

LightGuardjp
Well, that wasn't exactly what I had in mind, you have to fence the block with `====` and `====` but I just tried that and it's also dropped. Looks like with the base backends it is not possible.

On Wed, Sep 30, 2015 at 8:50 AM, joster [via Asciidoctor :: Discussion] <[hidden email]> wrote:
You mean like this?

----
<1> Explanation of value 1
+
[IMPORTANT]
Some warning.
+
<2> ...
----

That also gets silently dropped, when I try it. Have you been able to get it to work? I'm running the latest release:

$ asciidoctor --version
Asciidoctor 1.5.2 [http://asciidoctor.org]
Runtime Environment (ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-darwin14]) (lc:UTF-8 fs:UTF-8 in:- ex:UTF-8)


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Problem-using-numbered-callouts-from-code-blocks-tp3774p3778.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--
Reply | Threaded
Open this post in threaded view
|

Re: Problem using numbered callouts from code blocks

mojavelinux
Administrator
Callout list items can only contain simple content (paragraph text). This is by design. Adding complex content in a callout list item is an anti-pattern IMO.

I give more reasoning in the following issue: https://github.com/asciidoctor/asciidoctor/issues/1478

Cheers,

-Dan

On Wed, Sep 30, 2015 at 6:57 AM, LightGuardjp [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Well, that wasn't exactly what I had in mind, you have to fence the block with `====` and `====` but I just tried that and it's also dropped. Looks like with the base backends it is not possible.

On Wed, Sep 30, 2015 at 8:50 AM, joster [via Asciidoctor :: Discussion] <[hidden email]> wrote:
You mean like this?

----
<1> Explanation of value 1
+
[IMPORTANT]
Some warning.
+
<2> ...
----

That also gets silently dropped, when I try it. Have you been able to get it to work? I'm running the latest release:

$ asciidoctor --version
Asciidoctor 1.5.2 [http://asciidoctor.org]
Runtime Environment (ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-darwin14]) (lc:UTF-8 fs:UTF-8 in:- ex:UTF-8)


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Problem-using-numbered-callouts-from-code-blocks-tp3774p3778.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--



If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Problem-using-numbered-callouts-from-code-blocks-tp3774p3779.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--
Dan Allen | @mojavelinux | http://google.com/profiles/dan.j.allen