From 1efe9c09be9e93ed5dbb2ae60d787517eb0609ca Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Sun, 12 Feb 2023 20:12:44 -0500 Subject: [PATCH] mjo-common: add \tuple. --- examples.tex | 6 +++++- mjo-common.tex | 6 ++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/examples.tex b/examples.tex index e70e0e1..5232635 100644 --- a/examples.tex +++ b/examples.tex @@ -79,7 +79,8 @@ The function $f$ applied to $x$ is $f\of{x}$, and the restriction of $f$ to a subset $X$ of its domain is $\restrict{f}{X}$. We can group terms like $a + \qty{b - c}$ or $a + \qty{b - \sqty{c - - d}}$. The tuples go up to seven, for now: + d}}$. The tuples go up to seven, for now, and then we give up + and use the general construct: % \begin{itemize} \begin{item} @@ -100,6 +101,9 @@ \begin{item} Septuple: $\septuple{1}{2}{3}{4}{5}{6}{7}$. \end{item} + \begin{item} + Tuple: $\tuple{1,2,\ldots,8675309}$. + \end{item} \end{itemize} % The factorial of the number $10$ is $\factorial{10}$, and the diff --git a/mjo-common.tex b/mjo-common.tex index 6b357ab..ccb22da 100644 --- a/mjo-common.tex +++ b/mjo-common.tex @@ -39,6 +39,12 @@ % A seven-tuple of things. \newcommand*{\septuple}[7]{ \left({#1},{#2},{#3},{#4},{#5},{#6},{#7}\right) } +% A free-form tuple of things. Useful for when the exact number is not +% known, such as when \ldots will be stuck in the middle of the list, +% and when you don't want to think in column-vector terms, e.g. with +% elements of an abstract Cartesian product space. +\newcommand*{\tuple}[1]{ \left({#1}\right) } + % The "least common multiple of" function. Takes a nonempty set of % things that can be multiplied and ordered as its argument. Name % chosen for synergy with \gcd, which *does* exist already. -- 2.43.2