# How to create your own command in latex class file

Today I have learn how to create new command in latex using Latex class file.

There is simple code.

• First create your class file like:- example.cls
• Add this code for new command in class file
\newcommand{\name}[1]{
\centerline{\Huge{#1}}
}

• Now there {name } is your new command and [1] is parameter. With help of parameter you call this command. like this \name{hello}
•  Now create your Latex document like:  example.tex
\documentclass{example.cls}
\begin{document}
\section{Education}
\subsection{University Of India}
\section{Work}
\datedsection{hello}{hitesh}
\datedsectio{hello}{hitesh}
\name{Guru Nanak Dev Engineering}
\workitems{hitesh}{kumar}{sofat}
\subsection{ABC Limited}
\end{document}



So now you learn how to create the new command in latex.