# Tag Info

## New answers tagged lists

2

Here there is a minimal working example using \fbox with enumitem package. \documentclass[12pt]{article} \usepackage{enumitem} \usepackage{lipsum} \begin{document} \lipsum[1][1-2] \begin{itemize}[label={\fbox{!!!}}] \item alpha \item beta \end{itemize} \lipsum[41][1-2] \end{document}

0

If one does not mind the extra vertical space, one could also use the following solution which adds \item[] in front of (3D). \documentclass{book} \usepackage{enumitem} \makeatletter\usepackage{microtype}\g@addto@macro\@verbatim{\microtypesetup{activate=false}}\makeatother% %uncomment to see the left-shift \begin{document} \begin{enumerate} \...

0

the correct way to do it is: This is just normal text... \begin{enumerate} \item First Item ? \end{enumerate} This is the text of the first item \begin{enumerate}[resume] \item Second Item ? \end{enumerate} This is the text of the second item simply using [resume] and if you need to retake a sub-item it will also help you to accompany using \...

6

Whereas one approach would be to inhibit protrusion everywhere, this approach is to force protrusion on left parentheses that follow an invocation of \item, which I do by redefining \item to look at what follows. \documentclass{book} \usepackage{enumitem} % \usepackage{microtype} \makeatletter \g@addto@macro\@verbatim{\microtypesetup{activate=false}}% %...

12

Note that this only happen when the line start with "(" but not with characters like a "E". This is a side effect of protrusion (= margin kerning), that move "(" a bit to the left, to have a more harmonious margin, but in this case seems the opposite because the protrusion is not applicable after the item number. An occasional ...

1

