TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I use a variable (e.g. a first name) in \cvitem?

  \makecvtitle % Print the CV title
  \section{Personal Data}
share|improve this question
up vote 1 down vote accepted

If you look at \meaning\firstname, you'll see that it just means


To get the functionality you want, you'll have to say

  \makecvtitle % Print the CV title
  \section{Personal Data}

(Remembering, of course, that you can make a macro to do the dirty work for you if you plan to do this a lot: \makeatletter\newcommand\myfirstname{\@firstname}\makeatother.)

share|improve this answer
yes i saw my mistake, but if i use \cvitem{}{\makeatletter\@firstname\makeatother} There are several problems at this line: -Missing } inserted. ...tem{}{\makeatletter\@firstname\makeatother} (followed by: ) -You can't use `\spacefactor' in internal vertical mode. ...tem{}{\makeatletter\@firstname\makeatother} (followed by: ) -Extra }, or forgotten $. ...tem{}{\makeatletter\@firstname\makeatother} (followed by: ) -Missing $ inserted. ...tem{}{\makeatletter\@firstname\makeatother} (followed by: ) – NewGuest Mar 5 '14 at 17:17
ok declared a new command \newcommand*{\usefirstname}{\@firstname} – NewGuest Mar 5 '14 at 17:24
Did this fix your issue? Don't forget you can 'accept' this answer to mark your issue as resolved :) (see How do you accept an answer?) – Sean Allred Mar 5 '14 at 17:28
ok thanks for the tip ;) – NewGuest Mar 5 '14 at 20:52

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.