Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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):

Example

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
add comment

1 Answer

up vote 2 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
add comment

Your Answer

 
discard

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.