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.

How to prevent indent on second line with packed itemize instead of itemize? In other words I dont want "Major" to be indented.

\documentclass[letterpaper]{article}
\usepackage[empty]{fullpage}% http://ctan.org/pkg/fullpage
\newenvironment{packed_itemize}
{\begin{itemize}
\setlength{\itemindent}{-10pt}
\setlength{\itemsep}{-0.3pt}}
{\end{itemize}\vspace{-0.5em}}

\newenvironment{packed_inner_itemize}
{\begin{packed_itemize}}
{\end{packed_itemize}\vspace{0.25em}}
\newcommand{\ressubheading}[4]{%
\item\textbf{#1} \hfill #2\null\\
#3 \hfill #4%
}
\begin{document}
\begin{packed_itemize} 
\ressubheading{Name of Grad School}{City}{Major}{2010 -- 2012}  
\ressubheading{Name of Grad School}{City}{Major}{2010 -- 2012}  
\ressubheading{Name of Grad School}{City}{Major}{2010 -- 2012}  
\ressubheading{Name of Grad School}{City}{Major}{2010 -- 2012}  
\end{packed_itemize}
\end{document}
share|improve this question
1  
Welcome to TeX.sx! What package provides packed_itemize? The example stops with "environment undefined". –  egreg Feb 18 '13 at 0:06
    
Looking at it closer, just delete \setlength{\itemindent}{-10pt} from your packed_itemize environment. packed_inner_itemize also does nothing different from packed_itemize but \vspace{0.25em}. You can move the definition of \ressubheading out of packed_inner_itemize too. –  hpesoj626 Feb 18 '13 at 0:32
    
deleting that line idents both "Name..." and "Major". Is there any way i can bring both of these out -10pt? –  user26080 Feb 18 '13 at 1:01
    
@user26080 See if replacing \setlength{\itemindent}{-10pt} with \setlength{\itemindent}{0pt} makes any difference. –  hpesoj626 Feb 18 '13 at 3:09
1  
Adding \hspace*{\itemindent} before #3 does what you are looking for. –  Peter Grill Feb 18 '13 at 5:23
add comment

1 Answer

You should adjust the left margin, via \leftmargini instead:

Sample output

\documentclass[letterpaper]{article}
\usepackage[empty]{fullpage}% http://ctan.org/pkg/fullpage
\newenvironment{packed-itemize}
{\leftmargini=15pt\begin{itemize}
\setlength{\itemsep}{-0.3pt}}
{\end{itemize}\vspace{-0.5em}}

\newenvironment{packed_inner-itemize}
{\begin{packed-itemize}}
{\end{packed-itemize}\vspace{0.25em}}
\newcommand{\ressubheading}[4]{%
\item\textbf{#1} \hfill #2\null\\\relax
#3 \hfill #4%
}
\begin{document}

\noindent Standard itemize:
\begin{itemize} 
\item{Name of Grad School}\hfill City\\Major \hfill 2010 -- 2012
\item{Name of Grad School}\hfill City\\Major \hfill 2010 -- 2012
\end{itemize}

\noindent New commands:
\begin{packed-itemize} 
\ressubheading{Name of Grad School}{City}{Major}{2010 -- 2012}  
\ressubheading{Name of Grad School}{City}{Major}{2010 -- 2012}  
\end{packed-itemize}

\noindent
Some text.
\end{document}

I have changed the name of your environment to packed-itemize to avoid the _ symbol, which to my eyes always denotes some mathematics. Also changed is the addition of a \relax after \\, to prevent nasty surprises if #3 begins with a square bracket [.

In general it is easier to define modified list environments via the enumitem package. Your example would then use:

\usepackage{enumitem}

\newlist{packed-itemize}{itemize}{1}
\setlist[packed-itemize]{leftmargin=15pt,label=\textbullet}
\newcommand{\ressubheading}[4]{\item \textbf{#1}\hfill #2\relax\\\relax #3
\hfill #4}
share|improve this answer
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.