# docauthor

    .docauthor author:{String? = null} -> Any

Content copied to clipboard

If author is specified, sets the document author to that value. This is a shortcut for docAuthors when there's only one author without additional information.

    .docauthor {John Doe}

Content copied to clipboard

If it's unset, the current author of the document is returned.

If the authors were set via docAuthors, only the name of the first author is returned. If you are looking forward to iterating over all authors, use forEach over docAuthors instead.

    The current document author is .docauthor

Content copied to clipboard

#### Return

the current document author if author is unset, nothing otherwise

#### Parameters

author

- Optional

optional author name to assign to the document

#### Wiki page

document-metadata