New answers tagged

2

This uses a wrapper command \myitem to grab the item text and stores it into \@currentlabelname, which is needed by \nameref to use the 'name' properly! \documentclass{article} \usepackage{enumitem} \usepackage{etoolbox} \usepackage{hyperref} \makeatletter \newcommand{\myitem}[2][]{% \ifblank{#1}{% \item #2% }{% \item[#1] #2% }% \protected@...


4

Grabbing the theorem 'BODY', i.e. the content between \begin{theorem}...\end{theorem} can be done with \RenewEnviron and the \BODY command. The \RenewEnviron command defines theorem to be a wrapper around the original version (which has been stored before into \let\theorem@@orig and \let\theorem@@origend command). The package environ provides the \BODY ...


1

You can always check with \ifvmode or \ifhmode, e.g., \ifvmode do this\else do that\fi. But here you don't need that because \par acts that way (don't use \newline or \\ to end paragraphs). I added the \noindent which does no harm if \parskip=0pt and acts as you seem to want when \parskip≠0pt. \newenvironment{myenv} {\begin{trivlist}\item} {\par\...


1

Consider using adjustbox to vertically align the tabulars to the \items as the default [t]op and [b]ottom alignments when including horizontal rules - \hlines - influences it: \documentclass{article} \usepackage{adjustbox} \begin{document} \begin{enumerate} \item \adjustbox{valign=t}{\begin{tabular}{|c|c|} \hline Lorem & Ipsum \...


1

Another option, inspired by Torbjørn T.'s answer: \documentclass{article} \usepackage{enumitem} \newlist{Description}{description}{3} \setlist[Description]{style=nextline} \SetEnumitemKey{margin}{leftmargin={\widthof{#1}+2em}} \begin{document} \begin{Description}[margin=longer label] \item[label] Text. More text.More text.More text. More text. More text. ...


3

This label is generated by mySoln environment to suppress this use \renewcommand{\mySolnlabel}[1]{\null}% suppresses the label Full MWE is ... \documentclass{article} \usepackage{answers} \usepackage{tasks} \Opensolutionfile{mysolutions} \Newassociation{mysolution}{mySoln}{mysolutions} \renewcommand{\mySolnlabel}[1]{\null}% suppresses the label \...


2

Using enumitem, the start=... option can be used. Please note that enumitem takes care of the correct value, i.e. if the item should start with 3, use start=3, not start=2, i.e. the counter will not increased again. \documentclass{article} \usepackage{enumitem} \begin{document} \begin{enumerate}[start=3] \item Third item \begin{enumerate}[start=4,...


2

You presumably want \setcounter{enumii}{3} to set the level 2 list, but the enumitem package gives a nicer interface to such things.


1

to end items and go back to your normal paragraph press enter and you l be put in a new item righ? look up to the icon "implicite" next to "liste numeroté",, it looks like a paper with lines in it ,, press it and bamm ! problem solved.


1

Here is a simpler code with enumitem, which has a resume option for lists: \documentclass[a4paper]{article} \usepackage[T2A]{fontenc} \usepackage[utf8]{inputenc} \usepackage[english ,russian,]{babel} \usepackage{amsmath,amsthm,amssymb} % amssymb also loads amsfonts \usepackage[cm]{fullpage} \usepackage{titling} % \usepackage{hyperref} \usepackage{xspace} \...


2

The log file contains a warning: Class scrreprt Warning: \float@listhead detected! (scrreprt) Implementation of \float@listhead became (scrreprt) deprecated in KOMA-Script v3.01 2008/11/14 and (scrreprt) has been replaced by several more flexible (scrreprt) features of package `tocbasic`. (scrreprt) ...


1

This, for example, using the enumerate package: \documentclass{article} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{enumerate,xcolor} \begin{document} \begin{enumerate}[{\color{red} 1 }] % notice the space after "1" \item One \item Two \end{enumerate} \end{document} and \begin{enumerate}[{[1]}] will produce You can see ...


3

You do want a list. \documentclass[12pt]{article} \pagestyle{plain} \usepackage[margin=1.8cm]{geometry} \geometry{a4paper,showframe} % showframe just for the example \usepackage[parfill]{parskip} \newenvironment{points} {\begin{list}{}{\leftmargin=1em\labelwidth=\leftmargin\labelsep=0pt}% \newcommand{\point}[1]{\item[##1]\mbox{}\\*\ignorespaces}} {\end{...


3

Use resume*, not resume. The starred version uses the options given to the last list(s), the unstarred version discards any option that was not already specified in list definition. Alternatively: Define a enumerate of your own (as shown in the example) ... and this is what the enumitem package suggests: Use resume* sparingly, define rather a new list ;-) ...


0

In the end I gave up on using a list environment, and instead defined a new command using boxes. This works for me, but feels hack-y. \newlength{\currentparskip} \setlength{\currentparskip}{\parskip} \newcommand{\point}[2]{\texttt{#1} \\ \makebox[1em]{}\begin{minipage}[t]{\dimexpr\textwidth-1em}% \setlength{\parskip}{\currentparskip}% #2% \end{...


5

It's how it's supposed to be, according to how lists are implemented. Any \item starts a paragraph and TeX inserts \parskip glue, that lists set equal to the value of \parsep (that's set by the class), besides \itemsep; this \itemsep doesn't get through, in this case, but \parskip does. Example (two column format for easier comparison) \documentclass[...


3

This seems to be fairly close to what you want: \documentclass[12pt]{article} \pagestyle{plain} \usepackage[a4paper,margin=1.8cm]{geometry} \usepackage{enumitem} \usepackage{lipsum} \usepackage{showframe} \newlist{simple}{description}{1} \setlist[simple]{leftmargin=4mm, % indentation of paragraphs font=\texttt, % typewritter text for ...


1

I achieved the task by just putting \item[] instead of \item in front of the inter text


2

It's easy with the enumitem package: \documentclass{article} \usepackage[showframe]{geometry} \usepackage{enumitem} \usepackage{lipsum} \begin{document} \lipsum[1] \begin{enumerate}[label=H\arabic*. , wide=0.5em, leftmargin=*] \item \lipsum[2] \item \lipsum[3] \item \lipsum[4] \end{enumerate} \end{document}


1

The package enumitem supports this out of the box, the only change required is the label, using label={H\arabic*.} as an option. \documentclass{article} \usepackage{blindtext} \usepackage{enumitem} \begin{document} \section{Hypotheses and Hypotenuses} \blindtext \begin{enumerate}[font={\bfseries},label={H\arabic*.}] \item \blindtext \item \blindtext \...


2

The package xcntperchap can do this, with some 'easy' setup, using a dummy track level counter (dummycntr). Since itemize does not use a counter itself, another counter is necessary (for enumerate, it would be much easier, just say \RegisterCounters{dummycntr}{enumi} then. The current version works for the first level of itemize nesting only so far. \...


2

Here is a variant of Werner's answer with checkmarks for recording progress. \documentclass{article} \usepackage{enumitem,amssymb} \newlist{todolist}{itemize}{2} \setlist[todolist]{label=$\square$} \usepackage{pifont} \newcommand{\cmark}{\ding{51}}% \newcommand{\xmark}{\ding{55}}% \newcommand{\done}{\rlap{$\square$}{\raisebox{2pt}{\large\hspace{1pt}\cmark}}%...


2

Here's a way to avoid page breaks in the whole object: \documentclass[12pt]{article} \usepackage[a5paper]{geometry} \usepackage{fontspec} \usepackage{microtype} \usepackage{multicol} \usepackage[defaultlines=2,all]{nowidow} \usepackage{ragged2e} \usepackage{lipsum} \usepackage{enumitem} \usepackage{parskip} \newcommand{\indexClass}[1]{\index{#1}} \...


3

Have you considered using the tasks package? It can achieve something like what you're asking for. \documentclass{article} \usepackage{tasks} \begin{document} I'm trying to make a list in which each item has multiple lines, and I want the items to line up horizontally, like this: \begin{tasks}(2) \task this is the first item in the ...


3

A variant of Zarko's solution without mdwtab: I simply use cellspace to define minimal vertical spacings at the top and bottom of cells in columns with specifiers prefixed with the letter S: \documentclass{article} \usepackage{mathtools}% \usepackage[showframe]{geometry} \usepackage{cellspace,tabularx}% \renewcommand\cellspacetoplimit{5pt} \renewcommand\...


2

By use of mathtools, tabularx and mdwtab I create the following table: MWE: \documentclass{article} \usepackage{mathtools}% \usepackage{mdwtab,tabularx}% \usepackage[showframe]{geometry} \begin{document} \section{List of Things} \begin{tabularx}{\textwidth}{|>{$\displaystyle}X<{$} | c | c | p{2cm} | p{2cm} |} \hlx{hv} \text{Long equation} &...


1

Two Answers 1- For Short Lists Using a \vtop box: \documentclass[12pt]{article} \usepackage[a5paper]{geometry} \usepackage{fontspec} \usepackage{microtype} \usepackage{multicol} \usepackage[defaultlines=2,all]{nowidow} \usepackage{ragged2e} \usepackage{lipsum} \usepackage{enumitem} \usepackage{parskip} \tolerance=1000 \makeatletter \newcommand{\...


1

For example you can use the wasysym package, and with quick command to automate some proper spacing, here it goes. Output Code \documentclass{article} \usepackage{wasysym} \newcommand\insq[1]{% \Square\ #1\quad% } \begin{document} \textbf{Gab es irgendwelche technischen Probleme?} \insq{Allgemein} \insq{Personalisiert} \insq{Keine Probleme} \...


3

Just for fun (pdf only): \documentclass{article} \usepackage{hyperref} \begin{document} \CheckBox[name=check1]{} Allgemein \hfil \CheckBox[name=check2]{} Personalisiert \hfil \CheckBox[name=check3]{} Keine Probleme \end{document}


1

\makebox[2cm][l]{$\square$ TextA} \makebox[2cm][l]{$\square$ TextB} \makebox[2cm][l]{$\square$ TextC} Change [2cm] to whatever you need


0

Using multicol: \documentclass{article} \usepackage{enumitem,amssymb} \usepackage{multicol} \newlist{todolist}{itemize}{2} \setlist[todolist]{label=$\square$} \begin{document} \begin{multicols}{3} \begin{itemize} \begin{todolist} \item List item 1 \item List item 2 \item List item 3 \item List item 4 \...


0

Here is a solution using xparse. I define new listalign and listgather environments, which behave as align and gather, have starred versions, but add no vertical skip at the beginning. They're intended to be used in list environments, if there is no text after an \item command: \documentclass{article} \usepackage{enumitem} \usepackage{mathtools} \usepackage{...


2

The following code defines and illustrates a macro \images{}. \images takes one mandatory argument which should be a key-value list of options. The minimum sensible list sets the key images to a list of one or more image files. I've defined this as a macro but it could be easily defined using \NewDocumentEnvironment{images}{m} ... instead, or used within ...


3

Here's expl3 using a \seq variable and splitting the content of the \commandkey{im} macro into sequence items, then looping over those items using a map function, say \loopfunction Basically any loop macro that can split the comma separated value list would do of course. From the documentation of keycommand it's apparent, that this packages uses etoolbox, ...


0

An alternative to this approach, which facilitates the production of nested lists is the outlines package. To produce a bulleted list with three levels it is as simple as \documentclass{article} \usepackage{outlines} \begin{document} \begin{outline} \1 Top level item \2 Sub item \3 sub sub item \end{outline} \end{document} To make a numbered list ...


2

Here are 3 possibilities: \documentclass[paper=a4, fontsize=11pt]{scrartcl} % A4 paper and 11pt font size \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{enumitem} \begin{document} \noindent Some text Some text Some text Some text Some text Some text Some text Some text Some text Some text \begin{enumerate} [label=Step \arabic{enumi}.,ref=...


3

Unclear, what is meant really, I applied leftmargin=* here: \documentclass[paper=a4, fontsize=11pt]{scrartcl} % A4 paper and 11pt font size \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{enumitem} \begin{document} \noindent Some text Some text Some text Some text Some text Some text Some text Some text Some text Some text \begin{...



Top 50 recent answers are included