Tag Info

New answers tagged

5

There are many incorrect inputs that do not generate an error message. (\section[z]{\section{aa}} for example). \section inside a float is an error it is just not trapped by the system (it would have taken an unreasonable amount of memory to do so at the point that latex was designed.) The math/non-math distinction is built in to tex it is much easier to ...


13

Here is a solution (it doesn't use, but I hope it will be compatible with enumitem) Note: I don't understand what the OP want to do with display math Limitation: blank lines not supported (this code will not work) \begin{mathitem} \item E=mc^2 \item e^{i\pi}+1=0 \item \text{ducks} + \text{caffeine} = \text{\url{http://i.stack.imgur.com/GVksc.gif}} ...


6

(Answer modified to (i) add a "MathDescription" environment and (ii) demonstrate compatibility with the enumitem package.) Here's a LuaLaTeX-based solution. It defines three new environments called MathItemize, MathEnumerate, and MathDescription. The environments work just like the "ordinary" itemize, enumerate, and description environments, except that all ...


5

Quick and dirty: \documentclass{article} \makeatletter \newif\if@mathitemize \newif\if@closemathitem \let\orig@item=\item \renewcommand{\item}{\if@closemathitem$\fi\orig@item\if@mathitemize\@closemathitemtrue$\fi} \newenvironment{mathitemize}{\@mathitemizetrue\itemize\@closemathitemfalse}{$\enditemize} \makeatother \begin{document} \begin{itemize} \item ...


0

Among few options you have, one is to use nosep as the option to itemize (a feature of enumitem package). Add \raggedright additionally so that the weird justification doesn't spoil the looks. If adventurous, you may also consider using tasks package, which, is good in handling the multicolumn lists. I have added tasks environment with all possible ...


0

It is due to the package enumitem. If you disable \usepackage{enumitem}, then the extra line disappears as it works in template.tex of moderncv.


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={}, ] ...


0

There are two great answers here that both do the job, but neither directly answered the question that I asked. I'm therefore adding this answer (my eventual solution) in case anyone comes across the question with a different use-case. I found this page: http://www-h.eng.cam.ac.uk/help/tpl/textprocessing/squeeze.html It is a very approachable introduction ...


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 ...


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, ...


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 ...


0

Working example (documentation): \documentclass[letterpaper,12pt]{article} \usepackage{enumitem} \begin{document} \begin{enumerate}[label=(\alph*)] \item one \item two \end{enumerate} \end{document}


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

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.


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} ...


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 ...


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} ...


3

You are looking for \setupitemize[inmargin].


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

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} ...


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 ...


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 ...


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 ...


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} ...


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{}} { ...


0

Try this: \documentclass{article} \usepackage{amsmath} \begin{document} \begin{tabular}{p{.49\textwidth}p{.49\textwidth}}%%change the number as required a) First point & b) Second point \\ c) Third point & d) Fourth point \\ \end{tabular} \end{document} Improved version: \documentclass{article} \usepackage{amsmath} ...



Top 50 recent answers are included