New answers tagged

0

\documentclass{article} %\usepackage[parfill]{parskip}% <--- should work with or without this package. \usepackage{showframe} \usepackage{array} \usepackage{xcolor} \usepackage{enumitem} \usepackage{tikz} %% http://tex.stackexchange.com/questions/64982/why-is-parskip-zero-inside-a-minipage \newlength{\currentparskip} \newcommand*{\CircledText}[2][fill=...


3

\documentclass{scrbook} \usepackage{etoolbox} \def\masterieslist{} \def\printmasteries{\appto\masterieslist{\end{enumerate}}\masterieslist} \let\originalchapter\chapter \def\chapter#1#{\chapteraux{#1}} \def\chapteraux#1#2{\originalchapter#1{#2}% \expandafter\ifstrempty\expandafter{\masterieslist} {\eappto\masterieslist{\par Lesson \arabic{chapter} -- ...


2

Just use the classic itemize environment. Together with the symbols from http://tex.stackexchange.com/a/313337/36296 this gives: \documentclass{beamer} \usepackage{pifont} \newcommand{\cmark}{\ding{51}}% \newcommand{\xmark}{\ding{55}}% \newcommand{\done}{\rlap{$\square$}{\raisebox{2pt}{\large\hspace{1pt}\cmark}}% \hspace{-2.5pt}} \newcommand{\wontfix}{\...


3

