Tag Info

New answers tagged

2

\documentclass{article} \begin{document} \begin{description} \item[C]ommon infrastructure \item[L]ocation independence \item[O]nline accessibility \item[U]tility pricing \item[\llap{on-}D]mand resources \end{description} \end{document}


1

With some help from xparse (to easily define a \source command with a *-variant) and array for a new column type: \documentclass{article} \usepackage{xparse,array} \NewDocumentCommand{\source}{sm}{% \IfBooleanTF{#1}{\bracedsource{#2}}{#2 &}% } \NewDocumentCommand{\bracedsource}{m}{% \global\setbox9=\hbox{% ...


0

Another way to do ; maybe a less elegant : \documentclass{article} \usepackage{MnSymbol} \usepackage{multirow} \begin{document} \begin{tabular}{rcl} full-time & $\mapsto$ & $1$ \\ \begin{tabular}{rl} part-time & \multirow{3}{*}{\Huge{$\rbrace$}} \\ not at all & \\ don't know & \\ ...


4

Here you go. \documentclass{article} \usepackage{multirow,bigdelim} \begin{document} Text goes here \begin{description} \item[\texttt{bigdelim}] \begin{itemize} \item[] \item[Sub-Thing:] Text goes here \item[Sub-Thing:] \begin{tabular}{r@{}cl} ...


3

You can modify the indention with \setbeamersize{description width=0.57cm}, just play around to whatever value you need. \documentclass[14pt,handout]{beamer} \setbeamersize{description width=0.57cm} \begin{document} \begin{frame}\frametitle{} \begin{description} \item[FooBarBazZot] - foo bar \\ baz zot \end{description} \end{frame} \end{document} ...


2

Here are two solutions with the enumitem package, one based on the description environment, the other, based on enumerate, if the description text is always the same at a given level. I define for that a descrenum environment, which adds text to enumerate, and formats it: \documentclass{article} \usepackage[x11names]{xcolor} \usepackage{enumitem} ...


2

The automated list as a clone of enumerate (since I did not want to change the behaviour of enumerate itself. Use \newlist{pointdescription}{enumerate}{2} to provide a clone of the enumerate lists, with a nesting level of two. This will generate the counters pointdescriptioni and pointdescriptionii respectively. Afterwards set an 'arbitrary' style for ...


4

With enumitem and \itemsymbol: \documentclass{article} \usepackage{enumitem} \newenvironment{symenum} {\enumerate[label=\arabic*.\noexpand\thisenumsymbol,align=left]} {\endenumerate} \newcommand\thisenumsymbol{} \newcommand\itemsymbol[1]{% \renewcommand{\thisenumsymbol}{#1}% \item } \begin{document} \begin{symenum} ...


2

An alternative using enumitem.sty: \documentclass{article} \usepackage{enumitem} \makeatletter \def\ctext#1{\expandafter\@ctext\csname c@#1\endcsname} \def\@ctext#1{\ifcase#1\or $\diamondsuit$\or $\clubsuit$\or $\spadesuit$\or$\heartsuit$\or ?\fi} \makeatother \AddEnumerateCounter{\ctext}{\@ctext}{MyWidth} \begin{document} ...


3

\documentclass{article} \def\zz#1{% \ifcase#1\relax\or$\diamondsuit$\or$\clubsuit$\or$\spadesuit$\or$\heartsuit$\else?\fi} \begin{document} \renewcommand\labelenumi{\theenumi.\zz{\value{enumi}}} \begin{enumerate} \item First item \item Second item \item Third item \item Fourth item \end{enumerate} \end{document}


1

Another way, with the capt-of package. This allows you to use the floating environment or non-floating way (shown here) on a case-by-case basis, but retain the same captioning capability in either case. \documentclass{article} \usepackage{capt-of} \usepackage{newfloat} \DeclareFloatingEnvironment[placement={!ht},name=Liste]{mylist} \begin{document} ...


4

You don't need to make something a float to make it referencable. \documentclass{article} \newcounter{mylist} \makeatletter \newenvironment{mylist}{\def\@captype{mylist}}{} \def\ext@mylist{myl} \def\fnum@mylist{List\nobreakspace\themylist} \makeatother \begin{document} poqkweokqw pqok qpok opqkopkop qk opqk opqk poqk opqk opqk qpok qopk qopk qopk qkemwme ...


2

The package etoolbox defines a special command to handle internal lists: \forlistloop. These lists use a special character as internal list separator. So you have to use \listadd (or similar commands - see the etoolbox documentation) to add an item to such a list. \documentclass{article} \usepackage{etoolbox} \begin{document} \newcommand\doforme[1]{#1 \\} ...


3

The problem in using the variable form was its earlier expansion which would then take the whole a,b,c as one entity. By one entity, I mean the only single element in the list. To solve this problem, first of all we need to use double brackets here. So {a,b,c} becomes {{a,b,c}}, the reason of which will become clear by the end of this answer. \expandafter ...


2

A simple answer using only "standard" bits of LaTeX. This is not very flexible, in particular it assumes your items are all single lines, but it might get you going on the road to something more robust. \documentclass{article} \newcommand\db{\mbox{\enspace\textbullet\hspace*{-2.8pt}\rule[-6pt]{0.4pt}{16pt}}} \newenvironment{linked}{\begin{list}{}{% ...


3

EDITED to provide rbitemize environment. In this environment, \item will give a radio button with rules atop and below, with the optional argument of \item specifying the number of lines in the \item (if greater than 1). I name the internal macro \rb, in reference to my code for a "radio button" at How to typeset a radio button? In the environment, \item ...


8

This can be easily done with enumitem and its label option. Since the letter P is to be followed by a arabic number, the label P\arabic* is used. \documentclass[11pt,a4paper]{article} \usepackage{enumitem} \usepackage{fmtcount} \begin{document} \begin{enumerate}[label={\bfseries P\arabic*}] \item First \item Second \item Third \item Fourth ...


3

You can use the enumitem package that also frees you from manually adding the separators. Note that this package is much more powerful than paralist and offers several more bells and whistles. \documentclass{article} \usepackage{mathtools} \usepackage[inline]{enumitem} \begin{document} Determine which of the following matrices are ...


4

You could use the paralist package and its inparaenum environment. \documentclass{exam} \usepackage{mathtools} % for 'bmatrix*' environment \usepackage{paralist} % for 'inparaenum' environment \begin{document} Determine which of the following matrices are Hermitian \bigskip \begin{inparaenum}[i)] \item $A= \begin{bmatrix*}[r] 2 & ...


6

It does execute, but makes local assignments that are discarded at \end{enumerate}, you see the same with a simple {} group, it is not connected to \item. \documentclass[a4paper, titlepage, twocolumn]{article} \usepackage{expl3} \ExplSyntaxOn \seq_new:N \myStack \begin{document} {\seq_put_right:Nn \myStack {1}} \seq_put_right:Nn \myStack {1} ...


3

A quick and dirty trial solution, looping over a list using etoolbox macros and releasing it a specialized enumerate environment Description: \IntelligentEnumerate is a wrapper with three arguments: The first is optional, containing the label and other setups for the enumerate optional argument The first contains the list items as a comma-separated list ...


3

Here is one way; using a tabular-like structure: \documentclass{beamer} \usetheme{CambridgeUS} \newcommand{\tabitem}{% \usebeamertemplate{itemize item}\hspace*{\labelsep}} \begin{document} \begin{frame}{Centering the itemize} My first try: Centering the itemize \begin{itemize} \item item1 \item item2 \end{itemize} \begin{center} ...


1

Set the way the label is formatted using the before key (mentioned in the enumitem documentation (p 4)): \documentclass{amsart} \usepackage{enumitem} \begin{document} \begin{description} \item[abc] one \item[def] two \item[ghi] three \end{description} \begin{description}[before={\renewcommand\makelabel[1]{\bfseries ##1.}}] \item[abc] one ...


4

You have to redefine \descriptionlabel, nothing that enumitem is supposed to be able to do. This is the standard definition \newcommand{\descriptionlabel}[1]{% \hspace\labelsep \upshape\bfseries #1:% } so you want to say \renewcommand{\descriptionlabel}[1]{% \hspace\labelsep \upshape\bfseries #1.% } in your document preamble. ...


3

Almost all roads containing lists lead to enumitem. You can use enumitem to tweak the list as you want. \documentclass{amsart} \usepackage{enumitem} \setlist[enumerate,1]{label=\arabic*$^\circ$,ref=\arabic*$^\circ$} \begin{document} \begin{enumerate} \item one \item two \label{item:some} \item three \end{enumerate} \ref{item:some} ...


7

Try \obeylines. \documentclass{article} \usepackage{fontspec} \usepackage{multicol} \begin{document} \begin{multicols}{2} \obeylines JPEG JPEG2000 PDF PNG PPM TIFF XBM ZIP \end{multicols} \end{document}


0

For example \mychoose macro can be defined like this: \newcount\optnum \newif\ifdraftmode \let\finalmodetrue=\draftmodefalse \let\finalmodefalse=\draftmodetrue \def\mychoose[#1]{\bgroup\def\optcount{#1}\futurelet\next\mychooseA} \def\mychooseA{\ifx\next[\def\next{\mychooseB}\else \def\next{\mychooseB[0]}\fi \next} \def\mychooseB[#1]{% \ifdraftmode ...


2

With enumitem it is easy to add code to some list depth: \documentclass{article} \usepackage{enumitem,color} \setlist[1]{before=\huge} \setlist[2]{before=\tiny\color{red}} \begin{document} abc \begin{itemize} \item blub \begin{itemize} \item blblb \end{itemize} \item blabla \end{itemize} \end{document}


7

The following example uses a combination of a modified quote environment, packages tabularx, array and booktabs: \documentclass[twocolumn, a4paper]{article} \usepackage[ columnsep=5mm, textwidth=155mm, ]{geometry} \usepackage{amsmath} \usepackage{array} \usepackage{tabularx} \usepackage{booktabs} \newenvironment{leftquote}{% \list{}{}% \item\relax ...


2

I'm putting this as an answer, since my comment formatting gets messed up. I think you are making things too complicated, and so is the other answer. What's wrong with this? ...turpis. \begin{description} \item $y= \begin{cases} 1 & \textrm{condition for variable to be unity} \\ 0 & \textrm{condition for variable to be ...


1

Try: \documentclass{article} \usepackage{amsmath} \usepackage[active,displaymath,tightpage]{preview} \setlength\PreviewBorder{5pt}% \begin{document} \begin{flalign*} 1. && y = & \begin{cases} 1 & \textrm{condition for variable to be unity} \\ 0 & \textrm{condition for variable to be zero} \\[+1.5mm] ...


3

enumitem offers specialised ways to customise lists which was why it was recommended in this case. If you look at the documentation, you'll appreciate that the point is to abstract away from the need to use the lower level LaTeX list configuration macros. The following example shows one way. I very much doubt I have Warnock Pro so I created a MWE sans the ...


3

Two solutions, with the cellspace package, which defines minimal vertical spacings at the top or the bottom of cells, or with makecell, which defines vertical spacings to add at the top or the bottom of cells: \documentclass{article} \usepackage{lipsum} \setlength{\parindent}{0pt} \usepackage{cellspace} \newenvironment{mytable}[1]{% \begin{list}{}{% ...


5

I think you want something like \documentclass{article} \usepackage{lipsum} \setlength{\parindent}{0pt} \newenvironment{mytable}[1]{% \begin{list}{}{% \setlength{\leftmargin}{2em} \setlength{\topsep}{5pt} %desired vertical separation of table from } %surrounding text ...


0

I came up with the following snippet by combining ideas from several TeX stackexchange posts. It seems to give me what I want. Basically a description environment with the special commands \question, \answer, and \think. I can still use the usual \item command if I want to, so I can use a regular list inside my example environment. ...


2

I am not programmer but this do what you need \documentclass{book} \usepackage{amsmath} \usepackage{siunitx} \usepackage{framed,tikz} \colorlet{shadecolor}{orange!8} \newif\ifque\quefalse \newif\ifans\ansfalse \newcommand{\sep}{\hfill\rule[0.25em]{0.5\linewidth}{.7pt}\hfill\null\newline} \newcommand{\question}{\quetrue{\bfseries Question: }} ...


10

Stop and resume the enumerate: \documentclass{memoir} \usepackage{enumitem} \usepackage{lipsum} \begin{document} \lipsum[1] \begin{enumerate}[itemsep=-4pt] \item My first item \item My second item \end{enumerate} %%<---------------------- stop here Along with these should be mentioned: \begin{enumerate}[resume] %%<----------- resume \item ...


5

Another version, using my assoccnt package, without the need of remembering the counter value: The contenumii counter is used to store the total value of the enumii counter automatically and stored back after inparaenum. Caveat: It will be incremented each time when another second level enumeration is used Use the \SuspendCounters feature from the ...


9

You can set the number by hand; since it's a second level list, you have to set enumii. \documentclass[14pt,a4paper,headlines=6,headinclude=true]{scrartcl} \usepackage{amsmath,amssymb,stmaryrd} \usepackage{paralist} \usepackage{tabto} \begin{document} \begin{enumerate} \item \textbf{Working with ...


3

If you replace the lines some text\\ sdfsfdsf\\ sdfsdfdfd}\\ with (assuming you want the \textbullet in these lines as per your ascii image) \cenMultlCell{\textbullet~some text \\ \textbullet~sdfsfdsf \\ \textbullet~sdfsdfdfd\\} you get: Code: \documentclass[10pt,letterpaper]{article} \usepackage{booktabs} \usepackage{siunitx} ...


1

Here is one way to incorporate \mylabel into \myequation. The \makeatletter...\makeatother is needed due to the @ symbols used in \protected@write and \@auxout. \documentclass[12pt]{report} \usepackage{tocloft} \usepackage{amsmath} \usepackage{physics} \usepackage[a4paper,width=150mm,top=25mm,bottom=25mm,bindingoffset=6mm]{geometry} \makeatletter ...


3

You can include this into your \myequation command. \documentclass[12pt]{article} \makeatletter \newcommand{\mylabel}[2]% #1 = label name, #2 = text for \ref {\protected@write\@auxout{}{\string\newlabel{#1}{{#2}{\thepage}}}} \makeatother \begin{document} \mylabel{eq:name}{almost anything} You can use this to reference \ref{eq:name}. \end{document}


1

Perhaps it suffices to create a visually-equivalent ToC. Dot leaders can be achieved using \dotfill: \documentclass{article} \begin{document} \begin{itemize} \item[2.1] An example \dotfill 21 \item[2.2] A longer example like this such that the line wraps down to the next line and the last entry gets wrapped to the next line \dotfill 22 ...


3

If you want numbering, you can better use enumerate. However, you can also use enumitem, ad use \begin{description}[style=unboxed,itemindent=!] if you want to stick with this. \documentclass{article} \usepackage{graphicx} %\usepackage{fontspec} \usepackage{amsmath} \usepackage{enumitem} \begin{document} {\large % This what causes the overflow, I guess ...


5

You can use start=3 with enumitem \documentclass{article} \usepackage{enumitem} \begin{document} \begin{enumerate}[label=\alph*.,start=3] \item first \item second \item third \end{enumerate} \end{document}


2

Use \addtocounter{enumi}{2} \documentclass{article} \usepackage{enumitem} \begin{document} \begin{enumerate}[label=\alph*. ] \addtocounter{enumi}{2} \item first \item second \item third \end{enumerate} \end{document}



Top 50 recent answers are included