New [over]...[/over] bbCode, and short forms of several existing bbCodes

Post Reply
User avatar
Dave Keenan
Site Admin
Posts: 1071
Joined: Tue Sep 01, 2015 2:59 pm
Location: Brisbane, Queensland, Australia
Contact:

New [over]...[/over] bbCode, and short forms of several existing bbCodes

Post by Dave Keenan »

The new [over] bbCode is short for "overline" and places a line above the enclosed text. This is useful for making vinculums for math expressions. For example the following:

-b±√b2 -4ac
2a

can be produced by:

-b±√[over]b[sup]2[/sup] -4ac[/over]
[over]          2a          [/over]

But that's slow to type and difficult to edit, with the bbCodes overwhelming the actual text, so I've defined short forms for several bbCodes as follows:

[over]   = [o]
[strike] = [s]
[sup]    = [p] (suPer or Power)
[sub]    = [r]  (Radix)

So the above can also be produced by:

-b±√[o]b[p]2[/p] -4ac[/o]
[o]          2a          [/o]

I note that what happens to the overline above a superscript, like the 2 above, depends on your browser.

The ± and √ symbols were typed, using WinCompose, as ⎄+- and ⎄v/

The following page was very helpful in creating this [over] bbCode. It also talks about MathJax, which allows the use of TeX.
https://www.scientificpsychic.com/etc/square-root.html

If anyone can find a MathJax extension validated for phpBB version 3.3, please let me know.

[Edit: Changed [e] to [p] as per following posts.]

User avatar
cmloegcmluin
Site Admin
Posts: 770
Joined: Tue Feb 11, 2020 3:10 pm
Location: San Francisco, California, USA
Real Name: Douglas Blumeyer
Contact:

Re: New [over]...[/over] bbCode, and short forms of several existing bbCodes

Post by cmloegcmluin »

Super cool. I'm definitely interested. I myself a week or so ago suggested we try to find a MathJax plugin. I'll look for a viable one soon.

In the meantime, I'm concerned that somehow these recent features might have broken some core stuff.

Check out this post: viewtopic.php?p=1895#p1895
The Sagittal symbol smilies have been mangled.

And when I try to use the actual face smilies, they just get superscripted, without becoming images: : D

User avatar
volleo6144
Posts: 57
Joined: Mon May 18, 2020 7:03 am
Location: Earth
Contact:

Re: New [over]...[/over] bbCode, and short forms of several existing bbCodes

Post by volleo6144 »

On my end, the smilies aren't mangled per se, but just ... now they're superscripted forms of the ASCII smiley code; a peek into Firefox developer tools shows that's literally all they are: :/|\: instead of the actual smiley :/|\: / ↑.

Anyway, with the increasing use of [pre] tables, it might be ideal for the next update (after fixing [e]) to either create an actual table code or make the editing area appear in a monospace font (right now, I edit the table in nvim and gg"+99yy and paste it into the editing area).
A random guy who sometimes doodles about Sagittal and microtonal music in general in his free time.

User avatar
Dave Keenan
Site Admin
Posts: 1071
Joined: Tue Sep 01, 2015 2:59 pm
Location: Brisbane, Queensland, Australia
Contact:

Re: New [over]...[/over] bbCode, and short forms of several existing bbCodes

Post by Dave Keenan »

Thanks guys. I've deleted the custom [e] bbCode. It seems that a hidden [e] bbCode is used as an intermediate step in processing smilies. I'm guessing they used "e" for "emoji".

I've changed the short version of [sup] from [e] to [p], which you can take as either the first letter that differs between "suPerscript" and "suBscript", or the first letter of "Power", even though a power is really the combination of a base and an exponent.

I would have used [b] as the short version of [sub] but of course it's already in use (for bold), as are the first letters of "inferior", "index" and "base". Hence [r] for radix.

User avatar
cmloegcmluin
Site Admin
Posts: 770
Joined: Tue Feb 11, 2020 3:10 pm
Location: San Francisco, California, USA
Real Name: Douglas Blumeyer
Contact:

Re: New [over]...[/over] bbCode, and short forms of several existing bbCodes

Post by cmloegcmluin »

A hidden [e] bbCode, eh? Yeah, that makes sense. Thanks for diagnosing, Dr. bbKeenan.

[p] for suPerscript and [r] for radix work for me. Thanks for those as well.

Re: a MathJax extension, had you seen this? https://www.phpbb.com/community/viewtop ... p=15478686
Someone offers a MathJax extension, someone else points to previously existing one which looks to only work up through phpBB v3.2, then the first person explains how that one doesn't work on 3.3 and that this is why he made his own.

User avatar
Dave Keenan
Site Admin
Posts: 1071
Joined: Tue Sep 01, 2015 2:59 pm
Location: Brisbane, Queensland, Australia
Contact:

Re: New [over]...[/over] bbCode, and short forms of several existing bbCodes

Post by Dave Keenan »

Awesome! You can now obtain:

\(
\frac
{-b\pm\sqrt{b^2-4ac}}
{2a}
\)


using:

[latex]\frac{-b\pm\sqrt{b^2-4ac}}{2a}[/latex]

or:

[latex]
\frac
    {-b\pm\sqrt{b^2-4ac}}
    {2a}
[/latex]

Non-breaking spaces were used to indent the sub-expressions above.

The main topic about this is here: viewtopic.php?p=2024#p2024

User avatar
Dave Keenan
Site Admin
Posts: 1071
Joined: Tue Sep 01, 2015 2:59 pm
Location: Brisbane, Queensland, Australia
Contact:

Re: New [over]...[/over] bbCode, and short forms of several existing bbCodes

Post by Dave Keenan »

cmloegcmluin wrote:
Thu Jul 09, 2020 10:21 am
Re: a MathJax extension, had you seen this? https://www.phpbb.com/community/viewtop ... p=15478686
Someone offers a MathJax extension, someone else points to previously existing one which looks to only work up through phpBB v3.2, then the first person explains how that one doesn't work on 3.3 and that this is why he made his own.
I had seen it. [For other readers, the problem was that "his own" is no longer available.] But you caused me to reread it and to realise that the OP was only saying that (a) the older Marcovo MathJax extension didn't work with phpBB 3.3, and (b) the newer Kinerity MathJax extension didn't work with his existing LaTeX expressions in existing posts.

This left open the possibility that the Kinerity extension works fine for new posts in phpBB 3.3. And although the Kinerity extension (1.0) has (so far) only been validated for phpBB 3.2, that doesn't mean it won't work with 3.3. So I tried it, and so far so good.

User avatar
cmloegcmluin
Site Admin
Posts: 770
Joined: Tue Feb 11, 2020 3:10 pm
Location: San Francisco, California, USA
Real Name: Douglas Blumeyer
Contact:

Re: New [over]...[/over] bbCode, and short forms of several existing bbCodes

Post by cmloegcmluin »

I can always count on you to read carefully that which I read clumsily! We make a good team :hand::boom::hand:

User avatar
Dave Keenan
Site Admin
Posts: 1071
Joined: Tue Sep 01, 2015 2:59 pm
Location: Brisbane, Queensland, Australia
Contact:

Re: New [over]...[/over] bbCode, and short forms of several existing bbCodes

Post by Dave Keenan »

:hand::boom::hand:

Post Reply