Generic raw attribute
Extension: raw_attribute
Inline spans and fenced code blocks with a special kind of attribute will be parsed as raw content with the designated format. For example, the following produces a raw roff ms
block:
```{=ms}
.MYMACRO
blah blah
```
And the following produces a raw html
inline element:
This is `<a>html</a>`{=html}
This can be useful to insert raw xml into docx
documents, e.g. a pagebreak:
```{=openxml}
<w:p>
<w:r>
<w:br w:type="page"/>
</w:r>
</w:p>
```
The format name should match the target format name (see -t/--to
, above, for a list, or use pandoc --list-output-formats
). Use openxml
for docx
output, opendocument
for odt
output, html5
for epub3
output, html4
for epub2
output, and latex
, beamer
, ms
, or html5
for pdf
output (depending on what you use for --pdf-engine
).
This extension presupposes that the relevant kind of inline code or fenced code block is enabled. Thus, for example, to use a raw attribute with a backtick code block, backtick_code_blocks
must be enabled.
The raw attribute cannot be combined with regular attributes.