Specify the output options
emit
Use the emit option to specify which computer language specification to use for the final output document.
Syntax
The emit option is used to specify the computer language specification to follow to produce the final output document. BLUEPHRASE can be used to create files that are needed in a wide range of solutions, including markup languages, text documents, and serializing data structures. By default, the output is HTML.
The indent option is used to specify how structured markup is indented. By default, structured output is indented with tabs. Use the indent option to change this to spaces or to emit without indentation.
The fragment option is used to control the automatic inclusion of html, head and body elements, which are needed by HTML. The default is nofragment.
The html-target option is used to control the inclusion of the XML namspace declaration required in ePub documents.
To change the defaults, use the emit and indent options:
!option --emit=language
!option --indent=tabs // use tabs to indent the output
!option --indent=spaces // use spaces to indent the output
!option --indent=none // do not indent the output
!option --fragment // never prepend <html> or <body>, even when missing
!option --nofragment // automatically prepend <html> and <body>, if missing
!option --html-target=www // conforms to HTML5 standard
!option --html-target=epub // conforms to ePUB standard
Emit options
Markup languages
| option | language specification |
|---|---|
| html | Emits HTML conforming markup |
| xml | Emits XML conforming markup |
| haml | Emits output that conforms to the requirements for HTML Abstraction Markup Language |
Text documents
| option | language specification |
|---|---|
| wiki | Emits output that is understandable to wikitext readers |
| md | Emits output that is understandable to markdown readers |
| ghfm | Emits output in Github-flavored markdown format |
| txt | Emits only the subject matter of each phrase, without any semantax or shorthand directives |
| blue | Emits BLUEPHRASE in canonicalized form |
Serialized data structures
| option | language specification |
|---|---|
| json | Emits output that conforms to the requirements for JavaScript Object Notation |
| yaml | Emits output that conforms to the requirements for YAML Ain't Markup Language |
| toml | Emits output that conforms to the requirements for Tom's Obvious Minimal Language |
| plist | Emits output that conforms to the requirements for Apple property lists |
| ini | Emits output that conforms to the loose rules created for Windows 3.1 configuration files, and later used for Linux configuration files as well |
Fragments
When the default nofragment option is enabled, the html emitter will automatically use the following template to create any missing html, head or body elements.
<html>
<head>
<title>Placeholder</title>
<meta charset=UTF-8 />
</head>
<body>
. . .
</body>
</html>
nofragment templateePUB
The html emitter will normally produce output files that comply with the HTML5 specification. This is a good default for websites. To change the output to conform to ePUB standards, specify the epub option. It will produce documents with the required xml namespace declarations.
!option --html-target=epub
epub HTML target<html xmlns='http://www.w3.org/1999/xhtml' xmlns:epub='http://www.idpf.org/2007/ops'>
<head>
<title>Placeholder</title>
</head>
<body>
. . .
</body>
</html>
pub HTML target