Tag Info

New answers tagged

3

You can use the \normalfont switch before \textit, or the \textnormal command, to "kill" the boldface font attribute; of course, you can define a dedicated command for this: \documentclass{article} \usepackage{enumitem} \setlist[description]{style=nextline} \newcommand\MyIt[1]{{\normalfont\textit{#1}}} \begin{document} \begin{description} \item[Abd ...


3

You're forgetting that TeX uses macro expansion! And you already have the macro \choice that you can define in whatever way you want! So we can define \choice to supply the easylist marker in front of the question text; the only precaution is to make the marker into an active character: \documentclass[11pt]{memoir} \usepackage{fontspec} ...


5

as in egreg's answer you need to make the character active before making the definition. This runs without error, I am not sure if it is the output you want? \documentclass[11pt]{memoir} \usepackage[T1]{fontenc} \usepackage{fontspec} \usepackage{xstring} \usepackage{easylist} \usepackage{ifthen} \catcode`§=\active \newenvironment{question}{ ...


3

I'd suggest you to use a customized list defined with the help of enumitem and some \parboxes to include the information for every work: \documentclass[draft]{article} \usepackage[T1]{fontenc} \usepackage{enumitem} \usepackage{calc} \newcommand\WorkFont{\bfseries\raggedright} \newcommand\WorkNameStyle{\upshape} \newcommand\numberstyle{\scshape} ...


2

This is a quick-and-dirty tabularx approach, with automatic - at the first column. The widths of the columns etc. are just guesses, as well as the font commands. \documentclass{article} \usepackage{tabularx} \newcommand{\WorkFont}{\bfseries} \newcommand{\WorkNameStyle}{\upshape} \newcommand{\numberstyle}{\scshape} \newcommand{\worklistfont}{\itshape} ...


1

you can try something like this \newenvironment{work}[3]{% #1\hfill #2\\*#3 \begin{list}{-}{% \settowidth{\rightmargin}{#2}}}{% \end{list}}


2

Here's one possibility using tcolorbox. A new hypotheses environment is defined (internally is just a list); inside this environment you use the \Hypo command for each hypothesis; the syntax is \Hypo[<label>]{<text>} The code: \documentclass{article} \usepackage[many]{tcolorbox} \usepackage{enumitem} \usepackage{amsmath,amssymb} ...


3

If you want to change the labels in a description to use small caps, the easiest way is to use enumitem: \documentclass[12pt]{book} \usepackage{enumitem} \setlist[description]{font=\normalfont\scshape} \begin{document} This is normal text. \textsc{This is in small caps.} \begin{description} \item [It's small caps] as you clearly see \end{description} ...


3

You can fake bold small caps with my \fauxsc{}, first described at Fake small caps with XeTeX/fontspec?. There are three parameters for tuning the fauxsc font \def\Hscale{.85}\def\Vscale{.72}\def\Cscale{1.10} which define the horizontal scale on lc letters, the vertical scale on lc letters, and the horizontal scale on uc letters. ...


2

Not sure of your full intent, but perhaps something like this. As egreg pointed out in the comments, enumerate was already taken; and as I pointed out, the occurrences of #1 in the definitions of \itemdef and \itemex had to be recast as ##1, since they occurred in the context of environment usages. \documentclass{article} \newcounter{usagenumber} ...


0

Here is a way if you don't want to do it by hand each time: \documentclass{article} \newcounter{myenumi} \setcounter{myenumi}{0} \newenvironment{myenumerate}{\begin{enumerate} \setcounter{enumi}{\themyenumi}}{ \setcounter{myenumi}{\theenumi}\end{enumerate}} \begin{document} \begin{myenumerate} \item first one \item second one \end{myenumerate} Now we've ...


3

When you type \the#2 you have an already formed token, so this will not be merged into a single command name such as \thelistAcounter. You have to build the name yourself: \documentclass{article} \usepackage{etoolbox} \newcounter{listAcounter} \newcommand\addToList[3]{% \stepcounter{#2}% \csdef{#1\csuse{the#2}}{#3} } \newcommand\getFromList[2]{% ...


2

I would take a slightly different approach from @harishkumar . Namely, I would make the box for the answer and not the preceding material. Also, you said you wanted both the left and right brackets to be aligned; this approach accomplishes that. \documentclass{article} \usepackage[shortlabels]{enumitem} ...


5

You can use a box like \item \makebox[0.5\textwidth][l]{$(p \geq 7) \wedge (p < 12)$} [Answer: $7 \leq p < 12$] Adjsut 0.5\textwidth or use a \hfill like \item $(\pi > 0) \wedge (\pi < 10)$ \hfill [Answer: $0 < \pi < 10$] Code: \documentclass{article} \usepackage[shortlabels]{enumitem} \begin{document} \begin{enumerate} ...


3

You're using \edef and \pageref cannot be used in this context, nor can it appear in \csname...\endcsname Avoiding full expansion will work, together with stringifying the first level expansion of \next when in \csname...\endcsname. \providecommand{\expandonce}{\unexpanded\expandafter} \makeatletter \def\removeduplicates#1#2{\begingroup \let\@tempa#1% ...


3

The solution is simple: protect the item label with braces: \item[{[$\Leftarrow$]}]


0

With enumitem package, we can do as follow: Preamble: \newcommand{\subscript}[2]{$#1 _ #2$} In document use: \begin{enumerate}[label=(\subscript{E}{\arabic*})] \item Generated by the $f*\tilde{g}$, where $f\in C_c(G)$, $g\in C_c(G)$; \item Generated by the $h*\tilde{h}$, where $h\in C_c(G)$; \end{enumerate}


5

The bidi package offers the RTLitems environment for this: \documentclass{book} \usepackage{xcolor} \usepackage{setspace} \usepackage{fontspec} \usepackage{polyglossia} \setmainlanguage{english} \setotherlanguage{arabic} \usepackage{pifont} \usepackage{enumitem} \newfontfamily\arabicfont[Script=Arabic,Scale=1.1]{Scheherazade} \begin{document} Some latin ...


1

The default \cvlistdoubleitem is set with a symbol as defined in \listitemsymbol. You can remove this via a redefinition of \listitemsymbol: \renewcommand{\listitemsymbol}{} Note that this would affect the use of \cvlistitem as well, so you may want to limit the scope of this redefinition.


2

Don't use \cvlistdoubleitem. Use cvcolumns instead. From moderncv examples: \section{References} \begin{cvcolumns} \cvcolumn{Category 1}{\begin{itemize}\item Person 1\item Person 2\item Person 3\end{itemize}} \cvcolumn{Category 2}{Amongst others:\begin{itemize}\item Person 1, and\item Person 2\end{itemize}(more upon request)} \cvcolumn[0.5]{All the ...


2

Yes, you can easily do this using the etoolbox package and \AtBeginEnvironment to set the colors as you like inside the blocks; a little example changing the colors for block and exampleblock: \documentclass{beamer} \usecolortheme{orchid} \usepackage{etoolbox} \AtBeginEnvironment{block}{ \setbeamercolor{itemize item}{fg=orange!70!black} ...


0

You can use enumitem package, it has automatic alignment of item labels. \documentclass{article} \usepackage{enumitem} \begin{document} \begin{itemize}[font=\bfseries] \item[Long label] text \item[Text] text \item[Short] text \end{itemize} \end{document}


2

The following might suit you: \documentclass{article} \usepackage{etoolbox,xparse} \ExplSyntaxOn \cs_new_eq:NN \CALC \fp_eval:n \ExplSyntaxOff \newcounter{argcnt} \makeatletter \newcommand{\newarray}[2]{% \newarray{<array>}{<csv list>} \setcounter{argcnt}{0}% Restart argument count \renewcommand{\do}[1]{% With each element do... ...


1

Is this something like what you mean? Perhaps this could get you started. \documentclass{article} \newcommand{\twothings}[2]{% \gdef\thingone{#1} \gdef\thingtwo{#2} } \newcommand{\pickone}[1]{% \ifnum#1 = 1 \thingone \else \ifnum#1 = 2 \thingtwo \else \relax \fi \fi% } ...


1

One approach with explicit \onslide settings. \documentclass{beamer} \begin{document} \begin{frame}{Some title} \begin{enumerate} \item<1-3> Item1: \onslide<2-3>{text1} \item<1-3> Item2: \onslide<3-3>{text2} \end{enumerate} \end{frame} \end{document}


1

There are various overlay specifications (see beamer documentation for details). I use several of them here. One major difference is that the content of \only{} does not occupy space while not shown, but the others do. Using \only{} can cause material to move around on a frame, but can be useful when replacing one thing with another. Another difference is ...


0

If you just want to have some nicer looking code, define a new environment: \documentclass{article} \usepackage[shortlabels]{enumitem} \usepackage{amsthm} \newtheorem{theorem}{Theorem} \newenvironment{proofoutline}[1] {\begin{enumerate}[{#1}]\item\begin{enumerate}} {\end{enumerate}\end{enumerate}\par\noindent} \begin{document} \begin{theorem} Every ...


2

enumitem allows you to create enumerated environments with greater depth (up to 10 at least, I think): \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{enumitem} \newlist{myenum}{enumerate}{5} \setlist[myenum]{label=\arabic*} \begin{document} \begin{myenum} \item level 1 \begin{myenum} \item level 2 \begin{myenum} ...


3

Don't enumerate content manually. Instead, use a list that enumerates the content automatically: \documentclass{article} \begin{document} \begin{enumerate} \item Hello, my name is John Doe. I study applied mathematics and I enjoy the following subjects: calculus, differential equations, number theory, set theory, computer science, etc. \item ...


0

I've had a similar problem, and here's how I've solved it : The problem : I had defined personal quoting commands combined to the citation, making the same things as the \blockquote or \displaycquote : \newcommand{\kb}[3]{\begin{quote} \begin{singlespace} \smaller \og {\itshape #3} \fg \nolinebreak \cite[#1]{#2} \end{singlespace} \end{quote}} But when ...


3

Here's one way defining two commands \afterclasspart and \standardpart to give the desired formatting: \documentclass{exam} \newcommand\afterclasspart{\renewcommand\partlabel{(\thepartno)$^\ast$}} \newcommand\standardpart{\renewcommand\partlabel{(\thepartno)}} \begin{document} \begin{questions} \question[10] Why is there air? \question What if there ...


3

Here's one possibility allowing you to insert an image as background for the counters in enumerate environments; the code illustrates the simple procedure up to level three of nesting (the maximum nesting level for beamer). The main command is \bpebble with three mandatory arguments: \bpebble{<optionf for \includegraphics>}{<image ...


1

(As asked in comment) Press tab between #RET# and \item and save. See that charming orange triangle?


2

Here is a way to do it. I think, however, a list inside a wide list should have its label aligned with the label of the wide, not with the label of a ‘general’ first level list, as the latter is slightly shifted to the left of a paragraph indent (~ 2.5-3pt), which doesn't lok too good, in my opinion. Demo: \documentclass{scrartcl} ...


1

Is this what you want? \item<4-|alert@4>[]% \only<4>{and c.}% \only<5>{\missingfigure[figheight=0.4\textheight]{Picture of c.}}


6

At the end of a list (itemize and enumerate included), LaTeX issues a number of vertical adjustments that are not scrutinized by your \nopagebreak requirement. So, instead of patching \enditemize, include your The end as part of the list where you have more control over the page breaking restrictions: \documentclass{report} \usepackage{lipsum} ...


4

Similar to Harish's answer, but there's no need for \renewcommand*{\theenumi}{\thesubsection.\arabic{enumi}} You can simply define \setlist[enumerate]{leftmargin=*,align=left,label=\thesubsection.\arabic*.} MWE: \documentclass{memoir} \setcounter{secnumdepth}{3} \usepackage{enumitem} ...


3

You can use enumitem and its align=left \documentclass{memoir} \usepackage{enumitem} \renewcommand*{\theenumi}{\thesubsection.\arabic{enumi}} \begin{document} \chapter{A chapter} \section{A section} \subsection{A sub section} \begin{enumerate}[align=left,leftmargin=*] \item Some item Some item Some item Some item Some item Some item Some item Some item ...


5

You have to use \leaders (a low level command). The spacing between dots can be acted on by changing 0.44em to another length. \documentclass{article} \usepackage{siunitx} \sisetup{group-separator={,}} \newcommand{\data}[2]{% \begingroup\csname @afterindenttrue\endcsname % in case it comes after a section title \makebox[\datawidth][s]{% spread the ...


3

The common but not so optimal approach is to use \dotfill. It is implemeted by \cleaders primitive which repeats the boxes (with the dot) in the reserved space and the result is centered in this space. What is bad? The dots are not aligned in the lines one above second. But we have the \leaders primitive which repeats the boxes in the reserved space aligned ...


6

Like this? \documentclass{article} \usepackage{enumitem} \begin{document} \begin{enumerate}[label=``\arabic*., ref=\arabic*] \item bal \item bla blala bla \item bla bla bla'' \end{enumerate} \end{document} ref=\arabic* is needed so that if you label an item and \ref it later, you won't get " in the reference.


4

See the enumitem package documentation for more information in terms of list adjustments: \documentclass{article} \usepackage{enumitem} \newlist{outernum}{enumerate}{1} \newlist{innernum}{enumerate}{1} \setlist[outernum]{label={\Roman*},labelsep=0pt,itemindent=0pt,align=right,labelwidth=0pt,leftmargin=*} ...


5

You don't want to abuse the optional argument to \item; better defining a \nextitem command: \documentclass{article} \makeatletter \newcommand\nextitem[1]{% \setcounter{\@enumctr}{#1}% \addtocounter{\@enumctr}{-1}% } \makeatother \begin{document} \begin{enumerate} \item First \item Second \nextitem{8} \item Eighth! \item Ninth! \nextitem{4} \item ...


3

\documentclass{scrartcl} \usepackage{enumitem} \usepackage{etoolbox,xparse} \AtBeginEnvironment{enumerate} {\let\originalitem\item \RenewDocumentCommand\item{o}{\IfValueTF{#1} {\setcounter{enumi}{\numexpr#1-1\relax}\originalitem}{\originalitem}}} \begin{document} Good: \begin{enumerate} \item First \item Second \item[8] Eighth! \item ...


2

For such an application I wouldn't use longtable; just boxes for coping with long titles (or authors with long names). Some tricks are however necessary for getting correct and uniform vertical spacing (see How to keep a constant baselineskip when using minipages (or \parboxes)?) \documentclass{article} \newlength{\authorwidth} \newlength{\titlewidth} ...


3

Here is a simple solution that you could build on. You can use a \parbox for the authors and titles. By specifying that all the parboxes are the same width, they will align as though in a table. (EDIT You can also use a tabular: see below.) There is no limit on the length, as each \work entry is treated as a paragraph and TeX will break between them as ...


1

I strongly doubt that there's a LaTeX document class out there that "does" just the type of list you're interested in. I must confess to be entirely unaware of a LaTeX package that does just this -- and nothing else. At any rate, it's not difficult to set up a longtable environment to do what you're interested in. A longtable can span many pages. By using ...


2

Here's a solution that also teaches you how not to define a new unnumbered theorem each time. The *-version of genthm does a break, in case you want to start with a list. However, I find this bad style and I'd start the theorem by stating the general assumptions we're making on the functions. \documentclass{article} \usepackage[T1]{fontenc} ...



Top 50 recent answers are included