summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChloe Brown <chloe.brown.00@outlook.com>2025-04-29 17:16:31 +0100
committerChloe Brown <chloe.brown.00@outlook.com>2025-04-29 17:16:31 +0100
commit670a3e94dd299e4df6604afe64b4a09afeb82e18 (patch)
tree41380926ef2eda565b7d052d8551e2b0abca1498
parent10a046389c7a200b5b137faabab9eacf16b5393a (diff)
Add multiline tuple variant.
-rw-r--r--main.tex14
1 files changed, 13 insertions, 1 deletions
diff --git a/main.tex b/main.tex
index f02720b..09e8bed 100644
--- a/main.tex
+++ b/main.tex
@@ -226,7 +226,19 @@
\newcommand\encode[1]{\llcorner {#1} \lrcorner}
%% Tuples
-\DeclarePairedDelimiter\tuple{\langle}{\rangle}
+\DeclarePairedDelimiter\rawtuple{\langle}{\rangle}
+\NewDocumentCommand\domultituple{mm}{%
+ \langle & {#1} \cr
+ , & {#2} \cr
+ \rangle &
+}
+\NewDocumentCommand\multituple{>{\SplitArgument{1}{,}}m}{{%
+ \arraycolsep=0.2em
+ \begin{array}[t]{rl}
+ \domultituple#1
+ \end{array}%
+}}
+\NewDocumentCommand\tuple{s}{\IfBooleanTF{#1}{\multituple}{\rawtuple}}
%% Naturals
\newcommand\nat{\ensuremath{\mathsf{N}}}