How to I superscript?

Get help developing custom BBCodes or request one.
Post Reply
iKerry
Registered User
Posts: 7
Joined: Wed Mar 22, 2017 12:00 am

How to I superscript?

Post by iKerry » Fri Apr 06, 2018 11:26 am

I'm trying to add footnotes by super scripting.

Got tip?

Thanks, Kerry
phpBB 3.1.4

User avatar
KevC
Support Team Member
Support Team Member
Posts: 68023
Joined: Fri Jun 04, 2004 10:44 am
Location: Oxford, UK
Contact:

Re: How to I superscript?

Post by KevC » Fri Apr 06, 2018 11:32 am

-:|:- Support Request Template -:|:-
Image
Cheap UK Hosting
"In the land of the blind the little green bloke with no pupils is king - init!"

User avatar
david63
Jr. Extension Validator
Posts: 14342
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: How to I superscript?

Post by david63 » Fri Apr 06, 2018 11:35 am

Or you can use vertical-align: super; in your .css file
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored

iKerry
Registered User
Posts: 7
Joined: Wed Mar 22, 2017 12:00 am

Re: How to I superscript?

Post by iKerry » Sat Apr 07, 2018 9:37 pm

Thanks KevC: I tried both and when displayed I get, <sup>{1}</sup> or [sup]1[/sup]

David63, Can you post an example of where to place "vertical-align: super;" in my .css file?

Thanks, Kerry

User avatar
AbaddonOrmuz
Registered User
Posts: 300
Joined: Wed Dec 25, 2013 9:06 pm
Location: /dev/null
Name: Alfredo Ramos
Contact:

Re: How to I superscript?

Post by AbaddonOrmuz » Sat Apr 07, 2018 11:29 pm

I'm using a more generic approach:

BBCode template:

Code: Select all

[valign={CHOICE=baseline,sub,super,top,text-top,middle,bottom,text-bottom;defaultValue=baseline}]{TEXT}[/valign]
HTML replacement:

Code: Select all

<span style="vertical-align: {CHOICE}">{TEXT}</span>
To use it:

Code: Select all

[valign=super]1[/valign]
If you only need exactly [sup], then you can try the following:

BBCode template:

Code: Select all

[sup]{TEXT}[/sup]
HTML replacement:

Code: Select all

<span style="vertical-align: super">{TEXT}</span>
A proudly user of Arch Linux :: /r/sddm_themes

iKerry
Registered User
Posts: 7
Joined: Wed Mar 22, 2017 12:00 am

Re: How to I superscript?

Post by iKerry » Sun Apr 08, 2018 12:22 am

Here's what all four scripts look like. I must be doing something wrong. Could it be my aero style template?
Attachments
sup script tests.PNG
sup script tests.PNG (5.65 KiB) Viewed 450 times
sup script tests.PNG
sup script tests.PNG (5.65 KiB) Viewed 450 times

User avatar
3Di
Registered User
Posts: 12557
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: How to I superscript?

Post by 3Di » Sun Apr 08, 2018 12:39 am

I am using these viewtopic.php?p=14975026#p14975026 with 3.1.12 and they work just fine.

You do not need to modify any CSS, use the native BBcodes facility in ACP.
Want to compensate me for my interest? Donate
Please PM me only to request paid works. Thx.
Extensions, Scripts, MOD porting, Update/Upgrades
My development's activity º PhpStorm's proud user

iKerry
Registered User
Posts: 7
Joined: Wed Mar 22, 2017 12:00 am

Re: How to I superscript?

Post by iKerry » Sun Apr 08, 2018 10:00 am

Thanks 3Di

Here's what I've tried so far.
Test 1: <sup>{1}</sup>
Test 2: [sup]1[/sup]
Test 3: <span style="vertical-align: super">[1]</span>
Variation of Test 3: <span style="vertical-align: super">1</span>
Test 4: [valign={CHOICE=baseline,sub,super,top,text-top,middle,bottom,text-bottom;defaultValue=baseline}]{1}[/valign]
Test 5: <span style="font-size: 75%;line-height: 0;position: relative;vertical-align: baseline;top: -0.5em;">{1}</span>
Variation of Test 5: <span style="font-size: 75%;line-height: 0;position: relative;vertical-align: baseline;top: -0.5em;">{{1}}</span>

In ACP > Posting > BBCodes > TAG > [sup]{text}[/sup] and [super]{TEXT}[/super]

User avatar
KevC
Support Team Member
Support Team Member
Posts: 68023
Joined: Fri Jun 04, 2004 10:44 am
Location: Oxford, UK
Contact:

Re: How to I superscript?

Post by KevC » Sun Apr 08, 2018 10:47 am

That BBcode is working fine on my 3.2.2 test board.

Can you post a screenshot of where you've created the BBcode and the post where you're using it.

I have this
Attachments
Screen Shot 2018-04-08 at 11.45.51.png
Screen Shot 2018-04-08 at 11.46.18.png
Screen Shot 2018-04-08 at 11.46.18.png (38.63 KiB) Viewed 401 times
-:|:- Support Request Template -:|:-
Image
Cheap UK Hosting
"In the land of the blind the little green bloke with no pupils is king - init!"

iKerry
Registered User
Posts: 7
Joined: Wed Mar 22, 2017 12:00 am

Re: How to I superscript?

Post by iKerry » Sun Apr 08, 2018 9:06 pm

Hi KevC,

Here's screenshots: In phpBB Edit I changed "text" to 1.
Test 1: <sup>{1}</sup>
Test 2: [sup]1[/sup]
Test 3: <span style="vertical-align: super">[1]</span>
Variation of Test 3: <span style="vertical-align: super">1</span>
Test 4: [valign={CHOICE=baseline,sub,super,top,text-top,middle,bottom,text-bottom;defaultValue=baseline}]{1}[/valign]
Test 5: <span style="font-size: 75%;line-height: 0;position: relative;vertical-align: baseline;top: -0.5em;">{1}</span>
Variation of Test 5: <span style="font-size: 75%;line-height: 0;position: relative;vertical-align: baseline;top: -0.5em;">{{1}}</span>

Here's the page with the five scripts I've tried: http://www.comcom121.org/phpBB/viewtopic.php?f=5&t=718
Attachments
BBCodes-TAGs.PNG
BBCodes-TAG-sup.PNG
BBCodes-TAG-super.PNG

User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 49185
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: How to I superscript?

Post by stevemaury » Sun Apr 08, 2018 9:10 pm

Show us the HTML usage box.
For REALLY good and VERY inexpensive hosting CLICK HERE

I can stop all your spam. PM or email me.

All unsolicited PMs will be ignored.

iKerry
Registered User
Posts: 7
Joined: Wed Mar 22, 2017 12:00 am

Re: How to I superscript?

Post by iKerry » Mon Apr 09, 2018 2:27 am

HooYah! Success with the HTML suggestion.

Much appreciation to everyone.
Thanks, Kerry

iKerry
Registered User
Posts: 7
Joined: Wed Mar 22, 2017 12:00 am

Re: How to I superscript?

Post by iKerry » Mon Apr 09, 2018 3:01 am

Is there any way to have all the line spacings be the same when using super scripted footnotes?

Here's an exaggeration of what it looks like.

Line 1 looks like this.

Line 2 looks like this with a superscripted1
Line 3 looks like this with normal line spacing.


The space between lines 1 and 2 is not as much as my "exaggeration" example but aesthetically I'd prefer even spacing.
Thank, Kerry

Post Reply

Return to “Custom BBCode Development and Requests”

Who is online

Users browsing this forum: No registered users and 4 guests