Here is a solution with tasks. If you want sections tobe in small caps, you can redefine \sectionfont in the preamble. Note the syntax \sc, \bf, it is deprecated and should be replaced with the switches \scshape, \bfseries, \itshape or the commands \textsc{…}, \textbf{…}, \textit{…}. \documentclass[margin,line]{res} \usepackage[inline]{enumitem} \setlist[...


4

First solution which employ tabularx environment has some malfunction: in column with itemize the width column is doesn't work as expected. So, meanwhile I found better solution with tabular environment: \documentclass{report} \usepackage{makecell,multirow} \renewcommand\theadfont{\bfseries\normalsize} \usepackage{caption} \usepackage{calc} \usepackage{...


3

You can define a new style similar to multiline, but you will have to setup a better labelwidth and you will have to insert empty lines with \\~ if the description text is too short. \documentclass{article} \usepackage{enumitem,calc} \makeatletter \def\enit@align@parright{% \def\enit@align##1{% \nobreak \strut\smash{\parbox[t]\labelwidth{\...


5

You can do that with the verse package, and even number the verses. This is an example-code: \documentclass[11pt]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[lf]{ebgaramond} \usepackage{verse, etoolbox} \usepackage{enumitem} \AtBeginEnvironment{verse}{\itshape} \settowidth{\versewidth}{In the midst of the word he was trying ...


6

You shouldn't hard code lists like this, if you want to change the style of an item label, use a package (or do it the hard way) to change the style of an item label. Beyond that, the default behaviour of the enumerate environment gives you exactly the list structure that you want. Here I use the enumitem package and pass the optional argument [label=\...


0

I can propose a simple solution with ntheorem: its break style does not seem to have the same problem with page breaks, so I patched it to do what you want: \documentclass{article} \usepackage{amsmath} \usepackage[thmmarks, amsmath, thref, hyperref]{ntheorem} \usepackage{amssymb} \usepackage{enumitem} \usepackage{lipsum} \makeatletter \newtheoremstyle{...


1

The hyperref package puts the anchor above the list, hence the extra vertical space. If no anchor is needed, you can wrap the first \item in the list or the entire enumerate or the minipage environments in a NoHyper environment. The following MWE is with the enumerate wrapped in NoHyper: \documentclass{article} \usepackage{amsthm} \usepackage{fouriernc} \...


1

I think the problem is because hyperref packages redefines the macro and puts anchor for cross referencing. I would prefer the following code: \documentclass{article} \usepackage{amsthm} \usepackage{fouriernc} \usepackage[utf8]{vietnam} \usepackage{amsmath} \theoremstyle{definition} \newtheorem{thm}{}[section] \usepackage[unicode,bookmarksnumbered]{hyperref}...


2

The amsthm package manual has it covered in §2.1. You can obtain it via texdoc amsthm on your system, or on CTAN I loosely quote that section: The best way to avoid these problems is to allow the list to start on a new line. One way to accomplish this is to follow the theorem head (and \label, if present) by the command \leavevmode. (For more ...


3

I propose to do it with enumitem and a custom description environment. I replace \item with an \event command, which accepts three arguments and does the exact formatting. \documentclass[12pt, british]{article} \usepackage[utf8]{inputenc} \usepackage{babel} \usepackage[showframe]{geometry} \usepackage[autostyle]{csquotes} \usepackage{enumitem} \...


3

Instead of using label* you can use [label=(\alph{enumi}\,\roman*)] Notes: I added a small space \, between the b and the i, but you can adjust that as desired. Code: \documentclass{article} \usepackage{enumitem} \begin{document} \begin{enumerate}[label=(\alph*)] \item{One.} Here I would like keep both parentheses. \item{Two.} \begin{enumerate}[...


1

I suggest you load the enumitem package and define a dedicated enumerate-like list environment that uses lowercase-roman letters. \documentclass{article} \usepackage{enumitem} \newlist{romanenum}{enumerate}{1} \setlist[romanenum]{label=(\roman*)} % roman numerals, encased in parentheses \begin{document} \begin{romanenum} \item For any natural number \...


3

Here are three other solutions, the last two yielding an automatic numbering: \documentclass{scrartcl} \usepackage{framed,enumitem} \begin{document} \begin{framed} The \textit{two-step} model of XMCD: \begin{itemize}[align = left] \item[(BulletLine1)] In the \textit{first step}, circularly polarized X-rays generate photoelectrons with a spin and/or ...


3

With the enumitem package, you can specify various lengths associated with the itemization, including, as below, the itemindent. \documentclass{scrartcl} \usepackage{framed,enumitem} \begin{document} \begin{framed} The \textit{two-step} model of XMCD: \begin{itemize}[itemindent=4em] \item[(BulletLine1)] In the \textit{first step}, circularly polarized ...


6

Trivlist handles many things not handled by the simpler version for example xxx \begin{proof} zzz \end{proof} xxx \begin{proof} zzz \end{proof} you need to correctly handle ending the previous paragraph, you need to handle the case that the proof starts with a blank line or a nested list, you need to avoid a page break after the Proof heading and before ...


3

If you are willing to use the etoolbox package, you can replace your \if with a bool. \documentclass[10pt,presentation]{beamer} \usepackage{etoolbox} \newbool{exercise} \booltrue{exercise} \boolfalse{exercise} \begin{document} \section{Some Section} \begin{frame}{Some Slide} \ifbool{exercise}{% What is the answer to everything? \begin{enumerate} ...


3

Option caption enhances the listing with a caption, whose title is also used for the entry in the list of listings: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{listings} \lstset{language = Matlab, inputpath=./Code/} \begin{document} \lstlistoflistings \lstinputlisting[caption=test1.m]{test1.m} \lstinputlisting[caption=test2.m]{test2.m} ...


2

I'm sorry to post an answer, but since I haven't reached 50 points yet I can't comment it seems. You can fix the color issue with this: \newcommand{\inlineitem}{\leavevmode{\color{blue}\usebeamertemplate{itemize item}} } Probalby very crude but it does work for Madrid.


4

The following MWE will help you solve the problem: \documentclass[a4paper]{article} \usepackage{enumitem} \usepackage{lipsum} %Used in my LaTeX document that I'm preparing, just in case there is some conflict between this and any proposed solution \setlist[itemize]{wide,topsep=0mm,partopsep=0mm,parsep=0mm,itemsep=0.1mm,labelindent=0pt,leftmargin=0pt} \...


1

I prefer moving the introduction to a minipage: \begin{minipage}{\textwidth} And here, finally, is the list of mission-critical items: \begin{itemize} ... \end{itemize} \end{minipage} Note that this prevents page breaks inside the list too.


5

If you load the enumitem package, you just need to pass leftmargin=0cm to the second list: \documentclass{article} \renewcommand{\labelenumi}{\alph{enumi})} \renewcommand{\labelenumii}{\arabic{enumii}$^{\circ}$} \usepackage{enumitem} \begin{document} \begin{enumerate} \item First level item \item First level item \begin{enumerate}[leftmargin=0cm] % <-- ...


5

Yes, the syntax is \begin{tabularx}{<width>}[<pos>]{<col spec>} % tabular content \end{tabularx} Here is you example: \documentclass{article} \usepackage{tabularx} \newenvironment{cheeselist} {\begin{enumerate}} {\end{enumerate}} \newenvironment{cheese} {\item \tabularx{\linewidth}[t]{l X}} {\endtabularx} \newcommand{\...


1

You may use \reversemarginpar to have notes on the left side of the page and nolist option to create a note not listed in the ToDo's and Notes area. To create a note listed but not in the text, I propose to add an inline, nolist note after \listoftodos command, but I hope someone else will find a better solution! \documentclass[a4paper,12pt]{article} \...



Top 50 recent answers are included