by Max Barry

Latest Forum Topics

Advertisement

86

DispatchFactbookMiscellaneous

by New fakeland. . 9,354 reads.

Formating code

List of various formatting codes for NationStates

Author's Note: Feel free to telegram me about anything here, from pointing out mistakes I've made, to requests for help with your own factbook.

How To Use Tags

Tags are special keywords enclosed in square brackets, that can create special text effects when text is placed between a pair of tags. The second tag in a pair, (or "closing tag") must always have a forward slash before its keyword.

For some keywords, the first tag of a pair (the opening tag) can have a variable, which consists of a equals sign after the keyword, followed by a number or special word.
e.g:
The keyword for bold text is "b", so [b ]example[/b ] becomes: example
The keyword for different coloured text is "color" and it requires the name of a colour as a variable, so [color=red ]example[/color ] becomes: example

Different tags have different rules, and may not work if these rules are not followed exactly.

There can also be problems if you try to put a tag inside a tag of the same type, e.g:
[ color=red]A[ color=blue]B[ /color]C[ /color] - appears as
A[color=blue]BC[/color] - although you would expect it to appear as
ABC

Tag List

Note: All of these tags work in factbooks, dispatches, etc. but only the ones coloured red work on RMBs (Regional Message Boards) as well.
You can usually preview your posts before you submit then, and underneath the text-input area, it will have a list of common tags. If the list is short, then only the red tags will work.

Code Example

Effect

Notes

[b]Bold[/b]

Bold

[i]Italic[/i]

Italic

[u]Underline[/u]

Underline

[strike]Strikethrough[/strike]

Strikethrough

[size=200]Size[/size]

Size

Values: Numbers from 50 to 1000. 50=smallest text, 100=normal size, 1000=largest text

[font=wingdings]Font[/font]

Font

Values: Various font names

[color=red]Color[/color]

Color

Values: web-safe colour names

[background=red]Background[/background]

Background

Values: web-safe colour names

[background-block=red]Background block[/background-block]

Background block

Values: web-safe colour names

[tab=20]Tab[/tab]

Tab

Values: Numbers from 1 upwards.

[align=right]Align[/align]

Align

Possible Values: left, right, center, justify

[float=right]Float right[/float]

Float right

Values: left, right.
Also works without "=", e.g. floatright

[center]Center[/center]

Center

[hr]


Horizontal line. This tag does not have a closing tag

[ pre ]Preformated[/ pre ]

Preformated

Any other tags within this tag will not be formatted.

[box]box[/box]

Each section of this factbook is in a box. Making a box inside a box can cause issues, so there is no example here.

Table

See end of this list for details

