Quantcast
Viewing all articles
Browse latest Browse all 18

Include Inline

As implemented, the [[include]] tag allows to include a block of text as separate lines or paragraphs, but does not allow to include text “inline,” i. e. within a single line.

There have been quite some discussions if and how such an “inline include” could be done. Here is a workaround how to do it.

Step by Step

Step 1

Create your included page with

  1. a leading comment ([!----]) and
  2. a trailing backslash (\)

e. g.

 [!----]included //inline// and **may** contain formatting\ 

Step 2

Create your include statement with

  1. a trailing backslash (\) added to the text that goes before the inline include, and
  2. a leading comment ([!----]) before the text that goes after the inline include

e. g.

Text can be \
[[include inc]]
[!----] tags as you like

Examples

What you type … What you get …

Text can be \
[[include inc]]
[!----] tags as you like

Text can be included inline and may contain formatting tags as you like

How it Works

As an [[include]] introduces two consecutive line breaks both before and after the include, a way to remove those two line breaks is:

  1. remove the first line break by appending a trailing backslash (“\”) to the line preceding the two line breaks, and
  2. remove the second line break by prepending a leading Wikidot comment ([!----]) to the line following the two line breaks (similar to how a trailing “\” removes the following line break, a leading comment will remove the previous line break).

Backlinks

Author

Image may be NSFW.
Clik here to view.
ErichSteinboeck
ErichSteinboeck
. Please visit his/her userPage.

by Image may be NSFW.
Clik here to view.
ErichSteinboeck
ErichSteinboeck


Viewing all articles
Browse latest Browse all 18

Trending Articles