25
votes
How to add bullets to description lists?
You can use the itemization function (https://www.sharelatex.com/learn/Lists)
\begin{itemize}
\item one.
\item two.
\item three.
\end{itemize}
And the output:
22
votes
Accepted
How can I sort a list numerically?
This approach automatically orders the items by year or any other number, by using an external list on an .csv file.
\documentclass{article}
\usepackage{filecontents} % To create an external .csv file
...
15
votes
No indent in description list
Just to add to @Werner's excellent answer:
If you have very long labels in a description environment, sometimes it actually looks nicest to have the text wrap underneath the start of the labels, like ...
15
votes
Accepted
How to align `tcolorbox` at the top?
Updated version
After the edit with the question, I propose a different approach here not using a list to place the labels but reducing the width for the tcolorbox and using an optional argument (it ...
14
votes
Accepted
Reduce indent in description in beamer
You can modify the indention with \setbeamersize{description width=0.57cm}, just play around to whatever value you need.
\documentclass[14pt,handout]{beamer}
\setbeamersize{description width=0.57cm}
...
13
votes
Accepted
How to change colon into dot in description list?
You have to redefine \descriptionlabel, nothing that enumitem is supposed to be able to do. This is the standard definition
\newcommand{\descriptionlabel}[1]{%
\hspace\labelsep \upshape\bfseries #1:...
12
votes
How can I sort a list numerically?
You could make use of the glossaries package as shown in the following example:
\documentclass{article}
\usepackage[automake, nonumberlist]{glossaries}
\newglossaryentry{1912}{name={1912}, ...
10
votes
Accepted
Underlining an item
I propose this, with the help of the framed package, slightly tweaking the leftbar environment. If you don't want grey lines, it's easy to remove the colour. Using xparse, I define a \course command, ...
10
votes
How can I sort a list numerically?
If you prefer the solution to be as close to your syntax as possible:
\documentclass{article}
\usepackage{expl3}
\usepackage{xparse}
\usepackage{enumitem}
\usepackage{xcolor}
\begin{document}
\...
9
votes
Accepted
Redefining the item command of the description environment
In his answer, egreg has explained the problems with your current definition and a way to ammend it. However, I'd suggest you to use the nextline style for desciption offered by the enumitem package:
...
9
votes
Accepted
How to set leftmargin of description to width of a particular label in enumitem?
Here are two ways:
\documentclass{article}
\usepackage{enumitem}
\usepackage{calc}
\begin{document}
\begin{description}[labelwidth =\widthof{\bfseries9999}, leftmargin = !]
\item[1987]Something ...
8
votes
Accepted
Left aligned labels in descripton
As beamer does not like the package enumitem, you will have to define your own "description item".
% arara: pdflatex
\documentclass[handout]{beamer}
\defbeamertemplate{description item}{align left}{\...
8
votes
glossaries: How to customize list of symbols with additional column for units?
Just adding to Christian's answer: to use the unit macros inside the \si{unit} command defined by siunitx such as \metre and \kilo\watt used in his MWE, one should add the command \glssetnoexpandfield{...
7
votes
Line break after description label
Adding \leavevmode also has the desired effect and looks reasonably clean.
\documentclass{article}
\begin{document}
\begin{description}
\item[Animals:]\leavevmode
\begin{itemize}
\item Dog
\...
7
votes
Using \lstinline inside a \item
If you're happy with a new command, here is something I am using now (inspired by the previous answer):
\newcommand*{\lstitem}[1]{
\setbox0\hbox{\lstinline{#1}}
\item[\usebox0]
% \item[\...
7
votes
Accepted
right-alignment with enumitem
\documentclass{article}
\usepackage{enumitem,xcolor}
\usepackage{showframe}
\begin{document}
\begin{description}[font=\color{black},before=\color{blue},nosep]
\raggedleft %%...
7
votes
Accepted
line break in description label
Hide the depth of the parbox:
\documentclass{beamer}
\usetheme{Madrid}
\mode<handout>{ \usecolortheme{seahorse} \usecolortheme{rose} }
\useinnertheme{circles}
\usefonttheme[mathonly]{serif}
\...
7
votes
Accepted
Should I write \begin{quote} ... \end{quote} or \quote ... \endquote?
Always use the \begin \end syntax, some environments might work using the underlying commands but most will not. It also helps editors to offer syntax highlighting and context sensitive file ...
6
votes
How do I align enumerate items inside empty description?
You could also just do
\begin{enumerate}
\item[]
\item A1.
\item A2.
\item A3.
\end{enumerate}
instead of the above. Works equally well (and looks better in my opinion).
6
votes
Accepted
Automatically set description list `labelwidth` based on widest label?
Solution
Here is a solution that uses the eqparbox package to measure item label widths.
It avoids some of the limitations of the solution described in Gonzalo Medina's answer (see the bottom of this ...
6
votes
How to align `tcolorbox` at the top?
I want suggest another possibility. It still needs some work but let me know if it's interesting.
\tcolorboxes have upper and lower parts which can be placed side by side. Therefore instead of trying ...
6
votes
lstlisting environment as item in description
Adding a \leavevmode helps here:
\documentclass{article}
\usepackage{xcolor}
\usepackage{listings} % fancy code listings
\usepackage{caption} % fancy chapters for fancy code listings
\...
6
votes
Accepted
Numbered description list with dot leaders?
Simply change the descripton environment for an enumerate environment:
\documentclass[12pt, letter]{article}
\newenvironment{specifications}{%
\let\olditem\item%
\renewcommand\item[2][]{\olditem#...
6
votes
Accepted
Reduce the space between label and item in a description list
\documentclass[12pt]{article}
\usepackage{enumitem}
\begin{document}
\begin{description}[labelsep=\fontdimen2\font]
\item[Video recordings] arguably produced the richest part of the data set.
...
6
votes
Accepted
How to make enumerate indent like description
Just use [leftmargin=*, align=left] as your enumerate parameters.
The output is identical but the values printed of the lengths are different because of the way the default description values are ...
6
votes
Underlining an item
Here's a way of drawing the left bar suggested by Bernard when a star is appended to the command. It requires defining new courses with \newcourse rather than \newcommand, but it involves less typing ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
description × 366lists × 176
enumitem × 65
indentation × 39
beamer × 30
enumerate × 27
horizontal-alignment × 26
spacing × 23
itemize × 21
line-breaking × 15
tables × 14
cross-referencing × 13
environments × 10
hyperref × 9
labels × 9
math-mode × 8
equations × 8
context × 8
macros × 7
vertical-alignment × 6
listings × 6
margins × 6
counters × 6
fonts × 5
floats × 5