# Module:Wd/doc

## Advanced usage

The layout of the output from **value class** commands can be customized by using a number of named flags, which are name-value pairs (i.e. <code>|flag=value</code>). The table below shows the available named flags.  
Named flags can be given anywhere after the first command. To insert a space at the beginning or end of a <code>value</code>, use the HTML entity <code>&amp;#32;</code>.  
| Named flag | Default | Default condition | Description |
| --- | --- | --- | --- |
| <code>%p</code> | The claim's property value applied by the <code>property</code>/<code>properties</code> command. |  |  |
| <code>%q</code> | The claim's qualifier value or list of qualifier values applied by the <code>qualifier</code>/<code>qualifiers</code> command. |  |  |
| <code>%r</code> | The claim's reference value or list of reference values applied by the <code>reference</code>/<code>references</code> command. |  |  |
| <code>%s</code> | The movable separator placeholder. This is a special parameter that is not applied by a command, but instead is filled automatically between each pair of claims (if a list of claims is returned). This is handy in case a reference is returned as well, since it allows the reference to be placed after the punctuation mark as prescribed by Wikipedia's manual of style. The default value is a comma (<code>,</code>) and can be overridden with the <code>sep%s</code> flag (see below). | } |  |  
Optional parameters can be given by encapsulating them between square brackets: <code>[...]</code>. All content between the square brackets is only displayed if a value for each optional parameter that has been defined between the same brackets has been found. Optional content can also be nested.  
At least one parameter must be given that is not optional, while the <code>%s</code> parameter must always be defined as optional.  
To get a literal <code>[</code>, <code>]</code>, <code>%</code> or <code>\</code>, escape the character by placing a backslash (<code>\</code>) directly in front of it (e.g. <code>\%</code>).
|-
| <code>%q[%s][%r]</code>
| if the <code>property</code>/<code>properties</code> command **was not** given and the <code>qualifier</code>/<code>qualifiers</code> command **was** given
|-
| <code>%r</code>
| if **only** the <code>reference</code>/<code>references</code> command was given
|-
| <code></code>
| if the <code>property</code>/<code>properties</code> command **was** given and the <code>qualifier</code>/<code>qualifiers</code> command **was** given
|-
| |
|-
! | <code>sep=</code>
| <code></code>
| <span>*default*</span>
| | The fixed separator between each pair of claims.
|-
| if **only** the <code>reference</code>/<code>references</code> command was given **without** the <code>raw</code> flag
|-
| |
|-
! | <code>sep%s=</code>
| <code>,</code>
| <span>*default*</span>
| The movable separator between each pair of claims. This will be the value of the <code>%s</code> parameter applied to all claims except for the last in the list.
|-
| |
|-
! | <code>sep%q=</code>
| <code></code>
| <span>*default*</span>
| The separator between each pair of qualifiers of a single claim. This is the value separator for the <code>%q</code> parameter.
|-
| |
|-
! | <code>sep%r=</code>
| <span>*default*</span>
| | The separator between each pair of references of a single claim. This is the value separator for the <code>%r</code> parameter.
|-
| <code></code>
| if the <code>raw</code> flag was given for the <code>reference</code>/<code>references</code> command
|-
| |
|-
! | <code>punc=</code>
| <span>*default*</span>
| A punctuation mark placed at the end of the output. This will be placed on the <code>%s</code> parameter applied to the last claim in the list.  
This allows any references to be placed after the punctuation mark when the output is used as part of a sentence.
|}