Extra spaces within text

For formatting reasons, I would like to add extra spaces between words. Discourse normally removes these spaces, but sometimes it improves readability. I can use backticks, but that changes the font. I can use imagebut that vanishes the next time I edit the text.

Is there a way to add extra spaces between words and keep it persistent, without changing font?

word-spacing: 1em;

results in:

Don’t know why you would want it though :winking_face_with_tongue:

2 Likes

I am writing an after action report in a game. The report includes minerals present on a planet, with their accessibility. This is how it looks in Word (screenshot).

This is how it looks in Discourse.

Earth Survey Report

Duranium: 374,100 1.00

Neutronium: 121,600 0.60

Corbomite: 148,400 0.90

Tritanium: 183,700 0.70

Boronide: 146,400 0.90

Mercassium: 124,500 0.80

Vendarite: 125,600 0.70

Sorium: 166,700 0.80

Uridium: 105,200 0.70

Corundium: 275,000 0.70

Gallicite: 406,000 0.90

I can remove the extra lines, but it is more readable with spaces between the numbers.

Ah okay you meant in the composer specifically, so you can choose when and where to add them?

1 Like

What about a table?

Earth Survey Report

Material Value Modifier
Duranium 374,100 1.00
Neutronium 121,600 0.60
Corbomite 148,400 0.90
Tritanium 183,700 0.70
Boronide 146,400 0.90
Mercassium 124,500 0.80
Vendarite 125,600 0.70
Sorium 166,700 0.80
Uridium 105,200 0.70
Corundium 275,000 0.70
Gallicite 406,000 0.90
8 Likes

If you don’t use backticks for anything else, you could just overrule the CSS for them.

Might be the easiest way.

1 Like

You could also put a named wrap around your report and apply CSS to that:

I find this easiest in the Markdown composer:

[wrap=game-report]

Duranium: 374,100 1.00

Neutronium: 121,600 0.60

Corbomite: 148,400 0.90

...etc.

[/wrap]

Add your custom CSS:

[data-wrap="game-report"] {
    word-spacing: 1em;
}

Result:

2 Likes

Yes, I independently arrived at this solution before I came back here. Much better for what I need. Thanks.

I really need to start learning markup properly. My background is C++/C# etc.

And I just programmed the game to generate the survey data including the table markdown, as an option :slight_smile:

3 Likes

Thanks, this is also an interesting solution. I have no experience with CSS at all. Something else I need to learn :slight_smile:

Making custom CSS changes on your site is a nice primer & walkthrough.

1 Like

Thanks - that looks very interesting. I’ve bookmarked and I will spend some time on it.