I am having some user defined commands defined and used in my latex document. I need a way to check whether any of the commands is used. I want to make decisions based on the argument used in the command. Can I do this by defining a user defined environment? Please let me know what should be done here.
Example code:
\documentclass[12pt]{article}
\usepackage{ulem}
\usepackage{color}
\newcommand{\deleteline}[2]{\textsuperscript{\textcolor{black}{ #1}} \textcolor{red}{\sout{#2}}}
\title{Latex Document}
\author{Eddy}
\begin{document}
\maketitle
As part of this project, we intend to study the complex structures of Latex. \deleteline{eddy}{This line will be stroked through.}
I want to find out programmatically if \deleteline command is used in the content. I also want to find out what's the first argument used.
Edit: I am going to add a detailed use case of my current requirement.
My input code is as follows. Please note that \begin{analyze}{eddy} is the new environment that is to be defined yet.
\documentclass[12pt]{article}
\usepackage{ulem}
\usepackage{color}
\newcommand{\deleteline}[2]{\textsuperscript{\textcolor{black}{ #1}} \textcolor{red}{\sout{#2}}}
\newcommand{\addline}[2]{\textsuperscript{\textcolor{black}{ #1}} \textcolor{green}{#2}}
\title{Latex Document}
\author{Eddy}
\begin{document}
\maketitle
\begin{analyze}
As part of this project, we intend to study the complex structures of Latex. \deleteline{eddy}{This line will be stroked through.} \addline{Margret}{This line is to be added.}
\end{analyze}
\end{document}
If no argument is passed to the new environment,
\begin{analyze}
As part of this project, we intend to study the complex structures of Latex. \deleteline{eddy}{This line will be stroked through.} \addline{Margret}{This line is to be added.}
\end{analyze}
Output: All changes done by all users are taken into consideration

If 'eddy' is given as an input,
\begin{analyze}{eddy}
As part of this project, we intend to study the complex structures of Latex. \deleteline{eddy}{This line will be stroked through.} \addline{Margret}{This line is to be added.}
\end{analyze}
Output: Only changes by done by Eddy is considered. Other users changes are ignored.

\begin{analyze}{Margret}
As part of this project, we intend to study the complex structures of Latex. \deleteline{eddy}{This line will be stroked through.} \addline{Margret}{This line is to be added.}
\end{analyze}
Output: Only changes done by Margret is considered. All other changes are ignored.






\documentclass{...}and ending with\end{document}. – Paul Gaborit Feb 20 at 6:58ctrl+f... – Thanos Feb 20 at 7:23\@firstoftwo. You will find you are not. However, you are. As well, good typesetter splits his document into several files if it's long. – tohecz Feb 20 at 7:41