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 the moderncv package for making my resume however I am new to LaTeX, so please forgive me if this has been repeated (I did search) or is too stupid!

How do I increase the indent of a paragraph such that the entire paragraph is indented and not the first line only. In other words, try pasting a paragraph in OpenOffice and then choose Increase indent. Notice how the entire paragraph is indented.

I want this:

Heading

a leo. Pellentesque sapien dui, facilisis et sollicitudin et, ullamcorper vel massa. Pellentesque vulputate placerat sapien, et volutpat odio elementum eget. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per

Where: Heading is a section and a leo is cvitem.

EDIT: As asked:

\section{Foo} \cvitem{}{Para-Foo}

Now I want Para-Foo to be indented as the way I have described...

share|improve this question
1  
Welcome to TeX.SE. It is always best to compose a MWE that illustrates the problem including the \documentclass so that those trying to help don't have to recreate it. –  Peter Grill Oct 5 '11 at 21:13
    
Sorry if I was not clear. It would be very helpful to post a small example that we can copy and compile and then get on to fixing your problem rather than having to set it up ourselves. –  Peter Grill Oct 5 '11 at 21:28

1 Answer 1

up vote 4 down vote accepted

From the moderncv.cls code it appears that cvitem uses the lengths hintscolumnwidth and maincolumnwidth to control the spacing on the left and the width of the text. So, one way to do it would be to define a new command \MyCvItem which takes an optional first parameter allowing you to specify the indent amount. If the indent amount is not given, it defaults to 0.0pt.

enter image description here

\documentclass{moderncv}
\moderncvtheme[blue]{casual} 
\usepackage{lipsum}
\usepackage{layout}

\firstname{Joey}
\familyname{TeXUser}

\newcommand*{\MyCvItem}[3][0.0pt]{%
    \addtolength{\hintscolumnwidth}{#1}% Adjust settings
    \addtolength{\maincolumnwidth}{-#1}%
    \cvitem{#2}{#3}%
    \addtolength{\hintscolumnwidth}{-#1}% Restore settings
    \addtolength{\maincolumnwidth}{#1}%
}%


\begin{document}\layout
\maketitle

\section{Heading}
\MyCvItem{a leo. }{% No indent specified
\textbf{Regular:} Pellentesque sapien dui, facilisis et sollicitudin et, ullamcorper vel massa. Pellentesque vulputate placerat sapien, et volutpat odio elementum eget. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per
}

\textcolor{blue}{
\MyCvItem[1.0cm]{a leo. }{% Note optional indent amount specified
\textbf{Indented:} Pellentesque sapien dui, facilisis et sollicitudin et, ullamcorper vel massa. Pellentesque vulputate placerat sapien, et volutpat odio elementum eget. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per
}}
\MyCvItem{a leo. }{% No indent specified -- ensure it is back to normal
\textbf{Regular:} Pellentesque sapien dui, facilisis et sollicitudin et, ullamcorper vel massa. Pellentesque vulputate placerat sapien, et volutpat odio elementum eget. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per
}
\end{document}
share|improve this answer
    
Thank you! You are awesome! –  Joey Oct 6 '11 at 4:54

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.