7

I'm using a resume template from the following URL: (res9b) to be exact. http://rpi.edu/dept/arc/training/latex/resumes/

The problem is that the resume template doesn't include a header. If I simply add a new header, the alignment isn't correct. The header overwrites the first line of the page. So I need a way to align the page lower than the footer. I decided to use the geometry package that was recommended here on a similar post.

\usepackage{geometry}
\def\name{First Last}

\geometry{
    top=0.5in,            
    inner=0.5in,
    outer=0.5in,
    bottom=0.5in,
    headheight=3ex,      
    headsep=2ex,         
 }

 \pagestyle{myheadings}
 \markright{\name}
 \thispagestyle{empty}
 ....

But when I compile it, I get this error:

! Package keyval Error: No value specified for margin.

See the keyval package documentation for explanation.
Type  H <return>  for immediate help.
...                                              

l.848 \ProcessOptionsKV[c]{Gm}
                          %

It looks like the problem has something to do with the res.cls file.

\documentclass[line,margin]{res}

Could that be causing that error somehow? How do I fix this error? I like the format of this resume package and would like to keep it if possible.

1

2 Answers 2

6

The global margin option is passed to the geometry package (like all global options are passed to all packages). And geometry needs this option to have an argument.

To fix this either try to add a margin=<value> option to the geometry package to overwrite the global one or to rename the margin option of the class to something else.

Another alternative is to delete the global options, i.e. put the following after the \documentclass. The < > part marks a place which should be filled out, not taken verbatim.

\makeatletter
\def\@classoptionslist{<class options except `margin` OR empty>}
\makeatother
2
  • thanks! It didn't work when I added it to the geometry package. But when I added margin=<value> to the \documentclass[line,margin=<value>]{res} it did work.
    – ajpyles
    Feb 16, 2011 at 13:54
  • @MartinScharrer: The statement "To fix this either try to add a margin=<value> option to the geometry package to overwrite the global one" needs correction. \@classoptionslist is formed before \geometry is encountered. That is why it didn't work for the OP.
    – Ahmed Musa
    Oct 27, 2012 at 12:00
4

I just tried another way, and it works quite well! You can download the new cls file here

Then replace the first line:

\documentclass[line,margin]{res}

to:

\documentclass[line,mm]{res}

Then you can use the geometry package as you like.

Since the problem is caused by the fact that geometry will use global margin too, I renamed the margin option in res.cls to mm.

3
  • I will put res.cls on that url about 6 hours later.
    – FurtherLee
    Oct 27, 2012 at 10:21
  • mm is not a good choice of key name.
    – Ahmed Musa
    Oct 27, 2012 at 13:09
  • That's true. However, I have tried many meaningful variables, such like lmargin, finding that they are still used in geometry.
    – FurtherLee
    Oct 29, 2012 at 1:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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