You can set document information using the following functions. By convention, you should call these functions at the beginning of your Quarkdown source.
| Name | Accepts | Default |
|---|---|---|
.docname | The name of the document. | Untitled Quarkdown Document |
.docdescription | A short description of the document. | (empty) |
.docauthors | The authors of the document. | (empty) |
.dockeywords | Keywords associated with the document, as an iterable. | (empty) |
.doctype | Type of output document: plain, slides, paged, docs. See Document types for more information. | plain |
.doclang | The language of the document: either a case-insensitive English full name (such as English, Italian, French (Canada)) or an IETF BCP 47 language tag (such as en, it, fr-CA). This setting defines the target locale for content localization, locale-specific styles like Chinese fonts for Chinese locales, and the HTML lang attribute for hyphenation and accessibility. See Localization for more. | (none) |
All these functions have a modify or echo behavior: if you call them without an argument, they return the previously set value:
.docname {Quarkdown}
This document is named **.docname**!This document is named Quarkdown!
The .docauthors function sets the document’s authors.
.docauthors
- John Doe
- Jane DoeThe function takes a Dictionary as its value, where each key is the author’s name and values are nested dictionaries containing author information. There are no constraints on the information entries you can use.
.docauthors
- John Doe
- email: johndoe@example.com
- website: example.com
- Jane Doe
- email: janedoe@example.com
- company: GitHubCalling the function without arguments returns the dictionary itself, which you can iterate over to display authors according to a custom layout.
.foreach {.docauthors}
name info:
.row gap:{1cm}
**.name**
.get {email} from:{.info}John Doe
Jane Doe
If the document has just one author, and you don’t need additional information, use .docauthor {name} as a shorthand.
Whether you define the author using .docauthors or .docauthor, calling .docauthor without arguments returns the author’s name.
.docauthor {John Doe}The .dockeywords function sets the document’s keywords as an iterable.
When exporting the document as HTML, these keywords are used for search engine optimization (SEO).
.dockeywords
- markdown
- typesetting
- papers