The core idea you need here is that the sorting code needs some type of comparison to use. Here, we are comparing floating point values, so we need \fp_compare:nNnTF, viz. \clist_sort:Nn \mySamplLst { \fp_compare:nNnTF {#1} > {#2} { \sort_return_swapped: } { \sort_return_same: } } i.e. if the first value is bigger than the ...

1

You can avoid all the \xdef business. Here the name \foreachiinlist is completely arbitrary and its meaning will disappear as soon as the macro is executed. So you will have no \alist in the way any longer. \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.16} \newcommand{\TracStackPoints}[1]{(0.5*1/#1),(0.5*1/#1):(2*1/#1),(2*1/#1):} \...

2

Edit 1: pgfmanual.pdf says about \foreach's ⟨list⟩-argument: Again, in the easiest case, ⟨list⟩ is either a comma-separated list of values surrounded by curly braces or it is the name of a macro that contain such a list of values. Anything can be used as a value, but numbers are most likely. The phrase "name of a macro that contain such a list of ...

1

Here is one way using the b argument type of \NewDocumentEnvironment (thus not needing the environ package) and the \unexpanded primitive of e-TeX in order not to expand the contents too early (the harmless a,b,c in the example). \documentclass{article} % xspace not needed % xparse not needed if the LaTeX kernel is from 2020-10-01 or later \usepackage{xparse,...

4

Define: \def\foreachinlist#1#2{\expandafter\foreachinlistA\expandafter#1\expandafter{#2}} \def\foreachinlistA#1{\foreach#1in} and use: \foreachinlist \i \alist In your example: \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.16} \def\foreachinlist#1#2{\expandafter\foreachinlistA\expandafter#1\expandafter{#2}} \def\foreachinlistA#1{\...

1

I am not sure that this syntax will support what the OP is trying to achieve, but the issue is, as is often the case, EXPANSION. \documentclass{article} \usepackage{xparse,environ,xspace,etoolbox} \ExplSyntaxOn \NewEnviron{commalist}[1][\space]{\spence_comma_list:V \BODY #1} \seq_new:N \l_spence_items_seq \cs_new_protected:Npn \spence_comma_list:n #1 { \...

3

With a little help from listofitems: \documentclass{standalone} \usepackage{pgfplots,listofitems} \pgfplotsset{compat=1.16} \newcommand*{\TracStack}[4]{ \gdef\alist{(\Wmin):} \foreach \i in {#2,#3} { \xdef\alist{\alist(0.5*1/\i),(0.5*1/\i):(2*1/\i),(2*1/\i):} } \xdef\alist{\alist(\Wmax)} \readlist\alistlst{\alist}% <-- READS \...

0


1

Premise: I suspect this solution, although it appears to work, is a bit convoluted. Maybe some guru can find an elegant one. I don't understand why to put a \subsection inside an enumerate, as @Fran- pointed out. However the \subsection is shifted to the right by \leftmargin. We then have to modify the indentation of the \subsection from \z@ to -\leftmargin, ...

2

You have the second subsection (1.2) inside the enumerate environment. Change like this: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{amssymb} \usepackage{comment} \begin{document} \section{Operational rules for constructing an upper line with a basic step motion} \subsection{The basic step motion} \begin{enumerate} \item The final ...

0

you should be able to generate such indented lists by way of the enumitem package. \documentclass{article} \usepackage{enumitem}% http://ctan.org/pkg/enumitem \begin{document} \begin{enumerate} \item first item \item second item \begin{enumerate}[label=\arabic*.] \item first item \item second item ...

1

This is a custom LaTeX3 solution. It only demonstrates the concept. One needs to put a lot of work in it to make it look nice. Also, the nomenclature items within each section are not sorted, they just appear in the order the \Nomen command is called. \documentclass{article} \usepackage{expl3} \usepackage{amsmath, amssymb} \usepackage{datetime2} \usepackage{...

2

If you must, you must... \documentclass{article} \usepackage[margin = 2.54 cm]{geometry} \usepackage{parskip} \usepackage{enumitem} \usepackage{amsmath} \usepackage{amssymb} \usepackage{amsthm} \setlength{\parskip}{12 pt} \renewcommand\qedsymbol{$\blacksquare$} % dont do the assignments inside an environemnt that just makes things % even harder \...

3

Looking at your output, it seems that you've changed \parindent which is part of what makes everything look so odd. Here's the output from article with no adjustments: There are two things going on here: As you can see comparing the output in your document vs article, the difference in the indentation for the list compared to the indentation for the ...

1

\setuppapersize[S6] \starttext Footnote \startfootnote \blank[-line] \startitemize[before=] \item Item 1 \item Item 2 \stopitemize \stopfootnote \startitemize \item Item 1 \item Item 2 \stopitemize \stoptext

0

Here's one way of doing it. \documentclass{article} \newcommand{\listHeading}[1]{\parbox{1.7cm}{\textbullet\hspace{5pt}\textbf{#1}}} \begin{document} \begin{itemize} \item[\listHeading{Python}] functions, modules, dictionaries, recursion, machine learning, blockchain, chatbots, statistics, data visualisation, data handling \item[\...

0

Here is a solution with enumitem: \documentclass{article} \usepackage[showframe]{geometry} \usepackage{enumitem} \newlength{\lblwd} \settowidth{\lblwd}{Very wide label} \begin{document} \begin{enumerate}[label=\arabic*., labelwidth=\lblwd, leftmargin=!] \item An item \item[Very wide label] An item \item An item \addtocounter{enumi}{9997} \item\...

0

Maybe some like this? \documentclass{article} \usepackage{lipsum} % for dummy text %for numerated items \usepackage{linguex}\AtBeginDocument{\Exindent.5em\Exlabelsep.5em} \def\myenum#1{\noindent\parbox[t]{.5\linewidth}{\ex. #1\par}} % for bulleted items \def\myitem#1{\noindent\parbox[t]{.5\linewidth}{\begin{itemize}\item #1\end{itemize}}} \begin{document}...

0

Probably you're interested in the following solution based on paracol: \documentclass{article} \usepackage{geometry} \usepackage{lipsum} \usepackage{paracol} \begin{document} \lipsum[5] \begin{paracol}{2} \begin{itemize} \item \lipsum[1] \item \lipsum[2] \item \lipsum[3] \item \lipsum[4] \end{itemize} \switchcolumn \begin{itemize} \item \lipsum[5] \item \...

1

For those looking for an alternative solution: basically, you can pass anything in square brackets \begin{itemize}[...] \begin{itemize}[x] \item First \item Second \end{itemize} \begin{itemize}[ y] \item First \item Second \end{itemize} \begin{itemize}[\qquad z] \item First \item Second \end{itemize} \hspace{10pt}, \quad, etc. ...

2

Here is a solution with expl3 and {NiceMatrix} of nicematrix. You need the latest version of nicematrix (v. 5.14 of 2021-04-08). \documentclass{article} \usepackage{nicematrix,tikz} \ExplSyntaxOn \seq_new:N \l__pmbc_lines_seq \seq_new:N \l__pmbc_cells_seq \int_new:N \l__pmbc_lines_int \int_new:N \l__pmbc_cols_int \cs_generate_variant:Nn \seq_set_split:Nnn {...

3

This is the basis for the transposition: \documentclass{article} \usepackage{amsmath} \ExplSyntaxOn \NewDocumentCommand{\orexpl}{m} { \pmbc_orexpl:n { #1 } } \cs_generate_variant:Nn \seq_set_split:Nnn { c } \seq_new:N \l_pmbc_orexpl_lines_seq \int_new:N \l_pmbc_orexpl_cols_int \int_new:N \l_pmbc_orexpl_rows_int % allocate at least three columns \...

4

Here, I use listofitems to parse the input with a --- separator. Each of the items in the list can be directly employed as a stack. I actually do a nested parsing, to also read the number of \\ dividers in each stack, and use this information to calculate the depth of the rule between stacks. I changed the list depth in one of the examples just to show ...

Top 50 recent answers are included