Basic Syntax Create your first LaTeX Title Section Paragraph and Comments Text Processing Fonts Formatting List
Document type in Latex↓
Document Class Document Classes Comparison Document Classes Options
Command Table of Contents Page Numbering Footnotes Language Support
Bibliography ↓
Bibliography Management With Biblatex Bibliography Management With Natbib
Commands
Latex typesetting is made by using special tags or commands that provide a handful of ways to format your document. Sometimes standard commands are not enough to fulfil some specific needs, in such cases new commands can be defined and this article explains how.
Introduction
Most of the LaTeX commands are simple words preceded by a special character.
Defining a new command
New commands are defined by \newcommand statement, let's see an example of the simplest usage.

CODE - NEW COMMAND
\documentclass{article}
\title{Hello World}
\date{November 9, 2018}

\begin{document}

\maketitle
\newcommand{\proof}{example of a new command}
proof


\end{document}

base structure for a new command: \newcommand{⟨name⟩}[⟨number of arguments⟩]{⟨definition⟩}
CODE - NEW COMMAND
\documentclass{article}
\title{Hello World}
\date{November 9, 2018}

\begin{document}

\maketitle
\newcommand{\plants} [1]{\textit{#1}}
\plants{Rose}


\end{document}