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 am using ModernCV for my CV. I want to achieve something like the following example (please note that the address "align2@rightMargin.com" is aligned to the right margin):


Please note the last word is not necessarily an email address but any other word. In the example above what I used is the \hspace command, so I have to estimate the hspace manually everytime I change length of the sentence. I notice \raggedleft may be the right command, but I don't know how to make a command like \cvline in the ModernCV cls file to achieve the above example. Any help will be highly appreciated.

share|improve this question
@user3690 Try using \hfill rather than \hspace. – Yiannis Lazarides Feb 18 '11 at 18:59
@user3690: Welcome to tex.sx. You can use the icons on top of the edit window to include hyperlinks or use [text](URL) to do it. Please use ` to mark your macro names and other inline code. I included the image for you. You can do this by yourself once you got 10rep points. – Martin Scharrer Feb 18 '11 at 19:04
@Martin: thanks for including the image for me. – Causality Feb 18 '11 at 19:15
@Yiannis: \hfill works exactly what I wanted. Thanks a lot. – Causality Feb 18 '11 at 19:17
up vote 3 down vote accepted

You can use \hfill rather than \hspace and it should work.

share|improve this answer
\hfill works exactly what I wanted. Thanks a lot. Answer accepted! – Causality Feb 18 '11 at 19:32

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.