# Tag Info

## New answers tagged lists

2

You can adjust the way the item label is set. The macro responsible for this is \listitemsymbol, and it needs to be done before setting the moderncv theme: \documentclass{moderncv} \renewcommand*{\listitemsymbol}{\hspace{2em}\labelitemi~} \moderncvtheme[green]{classic} \firstname{Joe} \familyname{Blow} \begin{document} \maketitle \section{Profile} ...

3

There are four predefined styles for the itemize items or enumerate items templates controlling the aspect for the labels in an itemize, respectively enumerate, environment: these are default, square, circle and ball; the following simple example shows these four styles for an itemize: \documentclass{beamer} \begin{document} \begin{frame} ...

0

You probably want to use the Boadilla theme, not package. Try \usetheme{Boadilla} in your preamble. This is case-sensitive. Look at http://www.hartwork.org/beamer-theme-matrix/ for a good overview of themes, stacked vertically. Edit: Since I linked to that matrix: what you are seeing along the horizontal axis are colors, which can be changed by the ...

0

It seems that something like \let\orig@description\description \def\description{\orig@description \let\orig@par\par \def\par{\orig@par\nopagebreak[4]}} works for me. (I could go to \nopagebreak – without the optional argument – but there may be situations when the page break may be the better option after all.) I'm not enthusiastic about the minipage ...

2

With just xparse it's too complicated. Using \@ifnextchar is possible, but a jump to expl3 is perhaps better: \documentclass{article} \usepackage{xparse} \ExplSyntaxOn \NewDocumentCommand{\tab}{m} { % start an itemize (that also provides grouping for nested calls) \begin{itemize} \azpillaga_tab:n { #1 } % finish off \end{itemize} } \seq_new:N ...

2

Here I make the . active inside \tab and restore it when I am done. Inside \tab, the . can become \item if the next token is a not a nested \tab and it becomes \relax if the next token is a nested \tab. I keep track of the nesting level with a simple counter, and only restore the catcode 12 definition of . when the nesting level reaches back to zero. I ...

1

