#Why is `\middle\mid` not working?

1 messages · Page 1 of 1 (latest)

limber laurel
#

Consider the following example. $$\left{\bigcup\middle\mid\bigcup\right}$$ Notice the error.

timid ledgeBOT
#

xpple

Consider the following example. $$\left\{\bigcup\middle\mid\bigcup\right\}$$ Notice the error.
```Compilation error:```! Missing delimiter (. inserted).
<to be read again> 
                   \mid 
l.56 ...owing example. $$\left\{\bigcup\middle\mid
                                                  \bigcup\right\}$$ Notice t...
I was expecting to see something like `(' or `\{' or
`\}' here. If you typed, e.g., `{' instead of `\{', you
should probably delete the `{' by typing `1' now, so that
braces don't get unbalanced. Otherwise just proceed.
Acceptable delimiters are characters whose \delcode is
nonnegative, or you can use `\delimiter <delimiter code>'.```
limber laurel
#

Observe how $$\left{\bigcup\middle\vert\bigcup\right}$$ does in fact work, but doesn't have correct spacing.

timid ledgeBOT
sharp hare
#

\mid is not a delimiter

#

You must use \vert for a scalable bar

#

If you want spacing around the bar like \mid, just do \,\middle\vert\,.

dense crescent
#

isn't there something with \mathrel as well?

timid ledgeBOT
#

@dense crescent

\begin{gather*}
\left\{ \bigcup \mathrel{}\middle\vert\mathrel{} \bigcup \right\}
\end{gather*}
dense crescent
#

yeah that's it

livid lintel
# sharp hare `\mid` is not a delimiter

Technical pov (according to texdoc symbols p.129):

\mvert and \mid are identical and produce a relation. \vert is a synonym for | and both produce the same symbol, but should be used in the context of an ordinal, and should be used as an operator, not as a **delimiter **

dense crescent
livid lintel
#

but yes, should be used as operators

#

but then again, both are defined as delimiters so when one intends to use \middle then |/\vert would be appropriate

#

what the symbols implied by suggesting to not use it as a delimiter is don't use it as |x|

dense crescent
#

unless they meant "produce the same symbol[ as \mvert and \mid]"

limber laurel