Hot answers tagged lists
11
The following MWE provides \itemcolor{<colour>} that allows you to set the colour of the list item as you wish:
\documentclass{article}
\usepackage{pifont,xcolor}% http://ctan.org/pkg/{pifont,xcolor}
\definecolor{myblue}{RGB}{0,29,119}
\newcommand{\itemcolor}[1]{% Update list item colour
\renewcommand{\makelabel}[1]{\color{#1}\hfil ##1}}
...
7
you can define custom item commands:
\documentclass{book}
\usepackage{pifont}
\usepackage{xcolor}
\definecolor{myblue}{RGB}{0,29,119}
\newcommand{\bsquare}{\item[\color{myblue}\ding{110}]}
\newcommand{\barrow}{\item[\color{myblue}\ding{228}]}
\newcommand{\bwarrow}{\item[\color{myblue}\ding{227}]}
\begin{document}
\begin{dinglist}{110}
\bsquare{Sample ...
7
If I understand correctly, you need to add [t] alignment:
\documentclass{article}
\begin{document}
\begin{enumerate}
\item \begin{tabular}[t]{cccccccccc} %%%% note [t] here.
$x[n] = $ & \{1/3 & -1/2 & 1/4 & -1/8 & 1/6\} & and\\
& & & $\uparrow$ & & & \\
\end{tabular}
...
5
The following is a suggestion for a slightly easier notation that is more flexible. Moreover, it provides a consistent and accurate spacing around the math operators you use:
\documentclass{article}
\usepackage{amsmath,xparse}% http://ctan.org/pkg/{amsmath,xparse}
\NewDocumentCommand\printarray{O{~~} >{\SplitList{,}}m}
{%
...
5
There is seldom a case for nesting a description environment inside a tabular environment like you did, especially with such a narrow column; 2em is very very very narrow (an "em" is a font-dependent length corresponding to the width of an "M" of the font used). Get rid of the tabular environment.
Moreover, your modification of the description environment ...
5
Here is an idea; getting left alignment of both columns is easier with tabular & friends than with description.
\documentclass{article}
\usepackage[french]{babel}
\usepackage{array}
\usepackage{siunitx}
\DeclareSIUnit{\cheval}{ch}
\DeclareSIUnit{\tour}{tr}
...
4
LaTeX is in a funny state if you start one list environment immediately inside another, hyperref ends up referencing an internal label that it never actually uses.
\documentclass{scrartcl}
\usepackage{amsthm}
\usepackage{hyperref}
\newtheorem{Bem}{Bemerkung}
\begin{document}
\begin{Bem}
\mbox{}\label{Bemelm}
\begin{enumerate}
\item
\end{enumerate}
...
4
For more automation, you may want to define a new command \bitem, as follows:
\documentclass{article}
\newcommand\bitem[1]{\item{\bfseries #1}\\}
\begin{document}
\begin{enumerate}
\bitem {Specify a mean equation for the returns}
by testing for serial dependence of $r_t$ an, if necessary, building an ARMA model
\bitem {Test for ARCH ...
4
I also would like to suggest you another approach, using a matrix environment instead of a tabular; it's more natural, gives you the desired vertical alignment automatically, and saves you the column format specification:
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{enumerate}
\item
$
x[n] =
\{\begin{matrix}
1/3 & -1/2 & ...
3
Using the enumitem package you can specify the space between items as an optional itemsep argument:
\documentclass[a4paper,10pt]{article}
\usepackage{enumitem}
\begin{document}
\begin{enumerate}[itemsep=10pt]
\item%
Text text text text text text text text text text text text text text text text text text text text
\item%
Text text text text text ...
3
For a LaTeX/pgfmath solution I'd go with something like the code shown below. The code is somewhat impenetrable, but it is unfortunately unavoidable. As random list stuff is all assigned globally, it is necessary to also introduce a command to copy random lists. Possibly with LuaLaTeX and tables it would be easier.
\documentclass{article}
...
3
I hope I understood the question correct
Using the package enumitem you can specify the label position and the alignment of the label by \SetLabelAlign
\documentclass[paper=a4, paper=portrait, pagesize=auto]{scrartcl}
\usepackage[inline]{enumitem}
\usepackage[table]{xcolor}
\definecolor{orange}{HTML}{FFC296}
\begin{document}
...
3
I would kindly advise against such definitions since is a far more convenient and useful alternative in enumitem:
\documentclass{article}
\usepackage{enumitem}% http://ctan.org/pkg/enumitem
\begin{document}
\begin{enumerate}[label=\arabic*.,ref=\arabic*]
\item Some item
\begin{enumerate}[label*=\arabic*.,ref=\theenumi.\arabic*]
\item Another item ...
3
One possibility using the enumitem package:
\documentclass{article}
\usepackage{enumitem}
\newcommand\setupdes{%
\renewcommand\makelabel[1]{%
\parbox[t]{\dimexpr\leftmargin+\linewidth\relax}{\ttfamily##1}}}
\setlist[description]{labelsep=0pt,before={\setupdes}}
\begin{document}
\begin{description}
\item[packeteer.send(message)]
is used to ...
3
You can play with the layout a bit, but something like this:
\documentclass{article}
\renewcommand*\descriptionlabel[1]{\hspace\labelsep
\parbox[t]{\dimexpr\leftmargin+\linewidth-\labelsep}{%
\normalfont\bfseries\raggedright #1}}
\begin{document}
\begin{description}
\item[\texttt{packeteer.send(message)}]
is used to send a given ...
2
Niel's answer is a good one for what you want to do. I was thinking more generally of the question: how to change the formatting of the body of an enumerate or itemize environment, without changing the item labels?
In order to do this, you have to switch the font commands on and off after each \item and before the next \item. The trouble is that \item ...
2
You can redefine the behaviour of the itemize environment directly, exploiting the fact that \begin{itemize} calls the macro \itemize within a \begingroup ... \endgroup pair.
Example code
\setlength\parindent{0ex}
\let\originalitemize\itemize
\def\itemize{\originalitemize\itshape}
Some text
\begin{itemize}
\item foo \emph{(bar)} \item bar
\end{itemize}
...
2
The etaremune package provides an etaremune environment that does just this. Note that two compile runs is necessary to get the correct numbering.
\documentclass{article}
\usepackage{etaremune}
\begin{document}
\begin{etaremune}
\item Last things first
\item \ldots
\item First things last
\end{etaremune}
\end{document}
2
Use the enumitem package to push the item label inward, while fixing the left margin at 0pt:
\documentclass{article}
\usepackage{enumitem}% http://ctan.org/pkg/enumitem
\begin{document}
\begin{itemize}
\item Item NO 1
\\paragraph no1 paragraph no1 paragraph no1 paragraph no1 paragraph no1
paragraph no1 paragraph no1 paragraph no1 paragraph no1 ...
2
Here's a quick and dirty way to achieve what you want. All I did was change your
\SetLabelAlign{rightbox}{\hss\llap{#1\quad}}
to
\SetLabelAlign{rightbox}{\hspace{-19ex}\rlap{#1\quad}}
Output before:
Output after:
The complete code becomes:
\documentclass{article}
\usepackage{enumitem}
\begin{document}
...
2
I don't think you need itemized lists, but a (modified) tabular environment.
\documentclass{article}
\usepackage{booktabs,caption}
\captionsetup[table]{position=top}
\newcommand{\category}{%
\ifstarted\addlinespace\fi
\global\startedtrue
\global\categorytrue
\itshape}
\newcommand{\main}{\ifcategory\global\categoryfalse\else\addlinespace\fi}
...
2
You can do everything you want with overlay specifications and the \againframe command. First of all, format the list like this:
\begin{enumerate}[<+-| alert@+>]
\item collect underpants
\item ...
\item profit!
\end{enumerate}
The +- specification says that each item should automatically increment the pause counter by one, and display that item ...
2
I thought you could achieve this effect without having to hack an itemize. Just use multiple rows of the table:
\documentclass{report}
\usepackage{longtable}% http://ctan.org/pkg/longtable
\usepackage{array,booktabs}
\begin{document}
\begin{longtable}{p{4cm}p{4cm}>{-- }p{6cm}}
\caption{Summary of proven determinants for ...
2
Without a full MWE, I've taken some code from Przemysław Scherwentke's answer:
\documentclass{report}
\usepackage{longtable}% http://ctan.org/pkg/longtable
\usepackage{array,booktabs,enumitem}% http://ctan.org/pkg/{array,booktabs,enumitem}
\newcolumntype{P}[1]{>{\endgraf\vspace*{-\baselineskip}}p{#1}}
\begin{document}
...
2
The following is a working example. Because lcr are for one-line entries, itemize shouldn't work with them. Compare the first part, improved, with the second, unchanged.
\documentclass[a4paper,twoside,11pt,openright]{report}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{longtable}
%\usepackage[inline]{enumitem}
\usepackage{enumitem} ...
1
This might be considered cheating, but if you skip the enumeration environment and put everything in one table, things behave better:
\documentclass{article}
\begin{document}
\begin{tabular}{lcccccccccccccccccccc}
1.&$x[n]=$&\{1/3&-1/2&1/4&-1/8&1/6\}& and $h[n]=$&\{1&-1&1&-1\}\\
...
1
Use \textbf{...} around text that you want to embolden and \\ to break a line.
\documentclass{article}
\usepackage{enumerate}
\begin{document}
\begin{enumerate}[\bfseries1.]
\item \textbf{Specify a mean equation for the returns}\\
by testing for serial dependence of $r_t$ an, if necessary, building an ARMA model
\item \textbf{Test for ARCH Effects}\\
using ...
1
Here's a the first solution that comes to mind. Kind of a hack actually, but it works fine.
\documentclass{article}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newenvironment{benumerate}[1]{
\let\oldItem\item
\def\item{\addtocounter{enumi}{-2}\oldItem}
\begin{enumerate}
\setcounter{enumi}{#1}
\addtocounter{enumi}{1}
}{
...
1
You can hack into pifont and redeclare one of its commands, for example \Pisymbol:
\documentclass{book}
\usepackage{pifont}
\usepackage{xcolor}
\definecolor{myblue}{RGB}{0,29,119}
\newcommand{\myPisymbolformatcommand}{}
\newcommand{\hackintoPisymbol}[1]{%
\renewcommand{\myPisymbolformatcommand}{#1}
}
...
Only top voted, non community-wiki answers of a minimum length are eligible


