<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Apr 18, 2013, at 1:33 PM, J. McKenzie Alexander <<a href="mailto:jalex@lse.ac.uk">jalex@lse.ac.uk</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html charset=windows-1252"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>I'm afraid that's not quite what I was looking for. If I wanted to type a macro, I would have done</div><div><br></div><div>\def\given{\mathbin{|}}</div><div><br></div><div>and written $\Pr(A \given B)$.</div><div><br></div><div>But I was interested in learning whether there was a LaTeX command like \DeclareMathOperator, except for binary relations (and which wasn't restricted to only being used in the preamble). Or maybe a pointer to some source about how LaTeX is told to interpret symbols in math mode… I guess I need to return to the TeXbook.</div><div><br></div><div>Thanks anyway,</div><div><br></div><div>Jason</div><div><br></div><div>On 18 Apr 2013, at 12:46, Peter Vamos <<a href="mailto:P.Vamos@exeter.ac.uk">P.Vamos@exeter.ac.uk</a>> wrote:</div><div><br><blockquote type="cite">presumably there's a way to change the definition of the '|' symbol in math mode so that TeX treats it as a binary operator by default<br></blockquote><br>There is:  \mid<br><br>Peter<br><br></div></div></blockquote></div><br><div>Doing something like this may be easiest in plain mode:</div><div><br></div><div><div>{\mathcode`|="326A $P\{A|B\}$} % math relation, family 2 (symbols), slot "6A</div><div><br></div><div>{\mathcode`|="226A $P\{A|B\}$} % binary operation</div><div><br></div><div>$P\{A|B\}$ % back to default</div></div><div><br></div><div>You may of course simplify these using your own \defs but you will need to know the family and the slot number for each character you change temporarily.</div><div><br></div><div>Michael</div><div><br></div></body></html>