TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a way to typeset a square bracket without using the symbols [ and ]?

What I am looking for is like \vert instead of |.

Motivation is a need for a workaround in using LaTeX formulas inside Moodle wiki pages. The latter use square brackets to start a new page (like [page-name]), and this functionality interferes with scripts processing LaTeX formulas (which otherwise are ok in Moodle HTML/wiki).

share|improve this question
up vote 39 down vote accepted

Yes, there is:

share|improve this answer
Thanks! However, this seems to require a special package, could you tell me which one it is? – Slaviks Feb 27 '12 at 13:45
@Slaviks: These commands are part of the LaTeX kernel. – Andrey Vihrov Feb 27 '12 at 14:07
They can be used out-of-the-box, even in text mode. – egreg Feb 27 '12 at 14:10
@AndreyVihrov: Sorry, my mistake (just misspelled the command). Now the problem is solved! – Slaviks Feb 27 '12 at 14:11
Thank you! I've been crazy when use the '[' as the first character of line. You've just saved me! :3 – xuansamdinh Jul 4 '15 at 11:35

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.