New answers tagged

0

\documentclass{article} %\usepackage[parfill]{parskip}% <--- should work with or without this package. \usepackage{showframe} \usepackage{array} \usepackage{xcolor} \usepackage{enumitem} \usepackage{tikz} %% http://tex.stackexchange.com/questions/64982/why-is-parskip-zero-inside-a-minipage \newlength{\currentparskip} \newcommand*{\CircledText}[2][fill=...


2

Just use the classic itemize environment. Together with the symbols from http://tex.stackexchange.com/a/313337/36296 this gives: \documentclass{beamer} \usepackage{pifont} \newcommand{\cmark}{\ding{51}}% \newcommand{\xmark}{\ding{55}}% \newcommand{\done}{\rlap{$\square$}{\raisebox{2pt}{\large\hspace{1pt}\cmark}}% \hspace{-2.5pt}} \newcommand{\wontfix}{\...


0

As an addendum to Ulrike Fischer's answer, you can define all levels greater than 2 with a loop: TeX Loop % Loop Sublevels 2 thru 4 \newcount\descriptionlistlevel \descriptionlistlevel=4 \loop \ifnum\descriptionlistlevel>1 \setlist[description,\descriptionlistlevel]{font=\normalfont\color{blue}\elbowarrowright\ }% Inherit level 1 and override/...


2

It is easier to NOT use the enumitem package for this. The reason for this is that \refstepcounter uses \theenumi but \item (as defined by the package) does not. (Note, this only works for the first level. The counter names are enumi, enumii, enumiii, etc.) \documentclass{article} %\usepackage{enumitem} \newcommand{\itemprime}[1]% #1 = contents (inside ...


3

The main question is how to print the prime. \documentclass{article} \usepackage{textcomp} \usepackage{enumitem} \makeatletter \newcommand\myprimeitem{% \item[(\roman{enumi}\textquotesingle)]\def\@currentlabel{(\roman{enumi}\textquotesingle)}} \makeatother \begin{document} \begin{enumerate}[label=(\roman*)] \item\label{A} First \item\label{B} Second \...


3

You can define a new style similar to multiline, but you will have to setup a better labelwidth and you will have to insert empty lines with \\~ if the description text is too short. \documentclass{article} \usepackage{enumitem,calc} \makeatletter \def\enit@align@parright{% \def\enit@align##1{% \nobreak \strut\smash{\parbox[t]\labelwidth{\...


2

You can add after={\vspace{-\baselineskip}} to the list of enumerate options you currently have. This should revert the empty line following the list.


2

You can define options that affect only the second level: \documentclass{article} \usepackage{xcolor,enumitem} % Adds functionality to lists \setlist[description]{style=nextline,labelwidth=0pt,leftmargin=15pt,font=\normalfont\color{blue},itemindent=\dimexpr-5pt-\labelsep\relax} % \setlist[description,2]{font=\normalfont\color{red}\elbowarrowright\ } \...


1

Assignments like \setlength, \addtolength, \settowidth, \settoheight and \settodepth are local, in the sense that they are only valid in the group they are issued; an environment constitutes a group, like alignment cells and boxes (\mbox, \makebox, \fbox and so on). If you need global versions of these commands, it's not really difficult to make versions ...


1

Length adjustments respect the scope they're in, as is demonstrated by the minimal example below. So, setting or changing it inside a group will revert it back to its original definition/setting before the group. You could use \global<len>=<len> to make the change global, thereby avoiding the scope limitation: \documentclass{article} \begin{...


1

Unlike LaTeX counters length registers are group-safe, i.e. changing their values inside a group (like \begin{enumerate}...\end{enumerate}) does not survive the exit of the group, i.e. the change is not persistent unless \global\addtolength is used here. Since the definition of \addtolength is (see latex.ltx) \def\addtolength#1#2{\advance#1 #2\relax} \...


4

A solution using no new packages, only xcolor. You can add shadow to any symbol or text using the command created here, \ourshadow. Output Code \documentclass{book} \usepackage{enumitem} \usepackage{amsmath,amsfonts,amssymb,amsthm, bm} \usepackage{xcolor} \newlength{\tmpShadow} \newcommand{\ourShadow}[2]{% \settowidth{\tmpShadow}{#1} \...


3

Here are two options using tikz: Code: \documentclass{book} \usepackage{enumitem} \usepackage{xcolor} \usepackage{tikz} \usetikzlibrary{shadows} \newcommand*{\MyShadow}{\tikz \draw [baseline, fill=blue,draw=blue,circular drop shadow] circle (2pt);} \newcommand*{\MyBall}{\tikz \draw [baseline, ball color=red, draw=red] circle (2pt);} \begin{document} \...


4

Your footnote list is nested inside another list of the same type and you have declared that this list only has one level. Just define it with two levels. \documentclass{article} \usepackage{enumitem} \setlist{parsep=0pt,listparindent=\parindent} \setlist[enumerate, 2]{leftmargin=0cm} \newlist{mylist3}{itemize*}{2} \setlist[mylist3]{label=-} \setlength{\...


4

The following MWE will help you solve the problem: \documentclass[a4paper]{article} \usepackage{enumitem} \usepackage{lipsum} %Used in my LaTeX document that I'm preparing, just in case there is some conflict between this and any proposed solution \setlist[itemize]{wide,topsep=0mm,partopsep=0mm,parsep=0mm,itemsep=0.1mm,labelindent=0pt,leftmargin=0pt} \...


1

Here is a solution: I define an assignment environment, based on the snugshade* environment from framed. \documentclass{article} \usepackage[english]{babel} \usepackage{blindtext} \usepackage{framed} \usepackage[dvipsnames]{xcolor} \colorlet{shadecolor}{lightgray!35!} \newcounter{assignment} \newenvironment{assignment}{% \refstepcounter{assignment}\...


2

You can build a protected number test into the label. Here, \padz adds a zero if the enumi count is 15 or less. \documentclass{scrartcl} \usepackage{moreenum} \usepackage{enumitem} \def\padz{\ifnum\value{enumi}>15\relax\else0\fi} \begin{document} \begin{enumerate}[label={\ttfamily0x\protect\padz\enumhex*}] \item Thou shalt not follow the ...


2

Since moreenum uses fmtcount as its "number translation workhorse", you can use \padzeroes[2] to prepend a sufficient number of zeroes to your enumeration: \documentclass{article} \usepackage{moreenum,enumitem} \padzeroes[2] \begin{document} \begin{enumerate}[label=\texttt{0x\enumHex*}] \item Thou shalt not follow the null pointer. \item Thou shalt ...



Top 50 recent answers are included