Skip to main content
8 votes
Accepted

Use other units than point for arraycolsep

The error message does not say that the it needs points, the message is ! Illegal unit of measure (pt inserted). <to be read again> m l.5 \setlength{\arraycolsep}{3mu} So ...
David Carlisle's user avatar
5 votes

Spacing between mathrel and mathord same as between mathrel and mathopen

TeX inserts a thick space between a relation symbol and an opening atom. The following table has been taken from the TeXbook (see this answer for reference The indices in the left column and the top ...
egreg's user avatar
  • 1.2m
5 votes
Accepted

Spacing between mathrel and mathord same as between mathrel and mathopen

TeX by Topic is wrong here. The original table in the TeXbook looks like this
Ulrike Fischer's user avatar
4 votes
Accepted

Turn on double spacing, but not before equations

You want the nodisplayskipstretch option, but also to modify \arraystretch. \documentclass[12pt]{article} \usepackage{amsmath} \usepackage[nodisplayskipstretch]{setspace} \usepackage{lipsum} % for ...
egreg's user avatar
  • 1.2m
2 votes
Accepted

How to detect inner spaces at the document level forwarded to token lists in LaTeX3?

Unprotected spaces are not treated as items in token lists in LaTeX3. interface3.pdf says: A token list (explicit, or stored in a variable) can be seen either as a list of “items”, or a list of “...
Ulrich Diez's user avatar
  • 30.1k
2 votes

Operator names that ignore parentheses

I heartily disagree. Why should \dim behave differently from \sin? I really can't find a reason. Anyway, you can ruin your math typesetting 😉 with the following definition. \documentclass{article} \...
egreg's user avatar
  • 1.2m
1 vote

Operator names that ignore parentheses

Quick hack: You can peek ahead with \@ifnextchar to conditionally add a {}. \documentclass{article} \makeatletter \NewCommandCopy\orig@dim\dim \renewcommand{\dim}{\orig@dim\@ifnextchar({{}}{}} \...
mbert's user avatar
  • 5,116
1 vote

How to detect inner spaces at the document level forwarded to token lists in LaTeX3?

You can use tl_if_in but as shown here you may need to trim first if you really only care about inner spaces. \documentclass{article} \begin{document} \ExplSyntaxOn \def\hasspace#1{\tl_if_in:nnTF{#...
David Carlisle's user avatar
1 vote

fbox of parbox of textwidth length is too wide

Following up on Phelype's comment: \documentclass{article} \newcommand{\answer}[1]{% \par \noindent\fbox{% \parbox{\dimeval{\linewidth-2\fboxsep-2\fboxrule}}{% #1 \hfill ...
mbert's user avatar
  • 5,116
1 vote

How to detect inner spaces at the document level forwarded to token lists in LaTeX3?

We can implement this task using TeX primitives only. \catcode`~=12 \def\isinnerspace#1{\expandafter\isinnerA\detokenize{#1}\end} \def\isinnerA#1\end{\expandafter\isinnerC\expanded{\isinnerB#1~{}} \...
wipet's user avatar
  • 75.9k

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