Tag Info

Hot answers tagged

7

If your input is in a file, you need to grab the file: \begin{filecontents*}{\jobname-list.tex} apples.tex bananas.tex strawberries.tex \end{filecontents*} \documentclass{article} \usepackage{xparse} \ExplSyntaxOn \NewDocumentCommand{\listset}{O{default}m} { \macmadness_listset:nn { #1 } { #2 } } \NewDocumentCommand{\listprint}{+O{}} { ...


6

\documentclass{article} \newread\myread% Get a file handle grip, call it myread \newcommand{\openandtypeset}[1]{% \IfFileExists{#1}{% Check first \openin\myread=#1 % Open the file from #1 \begin{itemize} \loop \read\myread to \localvariable % Read line content to `\localvariable` \ifeof\myread % Is it at the end of the file -> localvariable is ...


3

This is a well known (and documented; cf. section 9.5 of the beamer documentation) effect with overlays and I am afraid there's no general solution. Two possible solutions are to use \struts for the \items or to use an overprint or an overlayarea environment: \documentclass{beamer} \begin{document} \begin{frame} \begin{block}{The One} ...


3

You are looking for \setupitemize[inmargin].


3

Just add a \par or blank line leaving the nested enumerate environment. \documentclass{article} \usepackage{ragged2e} \usepackage{polyglossia} \begin{document} \section{Nested list with sloppypar} \begin{enumerate} \item \begin{sloppypar}\justifying\hyphenrules{nohyphenation}Blah blah blah.\end{sloppypar} \begin{enumerate} \item ...


3

The following example defines macros \dotsfrom and \dotsto, which put a dotted line between the locations. The locations are get from module zref-savepos of package zref, which provides an interface for the \pdfsavepos feature of pdfTeX, which is also available in LuaTeX and XeTeX. The first LaTeX run stores the positions in the .aux file as references and ...


3

Compile at least twice. \documentclass{beamer} \usepackage{etaremune} \newcommand{\labelenumi}{\textcolor{structure}{\theenumi.}} \begin{document} \begin{frame}{Foo} \begin{enumerate} \item A \item B \end{enumerate} \begin{etaremune} \item A \item B \end{etaremune} \begin{etaremune} \item A \item B \end{etaremune} \end{frame} ...


2

While Steven's answer certainly solves your problem, the way you are marking up your document is not ideal. You can simplify everything a lot with the following: \usepackage{etoolbox} \AtBeginEnvironment{enumerate}{\sloppy\hyphenrules{nohyphenation}} Compare (and comment out the \AtBeginEnvironment line to see the difference): \documentclass{article} ...


2

In a list environment, the action of \item is deferred when a paragraph is started. And \begin{sloppypar} starts with \par, which confuses this mechanism. Here's a minimal example that emulates what sloppypar does: \par at the beginning, some other actions that don't concern the issue, and \par at the end. \documentclass{article} ...


2

This is not exactly what you want, but tray, maybe you liked ... \documentclass[12pt,border=2mm,preview]{standalone} \usepackage{array,amsmath} \usepackage{lipsum} \begin{document} \lipsum[1] \begin{minipage}[t]{0.48\hsize} \begin{equation}\label{eq:i} \tag{i} a=b \end{equation} \end{minipage}\quad\begin{minipage}[t]{0.48\hsize} ...


2

To get the correct symbol for the current level of the itemize use \usebeamertemplate{itemize \beameritemnestingprefix item} \documentclass{beamer} \setbeamertemplate{itemize subitem}[circle] \begin{document} \begin{frame} \begin{itemize} \item xxx \begin{itemize} \item yyy \usebeamertemplate{itemize item}{} \item xx ...


2

enumitem has always met my needs for lists. However, I'm not sure it is the best option here. multienum seems designed to do just what you want. It provides an environment multienumerate within which you can use commands such as \mitemx{} to define a line with a single item, \mitemxx{}{} for a line with 2 and so on. You can also say something like ...


2

Maybe it's not very professional, but I would use \phantom{what you don't want to see} for the first page and put inside what's added on the second one.


2

It depends on your use case, but there are packages for this kind of task. E.g., paracol.sty (asymmetric column widths to show the effect):


2

Aligning the label left is easy with align=left from enumitem package. The special item can be set with \item[4bis], but this is only a strategy, if this does not occur very often. If the features of the enumerate package are requested, change to \usepackage[shortlabels]{enumitem} here. If the label should be wider, just say labelwidth=40pt, for example, ...


2

The key is to set afterlabel={}, so nothing is added after the empty label: \documentclass[]{article} \usepackage[inline]{enumitem} \usepackage{showframe} % just for the example \setlength{\parindent}{0pt} % just for the example \begin{document} This is a short paragraph \begin{enumerate*}[ label={}, itemjoin={~\textbullet\ }, afterlabel={}, ] ...


1

The labelling itself could be achieved very easily with enumitem package, but not the reversal of the list. However, there's the etaremune package, which does the reversal (requires two compilation runs, however). The labelling is to be changed manually. Since the first level of enumerate uses the enumi counter, \theenumi has to be redefined locally, for ...


1

The enumitem package version 3.0 provide inline lists (horizontal lists), for their use just add inline in the options when calling the package, this provides the environments enumerate*, itemize* and description* they can be used as follows \documentclass{article} \usepackage[inline]{enumitem} \newcommand{\inline}[1]{\stepcounter{enumi} \def\c{\theenumi} ...


1

The label=... syntax gives a clue that enumitem is used. \boxed is from amsmath or mathtools package, but it doesn't need to be enclosed with a $...$ pair, since it's basically the same as \fbox. \documentclass{article} \usepackage{enumitem} \begin{document} \begin{enumerate}[label={\fbox{\Alph*}}] \item text text text \item text text text \item ...


1

Perhaps using full-width tabulars - in the form of tabularx - would work for you: \documentclass{article} \usepackage{tabularx,array,booktabs} \newcolumntype{L}{@{}X<{\dotfill}@{}} \begin{document} \begin{list}{}{} \item Article group 1 \end{list} \begin{list}{}{} \item Article 1~\dotfill~ID \item Second article~\dotfill~ID \end{list} ...


1

Here are three possibilities, with enumitems tools: \documentclass{report}%{memoir} \usepackage{enumitem} \usepackage{lipsum} \begin{document} The way to propose a solution that \begin{enumerate}[nosep, wide] \item is able to clearly show my items, \item can be read as if it were only one sentence, and \item is well formatted \end{enumerate} is ...



Only top voted, non community-wiki answers of a minimum length are eligible