Template:ProbMacro

From Maths
Revision as of 16:57, 3 November 2017 by Alec (Talk | contribs) (Trimmed white space due to alignment problems.)

Jump to: navigation, search
\newcommand{\P}[1]{\mathbb{P}\left[{#1}\right]} \newcommand{\Plcond}[2]{\mathbb{P}\left.\left[{#1}\right\vert{#2}\right]} \newcommand{\Prcond}[2]{\mathbb{P}\left[{#1}\left\vert{#2}\right.\right]}

Description

  • Prototype created: 3rd Nov 2017
  • Purpose: to be included and uniformly provide a short cut to typing \mathbb{P}\left[(whatever)\right] every time
  • No spaces are provided either side of the \vert in conditional versions.

Tasks


TODO: Remove this when there are none left


  • Support variations, for example to underbrace things without the brackets becoming huge
  • Support things like \mathbb{P}'[A] or \overline{\mathbb{P} }[A]
  • If Plcond and Prcond always work the same, introduce Pcond alone. I have no solution right now. Examples of why below
    • They are named so that the left one is sized by the first argument, the right one is sized by the second (due to the \vert in the middle)

Tests

  • \P{A} , \Prcond{A}{B}
    • lcond:
      • \Plcond{\sum^n_{k\eq 1} }{\text{small} }
      • \Plcond{\text{small} }{\sum^n_{k\eq 1} }
    • rcond:
      • \Prcond{\sum^n_{k\eq 1} }{\text{small} }
      • \Prcond{\text{small} }{\sum^n_{k\eq 1} }

Pay careful condition to the \vert heights as much as the [ and ]