# Declare non-stretching non-pairing delimiters

How do I define my own delimiters from arbitrary symbols for math which have these properties:

• They have a fixed size. Unlike the usual delimiters they do not stretch to adapt to the enclosed content.
• They do not have to be paired. A left delimiter need not be followed by a right delimiter. A right delimiter need not be preceded by a left delimiter.
• Each delimiter can be declared to belong to one of the three sides (left, middle, right).

Example 1: I want to use the $character as a math delimiter. I want to declare a left, a right, and a middle$ delimiter. I want to be able to use just any one, just any two, or all three variants of $delimiters. Example 2: What I want already exists for some characters. There are the \lvertand \rvert delimiters. I would like to declare delimiting characters of this type for arbitrary characters. So, for my example 1 I would create the new commands \ldollar, \mdollar, and \rdollar which would produce a left, a middle, and a right$ sign delimiter, respectively.


\begin{document}
$\log\ldollar a+b\rvert-\{a\mdollar b\}$
\end{document}


• I'd have guessed \mathbin ? – David Carlisle Feb 5 '15 at 17:21
• @DavidCarlisle Why \mathbin? A “middle delimiter” is surely a relation symbol like \mid. – egreg Feb 5 '15 at 17:23
• I don't know what a\$b means but if I had to guess, I'd guess it was semantically closer to a+b than a=b` but who knows:-) – David Carlisle Feb 5 '15 at 17:25