4

prefacing that I am a total beginner and trying to put my CV into LaTeX as my first project.

I am using the currvita package and googled how to do hanging indents, as I want to use it in a certain section. Here is what I have as an example (I commented out the part that I can't get to work):

\documentclass{article}
\usepackage[NoDate]{currvita}
%\usepackage{hanging}
%\newlength{\hangwidth}
%\newcommand{\newhang}[1]{\settowidth{\hangwidth}{#1}\par\hangparas{\hangwidth}{1}#1}

\begin{document}

\begin{cv}  

\begin{cvlist}{Some section}

\item[07/2014--08/2014] \textbf{Some school}\\
\textit{Some degree bla bla}\\
Activities: Lorem ipsum dolor sit amet, consectetur adipiscing elit.Phasellus volutpat eu orci vitae eleifend.Praesent sed orci commodo, venenatis neque vel, pulvinar velit.Mauris ullamcorper tellus sed quam pellentesque, vitae sagittis nisl dapibus.      
%\newhang{Activities: }Lorem ipsum dolor sit amet, consectetur adipiscing elit.Phasellus volutpat eu orci vitae eleifend.Praesent sed orci commodo, venenatis neque vel, pulvinar velit.\\Mauris ullamcorper tellus sed quam pellentesque, vitae sagittis nisl dapibus.

\end{cvlist}

\end{cv}

\end{document}

What I want to have is a hanging indent after the word "Activities", starting in the next line. I came across this thread Align text under a colon, which is exactly what I need. I tried to implement Frank Epps solution using the hanging package.

However I cannot get it to work within the cv and cvlist environment. If I put the newhang line right under "begin document", it seems to work. However, as soon as I put it within the cvlist, nothing changes. To be more specific, I get no error message, but also not the desired result (as seen below in the picture). Any hints?

This is the result I would like: enter image description here

Dreica
  • 93
  • Welcome! Would it work to put it outside the cvlist environment? Note that I've never used either of these packages, so the answer may well be 'no'. – cfr Apr 23 '16 at 13:12
  • Thank you! As mentioned, it works when I put it outside the cv/cvlist environment (then I get a result as seen in the picture), but that is not what I need. If anyone has another solution for hanging indents besides the hanging package I would appreciate it, too. – Dreica Apr 23 '16 at 13:16

2 Answers2

2

It's possible, but the result doesn't seem like a good one:

\documentclass{article}
\usepackage[NoDate]{currvita}
\usepackage{enumitem}

\newenvironment{hanghere}[1]
 {\par\vspace{-\parsep}%
  \begin{itemize}[label={#1:\ },leftmargin=*,labelsep=0pt,nosep]
  \item\relax}
 {\end{itemize}}

\begin{document}

\begin{cv}  

\begin{cvlist}{Some section}

\item[07/2014--08/2014] \textbf{Some school}\\
\textit{Some degree bla bla}

\begin{hanghere}{Activities}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. 
Phasellus volutpat eu orci vitae eleifend. Praesent sed orci commodo, 
venenatis neque vel, pulvinar velit. Mauris ullamcorper tellus sed 
quam pellentesque, vitae sagittis nisl dapibus.
\end{hanghere}

\end{cvlist}

\end{cv}

\end{document}

enter image description here

egreg
  • 1,121,712
  • Thanks, I will try this out! Could you elaborate on why you think the result is not good? I am not sure whether you are referring to some sort of bad programming practice, or don't like the looks of the outcome. – Dreica Apr 23 '16 at 14:38
  • @Dreica The amount of indentation is huge. I'd prefer emphasizing “Activities” (with italics or whatever) and keeping the margin. – egreg Apr 23 '16 at 14:39
  • Indeed, initially I just wanted to check whether it would look good at all. Then I wanted to figure out how this would work - even if I won't end up using it. – Dreica Apr 23 '16 at 14:43
1

I think, 'cvlist' works the same like other listings e.g. like 'itemize'. Therefore you can embed a 'cvlist' within an other 'cvlist'.

\documentclass[10pt,a4paper]{scrartcl}

\usepackage[TextAligned]{currvita}
\usepackage[final]{graphicx}
\usepackage[usenames,dvipsnames]{xcolor}

\usepackage[english,ngerman]{babel}
\usepackage[ansinew]{inputenc}

\usepackage[headsep=0cm,textheight=25cm,textwidth=17.2cm]{geometry}

\AtBeginDocument{\settowidth{\cvlabelwidth}{\cvlabelfont 2005-04 -- 2018-03 (vsl.)}}
\thispagestyle{empty}

\begin{document}
\begin{cv}{\centerline{\Huge{Name}}}
\vspace{5pt}


\begin{minipage}{\textwidth}
    {\color{Blue}\rule[0mm]{\textwidth}{.8mm}}
    \begin{cvlist}{\centerline{Skills}}
        \item[{\color{Blue}\rule[1mm]{\textwidth}{.8mm}}]
        \item[2018-03 -- heute] Developer with perfect skills
                \begin{cvlist}{}
                        \item[Project 1] nice project
                        \item[Project 2] better project\\
                                with some extra skill needed
                \end{cvlist}

        \item[2013-06 -- 2018-03] Developer with growing skills
                \begin{cvlist}{}
                        \item[Customer 1] Tabula
                        \item[Customer 2] rasa
                \end{cvlist}

        \item[2008-04 -- 2013-03] Something different
        \item[März 2008] Something really different
    \end{cvlist}
\end{minipage}

\hfill\cvplace{Aachen}
\end{cv}

\end{document}