After carefully reading the documentation of enumitem, I realized that you can do this: \documentclass{article} \usepackage{enumitem} % Typeset descriptions \newcommand{\appendDot}[1]{#1.} \setlist[description]{% font=\appendDot, } \begin{document} \begin{description} \item[First] bla bla blaa. \item[Second] bla bla blaa. \item[Third] bla bla ...

0

An alternative to the accepted answer that doesn't require a new theorem environment name is the following: \documentclass{article} \usepackage{amsthm} \usepackage{lipsum} \usepackage{needspace} \newtheorem{theorem}{Theorem} \let\ORGtheorem\theorem \def\theorem{% \Needspace*{3\baselineskip} \ORGtheorem } \let\ORGendtheorem\endtheorem \def\endtheorem{% ...

1

You can use the enumitem package to do this. \documentclass{article} \usepackage{showframe} \usepackage{enumitem} \setlist{leftmargin=5.5mm} \pagestyle{empty} \begin{document} \begin{itemize} \item hello \item world \end{itemize} \end{document} However, I don't think it's a good idea universally change this setting. In particular, it will effect all ...

12

well I didn't say any primitives, but those in particular (\leftskip and \rightskip) are bad ones to touch.. LaTeX list environments (which is almost all latex display environments, so not just enumerate but center, verbatim, quote etc) all need to know how much space is available on the line after current indentation levels are taken into account. LaTeX ...

2

Based on my answer at How can I add lists and similar in a savebox?, I placed the question in a temporary vbox, and then embraced it in an \fbox, making the appropriate allowances for indentation. I here define the process as a macro, \boxitem{}: \def\boxitem#1{\setbox0=\vbox{#1}{\centering\makebox[0pt]{% ...

7

As was mentioned in the comments, you can also use the tcolorbox package for creating the box. In my example code, I took over the enumitem package suggestion of A.Ellett. The code uses your example three times: without box, with box, and finally with a box broken from one page to the following. Color, line width, arcs etc. of the box can be adapted. ...

3

I would make a number of changes: I would use the enumitem package to facilitate formatting the labels for your enumerate environments. I would use a \label/\ref pair to refer to a previous label Here's a solution for you box using tikz and a \vadjust \documentclass{article} \usepackage{tikz} \usepackage{enumitem}%%[inline] \usepackage{amsmath} ...

3

This is one possible solution, where the second \tikzmark{br} is moved inside the enumerate environment to prevent extra white space. Also the relative distance is adjusted to 5em to cover the whole text. Code \documentclass{article} \usepackage{tikz} \usepackage{amsmath} \usetikzlibrary{calc,shapes} \newcommand{\tikzmark}[1]{\tikz[overlay,remember ...

3

The insertion of an empty item seems to give a better vertical spacing. One can define a myitemize environment that includes this empty item; that will prevent typing it for each description item: \documentclass{article} \usepackage{enumitem} \newenvironment{myitemize}% {\begin{itemize}\item[]} {\end{itemize}} \begin{document} \begin{description}[style ...

4

Adding \leavevmode also has the desired effect and looks reasonably clean. \documentclass{article} \begin{document} \begin{description} \item[Animals:]\leavevmode \begin{itemize} \item Dog \item Cat \item Fish \end{itemize} \item[Colors:]\leavevmode \begin{itemize} \item Red \item Green \item Blue \end{itemize} \end{description} ...

2

The caption package allows you to use \captionlistentry{figure}{my caption} for a caption entry in the list of figures (or any other specified float type) without making a caption in the float itself.

2

While Andrew's solution works great in many, many situations, it will fail in some, for example, if you try to place \mytext in an \fbox. To get around that problem, you really have to define \mytext to place the contents in a box. \documentclass{article} \parindent 0in \begin{document} \newcommand{\mytext}{\setbox0=\vbox{% This is a sentence ...

5

For this type of material you can just save your text etc. in a macro \documentclass{article} \begin{document} \newcommand{\mytext}{This is a sentence \begin{itemize} \item I am a list \end{itemize}} \mytext Something else. \mytext \end{document}

3

You can simplify the input syntax and also get centering (but the list can't be split across pages): \documentclass{article} \usepackage{xparse,lipsum,varwidth} \ExplSyntaxOn \NewDocumentCommand{\printbiglist}{m} { \[ \begin{varwidth}{.8\textwidth}\raggedright $\makebox[0pt][r]{$\lbrace$} % the opening brace hanging left \dan_print_biglist:n { #1 ... 3 \documentclass{article} \newcommand\z{,\linebreak[0]} \begin{document} \begin{raggedright}$\{7, 2, 6, 5\}\z \{7, 2, 6, 6\}\z \{7, 3, 1, 1\}\z \{7, 3, 1, 3\}\z \{7, 3, 1, 6\}\z \{7, 3, 2, 2\}\z \{7, 3, 2, 3\}\z \{7, 3, 2, 4\}\z \{7, 3, 3, 1\}\z \{7, 3, 3, 2\}\z \{7, 3, 3, 3\}\z \{7, 3, 3, 4\}\z \{7, 3, 3, 5\}\z \{7, 3, 3, 6\}\z \{7, 3, 4, 2\}\z \{7, 3, 4, ...

3

\documentclass[12pt]{article} \usepackage{adjustbox} \begin{document} \begin{enumerate} \item \begin{enumerate} \item \adjustbox{valign=t}{\rule{1cm}{2cm}} \end{enumerate} \end{enumerate} \end{document}

4

I wouldn't do this, since there is no consistency with other chapter titles, but if you really want to do this, here is what you can do. You have two commands to control the spacing before and after the chapter titles, \chapterheadstartvskip and \chapterheadendvskip, respectively. You can modify them locally to change only the appearance of the List of ...

1

Another alternative. The OP did not provide the commands used in math mode. This solution removed them to make a run. Code \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{enumitem} \usepackage{amsmath,amssymb} \begin{document} \noindent x\hrulefill x \begin{enumerate}[ labelindent=*, style=multiline, leftmargin=*, label=Caso ...

2


5

EDIT Sorry for misunderstanding... To obtain what you want, you just have the use the option: leftmargin=* The following MWE (I've replaced your custom commands with known ones): \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{enumitem} \begin{document} \noindent x\hrulefill x \begin{enumerate}[leftmargin=*,label=Caso \arabic*)] ...

1

Edit 3: The OP was hoping to get a running counter that would allow another user to input additional questions without messing with the overall code framework. Is this possible? Yes, It is possible. This new solution will automatically do the numbering by save the counter to tmpc and then restore it to ptestlisti, as shown below \newcounter{tmpc} ...

3

You're better adding the annotation to the chapter making command; with memoir there's the hook \mempostaddchaptertotochook for this purpose. The following code is adapted to an answer of mine in the GuIT forum; as you see, the annotation is printed only if in a chapter some tables (or figures) are found. \documentclass[twoside,a4paper]{memoir} ...

7


12

I am not sure whether this is, what you want to achieve, but you can explicitly set the label of an item. \documentclass[a4paper,10pt]{article} \usepackage[]{enumitem} \begin{document} Foobar \begin{enumerate}[label={(\arabic*)}] \item baz \item[\refstepcounter{enumi}(*\number\value{enumi})] xyzzy \item quux \end{enumerate} ...

7

Explicitly embed the enumerate environment inside a minipage environment. \documentclass[11pt,a4paper]{article} \usepackage{longtable} \begin{document} \begin{longtable}{c|p{10cm}}\hline \textbf{test} & \textbf{test} \\\hline\hline test & \begin{minipage}[t]{10cm} \begin{enumerate} \item test \item test ...

Top 50 recent answers are included