 			else
 				closingHTML = "</div>"
 
-			return html + @children.map((child) -> child.toHTML()).join("+") + closingHTML
+			return html + @children.map((child) -> "(" + child.toHTML() + ")").join("+") + closingHTML
+
+		toLaTeX: ->
+			# Return a LaTeX string representing this node.
+			return @children.map((child) -> "\\left(" + child.toLaTeX() + "\\right)").join("+")
 
 	class Mul extends nodes.RoseNode
 		# Represent multiplication.

			else
				closingHTML = "</div>"

			return html + @children.map((child) -> child.toHTML()).join("&cdot;") + closingHTML

	class Pow extends nodes.BinaryNode
		# Represent powers.

			else
				innerHTML = "(#{@children.left.toHTML()}) ** (#{@children.right.toHTML()})"
				return html + innerHTML + closingHTML

		toLaTeX: ->
			# Return a LaTeX string representing this node.
			if @children.right.evaluate?() == 1
				return @children.left.toLaTeX()
			else if @children.right.evaluate?() == 0
				return "1"
			else
				innerLaTeX = "\\left(#{@children.left.toLaTeX()}\\right)^{#{@children.right.toLaTeX()}}"
				if @children.right.evaluate?() < 0
					right = @children.right.copy()
					right = new Mul("-1", right)
					right = right.simplify()
					innerLaTeX = "\\frac{1}{#{innerLaTeX}}"
				return innerLaTeX

	compare = (a, b) ->
		# Compare two values to get an order.