[*]

  • Bullet point. This tag does not have a closing tag. Combined with list for other effects

    [list=A][*]List
    
    List[*]List[/list]

    1. List

      List

    2. List

    Does not require a variable, or bullet points. Variable can change bullet display, e.g. A lists bullets by letter, 1 lists bullets by number.

    [spoiler=button-text]spoiler[/spoiler]

    spoiler

    Values: Whatever text you want to appear on the button. if no variable is used, the button will say "click to show"

    [img]http://www.nationstates.net/images/titlerift.png[/img ]

    [url=http://www.nationstates.net/images/titlerift.png]URL link text[/url ]

    URL link text

    Note: this works on RMBs, but only for links to NationStates pages.
    For links to NationStates pages, everything up to and including ".net/" can be obmitted.

    [anchor=anchorname1]Anchor[/anchor]

    Anchor

    Variables: a name for the anchor. A URL link to an anchor on the same page, will scroll to where the anchor is located.

    [url=#anchorname1]Anchor Link[/url]

    Anchor Link

    To create a URL link to an anchor, simply have the URL variable as the name of the anchor you want to jump to, preceded by a hash.

    [nation=new fakeland]

    New fakeland

    This tag does not have a closing tag. There is also an alternative tag for this, see below

    [nation=short+noflag]new fakeland[/nation]

    New fakeland

    This is similar to the above tag, except it does have a closing tag, and can have 2 variable, "short" and "noflag", which remove the pre-title, and remove the flag respectively

    \@new fakeland

    New fakeland

    A third and faster way of linking to a. Not actually a tag so has no variables. To prevent an "@" turning into a link, proceed it with a backslash (i.e. \@ nationname)

    [region=balder] -or-
    [region]balder[/region]

    balder

    As with the nation tag, the region tag has 2 versions, the different is that the second region tag has no variables


    Note: If you post a NationStates URL, it will automatically shorten it, and turn it into a link. e.g.
    - https:/ /www.nationstates.net/page=un
    becomes
    - page=un

    If you wish to prevent this add a "tab=0" tag within the URL near the beginning. e.g.
    - https:/[ tab=0][/tab]/www.nationstates.net/page=un
    becomes
    - https://www.nationstates.net/page=un


    Tables

    Because you can't place tables within tables, the code for tables is below.

    [table]
    [tr][td][/td][td][/td][td][/td][/tr]
    [tr][td]text[/td][td]text[/td][td]text[/td][/tr]
    [tr][td]text[/td][td]text[/td][td]text[/td][/tr]
    [/table]
    
    becomes

    text

    text

    text

    text

    text

    text

    Note: The first row will be grey, with white text (unless you use a different NS theme)
    Variables: Plain, which removes the lines, and grey-white colour of the first row.
    If you don't want a table to span the whole screen, put in inside Float tags



    There may be others tags. I don't know.

    Variables

    For colour-name variables, most commonly known colour names should work. The following links contain large list of other colour names that should work: LinkWeb colors (Wikipedia) | LinkX11 color names (Wikipedia)

    Font variables are a bit more tricky, as they depend on what you have installed on your computer (e.g. if you use a font that you have on your computer, and someone who doesn't have the same font views your factbook, it will revert to the default font for them). Here is a somewhat good list, of what fonts may work: LinkWeb safe fonts (cssfontstack)

    Also, there is a special NationStates font, which you can use to display some of the NationStates icons. See below for details.

    NationStates Symbols

    Ever wanted to use the NationStates menu symbols in your dispatches?
    No? Well, here's how to use them anyway.

    First, in your dispatch, create a font tag, with the font "nationstates". (see this post if you don't know how/what tags are).
    Next, copy the NationStates symbol from below, and paste it between the font tags.
    And that's it.
    Note: Most of theses symbols appear as either Chinese characters, or empty spaces, but they will appear as expected if you've done everything right. Also, they don't work on Regional Message Boards


    [] Region - - - [] Message Board
    [] World Assembly
    [] The World - - - [] Search
    [] Dispaches - - - []Factbooks
    [] Forum
    `
    [] Store [] Help [] News
    -------
    [] Notices - [] Issues - [] Telegrams - [] Dossier - [] Activity - [] Settings
    `
    [] Switch/Logout - [] Recycle
    -------
    [] Overview - [] Government - [] Economy - [] Rank - [] Trend

    You can also put the characters in links, change size, colour, and do all the stuff you can do with normal letters, e.g.



    Special Z-Day symbols
    [] Cure research - [] Zombies - [] Anti-zombie squad
    [☣] is also used on Z-day, but is a Unicode symbol, so can be used with any font



    Symbols from the 1/4/2017 nuclear war event
    Nukes: [] Stockpile - [] Outgoing - [] Incoming
    Other: [] Shields - [] Target - [] Targeted - [] Mushroom cloud - [] Radiation

    Unicode Symbols ★☺☘☠

    Unicode symbols aren't NationStates specific symbols, they're actually in normal fonts, and can be used as such.
    There are ways to type out the symbols, but it's much easier to just copy+paste them from a list, such as Linkthis one (Wikipedia)

    👂👁 👁
    👃Note: the nose was moved along with the "tab" tag, as spaces wont work.
    -

    You can also use these in some of your nation "custom name" options (e.g. national classification, national animal, currency).
    Usually it wont let you change a "custom name" if it is too short, so use hair-width spaces to make up the character count.
    e.g.
    ]⛨[ - (without the square brackets) will get a "too short" error message, as it's only a single character.
    ] ⛨ [ - (without the square brackets) will work. Notice it has very small spaces to either side.

    Note: While most of theses will work for most people, some may not work on really old computers.

    Code Used For This Factbook

    Content Menu

    [float=left][box][size=150][background-block=gold]Content:[/background-block][u]
    [tab=20][/tab][url=#anchorNameA]Section A Title[/url]
    [tab=20][/tab][url=#anchorNameB]Section B Title[/url]
    [/u][/size][/box][/float]
    ] [
    ] [
    ] [
    ] [
    ] [
    

    Notes: Because floated boxes will overlap other boxes, I have followed this by several lines of single hair-width spaces (enclosed with square brackets for better visibility in this example)

    Main Content Sections

    [box][anchor=anchorNameA][background-block=gold][color=blue][size=200][u][tab=20][/tab]Section A Title[/u][/size][/color][/background-block][/anchor]
    
     - Content text goes here -
    
    [/box]
    

    The content menu item with the URL of "#anchorNameA" will scroll the page to the anchor named "anchorNameA" when clicked on.

    Pre, hair spaces, and tab=0
    To display many of the tags on this page, I have used the [pre ] tag, which, if used in a sentence creates a new line. For example "This is [pre ]only one[/pre ] line" becomes: "This is

    only one
    line"
    To get around this issue, I have use the special ascii character of hair-width space (a space that is so narrow you barely notice it), so what looks like [pre ] is actually [pre ], which causes the tag to not work. For comparison;
    ][ - no space
    ] [ - hair width space
    ] [ - normal width space

    Hair spaces can also be use to stop NationStates URLs automatically turning into links, but this has the problem of splitting the URL in half if it goes onto a new line, and copy+pasting the URL will not work (as it still has the hair-space in it). To get around this, a 0-tab space is used: [tab=0][/tab] (placed between the http: and the //)

    New fakeland

    RawReport