how do I put a square bracket on a page
Asked by Theresa Adams:

I **thought** I could put square brackets on my confluence page by escaping the bracket...like \\\[ 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


Answers:
author: Milo Test
body: 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\].

comments: author: John Woods
body: 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.


author: Dale Worley
body: This seems to work on my Mac:

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


author: Kyle Simmons
body: 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.


author: Bill Finn
body: [@Kyle](/t5/user/viewprofilepage/user-id/527717), 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 \\\]


author: Oliver Schoenborn
body: combination of ESC and backslash worked for me. Also this works:

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


author: TerraTech11
body: 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\*).

comments: author: Kyle Simmons
body: 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.


author: Kyle Simmons
body: 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.


author: Trey Fore
body: The incantation that seems to work from my Mac today:

\[ \<escape\> char char char \\ \]

comments: author: Michael Ross
body: Yes, this is working today also.


author: Oliver Schoenborn
body: This also works:

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

although the backslash method is simpler


author: Kimberly Tran
body: 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??

comments: author: Ron Fowler
body: 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.


author: Theresa Adams
body: OH MY Goodness. this is awesome! Thank you. And thanks for being so quick!

comments: author: Milo Test
body: My pleasure.