Loading...
 
Features / Usability

Features / Usability


What is the syntax for indentation?

posts: 125

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: 8314 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:

<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:

.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:

{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: 4593 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:

{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:

{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