TransWikia.com

Indent text after line break in itemize enviroment

TeX - LaTeX Asked by Martin Schmitz on January 1, 2021

I’m using the following CV as a template for my application. Everything works fine but there is one thing that i would like to change. For that consider the picture below:
enter image description here

I want to intend the letter B in the enumeration such that it stands directly under the letter A (same x – position). I tried using ~ or vspace{0.1cm} to manually adjust the position of B but theses commands are not working in the enumeration-enviroment.

I created a minimal working example (which creates the picture above) from the template. Does someone know what i need to change to get my desired result?

EDIT:
I want only to indent the text in this specific enumeration-environment. The text in other enumeration-environment should not be indented!

documentclass[10pt]{article}

usepackage{calc}
usepackage{pifont}
usepackage{marvosym}
reversemarginpar
usepackage[paper=a4paper, marginparwidth=24mm, marginparsep=1mm, margin=15mm, includemp]{geometry}
setlength{parindent}{0in}


usepackage{paralist}
usepackage[shortlabels]{enumitem}

usepackage{fancyhdr,lastpage}
pagestyle{fancy}
pagestyle{empty}      % Uncomment this to get rid of page numbers
fancyhf{}renewcommand{headrulewidth}{0pt}
fancyfootoffset{marginparsep+marginparwidth}
newlength{footpageshift}
setlength{footpageshift}
          {0.1textwidth+0.1marginparsep+0.1marginparwidth-2in}
lfoot{hspace{footpageshift}%
       parbox{3.5in}{, hfill %
                    arabic{page} of protectpageref*{LastPage} % +LP
%                    arabic{page}                               % -LP
                    hfill ,}}

% Finally, give us PDF bookmarks
usepackage{color,hyperref}
definecolor{darkblue}{rgb}{0.0,0.0,0.3}
hypersetup{colorlinks,breaklinks,
            linkcolor=darkblue,urlcolor=darkblue,
            anchorcolor=darkblue,citecolor=darkblue}

