# Use variables/properties in class file

I have a class resume which I use in a .tex file as

\documentclass{resume}

\begin{document}
\end{document}


but I also want to define some variables in my .tex document to be used in my class.

How can I, for instance, use the variables/properties that I set in

\documentclass{resume}

\name{John Doe}
\phone{No phone}

\begin{document}
\end{document}


in my class?

• Did you write resume.cls? Or is this some other class that already provides \name, \address and \phone? – Werner Dec 10 '15 at 7:14
• I write resume.cls myself, so I guess I have to define some placeholders in my class and overwrite them with \name{...} in my .tex file. – Jamgreen Dec 10 '15 at 7:22
• Oh please, not another resume class. There are already a bunch of them out there. – Johannes_B Dec 19 '15 at 14:12
• I am confused. Normally you create commands in the .cls that you can access/use in your .tex file. But you seem to be asking to create commands in your .tex file that will be accessed/used in the .cls, which does not make sense (or, probably, I can't see the sense of what this is supposed to accomplish). – jon May 20 '16 at 2:15
• How can we help if this uses a custom class we don't have access to? Confused. – cfr May 20 '16 at 2:44

Well, only defining commands \name etc. is only the first step. You need to define where should it be printed, for example inside \maketitle, how to layout the cv, font, fontsize etc.
If you are realy interested in learning writing own classes please read and study first clsguide.pdf. You can read it with typing texdoc clsguide into your console/terminal. Then there are some questions here about classes, for example Pass parameter to class or creating a class or package etc.
Or look for example on CTAN for existing classes to create an CV, for example moderncv.