Page 1 of 1

Monospace tag support

Posted: 12:41 Thu 20 Jun 2019
by PhilW
Until now we have not been able to simply cut/paste simple code/tables created for proportionate display without either spending ages wrapping them into some table format, or having to use the "code" tag. The latter has been the default method to cope when this issue is encountered, but this often fails to display much of what you may have wanted to be visible due to using a truncated window.

I have therefore added a new custom BBcode of "monospace", configured to address both issues. When wrapped with "monospace" tags, any text between the start and end tag will be (i) displayed in monotype font if the browser supports it, and (ii) adds tags to prevent the browser client from removing additional spaces causing mis-alignment. There is a "monospace" button now present in the text editor also, to support this.

Example:
A simple table with 6 lines and four columns, created in proportional spaced font.

A. Copy/pasted as text (a messy unclear layout/display):

A B C
01 John 1 2 23
02 Bill 3 16 2
03 Fred 12 9 13
04 Jane 18 1 7
05 William 5 7 4
06 Phil 17 12 5
07 Old Dave 17 12 5
08 Big John 17 12 5
09 Mike 17 12 5
10 Sarah 17 12 5
11 Lucy 17 12 5
12 Tony 17 12 5
13 Michel 17 12 5
14 Jo 17 12 5

B. Using "code" tag (current "workaround" method; clear, but truncated - if the bottom line included important totals, for example, these would not be immediately visible)

Code: Select all


               A   B   C
01 John        1   2  23
02 Bill        3  16   2
03 Fred       12   9  13
04 Jane       18   1   7
05 William     5   7   4
06 Phil       17  12   5
07 Old Dave   17  12   5
08 Big John   17  12   5
09 Mike       17  12   5
10 Sarah      17  12   5
11 Lucy       17  12   5
12 Tony       17  12   5
13 Michel     17  12   5
14 Jo         17  12   5

C. Using "monospace" tag (all data present, visible, with expected clear layout)

               A   B   C
01 John        1   2  23
02 Bill        3  16   2
03 Fred       12   9  13
04 Jane       18   1   7
05 William     5   7   4
06 Phil       17  12   5
07 Old Dave   17  12   5
08 Big John   17  12   5
09 Mike       17  12   5
10 Sarah      17  12   5
11 Lucy       17  12   5
12 Tony       17  12   5
13 Michel     17  12   5
14 Jo         17  12   5

Re: Monospace tag support

Posted: 15:30 Thu 20 Jun 2019
by Alex Bridgeman
PhilW wrote: 12:41 Thu 20 Jun 2019 C. Using "monospace" tag (all data present, visible, with expected clear layout)

               A   B   C
01 John        1   2  23
02 Bill        3  16   2
03 Fred       12   9  13
04 Jane       18   1   7
05 William     5   7   4
06 Phil       17  12   5
07 Old Dave   17  12   5
08 Big John   17  12   5
09 Mike       17  12   5
10 Sarah      17  12   5
11 Lucy       17  12   5
12 Tony       17  12   5
13 Michel     17  12   5
14 Jo         17  12   5
That is really helpful! Thank you. I had no idea about the "code" workaround so I am now doubly educated.

Re: Monospace tag support

Posted: 23:12 Thu 20 Jun 2019
by DRT
Splendid. Thank you.

Re: Monospace tag support

Posted: 00:11 Tue 25 Jun 2019
by Glenn E.
All forums should be required to have this feature. This is brilliant.

Re: Monospace tag support

Posted: 23:01 Sat 29 Jun 2019
by jdaw1
So tt is for inline monospace, and
monospace
is for multi-line monospace. Please confirm.

Re: Monospace tag support

Posted: 12:49 Mon 07 Sep 2020
by PhilW
jdaw1 wrote: 23:01 Sat 29 Jun 2019 So tt is for inline monospace, and
monospace
is for multi-line monospace. Please confirm.
Not quite. Either can be used inline or multiline. The main benefit of monospace is that it does NOT eat whitespace i.e. multiple sequential spaces will be reduced to a single space when submitting/storing/displaying the post (I do not know at which step the spaces are eaten) and this behaviour is unaffected by tt, but use of monospace retains all spaces, and hence desired alignment. Additionally monospace retains default colouring, whereas tt changes the background to white, and may add newlines also.

Hence, using the same lines when posting of
<space><space>4<space><space>8<space><space>Bill
<space>10<space>12<space>Mitch

in tt

4 8 Bill
10 12 Mitch


in monospace
  4  8 Bill
 10 12 Mitch

Re: Monospace tag support

Posted: 17:44 Mon 07 Sep 2020
by Doggett
Posts like this never fail to make me feel intellectually challenged! 😀