I use LaTeX to write my job applications. Since I have more than 50 places to apply for, I like to define variables, such as: \targetorg, \website, \mysignature etc. Since these are sensitive portions of the letters, I would like to be able to define these variables such that they easily can stick out.(by means of a color for example.) So far what I have been doing is the following:
\newcommand{\mycolor}{\color{blue}}
\newcommand{\defaultcolor}{\color{black}}
\newcommand{\targetorg}{\mycolor "Name of organization I am applying work for" \defaultcolor}
\newcommand{\myname}{\mycolor "my name" \defaultcolor}
\newcommand{\job}{\mycolor "type of work" \defaultcolor}
\newcommand{\place}{\mycolor "location of organization" \defaultcolor}
This would then be used as follows:
begin{document}
Hi,
My name is \myname and would like to apply as \job for \targetorg in \place.
end{document}
In this manner, when I compile my document, the various defined variables stick out so I can spot quickly if there are any mess ups and adjust accordingly. After I am done with double checking the work, I then redefine \mycolor to black so that the text is in one uniform color. The way I have done it now works perfectly, except that from a coding perspective it looks primitive to always have to include {\mycolor ... \defaultcolor} for every new instance of \newcommand.
Question:
I would like to ask if there is a way to make a \newcommand that would automatically incorporate these color definitions within itself. Ultimately I would like to do the following:
\newcmdcolor{\targetorg}{"Name of organization I am applying work for"}
which should be the exact equivalent of:
\newcommand{\targetorg}{\mycolor "Name of organization I am applying work for" \defaultcolor}
So how do a define such a \newcmdcolor?
\newcommand{\newcmdcolor}{??????}
MWE
I discussed above the essential aspects of the code. For the sake of complying to the MWE standards, I hereby produce a full working sample which can be copy-pasted to your convenience:
\documentclass{article}
\usepackage{xcolor}
\newcommand{\mycolor}{\color{blue}}
\newcommand{\defaultcolor}{\color{black}}
\newcommand{\targetorg}{\mycolor "Dummy Organization" \defaultcolor}
\newcommand{\myname}{\mycolor "Dummy Name" \defaultcolor}
\newcommand{\job}{\mycolor "Dummy Work" \defaultcolor}
\newcommand{\place}{\mycolor "Dummy Location" \defaultcolor}
\begin{document}
\noindent
To whom it may concern,\\\indent
My name is \myname\, and I would like to apply for \job\, at \targetorg\, in \place.\\
Sincerely,\\
\myname
\end{document}
\documentclass{...}
and ending with\end{document}
.\textcolor
command will perhaps make things look a bit better, i.e.\newcommand\newcmdcolor{\textcolor{\mycolor}{Name of organization}}
.