Tell me more ×
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 itemize in minipage and observe unexpected spacing among items.

\documentclass[11pt,table,a4paper]{article}
\usepackage[framemethod=TikZ]{mdframed}
\usepackage[top=.5cm, bottom=2cm, left=1cm, right=1cm]{geometry}
\usepackage{wrapfig}
\usepackage{enumitem}
\begin{document}

This is first line.\newline
 \begin{minipage}{\textwidth}\begin{itemize}[topsep=0ex]
 \item First Item
 \item Second Item
 \item Third Item
 \end{itemize}\end{minipage}  
 \newline This is second line.
 \end{document}

enter image description here

How can I fix this problem?

share|improve this question
This is very similar to How to keep a constant \baselineskip when using minipages (or \parboxes)? (possibly a duplicate). – Werner Mar 15 at 6:14
Is there a specific reason why you're using a minipage here? – egreg Mar 15 at 10:00

1 Answer

up vote 2 down vote accepted

I am not sure about this, but maybe the following is what you are looking for.

Code

\documentclass{article}
\usepackage{enumitem}

\begin{document}

\noindent This is first line.\\[\baselineskip]
\begin{minipage}{\textwidth}
\begin{itemize}
\item First Item
\item Second Item
\item Third Item
\end{itemize}
\end{minipage}
\\[\baselineskip] This is second line.

\end{document}

Output

enter image description here

Update

Code

\documentclass{article}
\usepackage{enumitem}

\setlength\parindent{0pt}

\begin{document}

This is first line.\\[0.5\baselineskip]
\begin{minipage}{\textwidth}
\begin{itemize}
\item First Item
\item Second Item
\item Third Item
\end{itemize}
\end{minipage}
\\[0.5\baselineskip] This is second line.

\end{document}

Output

enter image description here

share|improve this answer
In my example, there is one newline before intemize. I want to reduce the space equal to 1 newline using topsep. But using baselineskip, space seems to be more. – user15662 Mar 15 at 6:45
"using baselineskip, space seems to be more": Then use, say, \\[0.5\baselineskip]. (I don't know if 0.5 is the correct factor; it's just a guess.) – Svend Tveskæg Mar 15 at 6:52
my report is auto report so i cannot add \noindent. How can i avoid using this. – user15662 Mar 15 at 7:11
You can just delete it and then you are not using it... (I don't understand the question.) – Svend Tveskæg Mar 15 at 7:25
If i use no indent, text before itemize get indented. Is there any way to not to indent without using \noindent – user15662 Mar 15 at 7:30
show 1 more 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.