# Tag Info

3

Since the left hand column of the description is in bold letters, you have to calculate the the width based on bold letters. Trying \widthof{\textbf{Connectivity}} solves that problem. As for the insufficient indenting when multiple lines are present, they seem to be about one n space and so I gave a dummy character n or y to the argument of the second ...

7

\begin{enumerate}[label=\arabic*.,ref=\arabic*] ... Or add it to the definition of your custom list or whatever.

3

A variant of Christian Hupfer's solution, but fully expandable: \documentclass{article} \usepackage{enumitem} \usepackage{xparse} \ExplSyntaxOn \DeclareExpandableDocumentCommand{\basetwoenum}{m} { \basetwoenum_main:n { #1 } } \cs_new:Nn \basetwoenum_main:n { \exp_args:Nc \basetwoenum_eval:n { c@#1 } } \cs_new:Nn \basetwoenum_eval:n { \fp_eval:n ...

3

Here's a LuaLaTeX-based solution, which works with the enumitem package. It defines an enumerated environment called powertwoenum, in which consecutive items are numbered as 1, 2, 4, 8, 32, etc. Items in a powertwoenum list may be cross-referenced via the usual \label-\ref mechanism. % !TEX TS-program = lualatex \documentclass{article} ...

2

An 'awful' mix with enumitem and expl3 features, defining a new counter formater named baseenum -- I've to test with deeper level nesting however. \documentclass{article} \usepackage{enumitem} \usepackage{xparse} \makeatletter \def\basetwoenum#1{\expandafter\@basetwoenum\csname c@#1\endcsname} \ExplSyntaxOn \def\@basetwoenum#1{% \int_set:Nn ...

3

\documentclass{article} \usepackage{tikz} \renewcommand*{\labelenumi}{\pgfmathparse{int(2^(\theenumi-1))} \pgfmathresult} \begin{document} \begin{enumerate} \item One \item Two \item Three \item more \item more \item more \item more \item more \item more \item more ...

3

You shouldn't redefine \descriptionlabel. That is used to format the label, and the argument can contains fonts, penalties and other things not really suitable in a label. Better use the format key of enumitem: \documentclass[12pt]{article} \usepackage{lingmacros, amssymb, setspace, units, tabto, array, hyperref, nameref, enumitem, footnote, cite, changes, ...

3

The reason for the extra space is the argument for \descriptionlabel The command \enit@description@i calls \descriptionlabel and applies \enit@align{\enit@format{##1}} effectively. This will lead to extra space since NSC\label{NSC} will add this space for \label{NSC}. I've applied another strategy: The argument of \item [Foo] will automatically generate ...

1

The \tikzball command must be protected, i.e. use label={\protect\tikzball{...}}. \documentclass[11pt]{beamer} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{lmodern} \usepackage[francais]{babel} \usepackage{enumitem} \usepackage{tikz} \makeatletter % create beamer ball commands \newcommand\beamerball{% ...

0

I realize this answer doesn't satisfy the requirement of not using itemize, but I am adding it for completeness. Since the 5-level depth constraint also applies to itemize environments, here is an example (using the same method proposed in Peter's answer) that increases the depth for the default itemize environment: \usepackage{enumitem} \setlistdepth{20} ...

5

Why are you using an inline list when you obviously don't want it to be inline? Removing all your settings seems to give the output you want: \documentclass[12pt,a4paper]{article} \usepackage{times} \usepackage[inline, shortlabels]{enumitem} \begin{document} \begin{enumerate} \item \begin{enumerate} \item What is the flow rate in terms of the ...

8

Just for fun, a version that asks Pari-GP to increase the list of primes, using the function nextprime. The final list is written out in the .aux file, so it can be recycled at initialization time. Note that shell escape is needed if the list has to be made larger. Of course, a working Pari-GP installation is needed. \documentclass{article} ...

20

I took a different approach, not using a list of primes but, rather, using pgfmath to find the primes instead. This was fun. \documentclass{article} \usepackage{pgfmath} \usepackage{enumitem} \newcounter{primecnt} \newcommand{\nextprime}{%\ \loop \stepcounter{primecnt}% \pgfmathsetmacro{\primeTF}{isprime(\theprimecnt)}% ...

15

This answer takes Christian's excellent answer (and who deserves the credit for developing the basic structure) and tweaks it to make the input of new primes more streamlined. It uses the \getargsC macro of the readarray package to take a space-separated list and plunk the list into the macros \argi, \argii, \argiii, etc. in romannumeral fashion. This ...

19

Here's an enumitem version with a special \AddEnumerateCounter output named \primeenum which can be used label={\primeenum*.} style. Basically, it just applies \ifcase... \or...\fi and lists some prime numbers up to 59, but this can be extended of course. \documentclass{article} \usepackage{enumitem} \makeatletter ...

0

So I go this proposal at another forum and it works great. \documentclass{article} \usepackage{enumitem} \usepackage[svgnames]{xcolor} \newcommand{\checkbox}[1]{\protect\fbox{% \hbox to1em{\footnotesize\color{LightGray}\sffamily\hfil#1\hfil}}} \begin{document} Answer the following by marking the Yes or No box: \begin{enumerate} ...

3

You need to to \protect \dashuline,that's all. However, I doubt this style of typography ;-) (The some is true for \dotuline). Contrary to \uline etc. \dashuline is no robust command, i.e. it's fragile. Other way: Use \robustify{\dashuline} (needs etoolbox package), \protect is not needed then. \documentclass[12pt, a4paper]{article} \usepackage{enumitem} ...

2

I am unsure if this is meant, but the box is before the label: \documentclass[11pt]{article} \usepackage{amssymb} \usepackage{enumitem} \newlist{checklist}{enumerate}{2} \setlist[checklist]{label={$\square$\quad\arabic*.}} \newcommand{\YesNo}{Yes $\square$ \quad No $\square$} \begin{document} Put a check in the box if the statement is mostly true ...

0

Inline lists are boxes, and so your definition is lost. Either use mode=unboxed or move the \@currentlabel definition so that it is nearer at the label: \documentclass{article} \usepackage[inline]{enumitem} \makeatletter \newcommand{\myitem}[1][]{% \item[#1]\protected@edef\@currentlabel{#1}\ignorespaces% } \makeatother \begin{document} ...

3

OK. I'm an idiot. I can stare at something all afternoon but only find the answer 30 seconds after I post a question. It turns out that cleveref's documentation just has a weird idea of what constitutes a 'single' reference. I naïvely assumed that Single Cross-References meant cross-reference tokens and that Cross-reference formats for single ...

1


2

I don't understand the question, so don't expect this to answer it. But in any case, if you substitute this \expandafter\def\csname clettered#2\endcsname ##1{\expandafter\expandafter\expandafter\csname @clettered#2\endcsname\csname c@##1\endcsname}% \expandafter\def\csname @clettered#2\endcsname ##1{\@arabic##1}% \AddEnumerateCounter*{\expandafter\csname ...

4

Only a first version, working for digits only, not for numbers > 9. In short: enumitem needs special counter output information for such setups, i.e. an \AddEnumerateCounter macro must be used. The special setup is valid here only for digits, unfortunately. \documentclass{article} % For bilingual document \usepackage{fontspec} \usepackage{polyglossia} ...

2

The error is ref={(\thesection.\arabic*.\alph*)}, precisely the command \arabic*, since this will be replaced by enumii (it's the 2nd level) and not as requested, refering backward to the higher level enumi. It's somehow stated in the enumitem manual, that ref is not inherited and one has to use \ref{level1} etc (but this is an unclear statement, in my ...

Top 50 recent answers are included