Text FormattingWhy does my itemize render wrong?

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
rain
Posts: 12
Joined: Thu Jan 28, 2016 9:00 pm

Why does my itemize render wrong?

Post by rain »

Hi. Why does my itemize render the wrong way? Like MRQ is more left than others.

Code: Select all

\begin{itemize}
\item[MRQ] How to publish personal data in a way that preserves privacy?
\item[RQ1] What are the risks of publishing personal data and what methods can be used to mitigate these risks?
\item[RQ2] What anonymization operations implement privacy-preserving methods?
\item[RQ3] What is the prototype for learning these privacy-preserving methods?
\item[RQ4] What is usability of the prototype?
\end{itemize}
itemize.png
itemize.png (69.93 KiB) Viewed 2258 times
And how I could fix it?
Last edited by cgnieder on Fri May 19, 2017 4:40 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

Why does my itemize render wrong?

Post by Stefan Kottwitz »

You could use the enumitem package for customizing lists, such as:

Code: Select all

\documentclass{article}
\usepackage{enumitem}
\setlist[itemize]{align=left,leftmargin=*,itemindent=!}
\begin{document}
\noindent text
\begin{itemize}
  \item[MRQ] How to publish personal data in a way that
             preserves privacy?
  \item[RQ1] What are the risks of publishing personal data and
             what methods can be used to mitigate these risks?
  \item[RQ2] What anonymization operations implement
             privacy-preserving methods?
  \item[RQ3] What is the prototype for learning these
             privacy-preserving methods?
  \item[RQ4] What is usability of the prototype?
\end{itemize}
\end{document}
Btw. it would be great if you would post code like I did: using the Code button (the LaTeX button is for inline LaTeX, code within text), and posting as small compilable example for easy testing. Code boxes are automatically linked to the online LaTeX editor Overleaf, so readers can test and improve starting with a single click. That improves the chance to get a solution. ;-)

By the way, I think a description list would be better than itemize here.

Without any package:

Code: Select all

\documentclass{article}
\begin{document}
\noindent text
\begin{description}
  \item[MRQ] How to publish personal data in a way that
             preserves privacy?
  \item[RQ1] What are the risks of publishing personal data and
             what methods can be used to mitigate these risks?
  \item[RQ2] What anonymization operations implement
             privacy-preserving methods?
  \item[RQ3] What is the prototype for learning these
             privacy-preserving methods?
  \item[RQ4] What is usability of the prototype?
\end{description}
\end{document}
Stefan
LaTeX.org admin
Post Reply