Includes in part of a line/includes in numbered lists

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

Includes in part of a line/includes in numbered lists

Sisyphos
Hi,

Is it possible to include Text from a file as part of line? I was only able to include Text as single line. I have two use cases:

a) I want to include a sentence within a paragraph. Without breaking the line or the paragraph.
b) There is a text in a numbered instruction list, which can appear at several levels.

I tried this:
. include::snippet.adoc[]
. Second step.
. Third step.

The result looks like this:
1. include::snippet.adoc[]
2. Second step.
3. Third step.

Without the dot it works, but I need the number (on different levels).

Is this in general not possible, are there work-a-rounds, or did I oversee something? Also negative answers are welcome.
Reply | Threaded
Open this post in threaded view
|

Re: Includes in part of a line/includes in numbered lists

mojavelinux
Administrator
The include directive has to be on a line by itself. To use the include directive to bring in the primary text of a list item, you need to use the following syntax:

. {blank}
include::item-text.adoc[]

If you are including complex content, then you'll need to make sure you wrap it in an open block so that it stays attached to the list item.

. {blank}
+
--
include::complex-list-item.adoc[]
--

This seems like it could be a nice addition to the docs.

-Dan

On Mon, Aug 5, 2019 at 10:55 AM Sisyphos [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Hi,

Is it possible to include Text from a file as part of line? I was only able to include Text as single line. I have two use cases:

a) I want to include a sentence within a paragraph. Without breaking the line or the paragraph.
b) There is a text in a numbered instruction list, which can appear at several levels.

I tried this:
. include::snippet.adoc[]
. Second step.
. Third step.

The result looks like this:
1. include::snippet.adoc[]
2. Second step.
3. Third step.

Without the dot it works, but I need the number (on different levels).

Is this in general not possible, are there work-a-rounds, or did I oversee something? Also negative answers are welcome.


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Includes-in-part-of-a-line-includes-in-numbered-lists-tp7039.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: Includes in part of a line/includes in numbered lists

Sisyphos
Thanks for the tip, Dan! That's really cool! In the HTML output you get exactly that. In the PDF output, however, there is something like a manual break after the bullet (3rd entry is the insertet file).
linebreak_Insert
Is it a bug?

asciidoctor (2.0.10)
asciidoctor-pdf (1.5.0.beta.2)
Reply | Threaded
Open this post in threaded view
|

Re: Includes in part of a line/includes in numbered lists

mojavelinux
Administrator
Could be. Thanks for pointing that out. I'll investigate.

Cheers,

-Dan

On Mon, Aug 5, 2019 at 3:59 PM Sisyphos [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Thanks for the tip, Dan! That's really cool! In the HTML output you get exactly that. In the PDF output, however, there is something like a manual break after the bullet (3rd entry is the insertet file).
linebreak_Insert
Is it a bug?

asciidoctor (2.0.10)
asciidoctor-pdf (1.5.0.beta.2)


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Includes-in-part-of-a-line-includes-in-numbered-lists-tp7039p7043.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: Includes in part of a line/includes in numbered lists

mojavelinux
Administrator
Yes, this is an issue. See https://github.com/asciidoctor/asciidoctor-pdf/issues/1196 for the issue report and to track the progress

Best,

-Dan

On Mon, Aug 5, 2019 at 4:23 PM mojavelinux [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Could be. Thanks for pointing that out. I'll investigate.

Cheers,

-Dan

On Mon, Aug 5, 2019 at 3:59 PM Sisyphos [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Thanks for the tip, Dan! That's really cool! In the HTML output you get exactly that. In the PDF output, however, there is something like a manual break after the bullet (3rd entry is the insertet file).
linebreak_Insert
Is it a bug?

asciidoctor (2.0.10)
asciidoctor-pdf (1.5.0.beta.2)


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Includes-in-part-of-a-line-includes-in-numbered-lists-tp7039p7043.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



If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Includes-in-part-of-a-line-includes-in-numbered-lists-tp7039p7044.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