# Place a list in the middle of the page

I have an itemized list:

\begin{itemize}

\item First item

\item Second item

\end{itemize}


I'd like to place this list somewhere near the center of the page. But, I still want the bullet points to be left aligned. How do I do this?

If your list has to span across the page boundary, then you can adjust leftmargin and rightmargin provided by enumitem - set them to equal values:

\documentclass{article}
\usepackage{enumitem,lipsum}

\begin{document}
\lipsum[1]
\begin{itemize}
\item First item
\item Second item
\end{itemize}
\lipsum[2]
\begin{itemize}[leftmargin=.4\linewidth,rightmargin=.4\linewidth]
\item First item
\item Second item
\end{itemize}
\lipsum[3]
\end{document}


You could adjust the margins based on the width of the list items.

Without guessing:

\documentclass{article}
\usepackage{environ}
\usepackage{lipsum} % just for the example

\NewEnviron{centeritemize}{%
\global\centeritemizewd=0pt
\setbox0=\vbox{
\renewcommand{\item}[1][]{\centeritemizeitem}
\BODY\item\centeritemize
}
\begin{center}
\begin{minipage}{\centeritemizewd}
\leftmargini=0pt
\begin{itemize}
\BODY
\end{itemize}
\end{minipage}
\end{center}
}
\newdimen\centeritemizewd
\def\centeritemizeitem#1\item#2{%
\setbox2=\hbox{#1}%
\ifdim\wd2>\centeritemizewd
\global\centeritemizewd=\wd2
\fi
\ifx#2\centeritemize
% end the recursion
\else
\expandafter\centeritemizeitem
\fi
}

\begin{document}
\lipsum*[2]
\begin{centeritemize}
\item First item
\item Second item
\end{centeritemize}
\lipsum[2]
\end{document}


Limitations: no blank lines are allowed in the centeritemize environment.

Don't use it. There's no reason to.

• ... and page-breaking. – Werner Sep 5 '14 at 18:34
• @Werner This might be solved by setting \leftmargini instead of using a minipage. – egreg Sep 5 '14 at 19:56
\begin{center}
\begin{minipage}{.5\textwidth}
\begin{itemize}

\item First item

\item Second item

\end{itemize}
\end{minipage}
\end{center}


EDIT: Most methods try to guess the width of the \itemize by trial and error. Here is another simple method that requires no guessing (making use of the powerfull varwidth package):

\documentclass{article}
\setlength{\parindent}{0in}
\usepackage{varwidth}
\begin{document}

\newlength\mylen
\newsavebox\mybox
\setlength\mylen{\the\wd\mybox}

\vspace*{\fill}\centering
\parbox{\mylen}{%
\begin{itemize}
\item First item
\item Second item
\end{itemize}}
\vspace*{\fill}

\end{document}


OLD sol: Can try this (without changing the whole page size):

\documentclass{article}
\setlength{\parindent}{0in}
\begin{document}

\vspace*{\fill}\centering
\parbox{3cm}{%
\begin{itemize}
\item First item
\item Second item
\end{itemize}}
\vspace*{\fill}
\end{document}


Giving:

Limitation here is guessing the 3cm width.

• Well, for \hfill~ just use \begin{center} .. \end{center} and for \vfill~ may be use \vspace*{\fill} .. \vspace*{\fill} but i'm not sure about a better workaround. – AboAmmar Sep 5 '14 at 20:14
• Since you agree with my suggestion, I updated my answer. Thanks @David Carlisle – AboAmmar Sep 5 '14 at 20:36
• yes I deleted my comments:-) (and added a missing %) +1 then (the ~ version is still in the second blovk – David Carlisle Sep 5 '14 at 20:37
• Yes, I edited this too. – AboAmmar Sep 5 '14 at 20:42
• varwdith is a good suggestion, but \begin{center} \begin{varwidth}{\linewidth} \begin{itemize} \item One \item Two and three \end{itemize} \end{varwidth} \end{center} seems to be a simpler way to use it. – Andrew Swann Sep 6 '14 at 12:39

I can see two solutions, emulating the itemize environment with a tabular environment for short items, or with a tabulary environment, fixing the maximum width of items and automatic linebreaking at the prescribed width. It also allows for \pars.

Example:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{array}
\usepackage{lipsum}
\usepackage{tabulary}
\usepackage[textwidth = 16cm, nomarginpar, showframe]{geometry}

\begin{document}
\lipsum[2]
\begin{center}
\begin{tabulary}{0.6\linewidth}{@{\textbullet\hskip\labelsep}L@{}}
A very long first item, a very long first item, a very long first item, a very long first item,
\par
To be continued… \\
Second item \\
A slightly longer third item
\end{tabulary}
\end{center}

\lipsum[3]
\begin{center}
\begin{tabulary}{0.6\linewidth}{@{\textbullet\hskip\labelsep}L@{}}
A not so long first item\\
Second item \\
A slightly longer third item
\end{tabulary}
\end{center}

\lipsum[4]
\begin{center}
\begin{tabular}{@{\textbullet\hskip\labelsep}l@{}}
A not so long first item\\
Second item \\
A slightly longer third item
\end{tabular}
\end{center}

\end{document}


This is the simple way of doing it:

\begin{itemize}

\item \begin{center} $\vec{n}_{yz}=\langle 1,0,0 \rangle$ \end{center}
\item \begin{center} $\vec{n}_{zx}=\langle 0,1,0 \rangle$ \end{center}
\item \begin{center} $\vec{n}_{xy}=\langle 0,0,1 \rangle$ \end{center}

\end{itemize}