Way to indicate a callout covers multiple lines?

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

Way to indicate a callout covers multiple lines?

msc
I have a pseudo-code listing in a block with a few callouts. One callout refers to a group of 4 lines in the pseudo-code. I want to indicate very clearly that the callout refers to the 4 lines collectively. I've thought about a multi-line spanning brace "}" on the right or getting the 4 lines drawn in a different color than the other lines in the listing.

I don't see how to do either so I am seeking guidance on these or an alternative indicator,
msc
Reply | Threaded
Open this post in threaded view
|

Re: Way to indicate a callout covers multiple lines?

msc
Another way to ask this is "is there a way to add a role to lines in a listing block?" That would allow me to apply different styling.

I've tried the obvious things: adding [.role] at the start of each line of interest and a block within the block but they don't work.
Reply | Threaded
Open this post in threaded view
|

Re: Way to indicate a callout covers multiple lines?

TheElderCat
The straightforward way is simply to use the same callout number for multiple lines:

[source, python]

----
line_1 = 'Text for line 1' # <1>
line_2 = 'Text for line 2' # <2>
line_3 = 'Text for line 3' # <3>
line_4 = 'Text for line 4' # <3>
line_5 = 'Text for line 5' # <3>
line_6 = 'Text for line 6' # <3>
line_7 = 'Text for line 7' # <4>
line_8 = 'Text for line 8' # <5>
line_9 = 'Text for line 9' # <6>
----
<1> Callout text for line 1.
<2> Callout text for line 2.
<3> Callout text for lines 3, 4, 5, 6.
<4> Callout text for line 7.
<5> Callout text for line 8.
<6> Callout text for line 9.


Just tested it and it works with doctype as Article or Docbook:
Reply | Threaded
Open this post in threaded view
|

Re: Way to indicate a callout covers multiple lines?

mojavelinux
Administrator
Exactly.

On Mon, Feb 12, 2018 at 5:41 PM, TheElderCat [via Asciidoctor :: Discussion] <[hidden email]> wrote:
The straightforward way is simply to use the same callout number for multiple lines:

[source, python]

----
line_1 = 'Text for line 1' # <1>
line_2 = 'Text for line 2' # <2>
line_3 = 'Text for line 3' # <3>
line_4 = 'Text for line 4' # <3>
line_5 = 'Text for line 5' # <3>
line_6 = 'Text for line 6' # <3>
line_7 = 'Text for line 7' # <4>
line_8 = 'Text for line 8' # <5>
line_9 = 'Text for line 9' # <6>
----
<1> Callout text for line 1.
<2> Callout text for line 2.
<3> Callout text for lines 3, 4, 5, 6.
<4> Callout text for line 7.
<5> Callout text for line 8.
<6> Callout text for line 9.


Just tested it and it works with doctype as Article or Docbook:


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Way-to-indicate-a-callout-covers-multiple-lines-tp6168p6179.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