
(* Formats.m *)

Unprotect[DirectedInfinity]

Begin["`Private`"]

Format[DirectedInfinity[x_]] := PrecedenceForm[x "Infinity",150]
Format[DirectedInfinity[]]   := "ComplexInfinity"

Format[DirectedInfinity[1],TeXForm]  :=  "\\infty"
Format[DirectedInfinity[-1],TeXForm] :=  "{-\\infty}"
Format[DirectedInfinity[x_],TeXForm] := SequenceForm["{", x, "\\infty}"]
Format[DirectedInfinity[],TeXForm]   := "\\infty"

End[]

Protect[DirectedInfinity]

Null
