# \newcommand - Tex Command

## newcommand

\newcommand - Used to create your own commands (control sequences, macros, definitions).

## SYNOPSIS

{ \newcommand\myCommandName
[ <optional # of arguments, from 1 to 9> ]
{ <replacement text> } }


## DESCRIPTION


## EXAMPLE

1. \newcommand\myHearts
{\color{purple}{\heartsuit}\kern-2.5pt\color{green}{\heartsuit}}

\myHearts\myHearts

$\newcommand\myHearts {\color{purple}{\heartsuit}\kern-2.5pt\color{green}{\heartsuit}} \myHearts\myHearts$
2. \newcommand\myHearts[2]
{\color{#1}{\heartsuit}\kern-2.5pt\color{#2}{\heartsuit}}

\myHearts{red}{blue}

$\newcommand\myHearts[2] {\color{#1}{\heartsuit}\kern-2.5pt\color{#2}{\heartsuit}} \myHearts{red}{blue}$