Take the 2-minute tour ×
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.

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
add comment

1 Answer

up vote 16 down vote accepted

Yes, there is:

\lbrack
\rbrack
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
add comment

Your Answer

 
discard

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.