This repository was archived by the owner on Apr 15, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.tex
More file actions
50 lines (44 loc) · 1.72 KB
/
Copy pathmain.tex
File metadata and controls
50 lines (44 loc) · 1.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
\documentclass{article}
\usepackage{graphicx}
\usepackage{geometry}
\usepackage{float}
\geometry{left=12mm, top=5mm, right=2mm, bottom=5mm}
% Create new array
\ExplSyntaxOn
\NewDocumentCommand{\setarray}{mm}
{% #1 = name, #2 = items
\clist_clear_new:c { array_#1_clist }
\clist_set:cn { array_#1_clist } { #2 }
}
\NewExpandableDocumentCommand{\getIndex}{mmm}
{% #1 = name, #2 = row index, #3 = column index
\clist_item:en
{
\clist_item:cn { array_#1_clist } { #2 }
}
{ #3 }
}
\cs_generate_variant:Nn \clist_item:nn { e }
\ExplSyntaxOff
% Import numbers for bingo table
\input{numbers.tex}
\begin{document}
% Create table using new array
% Set the divider line width to 0.4pt
\setlength{\arrayrulewidth}{0.3pt}
\begin{table}[H]
\textbf
\centering
\resizebox{0.95\textwidth}{0.53\textheight}{%
\begin{tabular}{|c|c|c|c|c|}
\multicolumn{1}{l}{B} & \multicolumn{1}{l}{I} & \multicolumn{1}{l}{N} & \multicolumn{1}{l}{G} & \multicolumn{1}{l}{O} \vspace*{-0.3em} \\
\hline
\getIndex{arr}{1}{1} & \getIndex{arr}{1}{2} & \getIndex{arr}{1}{3} & \getIndex{arr}{1}{4} & \getIndex{arr}{1}{5} \\ \hline
\getIndex{arr}{2}{1} & \getIndex{arr}{2}{2} & \getIndex{arr}{2}{3} & \getIndex{arr}{2}{4} & \getIndex{arr}{2}{5} \\ \hline
\getIndex{arr}{3}{1} & \getIndex{arr}{3}{2} & \getIndex{arr}{3}{3} & \getIndex{arr}{3}{4} & \getIndex{arr}{3}{5} \\ \hline
\getIndex{arr}{4}{1} & \getIndex{arr}{4}{2} & \getIndex{arr}{4}{3} & \getIndex{arr}{4}{4} & \getIndex{arr}{4}{5} \\ \hline
\getIndex{arr}{5}{1} & \getIndex{arr}{5}{2} & \getIndex{arr}{5}{3} & \getIndex{arr}{5}{4} & \getIndex{arr}{5}{5} \\ \hline
\end{tabular}%
}
\end{table}
\end{document}