\let\OLDcommand\command
Then you can redefine the exisiting command \command and use the old \OLDcommand:
\renewcommand{\command}{this was \OLDcommand}
\let\OLDcommand\command
\renewcommand{\command}{this was \OLDcommand}
\AtBeginDocument{%
\Opensolutionfile{FILE}
}
\AtEndDocument{%
\Closesolutionfile{FILE}
}
\Writetofile{FILE}{text}
\IfFileExists{FILE.tex}{\input{FILE.tex}}{}
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{CLASSNAME}[CLASSCOMMENT]
\LoadClass{CLASS_TO_LOAD}
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{dissertation}[class to write a perfect dissertation]
\LoadClass{book}
\RequirePackage{graphixc}
\newcommand{}{}
\renewcommand{}{}
to define or change commands.\AtBeginDocument{}
\AtEndDocument{}
to execute commands at the beginning or end of the document.
%%% Local Variables: %%% mode: latex %%% TeX-master: t %%% End:
%%% LaTeX-command: "latex -shell-escape"
\usepackage{titlesec}
\titleclass{\NAME}{option}[\PART]
\newcounter{NAME}
\renewcommand{\theNAME}{\arabic{NAME}}
\titleformat{\NAME}[hang]
{\normalfont } % format of titletext
{{\bf Task \theNAME:} } % command before titletext
{0pt} % spacing after titletext
{} % before code
[] % after code
\titlespacing{\NAME}{0pt}{*4}{*2}
\titlespacing*{command}{left}{before-sep}{after-sep}
For a more detailed description look into the titlesec documentatio, but these are the most important points.