Skip to content

yashi/org-asciidoc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

84 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

https://melpa.org/packages/ox-asciidoc-badge.svg https://github.com/yashi/org-asciidoc/actions/workflows/tests.yml/badge.svg

org-asciidoc

An Org Mode Exporter Backend For AsciiDoc and Asciidoctor

Setup

  1. Make sure you have org-mode v8.0 or later
  2. Clone this repository
  3. Add the following to your .emacs
    (add-to-list 'load-path "~/path/to/org-asciidoc/")
    (require 'ox-asciidoc)
        
  4. open a .org file and run org-asciidoc-export-as-asciidoc

AsciiDoc specific attributes

AsciiDoc backend understands the following attributes in a ATTR_ASCIIDOC line.

Source Code Blocks

:asciidoctor-diagram
Export a source code block as an Asciidoctor Diagram. Set it as t to generate a listing block for an asciidoctor diagram.

Make sure to set :exports to something non-standard, diagram. This allows us to get :file parameter in the exporter.

e.g)

#+ATTR_ASCIIDOC: :asciidoctor-diagram t
#+BEGIN_SRC ditaa :file images/hello-world.png :exports diagram
+--------------+
| Hello World! |
+--------------+
#+END_SRC
    

Tables

:width
a percentage value to specify the table width with in the current column. Valid values: 1…99.

e.g)

#+ATTR_ASCIIDOC: :width 50
| Name  | Phone | Age |
| Peter |  1234 |  17 |
| Anna  |  4321 |  25 |
    
:pgwide
a boolean value to specify the table should be column width or full page width in multi-column setup. Valid values: t or nil.

e.g)

#+ATTR_ASCIIDOC: :pgwide t
| Name  | Phone | Age |
| Peter |  1234 |  17 |
| Anna  |  4321 |  25 |
    

org-publish

If you want to use `org-publish` with ox-asciidoc, setup your `org-publish-project-alist` like this:

 (setq org-publish-project-alist
	  '(("my-proj"
	     :base-directory "/tmp/my-dir"
	     :publishing-directory "/tmp/pub-dir"
	     :publishing-function org-asciidoc-publish-to-asciidoc)))

About

An org-mode exporter backend for AsciiDoc

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published