CINXE.COM

Process AsciiDoc Using the CLI | Asciidoctor Docs

<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <title>Process AsciiDoc Using the CLI | Asciidoctor Docs</title> <link rel="stylesheet" href="../../../_/css/site.css"> <meta name="generator" content="Antora 3.1.8"> <link rel="canonical" href="https://docs.asciidoctor.org/asciidoctor/latest/cli/"> <meta property="og:url" content="https://docs.asciidoctor.org/asciidoctor/latest/cli/"> <meta property="og:description" content="A documentation page for Asciidoctor."> <meta property="og:site_name" content="Asciidoctor Docs"> <meta name="twitter:card" content="summary_large_image"> <meta property="og:title" content="Asciidoctor - Process AsciiDoc Using the CLI"> <meta property="og:image" content="https://docs.asciidoctor.org/_/img/asciidoctor-og.png"> <meta name="twitter:site" content="@asciidoctor"> <link rel="prev" href="../manpage-backend/"> <link rel="next" href="man1/asciidoctor/"> <meta name="page-spec" content="asciidoctor:cli:index.adoc"> <link rel="icon" href="../../../_/img/favicon.ico" type="image/x-icon"> </head> <body class="article"> <header class="header"> <nav class="navbar"> <div class="navbar-brand"> <a class="navbar-item logo" title="Asciidoctor" href="https://asciidoctor.org"><img src="../../../_/img/asciidoctor-logo.svg" alt="Asciidoctor" width="48"></a> <a class="navbar-item title" href="https://docs.asciidoctor.org/">Asciidoctor Docs</a> <button class="navbar-burger" aria-controls="topbar-nav" aria-expanded="false" aria-label="Toggle main menu"> <span></span> <span></span> <span></span> </button> </div> <div id="topbar-nav" class="navbar-menu"> <div class="navbar-end"> <div class="navbar-item search hide-for-print"> <div id="search" class="field has-filter"> <input class="query" type="text" placeholder="Search the docs"> <label class="filter checkbox"> <input type="checkbox" data-facet-filter="component:asciidoctor"> In this project </label> </div> </div> <div class="navbar-item has-dropdown is-hoverable"> <div class="navbar-link">AsciiDoc</div> <div class="navbar-dropdown"> <a class="navbar-item" href="../../../asciidoc/latest/">Language</a> <a class="navbar-item" href="../../../asciidoc/latest/syntax-quick-reference/">Syntax Quick Reference</a> </div> </div> <div class="navbar-item has-dropdown is-hoverable"> <div class="navbar-link">Processing</div> <div class="navbar-dropdown"> <a class="navbar-item" href="../">Asciidoctor <small>Ruby</small></a> <a class="navbar-item" href="../../../asciidoctor.js/latest/">Asciidoctor.js <small>JavaScript</small></a> <a class="navbar-item" href="../../../asciidoctorj/latest/">AsciidoctorJ <small>Java</small></a> </div> </div> <div class="navbar-item has-dropdown is-hoverable"> <div class="navbar-link">Extensions</div> <div class="navbar-dropdown"> <div class="navbar-item">Add-on Converters</div> <a class="navbar-item" href="../../../pdf-converter/latest/">PDF <small>Ruby</small></a> <a class="navbar-item" href="../../../epub3-converter/latest/">EPUB3 <small>Ruby</small></a> <a class="navbar-item" href="../../../reveal.js-converter/latest/">reveal.js <small>Ruby, JavaScript</small></a> <hr class="navbar-divider"> <div class="navbar-item">Extended Syntax</div> <a class="navbar-item" href="../../../diagram-extension/latest/">Asciidoctor Diagram <small>Ruby</small></a> </div> </div> <div class="navbar-item has-dropdown is-hoverable"> <div class="navbar-link">Tooling</div> <div class="navbar-dropdown is-right"> <div class="navbar-item">Build Automation</div> <a class="navbar-item" href="../../../maven-tools/latest/">Maven Tools <small>Java</small></a> <a class="navbar-item" href="../../../gradle-plugin/latest/">Gradle Plugin <small>Java</small></a> <a class="navbar-item" href="../../../asciidoclet/latest/">Asciidoclet <small>Java</small></a> <hr class="navbar-divider"> <div class="navbar-item">Text Editors / Viewers</div> <a class="navbar-item" href="../../../browser-extension/">Browser Extension</a> <a class="navbar-item" href="https://intellij-asciidoc-plugin.ahus1.de/docs" target="_blank" rel="noopener">IntelliJ Plugin</a> </div> </div> <div class="navbar-item has-dropdown is-hoverable"> <a class="navbar-item" href="../../../about/get-help/" data-title="Support"> <span class="icon"><img src="../../../_/img/octicons-24.svg#view-comment-discussion"></span> </a> <div class="navbar-dropdown is-right"> <a class="navbar-item has-icon" href="https://chat.asciidoctor.org" target="_blank" rel="noopener"> <span class="icon"><img src="../../../_/img/octicons-16.svg#view-comment-discussion"></span> <span>Chat</span> </a> <!-- <a class="navbar-item has-icon" href="https://discuss.asciidoctor.org" target="_blank" rel="noopener"> <span class="icon"><img src="../../../_/img/octicons-16.svg#view-mail"></span> <span>List</span> </a> --> <a class="navbar-item has-icon" href="https://github.com/asciidoctor" target="_blank" rel="noopener"> <span class="icon"><img src="../../../_/img/octicons-16.svg#view-mark-github"></span> <span>Source</span> </a> <a class="navbar-item has-icon" href="https://twitter.com/asciidoctor" target="_blank" rel="noopener"> <span class="icon"><img src="../../../_/img/octicons-16.svg#view-hash"></span> <span>Tweets</span> </a> </div> </div> </div> </div> </nav> </header> <div class="body"> <div class="nav-container"> <aside class="nav"> <div class="panels"> <div class="nav-panel-menu is-active is-loading" data-panel="menu"> <nav class="nav-menu"> <button class="nav-menu-toggle" aria-label="Toggle expand/collapse all" style="display: none"></button> <h3 class="title"><a href="../">Asciidoctor</a></h3> <ul class="nav-list"> <li class="nav-item" data-depth="0"> <ul class="nav-list"> <li class="nav-item" data-depth="1"> <a class="nav-link" href="../features/">Features</a> </li> </ul> </li> <li class="nav-item" data-depth="0"> <ul class="nav-list"> <li class="nav-item" data-depth="1"> <a class="nav-link" href="../whats-new/">What&#8217;s New in 2.0</a> </li> </ul> </li> <li class="nav-item" data-depth="0"> <ul class="nav-list"> <li class="nav-item" data-depth="1"> <button class="nav-item-toggle"></button> <a class="nav-link" href="../install/">Install and Update</a> <ul class="nav-list"> <li class="nav-item" data-depth="2"> <a class="nav-link" href="../install/supported-platforms/">Supported Platforms</a> </li> <li class="nav-item" data-depth="2"> <a class="nav-link" href="../install/ruby-packaging/">Install Using Ruby Packaging</a> </li> <li class="nav-item" data-depth="2"> <a class="nav-link" href="../install/linux-packaging/">Install Using Linux Packaging</a> </li> <li class="nav-item" data-depth="2"> <a class="nav-link" href="../install/macos/">Install on macOS</a> </li> <li class="nav-item" data-depth="2"> <a class="nav-link" href="../install/windows/">Install on Windows</a> </li> </ul> </li> </ul> </li> <li class="nav-item" data-depth="0"> <ul class="nav-list"> <li class="nav-item" data-depth="1"> <a class="nav-link" href="../get-started/">Convert Your First File</a> </li> </ul> </li> <li class="nav-item" data-depth="0"> <ul class="nav-list"> <li class="nav-item" data-depth="1"> <button class="nav-item-toggle"></button> <a class="nav-link" href="../convert/">Converters</a> <ul class="nav-list"> <li class="nav-item" data-depth="2"> <a class="nav-link" href="../convert/available/">Available Converters</a> </li> <li class="nav-item" data-depth="2"> <a class="nav-link" href="../convert/custom/">Custom Converter</a> </li> <li class="nav-item" data-depth="2"> <a class="nav-link" href="../convert/templates/">Converter Templates</a> </li> <li class="nav-item" data-depth="2"> <a class="nav-link" href="../convert/contexts-ref/">Convertible Contexts</a> </li> </ul> </li> </ul> </li> <li class="nav-item" data-depth="0"> <ul class="nav-list"> <li class="nav-item" data-depth="1"> <button class="nav-item-toggle"></button> <a class="nav-link" href="../html-backend/">Generate HTML</a> <ul class="nav-list"> <li class="nav-item" data-depth="2"> <button class="nav-item-toggle"></button> <span class="nav-text">Stylesheets</span> <ul class="nav-list"> <li class="nav-item" data-depth="3"> <a class="nav-link" href="../html-backend/default-stylesheet/">Default Stylesheet</a> </li> <li class="nav-item" data-depth="3"> <a class="nav-link" href="../html-backend/stylesheet-modes/">Stylesheet Modes</a> </li> <li class="nav-item" data-depth="3"> <a class="nav-link" href="../html-backend/custom-stylesheet/">Apply a Custom Stylesheet</a> </li> <li class="nav-item" data-depth="3"> <a class="nav-link" href="../html-backend/source-highlighting-stylesheets/">Embed a CodeRay or Pygments Stylesheet</a> </li> </ul> </li> <li class="nav-item" data-depth="2"> <a class="nav-link" href="../html-backend/manage-images/">Manage Images</a> </li> <li class="nav-item" data-depth="2"> <a class="nav-link" href="../html-backend/local-font-awesome/">Use Local Font Awesome</a> </li> <li class="nav-item" data-depth="2"> <a class="nav-link" href="../html-backend/favicon/">Add a Favicon</a> </li> <li class="nav-item" data-depth="2"> <a class="nav-link" href="../html-backend/verbatim-line-wrap/">Verbatim Block Line Wrapping</a> </li> <li class="nav-item" data-depth="2"> <a class="nav-link" href="../html-backend/skip-front-matter/">Skip Front Matter</a> </li> </ul> </li> </ul> </li> <li class="nav-item" data-depth="0"> <ul class="nav-list"> <li class="nav-item" data-depth="1"> <a class="nav-link" href="../docbook-backend/">Generate DocBook</a> </li> </ul> </li> <li class="nav-item" data-depth="0"> <ul class="nav-list"> <li class="nav-item" data-depth="1"> <a class="nav-link" href="../manpage-backend/">Generate Manual Pages</a> </li> </ul> </li> <li class="nav-item" data-depth="0"> <ul class="nav-list"> <li class="nav-item is-current-url" data-depth="1"> <button class="nav-item-toggle"></button> <a class="nav-link" href="./">Process AsciiDoc Using the CLI</a> <ul class="nav-list"> <li class="nav-item" data-depth="2"> <a class="nav-link" href="man1/asciidoctor/">asciidoctor(1)</a> </li> <li class="nav-item" data-depth="2"> <a class="nav-link" href="output-file/">Specify an Output File</a> </li> <li class="nav-item" data-depth="2"> <a class="nav-link" href="process-multiple-files/">Process Multiple Source Files</a> </li> <li class="nav-item" data-depth="2"> <a class="nav-link" href="io-piping/">Pipe Content Through the CLI</a> </li> <li class="nav-item" data-depth="2"> <a class="nav-link" href="set-safe-mode/">Set Safe Mode</a> </li> <li class="nav-item" data-depth="2"> <a class="nav-link" href="man1/asciidoctor/#options">CLI Options</a> </li> </ul> </li> </ul> </li> <li class="nav-item" data-depth="0"> <ul class="nav-list"> <li class="nav-item" data-depth="1"> <button class="nav-item-toggle"></button> <a class="nav-link" href="../api/">Process AsciiDoc Using the API</a> <ul class="nav-list"> <li class="nav-item" data-depth="2"> <a class="nav-link" href="../api/convert-files/">Load and Convert Files</a> </li> <li class="nav-item" data-depth="2"> <a class="nav-link" href="../api/convert-strings/">Load and Convert Strings</a> </li> <li class="nav-item" data-depth="2"> <a class="nav-link" href="../api/generate-html-toc/">Generate an HTML TOC</a> </li> <li class="nav-item" data-depth="2"> <a class="nav-link" href="../api/set-safe-mode/">Set Safe Mode</a> </li> <li class="nav-item" data-depth="2"> <a class="nav-link" href="../api/sourcemap/">Enable the Sourcemap</a> </li> <li class="nav-item" data-depth="2"> <a class="nav-link" href="../api/catalog-assets/">Catalog Assets</a> </li> <li class="nav-item" data-depth="2"> <a class="nav-link" href="../api/find-blocks/">Find Blocks</a> </li> <li class="nav-item" data-depth="2"> <a class="nav-link" href="../api/options/">API Options</a> </li> </ul> </li> </ul> </li> <li class="nav-item" data-depth="0"> <ul class="nav-list"> <li class="nav-item" data-depth="1"> <button class="nav-item-toggle"></button> <a class="nav-link" href="../safe-modes/">Safe Modes</a> <ul class="nav-list"> <li class="nav-item" data-depth="2"> <a class="nav-link" href="../reference-safe-mode/">Safe Mode Specific Content</a> </li> </ul> </li> </ul> </li> <li class="nav-item" data-depth="0"> <ul class="nav-list"> <li class="nav-item" data-depth="1"> <a class="nav-link" href="../tooling/">AsciiDoc Tooling</a> </li> </ul> </li> <li class="nav-item" data-depth="0"> <ul class="nav-list"> <li class="nav-item" data-depth="1"> <button class="nav-item-toggle"></button> <a class="nav-link" href="../syntax-highlighting/">Syntax Highlighting</a> <ul class="nav-list"> <li class="nav-item" data-depth="2"> <a class="nav-link" href="../syntax-highlighting/highlightjs/">Highlight.js</a> </li> <li class="nav-item" data-depth="2"> <a class="nav-link" href="../syntax-highlighting/rouge/">Rouge</a> </li> <li class="nav-item" data-depth="2"> <a class="nav-link" href="../syntax-highlighting/coderay/">CodeRay</a> </li> <li class="nav-item" data-depth="2"> <a class="nav-link" href="../syntax-highlighting/pygments/">Pygments</a> </li> <li class="nav-item" data-depth="2"> <a class="nav-link" href="../syntax-highlighting/custom/">Custom Adapter</a> </li> </ul> </li> </ul> </li> <li class="nav-item" data-depth="0"> <ul class="nav-list"> <li class="nav-item" data-depth="1"> <button class="nav-item-toggle"></button> <a class="nav-link" href="../stem/">STEM Processing</a> <ul class="nav-list"> <li class="nav-item" data-depth="2"> <a class="nav-link" href="../stem/mathjax/">MathJax and HTML</a> </li> <li class="nav-item" data-depth="2"> <a class="nav-link" href="../stem/mathematical/">Asciidoctor Mathematical</a> </li> <li class="nav-item" data-depth="2"> <a class="nav-link" href="../stem/docbook/">STEM Support in the DocBook Toolchain</a> </li> <li class="nav-item" data-depth="2"> <a class="nav-link" href="../stem/asciimath-gem/">AsciiMath Gem</a> </li> </ul> </li> </ul> </li> <li class="nav-item" data-depth="0"> <ul class="nav-list"> <li class="nav-item" data-depth="1"> <button class="nav-item-toggle"></button> <a class="nav-link" href="../extensions/">Extensions</a> <ul class="nav-list"> <li class="nav-item" data-depth="2"> <a class="nav-link" href="../extensions/register/">Register Extensions</a> </li> <li class="nav-item" data-depth="2"> <a class="nav-link" href="../extensions/logging/">Log from an Extension</a> </li> <li class="nav-item" data-depth="2"> <a class="nav-link" href="../extensions/preprocessor/">Preprocessor</a> </li> <li class="nav-item" data-depth="2"> <a class="nav-link" href="../extensions/tree-processor/">Tree Processor</a> </li> <li class="nav-item" data-depth="2"> <a class="nav-link" href="../extensions/postprocessor/">Postprocessor</a> </li> <li class="nav-item" data-depth="2"> <a class="nav-link" href="../extensions/docinfo-processor/">Docinfo Processor</a> </li> <li class="nav-item" data-depth="2"> <a class="nav-link" href="../extensions/block-processor/">Block Processor</a> </li> <li class="nav-item" data-depth="2"> <a class="nav-link" href="../extensions/compound-block-processor/">Compound Block Processor</a> </li> <li class="nav-item" data-depth="2"> <a class="nav-link" href="../extensions/block-macro-processor/">Block Macro Processor</a> </li> <li class="nav-item" data-depth="2"> <a class="nav-link" href="../extensions/inline-macro-processor/">Inline Macro Processor</a> </li> <li class="nav-item" data-depth="2"> <a class="nav-link" href="../extensions/include-processor/">Include Processor</a> </li> </ul> </li> </ul> </li> <li class="nav-item" data-depth="0"> <ul class="nav-list"> <li class="nav-item" data-depth="1"> <a class="nav-link" href="../localization-support/">Localization Support</a> </li> </ul> </li> <li class="nav-item" data-depth="0"> <ul class="nav-list"> <li class="nav-item" data-depth="1"> <a class="nav-link" href="../errors-and-warnings/">Errors and Warnings</a> </li> </ul> </li> <li class="nav-item" data-depth="0"> <ul class="nav-list"> <li class="nav-item" data-depth="1"> <button class="nav-item-toggle"></button> <span class="nav-text">Migration Guides</span> <ul class="nav-list"> <li class="nav-item" data-depth="2"> <a class="nav-link" href="../migrate/upgrade/">Upgrade from Asciidoctor 1.5.x to 2.0</a> </li> <li class="nav-item" data-depth="2"> <a class="nav-link" href="../migrate/asciidoc-py/">Migrate from AsciiDoc.py</a> </li> <li class="nav-item" data-depth="2"> <a class="nav-link" href="../migrate/docbook-xml/">Migrate from DocBook XML</a> </li> <li class="nav-item" data-depth="2"> <a class="nav-link" href="../migrate/markdown/">Migrate from Markdown</a> </li> <li class="nav-item" data-depth="2"> <a class="nav-link" href="../migrate/confluence-xhtml/">Migrate from Confluence XHTML</a> </li> <li class="nav-item" data-depth="2"> <a class="nav-link" href="../migrate/ms-word/">Migrate from MS Word</a> </li> </ul> </li> </ul> </li> </ul> </nav> <script> ;(function () { var panel = document.querySelector('.nav-panel-menu') var page var hash = window.location.hash if (hash) { if (~hash.indexOf('%')) hash = decodeURIComponent(hash) if (~hash.indexOf('"')) hash = hash.replace(/(?=")/g, '\\') var link = panel.querySelector('.nav-link[href="' + hash + '"]') if (link) page = link.parentNode else if ((page = panel.querySelector('.is-current-url'))) page.classList.add('is-provisional') } else { page = panel.querySelector('.is-current-url') } if (page) { var ancestor = page while ((ancestor = ancestor.parentNode) && ancestor !== panel) { if (ancestor.className === 'nav-item') ancestor.classList.add('is-current-path', 'is-active') } page.classList.add('is-current-page', 'is-active') if (panel.scrollHeight > panel.clientHeight) { var panelRect = panel.getBoundingClientRect() var linkRect = page.querySelector('.nav-link').getBoundingClientRect() panel.scrollTop += Math.round(linkRect.top - panelRect.top - (panelRect.height - linkRect.height) * 0.5) } } else { panel.scrollTop = 0 } panel.classList.remove('is-loading') })() </script> </div> <div class="nav-panel-explore" data-panel="explore"> <div class="context"> <span class="title">Asciidoctor</span> <span class="version">2.0</span> </div> <ul class="components"> <li class="component"> <a class="title" href="../../../asciidoc/latest/">AsciiDoc</a> </li> <li class="component is-current"> <a class="title" href="../">Asciidoctor</a> <ul class="versions"> <li class="version is-current is-latest"> <a href="../">2.0</a> </li> </ul> </li> <li class="component"> <a class="title" href="../../../asciidoctor.js/latest/">Asciidoctor.js</a> <ul class="versions"> <li class="version is-latest"> <a href="../../../asciidoctor.js/latest/">3.0</a> </li> <li class="version"> <a href="../../../asciidoctor.js/2.2/">2.2</a> </li> </ul> </li> <li class="component"> <a class="title" href="../../../asciidoctorj/latest/">AsciidoctorJ</a> <ul class="versions"> <li class="version is-latest"> <a href="../../../asciidoctorj/latest/">3.0</a> </li> <li class="version"> <a href="../../../asciidoctorj/2.5/">2.5</a> </li> </ul> </li> <li class="component"> <a class="title" href="../../../pdf-converter/latest/">Asciidoctor PDF</a> <ul class="versions"> <li class="version is-latest"> <a href="../../../pdf-converter/latest/">2.3</a> </li> <li class="version"> <a href="../../../pdf-converter/2.2/">2.2</a> </li> <li class="version"> <a href="../../../pdf-converter/2.1/">2.1</a> </li> <li class="version"> <a href="../../../pdf-converter/2.0/">2.0</a> </li> </ul> </li> <li class="component"> <a class="title" href="../../../epub3-converter/latest/">Asciidoctor EPUB3</a> <ul class="versions"> <li class="version is-latest"> <a href="../../../epub3-converter/latest/">2.1</a> </li> </ul> </li> <li class="component"> <a class="title" href="../../../reveal.js-converter/latest/">Asciidoctor reveal.js</a> <ul class="versions"> <li class="version is-latest"> <a href="../../../reveal.js-converter/latest/">5.0</a> </li> <li class="version"> <a href="../../../reveal.js-converter/4.1/">4.1</a> </li> </ul> </li> <li class="component"> <a class="title" href="../../../maven-tools/latest/">Maven Tools</a> <ul class="versions"> <li class="version is-latest"> <a href="../../../maven-tools/latest/">3.1</a> </li> <li class="version"> <a href="../../../maven-tools/2.2/">2.2</a> </li> </ul> </li> <li class="component"> <a class="title" href="../../../gradle-plugin/latest/">Gradle Plugin Suite</a> <ul class="versions"> <li class="version is-latest"> <a href="../../../gradle-plugin/latest/">4.0</a> </li> </ul> </li> <li class="component"> <a class="title" href="../../../asciidoclet/latest/">Asciidoclet</a> <ul class="versions"> <li class="version is-latest"> <a href="../../../asciidoclet/latest/">2.0</a> </li> <li class="version"> <a href="../../../asciidoclet/1.5.6/">1.5.6</a> </li> </ul> </li> <li class="component"> <a class="title" href="../../../diagram-extension/latest/">Asciidoctor Diagram</a> <ul class="versions"> <li class="version is-latest"> <a href="../../../diagram-extension/latest/">2.2</a> </li> </ul> </li> <li class="component"> <a class="title" href="../../../browser-extension/">Browser Extension</a> </li> <li class="component"> <a class="title" href="../../../about/">Community</a> </li> </ul> </div> </div> </aside> </div> <main class="article"> <div class="toolbar" role="navigation"> <button class="nav-toggle"></button> <a href="../../../" class="home-link" title="Home"></a> <nav class="breadcrumbs" aria-label="breadcrumbs"> <ul> <li><a href="../">Asciidoctor</a></li> <li><a href="./">Process AsciiDoc Using the CLI</a></li> </ul> </nav> <a class="project-link" href="https://github.com/asciidoctor/asciidoctor" title="Project home"><span class="icon"><img src="../../../_/img/octicons-16.svg#view-mark-github"></span></a> <div class="edit-this-page"><a href="https://github.com/asciidoctor/asciidoctor/edit/v2.0.x/docs/modules/cli/pages/index.adoc">Edit this Page</a></div> </div> <div class="content"> <aside class="toc sidebar" data-title="Contents" data-levels="2"> <div class="toc-menu"></div> </aside> <article class="doc asciidoctor"> <h1 class="page">Process AsciiDoc Using the CLI</h1> <div id="preamble"> <div class="sectionbody"> <div class="paragraph"> <p>When the Asciidoctor gem is installed successfully, the Asciidoctor command line interface (CLI) named <code>asciidoctor</code> will be available on your PATH.</p> </div> </div> </div> <div class="sect1"> <h2 id="version-and-runtime"><a class="anchor" href="#version-and-runtime"></a>Version and runtime</h2> <div class="sectionbody"> <div class="paragraph"> <p>To confirm that the CLI is available, execute the following command in your terminal application:</p> </div> <div class="literalblock"> <div class="content"> <pre>$ asciidoctor --version</pre> </div> </div> <div class="paragraph"> <p>If this command completes successfully, information about Asciidoctor and the runtime environment will be printed to the standard output of your terminal:</p> </div> <div class="literalblock"> <div class="content"> <pre>Asciidoctor 2.0.23 [https://asciidoctor.org] Runtime Environment (ruby 3.3.0 [x86_64-linux]) (lc:UTF-8 fs:UTF-8 in:UTF-8 ex:UTF-8)</pre> </div> </div> <div class="paragraph"> <p>The runtime environment information varies based on the version of Ruby you&#8217;re using and the encoding settings of your operating system.</p> </div> </div> </div> <div class="sect1"> <h2 id="convert-an-asciidoc-file"><a class="anchor" href="#convert-an-asciidoc-file"></a>Convert an AsciiDoc file</h2> <div class="sectionbody"> <div class="paragraph"> <p>To invoke Asciidoctor from the CLI and convert an <code>.adoc</code> file, execute:</p> </div> <div class="literalblock"> <div class="content"> <pre>$ asciidoctor &lt;asciidoc-file&gt;</pre> </div> </div> <div class="paragraph"> <p>This will use the built-in defaults for options and create a new file in the same directory as the input file, with the same base name, but with the <code>.html</code> extension.</p> </div> <div class="paragraph"> <p><a href="man1/asciidoctor/#options" class="xref page">CLI Options</a> describes the available options and parameters for the Asciidoctor CLI.</p> </div> </div> </div> <div class="sect1"> <h2 id="help-topics"><a class="anchor" href="#help-topics"></a>Help topics</h2> <div class="sectionbody"> <div class="paragraph"> <p>The <code>--help</code> option provides self-describing documentation for the <code>asciidoctor</code> command, grouped by topic. If you don&#8217;t specify a topic, the <code>--help</code> option prints the usage statement for the <code>asciidoctor</code> command:</p> </div> <div class="literalblock"> <div class="content"> <pre>$ asciidoctor --help</pre> </div> </div> <div class="paragraph"> <p>You can generate the full documentation (i.e., man page) for the <code>asciidoctor</code> command by passing the <code>manpage</code> topic to the <code>--help</code> option. You can pipe that output to the <code>man</code> pager to view it:</p> </div> <div class="literalblock"> <div class="content"> <pre>$ asciidoctor --help manpage | man -l -</pre> </div> </div> <div class="paragraph"> <p>You can also find the man page for the <code>asciidoctor</code> command rendered as HTML in this documentation, which you can view in a browser instead. See <a href="man1/asciidoctor/" class="xref page">asciidoctor(1)</a>.</p> </div> <div class="paragraph"> <p>You can print an AsciiDoc syntax crib sheet by passing the <code>syntax</code> topic to the <code>--help</code> option.</p> </div> <div class="literalblock"> <div class="content"> <pre>$ asciidoctor --help syntax</pre> </div> </div> <div class="paragraph"> <p>The crib sheet itself is composed in AsciiDoc. You can convert it to HTML by piping the output back into the <code>asciidoctor</code> command.</p> </div> <div class="literalblock"> <div class="content"> <pre>$ asciidoctor --help syntax | asciidoctor -o syntax.html -</pre> </div> </div> <div class="paragraph"> <p>Navigate to the <em class="path">syntax.html</em> file in your browser to see what the examples in the crib sheet look like when converted to HTML.</p> </div> </div> </div> <nav class="pagination"> <span class="prev"><a href="../manpage-backend/">Generate Manual Pages</a></span> <span class="next"><a href="man1/asciidoctor/">asciidoctor(1)</a></span> </nav> </article> </div> </main> </div> <footer class="footer"> <div class="footer-main"> <figure class="footer-brand"> <a class="logo" href="https://asciidoctor.org" target="_blank" rel="noopener"><img src="../../../_/img/asciidoctor-logo.svg" alt="Asciidoctor" width="48"></a> <figcaption class="footer-brand-name"><a href="https://asciidoctor.org" target="_blank" rel="noopener">Asciidoctor</a></figcaption> </figure> <ul class="footer-brand-links"> <!-- <li><a href="https://asciidoctor.org" target="_blank" rel="noopener">Home</a></li> --> <li><a href="https://docs.asciidoctor.org">Docs</a></li> <li><a href="https://chat.asciidoctor.org" target="_blank" rel="noopener">Chat</a></li> <li><a href="https://github.com/asciidoctor" target="_blank" rel="noopener">Source</a></li> <li><a href="https://discuss.asciidoctor.org" target="_blank" rel="noopener">List (archive)</a></li> </ul> <p class="footer-brand-follow"> <a href="https://twitter.com/asciidoctor" title="Follow us on Twitter" target="_blank" rel="noopener"><img src="../../../_/img/twitter-logo.svg" alt="Twitter logo" class="logo" width="28"><span class="handle">@asciidoctor</span></a> </p> </div> <div class="footer-legal"> <p>Copyright © 2024 Dan Allen, Sarah White, and individual Asciidoctor contributors. Except where noted, the content is licensed under a Creative Commons Attribution 4.0 International (CC BY 4.0) license.</p> <p>The <a href="https://github.com/asciidoctor/asciidoctor-docs-ui" target="_blank" rel="noopener">UI for this site</a> is derived from the Antora default UI and is licensed under the MPL-2.0 license. Several icons are imported from <a href="https://primer.style/octicons/" target="_blank" rel="noopener">Octicons</a> and are licensed under the MIT license.</p> <p>AsciiDoc® and AsciiDoc Language™ are trademarks of the Eclipse Foundation, Inc.</p> </div> <div class="footer-thanks"> <p>Thanks to our <a href="https://asciidoctor.org/supporters/" target="_blank" rel="noopener">backers</a> and <a href="https://asciidoctor.org/contributors/" target="_blank" rel="noopener">contributors</a> for helping to make this project possible. Additional thanks to:</p> <p class="badges"> <a href="https://opendevise.com" title="Development support by OpenDevise" target="_blank" rel="noopener"><img src="https://secure.gravatar.com/avatar/823717a797dbd78ceff7b26aa397f383.png?size=80" alt="OpenDevise Logo" width="30"></a> <a href="https://zulip.com" title="Chat powered by Zulip" target="_blank" rel="noopener"><img src="../../../_/img/zulip-logo.svg" alt="Zulip logo" width="30"></a> <a href="https://algolia.com/docsearch" title="Search by Algolia DocSearch" target="_blank" rel="noopener"><img src="../../../_/img/algolia-logo.svg" alt="Algolia logo" width="30"></a> <a href="https://netlify.com" title="Deploys by Netlify" target="_blank" rel="noopener"><img src="../../../_/img/netlify-logo.svg" alt="Deploys by Netlify" width="67"></a> </p> <p>Authored in <a href="https://asciidoc.org" target="_blank" rel="noopener">AsciiDoc</a>.<br>Produced by <a href="https://antora.org" target="_blank" rel="noopener">Antora</a> and <a href="https://asciidoctor.org" target="_blank" rel="noopener">Asciidoctor</a>.</p> </div> </footer> <script id="site-script" src="../../../_/js/site.js" data-ui-root-path="../../../_"></script> <script async src="../../../_/js/vendor/highlight.js"></script> <script async id="search-script" src="../../../_/js/vendor/docsearch.js" data-app-id="V1SEVEBOXX" data-api-key="02ab3d2d0cab4dec119447e14abdd3bc" data-index-name="asciidoctor-docs" data-stylesheet="../../../_/css/vendor/docsearch.css"></script> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10