newcommand{makeheading}[1]%
        {hspace*{-marginparsep minus marginparwidth}%
         begin{minipage}[t]{textwidth+marginparwidth+marginparsep}%
                {large bfseries #1}[-0.15baselineskip]%
                 rule{columnwidth}{1pt}%
         end{minipage}}

renewcommand{section}[2]%
        {pagebreak[2]vspace{1baselineskip}%
         phantomsectionaddcontentsline{toc}{section}{#1}%
         hspace{0in}%
         marginpar{
         raggedright scshape #1}#2}

% An itemize-style list with lots of space between items
newenvironment{outerlist}[1][enskiptextbullet]%
        {begin{itemize}[#1]}{end{itemize}%
         vspace{-0.6baselineskip}}

% An environment IDENTICAL to outerlist that has better pre-list spacing
% when used as the first thing in a section
newenvironment{lonelist}[1][enskiptextbullet]%
        {vspace{-baselineskip}begin{list}{#1}{%
        setlength{partopsep}{0pt}%
        setlength{topsep}{0pt}}}
        {end{list}vspace{-.6baselineskip}}

% An itemize-style list with little space between items
% newenvironment{innerlist}[1][enskiptextbullet]%
newenvironment{innerlist}[1][enskip$circ$]%
        {begin{compactitem}[#1]}{end{compactitem}}

% An environment IDENTICAL to innerlist that has better pre-list spacing
% when used as the first thing in a section
newenvironment{loneinnerlist}[1][enskiptextbullet]%
        {vspace{-baselineskip}begin{compactitem}[#1]}
        {end{compactitem}vspace{-.6baselineskip}}

% To add some paragraph space between lines.
% This also tells LaTeX to preferably break a page on one of these gaps
% if there is a needed pagebreak nearby.
newcommand{blankline}{quadpagebreak[2]}

% Uses hyperref to link DOI
newcommanddoilink[1]{href{http://dx.doi.org/#1}{#1}}
newcommanddoi[1]{doi:doilink{#1}}

%hyphenpenalty = 9999
defvs{vspace{-0.1in}}
begin{document}
% makeheading{Curriculum Vitae [0.3cm] TIEP HUU VUquad~~~~~~quadquadquadquadquadquadquadquadquadquadquadquadquadquad{small Last update: December 17, 2015}}
makeheading{textbf{Bob}}


section{Contact Information}

newlength{rcollength}setlength{rcollength}{3 in}
vs
begin{tabular}[t]{@{}p{textwidth-rcollength}p{rcollength}}

 & Personal Information
end{tabular}
%% ==============================================================
vspace{0.2in}

section{Education}
    textbf{Physics, in Pseudo Science} hfill October 2000 -- June 2020 
begin{itemize}[label=-]
    setlengthitemsep{0em}
    item textit{thesis:} A das das dkgsmpfsd fresfdnsjfdnf fsdfjlksdnfl rewlkrwe dasjk eajkasdad dawdsad eawedasf vspace*{0.1cm}B
end{itemize}

section{some other section}
begin{itemize}[label=-]
    setlengthitemsep{0em}
    item textit{thesis:} items that contains a line break should not be intended in this enumeration-environment !!! 
    item textit{thesis:} items that contains a line break should not be intended in this enumeration-environment !!!  
end{itemize}

end{document}

One Answer

You could use a tabularx for this:

enter image description here

documentclass[10pt]{article}

usepackage{calc}
usepackage{pifont}
usepackage{marvosym}
reversemarginpar
usepackage[paper=a4paper, marginparwidth=24mm, marginparsep=1mm, margin=15mm, includemp]{geometry}
setlength{parindent}{0in}


usepackage{paralist}
usepackage[shortlabels]{enumitem}

usepackage{tabularx}

usepackage{fancyhdr,lastpage}
pagestyle{fancy}
pagestyle{empty}      % Uncomment this to get rid of page numbers
fancyhf{}renewcommand{headrulewidth}{0pt}
fancyfootoffset{marginparsep+marginparwidth}
newlength{footpageshift}
setlength{footpageshift}
          {0.1textwidth+0.1marginparsep+0.1marginparwidth-2in}
lfoot{hspace{footpageshift}%
       parbox{3.5in}{, hfill %
                    arabic{page} of protectpageref*{LastPage} % +LP
%                    arabic{page}                               % -LP
                    hfill ,}}

% Finally, give us PDF bookmarks
usepackage{color,hyperref}
definecolor{darkblue}{rgb}{0.0,0.0,0.3}
hypersetup{colorlinks,breaklinks,
            linkcolor=darkblue,urlcolor=darkblue,
            anchorcolor=darkblue,citecolor=darkblue}

newcommand{makeheading}[1]%
        {hspace*{-marginparsep minus marginparwidth}%
         begin{minipage}[t]{textwidth+marginparwidth+marginparsep}%
                {large bfseries #1}[-0.15baselineskip]%
                 rule{columnwidth}{1pt}%
         end{minipage}}

renewcommand{section}[2]%
        {pagebreak[2]vspace{1baselineskip}%
         phantomsectionaddcontentsline{toc}{section}{#1}%
         hspace{0in}%
         marginpar{
         raggedright scshape #1}#2}

% An itemize-style list with lots of space between items
newenvironment{outerlist}[1][enskiptextbullet]%
        {begin{itemize}[#1]}{end{itemize}%
         vspace{-0.6baselineskip}}

% An environment IDENTICAL to outerlist that has better pre-list spacing
% when used as the first thing in a section
newenvironment{lonelist}[1][enskiptextbullet]%
        {vspace{-baselineskip}begin{list}{#1}{%
        setlength{partopsep}{0pt}%
        setlength{topsep}{0pt}}}
        {end{list}vspace{-.6baselineskip}}

% An itemize-style list with little space between items
% newenvironment{innerlist}[1][enskiptextbullet]%
newenvironment{innerlist}[1][enskip$circ$]%
        {begin{compactitem}[#1]}{end{compactitem}}

% An environment IDENTICAL to innerlist that has better pre-list spacing
% when used as the first thing in a section
newenvironment{loneinnerlist}[1][enskiptextbullet]%
        {vspace{-baselineskip}begin{compactitem}[#1]}
        {end{compactitem}vspace{-.6baselineskip}}

% To add some paragraph space between lines.
% This also tells LaTeX to preferably break a page on one of these gaps
% if there is a needed pagebreak nearby.
newcommand{blankline}{quadpagebreak[2]}

% Uses hyperref to link DOI
newcommanddoilink[1]{href{http://dx.doi.org/#1}{#1}}
newcommanddoi[1]{doi:doilink{#1}}

%hyphenpenalty = 9999
defvs{vspace{-0.1in}}
begin{document}
% makeheading{Curriculum Vitae [0.3cm] TIEP HUU VUquad~~~~~~quadquadquadquadquadquadquadquadquadquadquadquadquadquad{small Last update: December 17, 2015}}
makeheading{textbf{Bob}}


section{Contact Information}

newlength{rcollength}setlength{rcollength}{3 in}
vs
begin{tabular}[t]{@{}p{textwidth-rcollength}p{rcollength}}

 & Personal Information
end{tabular}
%% ==============================================================
vspace{0.2in}

section{Education}
    textbf{Physics, in Pseudo Science} hfill October 2000 -- June 2020 
begin{itemize}[label=-]
    setlengthitemsep{0em}
    item begin{tabularx}{linewidth}[t]{@{}l@{~}X@{}} textit{thesis:} &  B das das dkgsmpfsd fresfdnsjfdnf fsdfjlksdnfl rewlkrwe dasjk eajkasdad dawdsad  eaweda  B end{tabularx}
    item begin{tabularx}{linewidth}[t]{@{}l@{~}X@{}} textit{some other item with long name:} &  B das das dkgsmpfsd fresfdnsjfdnf fsdfjlksdnfl rewlkrwe dasjk eajkasdad dawdsad  eaw B end{tabularx}
        item textit{shorter item:} shorter item without line break
end{itemize}

end{document}

Correct answer by leandriis on January 1, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP