Files
pandoc/test/typst-reader.typ
T
Samuel Huang 5a2495bcc6 Typst reader: map form: "prose" citations to AuthorInText. (#11846)
Previously only `form: "year"` was special-cased (to SuppressAuthor);
all other forms fell through to NormalCitation. As a result,
`#cite(<key>, form: "prose")` rendered as a parenthetical citation
"(Doe and Smith 2020)" instead of the narrative "Doe and Smith (2020)".

Typst's `author` and `full` forms have no pandoc citation mode
equivalent and still fall back to NormalCitation.

Adds reader test coverage for all four cite forms.
2026-09-05 22:06:06 -07:00

39 lines
773 B
Typst

#set page(width: 10cm, height: auto)
#set heading(numbering: "1.")
= Fibonacci sequence
The Fibonacci sequence is defined through the
recurrence relation $F_n = F_(n-1) + F_(n-2)$.
It can also be expressed in _closed form:_
$ F_n = round(1 / sqrt(5) phi.alt^n), quad
phi.alt = (1 + sqrt(5)) / 2 $
#let count = 8
#let nums = range(1, count + 1)
#let fib(n) = (
if n <= 2 { 1 }
else { fib(n - 1) + fib(n - 2) }
)
The first #count numbers of the sequence are:
#align(center, table(
columns: count,
..nums.map(n => $F_#n$),
..nums.map(n => str(fib(n))),
))
#include "undergradmath.typ"
= Citations
Normal: #cite(<brown01>) or @brown01.
Prose: #cite(<brown01>, form: "prose")
Year: #cite(<brown01>, form: "year")
Author: #cite(<brown01>, form: "author")