# Tag Info

## New answers tagged lists

3

As David says above you are much better off using a list and letting LaTeX take care of the formatting and numbering. Doing it this way is so easier, both to read and to write and, the layout is automatically uniform and easy to change. For this I would use the enumitem package to obtain using: \documentclass{article} \usepackage{enumitem} ...

3


2

Two things. First, use marginnote as it does better job. Second, move \MarginText{Some Margin Text B} inside \item. \item \MarginText{Some Margin Text B} Lorem ipsum .... If it is put outside (like you did), it is anchored in the upper line. Further, \footnotesize{#1} should be \footnotesize#1. Full code: \documentclass{scrartcl} ...

1

You should never stack math display environments; instead of consecutive equation environments use gather: \documentclass{beamer} \usetheme{Frankfurt} \begin{document} \begin{frame} \begin{itemize} \item blah \begin{gather} a=b\\ b=c\\ c=d \end{gather} \end{itemize} \end{frame} \begin{frame} \begin{itemize} \item blah blah blah blah blah blah blah blah ...

1

You can use the wide option of enumitem: \documentclass[draft, 12pt]{article} \usepackage[utf8]{inputenc} \usepackage{enumitem} \begin{document} \noindent\textbf{Summer research, AAAA}\\ \textbf{Title}\\ \emph{Advisor: AAA, AAA, AAA} \begin{itemize}[noitemsep,wide=0pt, leftmargin=\dimexpr\labelwidth + 2\labelsep\relax] \item Implemented cool cool cool ...

3

Use either preview or varwidth option. \documentclass[12pt,varwidth,border=3]{standalone} \usepackage{gb4e} \begin{document} \begin{exe} \ex German: \gll Dies ist ein Test. \\ This be.3SG INDEF.M.SG.NOM test. \\ \glt “This is a test.” \end{exe} \end{document}

0

As @Steven B. Segletes, you have to add empty lines by hand. I want to draw your attention to the fact that it's much simpler to use the enumitem package, which already has a multiline style for description labels. It could go like this: \documentclass{article} \pagestyle{empty} % produces empty heads and feet -- no page numbers \usepackage{enumitem} ...

2

\documentclass{article} \newcounter{mycounter} \setcounter{mycounter}{1} \newcommand{\mycounter}{\stepcounter{mycounter}\arabic{mycounter}} \begin{document} \begin{enumerate} \item[\mycounter] test \item[\mycounter] test \end{enumerate} \end{document}

4

Here is a common solution without any expl3, etoolbox etc. The \and macro can be defined as required. We need only three lines of macros: \def\mylist#1{\mylistA #1\and\and} \def\mylistA#1\and{\ifx\and#1\and\else \and{#1}\expandafter\mylistA\fi} \def\and#1{$\underline{\rm #1}$ } \mylist{Element1 \and Element2} Edit: Egreg's comment here includes question, ...

0

Instead of defining everything yourself you could use a dedicated package like exsheets. Then you can easily print solutions at the end of the document: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{exsheets} % cloning the exercise headings from the question: \DeclareInstance{exsheets-heading}{myheading}{default}{ join = { ...

1

If you are not bound by the idea to limit items by \and you may want to take a look at the packages commado or dowith that I recently discovered when having a similar problem. With the former you could try something along the lines \usepackage{commado} % ... \newcommand{\myList}[2][\underline]{\doWithCSL{#1}{#2}} and call it like ...

6

Define a new list and a new align: \documentclass{article} \usepackage{lipsum,showframe} %% showframe for demo \usepackage{enumitem} \SetLabelAlign{mycenter}{\strut\smash{\parbox[t]{\textwidth} {\centering#1}}% } \newlist{mylist}{enumerate}{1} \setlist[mylist]{label=\bfseries ...

3

Here is a simple way, with the stackengine package. You can set the distance beteen label and body with before=\setstackgap[S]{…}: \documentclass[12pt,a4paper]{article} \usepackage[utf8]{inputenc} \usepackage{lipsum} % just for dummy text \usepackage{enumitem} \usepackage{stackengine} \begin{document} \begin{enumerate}[label=\hfill\stackon{}{Article ...

4

How about this (you can obviously tweak the vertical space in the definition): \documentclass{article} \usepackage{lipsum} \usepackage[inline]{enumitem} \newenvironment{mylist}{% \begin{enumerate*}[% before={\$12pt]},% label=\centerline{Article \arabic*:},% afterlabel={\\[12pt]},% itemjoin={\\[12pt]},% itemjoin*={\\[12pt]},% ]% ... 2 I didn't see an easy way to use enumitem to make enumerate work this way (but Lucas was smarter!), so I thought that you had only two options: Use existing formatting. For example, it wouldn't be that hard to do what you want using \section or \subsection commands, either by choosing a class that centres these or by using titlesec to get the formatting ... 2 I assume you are using \usepackage[onehalfspacing]{setspace} to get your document set with one-half spacing. A good package to modify lists is enumitem. This might solve your problem: \documentclass{article} \usepackage[onehalfspacing]{setspace} \usepackage{enumitem} \usepackage{blindtext} \begin{document} \blindtext \begin{singlespace} ... 4 If you define your environment as \newenvironment{myenvironment}[1]{\taggedblock{#1}}{\endtaggedblock} then things work: Note: I have seen this trick used when wrapping environment around tabular but not sure why it is needed. Code: \documentclass[10pt,a4paper]{article} \usepackage[latin1]{inputenc} \usepackage{amsmath} \usepackage{amsfonts} ... 4 It works if you set the custom enum label via the paralist specific macro: \setdefaultenum{}{}{}{} MWE: \documentclass{book} \usepackage{paralist} \setdefaultenum{\bfseries1.}{}{}{} \begin{document} \begin{compactenum} \item One \item Two \item Three \item Four \item Five \item Six \item Seven \item Eight \item Nine \item Ten \item Eleven ... 2 One can also make it work with the varwidth environment. I added the enumitem package to have control on the itemize parameters, and cellspace to ensure a minimal vertical spacing above and below cells contents in a given column: one adds the S pre-specifier before the L specifier: \documentclass{scrartcl} \usepackage[utf8]{inputenc} ... 4 I'm sure this must be documented in the tabulary documentation somewhere... \documentclass{article} \usepackage{tabulary} \makeatletter \def\TY@tab{% \setbox\z@\hbox\bgroup \let\[\let$$% \let\equation$\let\endequation\$% \let\@itemdepth\count@ \let\itemize\endgraf \let\enditemize\endgraf \let\endenumerate\endgraf ...

5

KOMA-Script's labeling list could be used for this. It is available in every KOMA-Script class (like scrartcl or scrbook) and can be used in other classes by loading the scrextend package. The syntax is: \begin{labeling}[<separator>]{<widest label>} A complete example: \documentclass{article} \usepackage{scrextend} \begin{document} ...

5

You could use a simple tabular environment: \documentclass{article} \usepackage{array} \begin{document} \noindent \begin{tabular}{@{}l >{:\quad} l} TCS & Jeddah,Kochi,Bangalore \\ InfoSys & Jeddah,Kochi,Bangalore \\ Wipro & Jeddah,Kochi,Bangalore \\ \end{tabular} \end{document} To fine-tune the amount of whitespace to the left and right ...

2

This can be done e.g. with etoolbox list - utilities. Use, for example, \listgadd{\myfilelist}{} as initializer for a list. Afterwards, at 'any' position use \listgadd{\myfilelist}{file1} or for a bunch of files \forcsvlist{\listgadd{\myfilelist}}{file2, file3,file4}. To input all files in the appendix, it's good to have a wrapper command, that does some ...

3


6

You should not say \textbf#1, but \bfseries#1 or \textbf{#1}. Also it should be \arabic{enumi}, not enumi: with your code you're passing enumi to \circled as #1, not the instruction that prints the value of the counter. However I suggest using enumitem: \documentclass{report} \usepackage{color} \usepackage{tikz} \usepackage{enumitem} % Defining the ...

2

I guess this is what you want: \documentclass{article} \usepackage{enumitem} \usepackage{showframe} % just for the example \begin{document} \noindent\begin{minipage}[t]{0.45\textwidth} \subsection*{Header 1} \begin{itemize}[ align=left, leftmargin=2em, itemindent=0pt, labelsep=0pt, labelwidth=2em ] \raggedright \item[\textbf{foo}] ...

2

Just in order to show a table solution: % arara: pdflatex \documentclass{article} \usepackage{array} \usepackage{booktabs} \usepackage[inline]{enumitem} \newcommand*\myTableHeader[1]{\multicolumn{1}{c}{\large\textbf{#1}}} \begin{document} \noindent\begin{tabular*}{\linewidth}{@{\extracolsep{\fill}}p{0.3\linewidth}p{0.3\linewidth}p{0.3\linewidth}@{}} ...

2

You needed not only the intercolumn space added, but also a \noindent before the first minipage. Elsewise, you exceeded the column width. Indeed, minipages are a good way to handle this sort of multicolumn problem. REVISED to remove 2 stray spaces that David pointed out, by inserting line-end percent signs. \documentclass[11pt,a4paper]{article}% ...

11

\documentclass{article} \usepackage{pgfmath,color} \def\noun{% {{Fu}},{Fa}{ra},{{Uta}},{Ma}{ma},% {Ma}{mi},{{Ralf}},{La}{ra},% {Ma}{ra},{Mu}{rat},{Mar}{ta},% {Ma}{mut},{Ir}{a},{Mir}{a},{Ma}{ri}{a}% } \def\verb{{{malt}},{{ruft}},{um}{armt}% } \def\zc{\expandafter\zzblue} \def\zzblue#1{% \ifx\relax#1\else\textcolor{blue}{#1}% \expandafter\zzred \fi} ...

1

The solution is described already here by using etoolbox. So in your case do: \documentclass{beamer} \usepackage{etoolbox} % this is new \setbeamercovered{still covered={\opaqueness<1->{5}},again covered={\opaqueness<1->{60}}} % begining of the new definition \makeatletter \newcommand*\fix@beamer@close{% \ifnum\beamer@trivlistdepth>0 ...

1

You are missing a \end{enumerate} between the last "Answer: False" and "\end{document}". That is, the file should finish with: ... Answer: False \end{enumerate} \end{document} Also, you are missing a backslash (\) in the documentclass: \documentclass{siitexam} I copied everything from the start of your example until before the documentclass line ...

2

You do not have to redefine your own column style for this - it is already defined in tabular environment as p{column_width}. Also if you do not have special reason for defining the column width in milimeters, I would rather use the predefined lengths, such as \linewidth or \textwidth. Try the following: \begin{tabular}[t]{p{0.1\linewidth}p{0.9\linewidth} ...

1

You also can have item numbers left aligned, and thus aligned withe the left side of the text area, using the wide option: \documentclass[draft, 12pt]{article} \usepackage[showframe, nomarginpar]{geometry} \usepackage{enumitem} \usepackage{lipsum} \begin{document} This is a random and long sentence that apparently takes up two lines just so that I can see ...

5

I think this may be partly because one can use non-counter-style entries when using the optional argument to \item[<stuff>]. So, in that regard, you can set this manually so that the reference appears as you want: \documentclass{article} \usepackage{enumitem} \usepackage[noabbrev]{cleveref} \makeatletter \newcommand{\setcreflabel}[1]{% ...

6

The solution depends on how many items you are expecting in the list. If the number of items is 9 or less than use: labelindent=0pt,labelwidth=0.75em,leftmargin=! but for 10 thru 99 you should use a larger labelwidth=1.25em Notes: The showframe package was used just to show the page margins. It is not needed in your actual use case. Manually setting ...

3

Here is a possibility to do so. This table fits exactly on a page of an 11pt-book. If you need to do a page break, please read the documentation of the longtable package. You can reduce some more white space when having a look on Bernard's comment below. A makecell would reduce the width of the first column. \documentclass[11pt]{book} ...

0

I believe you're describing the part system. Refer to the exam documentation for a full explanation, but here's the example from it: \documentclass{exam} \begin{document} \begin{questions} \question Why is there air? \question What if there were no air? \begin{parts} \part Describe the effect on the balloon industry. \part Describe the effect on the ...

Top 50 recent answers are included