I want to refer to item list in text automatically (without using \label command).  Following is the code I am using. It could be any number of item and it should list starting and end list number without using \label command to each item.  \documentclass{article}  \usepackage{enumitem}  \begin{document}  There are question list having question 1 to 5.  \begin{enumerate}  \item volute ped qui derferum nus sequi cus si invelicatur aboreste sin nihiten imusdae ium excepe vidus   \item niam qui te si doloresti dolorit lam aut quatempori rectati atinis dolum rat plam dolori soluptatis assum reribus nienihi catemporitas des doluptatibus sequiaeri dolupta erferia dolupta dolorupta volupta speliquas as ventempos   \item quate nis ma accus, sitatur assum et, sendant ant lit, cuptur sitem con nos sim rerum repuda et essi nos nusaperro tem reseditam, cullantibea doloremporro dolutem re et restion   \item seditem eatia dolupidellit lab ius undit eum sit officiis eiciasp erorro int eium dolut fuga. Parunt, quas ex et asi de odicipitatia verro tenduciunt fuga.   \item Et labo. Editibus que arcimpo reiusae rspero quat. \end{enumerate}  \end{document}
120657
Suppose, I have the following code:  \documentclass{article} \begin{document} We have totally 7 columns, describing the user: \begin{enumerate} \item ID --- users.name \item Forename --- users\_profiles.first\_name \item Surname --- users\_profiles.last\_name \item Email --- users.mail \item Primary Service --- services.name \item Start date --- FROM\_UNIXTIME(users.created) \item Employment Status --- users\_profiles.employment\_status \end{enumerate} \end{document}   Producing this document:    Is it possible to set the value 7 automatically, depending upon number of elements in the list? The problem is, that it resides before the list.
15212
I see that you can create an ordered list using Markdown notation like the following.  1. line 1 2. line 2 3. line 3 ... N. line N   The Markdown content supports starting each line with any arbitrary number and reorders the list starting with 1. I'd like to start an ordered list with zero. My use case for zero would be in describing capture groups from regular expressions where group zero always returns the entire string. So I'd like to display something like this:  # Groups 0. Entire string 1. The first capture group you were looking for 2. The second capture group 3. The third group with the string I heart Kittens   Markdown instead reorders the group and forces the ordered list to start at 1:    Trying to force the issue with inline HTML: &lt;ol start="0"&gt; or &lt;ol&gt;&lt;li value="0"&gt;entire string&lt;/li&gt;&lt;/ol&gt; doesn't work either. Any ideas on how I can create ordered list starting with zero?  If it's not possible to do so, then this is a feature-request.
112429
I'm using the listings package with this \begin command:  \begin{lstlisting}[caption=blabla, label=amb]   This yields a nice code listing with a caption like "Listing 1.1 blabla". Is there a way to change the caption and have something like "Code 1.1 blabla"?  I saw the title command but it doesn't use a numbering system. Any hint will be greatly appreciated!
38547
In an enumerate environment, I want a few (not all) of the items to have asterisks which appear before the number (I don't feel strongly about whether the number or the asterisk is horizontally aligned with the other numbers).  Is there a less crufty way to do this than, say, using multiple lists (or &mdash; horrors &mdash; numbering manually)?  I'm already using enumitem for an unrelated purpose, if that helps, although I didn't find a solution after a quick skim of its manual.
34898
I'd like to be able to resume an enumerated list, continuing the old numbering, after some intervening text which should not be formatted like a list item.  Is there a nice way to do this?    In particular, I don't want to start a second list with a hard-coded initial counter value, because that will break if I change the number of items in the first list.
122801
Using receipt of "" I elaborated  the following code for my needs:  \documentclass{book}  ... \usepackage{expl3}  \begin{document}  \newcommand{\PrintAnswer}[1]{% \InputIfFileExists{#1}{\refstepcounter{subsection}}{\typeout{*** #1 not found ***}}}  \ExplSyntaxOn \cs_new:Nn\PrintAnswerList:n{   \clist_set:Nx\l_csv_clist{#1}   \clist_map_inline:Nn\l_csv_clist{     \typeout{**** Printing ##1.ans}     \ExplSyntaxOff     \PrintAnswer{##1.ans}     \ExplSyntaxOn   } } \PrintAnswerList:n{\inputfiles} \ExplSyntaxOff  \end{document}    It is intended for conditional compilation of a textbook, every chapter of which (eg, 01.tex, 02.tex) writes answers to problems to the file named after the name of the chapter source file, (eg, 01.ans, 02.ans etc). Near the end of the book these files are read in by the macro \PrintAnswer. Usually, I compile only few chapters using the following trick to keep desired chapters in \inputfiles macro:  \typein[\inputfiles]{^^JEnter filename(s) for \protect\includeonly:}   All that works fine, but I was forced to switch off experimental syntax before \PrintAnswer{##1.ans} because otherwise answer files are not processed correctly (in particular, LaTeX complains that the commands for greek letters are not defined and hyphenation is broken). Therefore my question is How can one rewrite the above code using user-level LaTeX3 commands?  I found \SplitList command in xparse package. Can it help?
5259
Is there a guide out there on how to customize the enumerate and itemize instances in my code?  (I'm using the Memoir class in LaTeX for Windows, and I have the enumitem package included.)  I want to mess with the margins and spacings to make my lists look a little less "LaTeX-default"...
37834
Sometimes, I want to have enumerate lists in LaTeX start at other than the first value (1, a, i, etc.) How can I make an enumerate list start at an arbitrary value?
71984
The following image illustrates what am looking for:    Essentially I want the numbering to occur as shown above but using the multicol and enumitem package. But when I try it by using the following code:  \documentclass{article} \usepackage{amsmath,amssymb} \usepackage{enumitem,multicol} \begin{document} \begin{enumerate} \item Evaluate each of the following if $x$ is a non-zero real number.     \begin{multicols}{2}     \begin{enumerate}[itemsep=1cm]% The item sep is my choice here.     \item $\dfrac{|x|}{x}$     \item $\dfrac{x}{|x|}$     \item $\dfrac{|-x|}{-x}$     \item $|x|-|-x|$     \end{enumerate}      \end{multicols} \end{enumerate} \end{document}   I get:    Essentially, I want the (b) to be where the (c) is. I know this has been done but I can't seem to find it.
7112
How can I ger a line break after the label of a description environment item? I'd like to keep the indentation and the bold face for the item label, but I'd like to have the body of the item in a separate paragraph, because it starts with an itemize environment and indenting that looks really strange.  Adding \\ does not work (error message “no line to end here”), neither does a blank line or \par (no effect). Even \,\par has no effect.  Example:  \documentclass{article} \begin{document}  \begin{description} \item[Animals:]   \begin{itemize}   \item Dog   \item Cat   \item Fish   \end{itemize} \item[Colors:]   \begin{itemize}   \item Red   \item Green   \item Blue   \end{itemize} \end{description} \end{document}   It renders like this:
57919
For space reasons I want to break up the contents of an itemize list into separate slides, which I have been doing without much problem using \only.  However, the following minimal document complains that the label eq:formula is not defined:  \documentclass{beamer} \begin{document} \begin{frame}{Title}  \begin{itemize}  \only&lt;1&gt;{   \item Item 1.  }             % Comment   \only&lt;2&gt;{     % these lines   \item Item 2, with equation   \begin{equation}    \label{eq:formula}    xyz   \end{equation}    \item Item 3, with reference \eqref{eq:formula}.  }  \end{itemize} \end{frame} \end{document}   As you can see, it is clearly defined.  The problem goes away if you comment out the marked lines (thus, printing everything on one slide).  I see using \tracingmacros that there is a serious redefinition of \label in beamer, and as such it appears that this is a bug with detecting what slide the label is printed on.  Is that right, and what is the solution?
121988
This is a follow up to . I would like to control the length of the horizontal line to be the same widths as the widest \item in the list. Below, I am manually passing in the text on which to base the length. While that is an acceptable workaround, I thought I'd see if there was some easy way to eliminate the parameter to \sepitem.  Code: \documentclass{article}  \usepackage{enumitem} \usepackage{xcolor} \usepackage{calc}  %% Adapted from  %%    https://tex.stackexchange.com/questions/341614/ %%            insert-small-line-above-an-item-in-a-list-without-adding-extra-space \newcommand\sepitem[1]{\item\raisebox{1.90ex}[0pt]{\rlap{\color{orange}\rule{\widthof{#1}}{0.8pt}}}}  \newcommand{\ShortText}{Short text.} \newcommand{\LongText}{Somewhat wider text.}  \begin{document} \begin{enumerate}[noitemsep] \item \ShortText \item \ShortText \sepitem{\ShortText}A \end{enumerate} %% ------------------- \begin{enumerate}[noitemsep] \item \LongText \item \ShortText \sepitem{\LongText}A \end{enumerate}  \end{document}
122833
\documentclass{report} \begin{document} Text\footnote{text1} Text\footnote{text2}  \vbox{% \begin{itemize} \item X\footnotemark{} \item Y\footnotemark{} \item Z\footnotemark{} \end{itemize} } \footnotetext{a} \footnotetext{b} \footnotetext{c} \end{document}   generates:  Text^1 Text^2  * X^3 * Y^4 * Z^5  ------------- 1 text1 2 text2 5 a 5 b 5 c   How to recover \footnotetext numbering without manual numbering?  I assume, I know that I used \footnotemark n times, so I would like solution like (It is "pseudocode" of draft of an idea) :  \newcounter{tempcounter := footnotecounter - n} \footnotetext[ ++tempcounter ]{a} \footnotetext[ ++tempcounter ]{b} \footnotetext[ ++tempcounter ]{c}   Or other authomatic numbering solution. I don't want to manually correct this list each time I change footnotes in chapter.  P.S. I know putting list into vbox might look strange, please assume it's just a toy-example of environment that needs usage of \footnotemark+\footnotetext.
13384
I'm trying to switch from enumitem lists to tasks lists, but the following, which works in an ordinary enumerate environment, generates a "Something's wrong--perhaps a missing \item" error in the tasks environment:  \documentclass{article} \usepackage{tasks} \newcommand{\itemexpansion}{\item test \item test \item test \item test} \newcommand{\taskexpansion}{\task test \task test \task test \task test}  \begin{document} % OK \begin{enumerate}     \itemexpansion \end{enumerate} % Error \begin{tasks}     \taskexpansion \end{tasks} \end{document}   I can tell that there's an expansion problem here, but that's about as far as my comprehension extends. It doesn't seem to match the situations warned about in the manual. Is there a workaround that will allow me to dump the results of a macro (the contents of which are gathered elsewhere) into a tasks environment?
124172
I have a simple itemized list like the following MWE:  \documentclass[10pt,a4paper]{article} \usepackage[utf8]{inputenc} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{graphicx} \usepackage{hyperref} \usepackage{lmodern} \usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry} \usepackage{lipsum} \begin{document} \begin{itemize} \item \href{http://google.com}{[ID1]: \underline{\lipsum[1]}} \end{itemize} \end{document}   This unfortunately doesn't break the block of text as expected, as shown below:    How can I fix this item so it will line break properly?
1863
I have a paper where all equations are numbered, but I want to number equations only if they are actually referred to in the .tex file using \ref{}. How can I make that happen? Alternatively, how can I make all equations that have no \label next to them (because then I know I don't refer to them) not have a number? Do I have to use \nonumber separately for each such equation?
65725
I have a list of items that looks like this:  A B C A A B D E A   Now I want to count the number of occurrences of each item. The result should look like this:  A 4 B 2 C 1 D 1 E 1   How can I do that? It is important to note that this should be flexible. That means if I add item F to the list, that item should also be considered in the result.