Welcome to our community

Be a part of something great, join today!

[SOLVED] Text justification in forums

Bacterius

Well-known member
MHB Math Helper
Jan 26, 2012
644
Hello,
would it be possible to add text justification in addition to the left-aligned, right-aligned and centered options already available? It's not super important but it goes a long way in making large posts cleaner and more readable, and helps with formatting (in my opinion).

Or if you disagree, of course.

:)
 

Klaas van Aarsen

MHB Seeker
Staff member
Mar 5, 2012
8,878
What extra types of text justification are you thinking of?


For myself I don't like it that an equation is centered by default.
It makes the relative positions of text and formulas jump up and down unpredictably.
So until now, I've only been using inline equations that I indent manually.

I would like it if the default of an equation could be changed to 1 indent...


Speaking for myself again, I never used either centered or right-aligned.
I only use left-align and indents.
 

Bacterius

Well-known member
MHB Math Helper
Jan 26, 2012
644
I did not mean the equations but the text itself. Consider the following image:



What we have on the forum currently is the format of two texts on the right. What I suggest is an option to enable the formatting of the text on the left, neatly aligned on both sides in an aesthetically pleasing way (like newspapers and academic papers do).

I've never used center and right-align either, but left-align just looks jarring to me. I might be a little bit obsessive-compulsive, though :)

For equations, you can achieve the same effect as double dollar signs by using inline equations with \displaystyle, I think. I tend to use ~ (tilde) for indentation out of habit and convenience. I personally prefer centered equations but I agree it looks a bit odd when you have "therefore" below a centered equation, completely off to the left.
 

Klaas van Aarsen

MHB Seeker
Staff member
Mar 5, 2012
8,878
I've never used center and right-align either, but left-align just looks jarring to me.
Hmm, I feel that full-justification would be more jarring, not less.
I agree that in a newspaper it looks aesthetically pleasing, but on a computer screen with limited pixels it looks jarring to me if the letters are not equally spaced.
Furthermore, the comments on this forum usually do not contain large sections of text (I would hope not!)
To be honest, if I see a post with a lot of text, I usually don't read it at all, but skip right through to another thread where people are not writing long stories.
 

Jameson

Administrator
Staff member
Jan 26, 2012
4,052
Interesting idea. If it were possible to allow each user to choose this as an option then I wouldn't be against it, so I will do some research. When you have long paragraphs I think this looks really good, as ILikeSerena said, but what about if the sentence stops well before the end of the line? Then a bunch of space must be added to make the alignments work. Take the above post and try to imagine it justified.

Anyway, I shall return with more information!
 

Bacterius

Well-known member
MHB Math Helper
Jan 26, 2012
644
Interesting idea. If it were possible to allow each user to choose this as an option then I wouldn't be against it, so I will do some research. When you have long paragraphs I think this looks really good, as ILikeSerena said, but what about if the sentence stops well before the end of the line? Then a bunch of space must be added to make the alignments work. Take the above post and try to imagine it justified.

Anyway, I shall return with more information!
The justification is not forced - if there aren't enough words to complete a full line, the last line will end up unstretched (only the previous lines will be justified). See the last line of the first paragraph in the left text in the picture. So for single lines, it's effectively equivalent to what is already on the site.

Thanks for looking into it Jameson!
 

Jameson

Administrator
Staff member
Jan 26, 2012
4,052
The justification is not forced - if there aren't enough words to complete a full line, the last line will end up unstretched (only the previous lines will be justified). See the last line of the first paragraph in the left text in the picture. So for single lines, it's effectively equivalent to what is already on the site.

Thanks for looking into it Jameson!
Hmm, perhaps I'm assuming it will work differently than it truly will. Here's my reasoning. This is what ILikeSerena wrote without any formatting edits:

Hmm, I feel that full-justification would be more jarring, not less.
I agree that in a newspaper it looks aesthetically pleasing, but on a computer screen with limited pixels it looks jarring to me if the letters are not equally spaced.
Furthermore, the comments on this forum usually do not contain large sections of text (I would hope not!)
To be honest, if I see a post with a lot of text, I usually don't read it at all, but skip right through to another thread where people are not writing long stories.
In my mind this would all be considered one paragraph so lines 1,3 and 4 would be stretched until the end but the last line wouldn't, as you said. If that is the case then this would look quite strange. Now if it had been formatted like this:

Hmm, I feel that full-justification would be more jarring, not less. I agree that in a newspaper it looks aesthetically pleasing, but on a computer screen with limited pixels it looks jarring to me if the letters are not equally spaced. Furthermore, the comments on this forum usually do not contain large sections of text (I would hope not!) To be honest, if I see a post with a lot of text, I usually don't read it at all, but skip right through to another thread where people are not writing long stories.
then I think everything would be peachy keen, however I have some doubts about the first case. It might put a burden on our users to change their writing styles.

Am I interpreting this correctly, Bacterius?
 

Bacterius

Well-known member
MHB Math Helper
Jan 26, 2012
644
Technically, ILikeSerena has put newlines, so each line would be considered a paragraph in itself, which means there would be little difference and the post would come out exactly the same it is now. But if his reply was all in one paragraph, yes, it would work correctly.

But I'm not suggesting this becomes mandatory or anything, of course - it would ideally just be an additional button in the forum's text editor (next to the three already existing align left, center and align right buttons) to apply to long sections of text to make it more readable.
 

Jameson

Administrator
Staff member
Jan 26, 2012
4,052
Just as an update, I've asked about changing text justification over at vb.org so hopefully we'll find out about this soon. I'm willing to try out the center justification and see what the response is.
 

Jameson

Administrator
Staff member
Jan 26, 2012
4,052
Just as an update, I've asked about changing text justification over at vb.org so hopefully we'll find out about this soon. I'm willing to try out the center justification and see what the response is.
Ok, good news. This will be easy to implement. The only delay is that I need to figure out how to rearrange the toolbar icons and figure out how to allow larger icons. Right now I can only add new buttons to the last row so I'm going to wait. Once I find out these things, I'll add a button for text justification formatting, Latex and probably some other custom buttons.
 

MarkFL

Administrator
Staff member
Feb 24, 2012
13,775
Ok, good news. This will be easy to implement. The only delay is that I need to figure out how to rearrange the toolbar icons and figure out how to allow larger icons. Right now I can only add new buttons to the last row so I'm going to wait. Once I find out these things, I'll add a button for text justification formatting, Latex and probably some other custom buttons.
Thanking this post simply isn't enough.

What a privilege it is to be a part of a forum whose administrators are always improving the forums, taking the suggestions made by its membership seriously and acting on them in such a prompt manner.

I can't say this enough...this is such a rare thing from what I have seen in all of the forums I have participated in the last eleven years, and I appreciate it immensely. It makes a great difference. (Yes)
 

Jameson

Administrator
Staff member
Jan 26, 2012
4,052
Hey Bacterius,

I haven't forgotten about you ;)

We're making even more progress on this, almost fully in part to a coder who has volunteered to help us out. I won't say his name unless he feels comfortable with it but we're going to be able to do a lot of things I didn't think possible now. :)

Anyway, we now have the ability to rearrange buttons and add new ones anywhere we want, but there are some CSS things to work out. Here's a screenshot of a working justify BB code button like you requested. I hope we'll be able to use it here soon. As you can see, the button image doesn't line up nicely with the others yet but that's just a cosmetic problem.