how do I put a square bracket on a page

thought I could put square brackets on my confluence page by escaping the \[ but, that just shows a \[ on the page.  and if i do [] two in a row, I get a task.  I thought I could do two in a row and then back arrow to get  between them - no.  Is my only option to go into the source and edit?


thanks in advance


5 answers

1 accepted

2 votes
Answer accepted

Just type your two brackets then cmd/ctrl+Z and it will convert to plain ol' brackets. Also works if you want some text in [brackets].

This does not work for me on Mac OS X and the newest version of Confluence. Cmd+Z merely deletes everything I've just typed, doesn't undo the WYSIWYG.

This seems to work on my Mac:

[ <escape> letter letter letter ... ] command-z


That still seems pretty hackish.  That's not really a feature, you're simply breaking the buffer stream that the WYSIWYG logic is using.  Atlassian ought to create a controlled escape mechanism, just to avoid the inevitable change in interpretation by the enduser OS/Browser.

@Kyle, Agreed, as Dale's solution does not work for me either.  Even using <esc>, which was my first guess to get [text text], command-z still deletes everything I typed.


What did work was opening TextEdit, typing what i needed there, then copying/pasting it back to Confluence.  :/


Also works is the suggestion below:

[<esc> text text \]

Like 1 person likes this

combination of ESC and backslash worked for me. Also this works: 

[<esc> text text]<ctr-z><ctrl-z>

OH MY Goodness.  this is awesome!  Thank you.  And thanks for being so quick!

The incantation that seems to work from my Mac today:

[ <escape> char char char \ ]

Yes, this is working today also.

This also works: 

[<esc> text text]<ctr-z><ctrl-z>

although the backslash method is simpler

I'm beginning to really regret our purchase of Confluence because of silly stuff like this.  Mostly because I have to try and explain away brain damaged usage behavior.

It should be:  \[text\]

No more - no less, instead of having to rely on what seems to be an undocumented magical incantation. 

Also, while moving over from an older MoinMoin wiki, there doesn't seem to be a way to script the regexes to easily handle this - leaving it to be a manual task.

Atlassian developers, I beg that you stop focusing on new-new-new, and fix the silly broken stuff like this that would make existing users happy.  To leave this broken really does bring to light that things like this just aren't a priority.  Another thing, is please bring Jira Software up to speed with Confluence markup capabilities, such as macros (*cough*inline code blocks*cough*).

For the scripting issue, you could use Bob Swift.  I've actually used that with pretty good effect to create a set of pages that represent directory structures.  We took all the archive files from previous workers in our group and reorganized them all so that each project had a matching org pattern.  (Previously, the organization of the files was pretty much reinvented for each project, so there was no consistency.) But before we resorted all the old files, I used scripts to map the DIR output to pages in Confluence.  That way if anyone wanted to know where a file used to be, what it's original size and Last Modified date, etc, they could search for it in that section of Confluence and it would come up.  Took about an hour to set up the script, and the script ran for 45 seconds to generate all the pages.  Turns out to be about 300 pages, each representing a folder in the old heirarchy, and each page contains the DIR output of that directory setup as links to either subdirectories or the new file location Perforce.

But I still wish there was a way to put a square bracket on a page without having to worry it might turn into something else when someone comes along and edits the page.

0 votes

Ditto. Why is Atlassian silent on this issue, both here and in the documentation. Is it the official stance that square brackets are not needed in human generated prose??

Also I don't think any of the above hacks will help when trying to import a word document with references like [1]. The result is an impressive mess.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Tuesday in Confluence

Confluence Admin Certification now $150 for Community Members

More and more people are building their careers with Atlassian, and we want you to be at the front of this wave! Important Dates Start the Certification Prep Course by 2 April 2019 Take your e...

183 views 2 10
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you