From 670a3e94dd299e4df6604afe64b4a09afeb82e18 Mon Sep 17 00:00:00 2001
From: Chloe Brown <chloe.brown.00@outlook.com>
Date: Tue, 29 Apr 2025 17:16:31 +0100
Subject: Add multiline tuple variant.

---
 main.tex | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

(limited to 'main.tex')

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}}}
-- 
cgit v1.2.3

