Difference between revisions of "Command/setupdocument"

From Wiki
Jump to navigation Jump to search
Line 4: Line 4:
 
</cd:shortdesc>
 
</cd:shortdesc>
 
<cd:variants>
 
<cd:variants>
<cd:command category="structure" file="file-job.mkvi" interfacedate="2020-06-19T13:41" interfacefile="i-document.xml" level="style" name="setupdocument" variantnumber="1">
+
<cd:command category="structure" file="file-job.mkvi" interfacedate="2021-03-02T11:08" interfacefile="i-document.xml" level="style" name="setupdocument" variantnumber="1">
 
   <cd:arguments>
 
   <cd:arguments>
 +
    <cd:keywords list="yes" optional="yes" ordinal="1">
 +
    <cd:keywordsdoc></cd:keywordsdoc>
 +
    <cd:constant type="cd:name"></cd:constant>
 +
    </cd:keywords>
 +
    <cd:assignments list="yes" ordinal="2">
 +
    <cd:assignmentsdoc></cd:assignmentsdoc>
 +
    <cd:parameter name="before">
 +
      <cd:paramdoc>Command to run before the text. Default: <code>\directsetup{document:start}</code></cd:paramdoc>
 +
      <cd:constant type="cd:command"></cd:constant>
 +
    </cd:parameter>
 +
    <cd:parameter name="after">
 +
      <cd:paramdoc>Command to run after the text. Default: <code>\directsetup{document:stop}</code></cd:paramdoc>
 +
      <cd:constant type="cd:command"></cd:constant>
 +
    </cd:parameter>
 +
    <cd:parameter name="metadata:author">
 +
      <cd:paramdoc>Value for the PDF metadata /Author field</cd:paramdoc>
 +
      <cd:constant type="cd:text"></cd:constant>
 +
    </cd:parameter>
 +
    <cd:parameter name="metadata:title">
 +
      <cd:paramdoc>Value for the PDF metadata /Title field</cd:paramdoc>
 +
      <cd:constant type="cd:text"></cd:constant>
 +
    </cd:parameter>
 +
    <cd:parameter name="metadata:subject">
 +
      <cd:paramdoc>Value for the PDF metadata /Subject field</cd:paramdoc>
 +
      <cd:constant type="cd:text"></cd:constant>
 +
    </cd:parameter>
 +
    <cd:parameter name="metadata:keywords">
 +
      <cd:paramdoc>Value for the PDF metadata /Keywords field</cd:paramdoc>
 +
      <cd:constant type="cd:text"></cd:constant>
 +
    </cd:parameter>
 +
    <cd:parameter name="cd:key">
 +
      <cd:paramdoc>Any user-supplied key</cd:paramdoc>
 +
      <cd:constant type="cd:value"></cd:constant>
 +
    </cd:parameter>
 +
    </cd:assignments>
 +
  <!--previously present arguments (merge 2021-10-28T16:28):
 +
<cd:arguments>
 
     <cd:assignments list="yes" ordinal="1">
 
     <cd:assignments list="yes" ordinal="1">
 
     <cd:assignmentsdoc></cd:assignmentsdoc>
 
     <cd:assignmentsdoc></cd:assignmentsdoc>
Line 38: Line 75:
 
     </cd:assignments>
 
     </cd:assignments>
 
   </cd:arguments>
 
   </cd:arguments>
 +
--></cd:arguments>
 
   </cd:command>
 
   </cd:command>
 
</cd:variants>
 
</cd:variants>
Line 47: Line 85:
 
<cd:notes></cd:notes>
 
<cd:notes></cd:notes>
 
<cd:seealso>
 
<cd:seealso>
 +
<cd:commandref name="definedocument" originator="system"></cd:commandref>
 
<cd:source file="file-job.mkvi" originator="system"></cd:source>
 
<cd:source file="file-job.mkvi" originator="system"></cd:source>
 
<cd:wikipage originator="system" page="Category:Structure"></cd:wikipage>
 
<cd:wikipage originator="system" page="Category:Structure"></cd:wikipage>

Revision as of 14:54, 28 October 2021


\setupdocument

Summary

The command \setupdocument is used for configuring \startdocument.

Settings

\setupdocument[...,...][...=...,...]
[...,...]name
beforecommand
aftercommand
metadata:authortext
metadata:titletext
metadata:subjecttext
metadata:keywordstext
keyvalue

OptionExplanation
before
Command to run before the text. Default: \directsetup{document:start}
after
Command to run after the text. Default: \directsetup{document:stop}
metadata:author
Value for the PDF metadata /Author field
metadata:title
Value for the PDF metadata /Title field
metadata:subject
Value for the PDF metadata /Subject field
metadata:keywords
Value for the PDF metadata /Keywords field
cd:key
Any user-supplied key

Description

With \setupdocument you can preset values to be used by \startdocument. Any argument passed to \setupdocument can be queried later with \documentvariable.

See \startdocument for an example.

Examples

Notes

See also

Help from ConTeXt-Mailinglist/Forum

All issues with: