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 center a text line within an itemize enivornment ?

What I tried:

\documentclass[a4paper]{article} 

\begin{document} 
\begin{itemize}
  \item {\centering text to center}
\end{itemize}
\end{document}

But the text is not centered, but on the left.

share|improve this question

1 Answer 1

up vote 10 down vote accepted
\documentclass[a4paper]{article}
\usepackage[showframe]{geometry}

\begin{document}
\begin{itemize}
  \item {\hfil text to center}
\end{itemize}
\end{document}

enter image description here

share|improve this answer
2  
\item \hfil text to center would be enough. The latter \hfil is removed by the end of paragraph and replaced by \parfilskip. –  Heiko Oberdiek Oct 21 '12 at 23:25
1  
@HeikoOberdiek: Thank you for noting. I changed the answer appropriately. :-) –  Harish Kumar Oct 21 '12 at 23:41

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.