Loading...
 
Features / Usability

Features / Usability


What is the syntax for indentation?

posts: 126

I need to indent a line of text for disambiguation. For example, this is seen on Wikipedia like this;

https://pasteboard.co/HizM7Uv.jpg

I have looked at the docs but cannot find a way of actually indenting text. It seems to just make it bold. What is the syntax for indentation?

posts: 8633 Israel

Hello James,

If you look at the source of you sample (https://en.wikipedia.org/wiki/PlayStation_(console)) you’ll see that this is not a "Text processor" indent (like tab in Word), this is a css style applied to a div:

Copy to clipboard
<div role="note" class="hatnote navigation-not-searchable">For the Play Station, a cancelled game console prototype designed by Sony and Nintendo in the early 1990s, see <a href="/wiki/SNES-CD" class="mw-redirect" title="SNES-CD">SNES-CD</a>. For other uses, see <a href="/wiki/PlayStation_(disambiguation)" class="mw-disambig" title="PlayStation (disambiguation)">PlayStation (disambiguation)</a>.</div>


And the CSS:

Copy to clipboard
.hatnote { padding-left: 1.6em; margin-bottom: 0.5em;}


You can do exactly the same customising you CSS (in your themes or the Tiki CSS custom field).
Something like:

Copy to clipboard
{DIV(class="note")}This is my note{DIV} and the css .note { padding-left: 1.6em;}


If this is a kind of standard and you’ll use it a lot, I suggest you to "vampirize" a non used tag.
For exemple I don’t really use header like h6 or h5 on my Tikis so I can change the usage to tweak the style and have it more handy than to use the div plugin.



posts: 4656 Japan

Hi,

1) The docs describe an indent method that is really more of a hack - it relies on definition list construction and assumes that the definition will be indented. However, the Bootstrap CSS framework that Tiki is using now doesn't indent the definition, so the indent hack broke.

2) The wiki edit page popup help says:

Indentation

+, ++ Creates an indentation for each plus (useful in list to continue at the same level)


But this also seems to not work, in Tiki 18 at least, where I'm testing it, or maybe only works inside a list.

3) This next method isn't so simple but works. It uses the HTML plugin whose content is the HTML encoding for a non-breaking space:

This line is not indented.
  This line begins with one non-breaking space.
    This line begins with three non-breaking spaces.

which is produced by:

Copy to clipboard
{HTML()}&nbsp; {HTML}This line begins with one non-breaking space. {HTML()}&nbsp;&nbsp;&nbsp; {HTML}This line begins with three non-breaking spaces.

(In case the syntax gets parsed instead of displayed, it is "& n b s p ;" without the spaces.)

4) Or you can make a borderless, no-background box that has padding (so you get an indent) by using the Box plugin with these parameters:

Copy to clipboard
{BOX(bg="transparent" align="left" style="border-color: transparent")}This is the content of the box.{BOX}


A borderless, no-background box:

This is the content of the box.


-- Gary



Upcoming Events

1)  18 Apr 2024 14:00 GMT-0000
Tiki Roundtable Meeting
2)  16 May 2024 14:00 GMT-0000
Tiki Roundtable Meeting
3)  20 Jun 2024 14:00 GMT-0000
Tiki Roundtable Meeting
4)  18 Jul 2024 14:00 GMT-0000
Tiki Roundtable Meeting
5)  15 Aug 2024 14:00 GMT-0000
Tiki Roundtable Meeting
6)  19 Sep 2024 14:00 GMT-0000
Tiki Roundtable Meeting
7) 
Tiki birthday
8)  17 Oct 2024 14:00 GMT-0000
Tiki Roundtable Meeting
9)  21 Nov 2024 14:00 GMT-0000
Tiki Roundtable Meeting
10)  19 Dec 2024 14:00 GMT-0000
Tiki Roundtable Meeting