Text Formattingremoving indent from list?

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
martman
Posts: 8
Joined: Thu Jul 31, 2008 4:09 am

removing indent from list?

Post by martman »

Im trying to remove the indentation from lists like this, with no luck. Any ideas?

Code: Select all

\begin{multicols}{2}
        \begin{itemize}
                \setlength{\itemsep}{1pt}
                \setlength{\parskip}{0pt}
                \setlength{\parsep}{0pt}
                \setlength{\leftmargin}{-.25in}
                \item a
                \item b
                \item c
                \item d
                \item e
                \item f
        \end{itemize}
\end{multicols}

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

frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

removing indent from list?

Post by frabjous »

The easiest way is to load the enumitem package and use some of its options, e.g.:

Code: Select all

        \begin{itemize}[leftmargin=*]
                \item a
                \item b
                \item c
                \item d
                \item e
                \item f
        \end{itemize}
See the enumitem package documentation for more information and more options.
martman
Posts: 8
Joined: Thu Jul 31, 2008 4:09 am

Re: removing indent from list?

Post by martman »

That helped with indenting nicely.

Now I'm noticing that if I start a list like that at the top of a section, the first elements in each column arnt lined up. Know how to fix that anychance?


Thanks
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Re: removing indent from list?

Post by frabjous »

Please provide a fully compilable minimal example of what you mean. At the moment, I don't know how to duplicate this problem. It seems to work fine for me at the start of a section, at least in the article class with no other packages besides multicol and enumitem loaded.
martman
Posts: 8
Joined: Thu Jul 31, 2008 4:09 am

removing indent from list?

Post by martman »

Code: Select all

\documentclass[12]{report}
\usepackage{titlesec}
\usepackage{anysize}
\usepackage{multicol}
\usepackage{enumitem}

\thispagestyle{empty}
\pagestyle{empty}
\setlength{\parindent}{0in}

\marginsize{1.5in}{.75in}{.0in}{0in}
\setlength{\parskip}{-.125in}

\titleformat{\section}[leftmargin] {
	\normalfont 
	\large
	\sffamily
	\bfseries
	\filleft
}{\thesection}{.25in}{} 

\titlespacing{\section}{1.25in}{.25in}{.125in} 

\begin{document}
	\section*{Foo Bar}
	\begin{multicols}{2}
		\begin{itemize}[leftmargin=*]
			\setlength{\itemsep}{1pt}
			\setlength{\parskip}{0pt}
			\setlength{\parsep}{0pt}
		
			\item a
			\item b
			\item c
			\item d
			\item e
			\item f
		\end{itemize} 
	\end{multicols}
\end{document}

Post Reply