Hi,
I do not manage to display vertically in a table data that are stored in an array.
I have written some code to illustrate it.
Solution 2 works as it is hard coded, but solution 3 does not as the spray is not seen inside the align(center). How can I expose …questions_2 inside the align() ?
Thanks in advance for your answer.
#let questions_2 = (
[2 x 1 =],
[2 x 2 =],
[2 x 3 =],
[2 x 4 =],
[2 x 5 =]
)
#let questions_3 = (
[3 x 1 =],
[3 x 2 =],
[3 x 3 =],
[3 x 4 =],
[3 x 5 =]
)
Solution 1 horizontal
#grid(
columns: (1fr, 1fr, 1fr),
gutter: 10pt,
..questions_2.map(questionDisplay => [My question: #questionDisplay])
)
\
\
Solution 2 : harcoded works
#grid(
columns: (1fr, 1fr, 1fr),
gutter: 10pt,
align(center)[
my question questions.at(0)
[My question: 3 x 7 = .........]
[My question: 3 x 2 = .........]
[My question: 3 x 8 = .........]
[My question: 3 x 9 = .........]
[My question: 3 x 3 = .........]
[My question: 3 x 6 = .........]
[My question: 3 x 4 = .........]
],
align(center)[
[My question: 5 x 5 = .........]
[My question: 5 x 7 = .........]
[My question: 5 x 2 = .........]
[My question: 5 x 8 = .........]
[My question: 5 x 9 = .........]
[My question: 5 x 3 = .........]
[My question: 5 x 6 = .........]
[My question: 5 x 4 = .........]
],
align(center)[
[My question: 4 x 5 = .........]
[My question: 4 x 7 = .........]
[My question: 4 x 2 = .........]
[My question: 4 x 8 = .........]
[My question: 4 x 9 = .........]
[My question: 4 x 3 = .........]
[My question: 4 x 6 = .........]
[My question: 4 x 4 = .........]
]
),
)
\
\
Solution 3
#grid(
columns: (1fr, 1fr, 1fr),
gutter: 10pt,
align(center)[
..questions_2,
],
align(center)[
..questions_3
]
)