# Blank space in posts



## Elan (Oct 1, 2015)

I know this has been addressed before, but is there a way to force a post to adhere to white space?  Posting 'cut & paste' type charts is a chore when the blank space between fields gets compressed.  

  Thanks!


----------



## Makai Guy (Oct 1, 2015)

Web pages are written in a markup language called html.  Consecutive spaces are ignored when html is interpreted.  Try placing [pre] and [/pre] tags around your text to label it as pre-formatted text.

[Edited by mg to display correctly under current XenForo bulletin board software.]


----------



## Elan (Oct 2, 2015)

Makai Guy said:


> Web pages are written in a markup language called html.  Consecutive spaces are ignored when html is interpreted.  Try placing [pre] and [/pre] tags around your text to label it as pre-formatted text.



Great.  Thanks!


----------



## Elan (Jan 10, 2018)

Is this formatting aid ([pre]) still valid?  Not working on a table I'm trying to post.


----------



## Makai Guy (Jan 10, 2018)

Elan said:


> Is this formatting aid ([pre]) still valid?  Not working on a table I'm trying to post.


That code was for the old vBulletin software we abandoned in November 2017.  In our current XenForo bbs, there is no stock XF equivalent to [pre].  (You can get to a list of XF's bbcodes via the small "Help" link at the bottom of the page.)

I have now created a custom [pre] bbcode replacement for use here on TUGBBS.

The syntax is [pre]Text you wish to preformat[/pre], which will display the text in monospaced type, as you have formatted it, thus:

Text you wish to preformat
This not only displays in a monospaced font, but it prevents the concatenation of multiple spaces into single spaces as is done by normal HTML.

With this in place I've substantially revised the balance of this post.

If I enter this tabular data:


 

It will actually display as:


Col 1    Col 2    Col3
a          b          c

Note that the column spacing is still off.  That is because we're normally entering the text in the message composition dialog using variable spaced text where the spaces are thinner than most other characters, so you have to enter more of them to get your columns to line up the way you'd like.  With the [pre] monospaced display where all characters are the same width those extra full-sized spaces shove things too far to the right.  In the example above I needed 10 spaces between a and b, but when monospaced, only 8 are needed.

*The easiest way to fix this for tabular data is to compose locally in a text editor using monospace type, then copy/paste it into the bbs composition window and surround the whole thing with [pre] and [/pre] tags.*

But if you want to type tabular data into the bbs text editor directly, it much easier if you can view it in monospace type as you're doing it.  Highlight your table text and use the 

 font button in the editing toolbar to change the text to Courier New.  Now you can visually adjust the spacing the way you prefer.



 

It displays as:

Col 1    Col 2    Col3
a        b        c


----------

