# Tag Info

0

First, the body of \foreach is in a group so the effect of local commands is restricted to a single iteration. What it means for your first example is that \toggletrue/\togglefalse only have an effect within the same iteration. To fix this, as suggested in the etoolbox manual, you can prefix them with \global which extends their effect beyond groups: ...

0

Because we do not have a compiling MWE and we do not have your file nomencl.ist I can not test it, but with the following changing in the definition of your output profile for TeXnicCenter it should work. Delete the entry for the postprocessor Add -s nomencl.ist to the command line of MakeIndex My profile definition in TeXnicCenter:

3

Since the left hand column of the description is in bold letters, you have to calculate the the width based on bold letters. Trying \widthof{\textbf{Connectivity}} solves that problem. As for the insufficient indenting when multiple lines are present, they seem to be about one n space and so I gave a dummy character n or y to the argument of the second ...

7

\begin{enumerate}[label=\arabic*.,ref=\arabic*] ... Or add it to the definition of your custom list or whatever.

9

If the engine is Unicode aware and a font is used, which contains the glyph for the private Unicode code point: ^^^^e25f See: The ^^ notation in various engines. This is TeX's method to encode non-ASCII characters with ASCII and can also be used inside command tokens. There are also commands to select a character by slot in the current font: LaTeX ...

1

Special thanks to @cmhughes. The solution is to use math mode with the aligned command: \item \begin{aligned}[t] ... \end{aligned}

3

A variant of Christian Hupfer's solution, but fully expandable: \documentclass{article} \usepackage{enumitem} \usepackage{xparse} \ExplSyntaxOn \DeclareExpandableDocumentCommand{\basetwoenum}{m} { \basetwoenum_main:n { #1 } } \cs_new:Nn \basetwoenum_main:n { \exp_args:Nc \basetwoenum_eval:n { c@#1 } } \cs_new:Nn \basetwoenum_eval:n { \fp_eval:n ...

3

Here's a LuaLaTeX-based solution, which works with the enumitem package. It defines an enumerated environment called powertwoenum, in which consecutive items are numbered as 1, 2, 4, 8, 32, etc. Items in a powertwoenum list may be cross-referenced via the usual \label-\ref mechanism. % !TEX TS-program = lualatex \documentclass{article} ...

2

An 'awful' mix with enumitem and expl3 features, defining a new counter formater named baseenum -- I've to test with deeper level nesting however. \documentclass{article} \usepackage{enumitem} \usepackage{xparse} \makeatletter \def\basetwoenum#1{\expandafter\@basetwoenum\csname c@#1\endcsname} \ExplSyntaxOn \def\@basetwoenum#1{% \int_set:Nn ...

3

\documentclass{article} \usepackage{tikz} \renewcommand*{\labelenumi}{\pgfmathparse{int(2^(\theenumi-1))} \pgfmathresult} \begin{document} \begin{enumerate} \item One \item Two \item Three \item more \item more \item more \item more \item more \item more \item more ...

2

Instead of an enumerate or itemize environment, consider using a plain array environment. (The horizontal bar in the following screenshot is added only to illustrate the width of the textblock.) \documentclass{article} \begin{document} \hrule\smallskip % just to illustrate width of textblock \noindent \begin{minipage}{0.5\textwidth} \centering ...

3

\documentclass{article} \usepackage{listings} \begin{document} \begin{lstlisting}[caption={\textsc{Newton(1,2,5)}}] > 0.0001 > 0.0011 > 0.0111 > 0.1111 > 0.1111 \end{lstlisting} \begin{lstlisting}[caption={\textsc{reciprocal(2,2,5)}}] > 0.0001 > 0.0011 > 0.0111 > 0.1111 > 0.1111 \end{lstlisting} \end{document} An update ...

4


1

This is mostly a hack, but it does work well. You could do it with just an environment {questionlist} and then incrementing a counter for the “depth”, that might be easier. \documentclass{scrartcl} \usepackage{etoolbox} \usepackage[shortlabels]{enumitem} \newlist{questionlistA}{enumerate}{1} \setlist[questionlistA]{label=\textup{\arabic*)}} ...

0

Inline lists are boxes, and so your definition is lost. Either use mode=unboxed or move the \@currentlabel definition so that it is nearer at the label: \documentclass{article} \usepackage[inline]{enumitem} \makeatletter \newcommand{\myitem}[1][]{% \item[#1]\protected@edef\@currentlabel{#1}\ignorespaces% } \makeatother \begin{document} ...

Top 50 recent answers are included