How to I superscript?

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

How to I superscript?

Post by iKerry »

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: 72343
Joined: Fri Jun 04, 2004 10:44 am
Location: Oxford, UK
Contact:

Re: How to I superscript?

Post by KevC »

-:|:- Support Request Template -:|:-
Image
"Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb"
User avatar
david63
Registered User
Posts: 20646
Joined: Thu Dec 19, 2002 8:08 am

Re: How to I superscript?

Post by david63 »

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!

I now no longer support any of my extensions but they will start to become available here
iKerry
Registered User
Posts: 10
Joined: Wed Mar 22, 2017 12:00 am

Re: How to I superscript?

Post by iKerry »

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
Dear Gabby—alternate replies to advice columnist's replies
User avatar
AlfredoRamos
Recognised Extension Developer
Posts: 1302
Joined: Wed Dec 25, 2013 9:06 pm
Location: /dev/null
Name: Alfredo
Contact:

Re: How to I superscript?

Post by AlfredoRamos »

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>
Some of my phpBB extensions:
:chart_with_upwards_trend: SEO Metadata | Image Markdown | :shield: hCaptcha
:trophy: Check out all my validated extensions :trophy:

:penguin: Arch Linux user | Linux Boards :penguin:
iKerry
Registered User
Posts: 10
Joined: Wed Mar 22, 2017 12:00 am

Re: How to I superscript?

Post by iKerry »

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 2407 times
sup script tests.PNG
sup script tests.PNG (5.65 KiB) Viewed 2407 times
Dear Gabby—alternate replies to advice columnist's replies
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

Re: How to I superscript?

Post by 3Di »

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.
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
iKerry
Registered User
Posts: 10
Joined: Wed Mar 22, 2017 12:00 am

Re: How to I superscript?

Post by iKerry »

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]
Dear Gabby—alternate replies to advice columnist's replies
User avatar
KevC
Support Team Member
Support Team Member
Posts: 72343
Joined: Fri Jun 04, 2004 10:44 am
Location: Oxford, UK
Contact:

Re: How to I superscript?

Post by KevC »

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 2358 times
-:|:- Support Request Template -:|:-
Image
"Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb"
iKerry
Registered User
Posts: 10
Joined: Wed Mar 22, 2017 12:00 am

Re: How to I superscript?

Post by iKerry »

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
Dear Gabby—alternate replies to advice columnist's replies
User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 52768
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: How to I superscript?

Post by stevemaury »

Show us the HTML usage box.
I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)
iKerry
Registered User
Posts: 10
Joined: Wed Mar 22, 2017 12:00 am

Re: How to I superscript?

Post by iKerry »

HooYah! Success with the HTML suggestion.

Much appreciation to everyone.
Thanks, Kerry
Dear Gabby—alternate replies to advice columnist's replies
iKerry
Registered User
Posts: 10
Joined: Wed Mar 22, 2017 12:00 am

Re: How to I superscript?

Post by iKerry »

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
Dear Gabby—alternate replies to advice columnist's replies
Post Reply

Return to “Custom BBCode Development and Requests”