86
Dispatch → Factbook → Miscellaneous
Formating code
List of various formatting codes for NationStatesAuthor'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.
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
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 |
| Bold | |
| Italic | |
| 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. |
[center]Center[/center] |
Center | |
[hr] |
| Horizontal line. This tag does not have a closing tag |
|
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 |
|
| 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 | 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 ] | Note: this works on RMBs, but only for links to NationStates pages. | |
[anchor=anchorname1]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] | 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. | |
| This tag does not have a closing tag. There is also an alternative tag for this, see below | |
| 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 | |
| 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) | |
| 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.
For colour-name variables, most commonly known colour names should work. The following links contain large list of other colour names that should work:
Web colors (Wikipedia) |
X11 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:
Web 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.
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 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
this 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.
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 oneline"
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 //)









