In JIRA wiki markup, how do I write O(n)?

Borek Bernard January 30, 2012

We are discussing algoritmic complexity in one of our JIRA issues and I want to write something like this:

O(n<sup>2</sup>) or O(n)

However, JIRA superscript tags don't work for me (there is O(n^2^) in the output) and when I write O(n), it converts it to some stupid emoticon.

How do I write those things in JIRA wiki markup? Can I insert inline HTML? Can I disable smilies?

3 answers

1 accepted

0 votes
Answer accepted
tier-0 grump
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 30, 2012

You just nees a space in front of the ^ - so this will work O(n ^2^)

Borek Bernard January 30, 2012

That creates O(n <sup>2</sup>), not O(n<sup>2</sup>). Does it always work like that, that wiki formatting characters must be prepended by a space? Are the exact rules described somewhere?

tier-0 grump
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 30, 2012

Just saw the second part.simply escape the brackets O\(n\)

tier-0 grump
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 31, 2012

This is probably the best resource - although it doesn't say anything about spaces - https://jira.atlassian.com/secure/WikiRendererHelpAction.jspa?section=all

Borek Bernard January 31, 2012

I've seen that but that is really very imprecise (it is a quick user guide rather than full documentation on all the rules). I'd be much happier if the markup was Markdown but I can that can't be intergrated with JIRA, can it?

Lorenzo Solano Martinez June 2, 2013

See my answer, it solves the space problem (between 'n' and '2').

Deleted user September 14, 2018

Like Björn Shad said below, enforce markup recognition by putting the markup in braces  : n{^}2^

The opposite is \^ .

Like # people like this
2 votes
Björn Schad
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 19, 2016

Obviously you need to have something not being a letter in front of the caret (superscript) or tilde (subscript) ... and many HTML entities exist. I would suggest &zwj; or the zero-wdith non-breakable space &#xfeff; (which does not have a nice entity reference).

Update: You can enforce markup recognition by putting caret or tilde into curly braces: n{^}2^.

1 vote
Lorenzo Solano Martinez June 2, 2013

Hi Borek,

Here you have: O(n&#08;^2^), renders as O(n<sup>2</sup>); the trick is to add the backspace HTML secuence in between the 'n' and the first caret.

To have n to the power of 2 you will need to write n^2^, now this doesn't work because the first caret is just after the 'n' and it needs to be after a space (or some other entities, unspecifed in JIRA's documentation). If you add a space between the 'n' and the first caret it works, but it is rendered as is, with the unwanted space in-between.

I did try several HTML codes but just the backspace ('&#08;') works. Don't ask my why becuase I don't fully understand the behaivor of the renderer, my guess is that this combination is a valid one to activate the superscript secuence.

Later, I did try with other html codes and found that the Delete char (#127), works in the same way that the backspace does (#08). Here you have 2 samples of writing the quadratic function. I found the same problem to put the 'X' bold, and solve it in the same way of the superscript.

A) Using backspace #08:

a&#08;*X*&#08;^2^ &plusmn; b&#127;*X* &plusmn; c = 0, a &#8800; 0

It's rendered as: aX<sup>2</sup> ± bX ± c = 0, a ≠ 0


B) Using delete #127:

a&#127;*X*&#127;^2^ &plusmn; b&#127;*X* &plusmn; c = 0, a &#8800; 0

It's rendered as: aX<sup>2</sup> ± bX ± c = 0, a ≠ 0

Lorenzo,

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events