Closed jaanli closed 1 year ago
You seem to be passing a string
instead of content
. string
s do not get parsed. They are converted to content
character by character.
Passing content
instead should solve your problem :
abstract: [test link: #link(https://google.com)],
or simply
abstract: [test link: https://google.com],
Of course, the function you are calling has to support content
instead of string
only.
That was it, thank you so much!! Now unfortunately I can't figure out how to do the same for the title
field --
// Set document metadata.
set document(title: title, author: names)
If I try following this guide: https://typst.app/docs/tutorial/making-a-template/
Then the above code results in the error:
error: content does not contain field "str" and no default value was specified
┌─ datathinking.org-report-template.typ:23:28
│
23 │ set document(title: title.str, author: names)
Almost there :) this is so cool!! @typst rocks :D
This is because the title
parameter of document
has to be a string: https://typst.app/docs/reference/meta/document/#parameters-title. I'm not sure, but this is likely due to the title being used for metadata, which cannot contain formatted text.
I'm not sure, but this is likely due to the title being used for metadata, which cannot contain formatted text.
Exactly. As this is a common problem, maybe we can allow content too and extract the plain text, but that's a separate discussion.
Description
Hi! We have been using
Typst
throughout @onefact -- thank you!!!However, when creating an Abstract using this documentation: https://typst.app/docs/tutorial/making-a-template/ Links are unsupported and do not render when inserted into this code:
Here is the code to reproduce if needed:
https://github.com/onefact/datathinking.org-report-template
Thank you!
Reproduction URL
https://github.com/onefact/datathinking.org-report-template
Operating system
macOS
Typst version