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

I'm working on my resume, found a nice template as a starting place, but I want my name to be centered on the top above a horizontal rule. Also, rather than two arguments, I just want one, my name. I would have like to have simplified that part away already, but when I remove the second argument, I start getting the below error, which I don't understand:

LaTeX Error: There's no line here to end.

{\Large \scshape{ #2 \hfill #1}}\\[-0.15\baselineskip]

How can I modify this new command to take just the name argument, and produce a centered heading above the same horizontal rule?

Many thanks.

share|improve this question
up vote 2 down vote accepted

You can try using center environment instead of minipage.

{\Large \scshape{#1}}\\[-0.15\baselineskip]%

Building on egreg's comment to remove the extra padding before and after the heading, you can use the following,

\centerline{\Large \textsc{#1}}\vspace{-0.15\baselineskip}%

This gives the following difference in padding: Difference in padding between two cases

share|improve this answer
This will add some padding space above and below; possibly better: \newcommand{\makeheading{{\centering{\Large\scshape #1}\\[-.15\baselineskip]\rule{\columnwidth}{.4pt}\par}} (so with an additional pair of braces). – egreg Oct 19 '12 at 20:57
ok, I tried the center environment inside minipage. I see now why that was a mistake. With the code you provide, I'm getting the error again: There's no line here to end. – NoahR Oct 19 '12 at 20:59
never mind, verbatim copy and paste, and it works. Thanks. Something about innocuous looking white space seems to screw things up. – NoahR Oct 19 '12 at 21:01
@egreg thank you, I have updated the answer to show the difference. – mythealias Oct 19 '12 at 22:02

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.