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
  • 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
\subsection{University Of India}
\name{Guru Nanak Dev Engineering}
\subsection{ABC Limited}

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


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s