From: Michael Orlitzky Date: Mon, 13 Feb 2023 01:12:44 +0000 (-0500) Subject: mjo-common: add \tuple. X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=1efe9c09be9e93ed5dbb2ae60d787517eb0609ca;p=mjotex.git mjo-common: add \tuple. --- 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.