mirror of
https://github.com/jgm/pandoc.git
synced 2026-09-02 13:45:49 +00:00
See jgm/typst-hs#80. Note that previously, the typst reader never returned document metadata. Now it does, even if the typst document does not contain a `#title` function that would result in actually printing the title block.
56 lines
746 B
Markdown
56 lines
746 B
Markdown
```
|
|
% pandoc -f typst -t native -s
|
|
#set document(
|
|
title: [My Title],
|
|
)
|
|
|
|
#title()
|
|
^D
|
|
Pandoc
|
|
Meta
|
|
{ unMeta =
|
|
fromList
|
|
[ ( "title"
|
|
, MetaInlines [ Str "My" , Space , Str "Title" ]
|
|
)
|
|
]
|
|
}
|
|
[]
|
|
```
|
|
|
|
```
|
|
% pandoc -f typst -t native -s
|
|
#set document(
|
|
title: [ignored],
|
|
)
|
|
|
|
#title[My Title]
|
|
^D
|
|
Pandoc
|
|
Meta
|
|
{ unMeta =
|
|
fromList
|
|
[ ( "title"
|
|
, MetaInlines [ Str "My" , Space , Str "Title" ]
|
|
)
|
|
]
|
|
}
|
|
[]
|
|
```
|
|
|
|
```
|
|
% pandoc -f typst -t native -s
|
|
#title[My Title]
|
|
^D
|
|
Pandoc
|
|
Meta
|
|
{ unMeta =
|
|
fromList
|
|
[ ( "title"
|
|
, MetaInlines [ Str "My" , Space , Str "Title" ]
|
|
)
|
|
]
|
|
}
|
|
[]
|
|
```
|