Re: Includes in part of a line/includes in numbered lists
Posted by
mojavelinux on
Aug 05, 2019; 5:52pm
URL: https://discuss.asciidoctor.org/Includes-in-part-of-a-line-includes-in-numbered-lists-tp7039p7040.html
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.
--