Sei sulla pagina 1di 23

Digital Authoring with

Asciidoc(tor) and AsciidocFX


Rahman Usta Hakan Özler
@ustarahman @ozlerhakan
Istanbul JUG Istanbul JUG

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted
What is AsciiDoc?

Asciidoc is a markup language to write books (PDF),


documentation (Reference, REST API), ebooks (EPUB) and
slideshows (Reveal.js).

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted
More About AsciiDoc ...
● Simple to read, simple to write
● It is just plain text
● No magic, everything is on the front
● Use any text editor
● Versionable

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted
Asciidoctor
A Ruby implementation of AsciiDoc markup language.
● Written by Dan Allen
● Straightforward and extensible
● AsciidoctorJ (JRuby port ⇒ Ruby to Java)
● Asciidoctor.js (Opal port ⇒ Ruby to JavaScript)

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted
Who uses Asciidoc(tor)?
● Pivotal
○ Spring Framework documentation
● Red Hat
○ Openshift documentation
● Neo4J
○ documentation
● O’reilly
○ the Atlas Project
● Github
○ Github.com, Gitbook.com

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted
AsciidocFX
AsciidocFX is a rich Asciidoc editor working on any OS!
● Uses Java, JavaFX and Asciidoctor.js
● Live previewing
● PDF, HTML5, Slideshow, and Ebook output
● Embedded Terminal and File system view

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted
AscidocFX - Live Preview

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted
AsciiDoc
Basics

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted
AsciiDoc Syntax - Headers

= Header 1
== Header 2
=== Header 3
==== Header 4
===== Header 5
====== Header 6

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted
Formating

*Merhaba* _Dünya_

a^2^ + b^2^

log ~7~ 13 = x

http://jcp.org[Java Community Process]

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted
Bullet / Number list

Bulleted list Numbered list

* Item 1 . Item 1
* Item 2 . Item 2
** Item 3 .. Item 3

● Item 1 1. Item 1
● Item 2 2. Item 2
○ Item 3 a. Item 3

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted
Table
.Table title
[width="100%",options="header"]
|====================
| cell | cell | cell
| cell | cell | cell
| cell | cell | cell
|====================

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted
Source code and Callouts

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted
Include partials
= Book name
== Chapter 1
include::chapters/chapter-1.adoc[]
== Chapter 2
include::chapters/chapter-2.adoc[]

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted
DEMO
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted
AsciidocFX
Extensions

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted
UML diagrams in AsciidocFX
[uml]
----
abstract class Store {
void store(Data data);
}

class CloudStore extends Store {


void store(Data data);
}
----

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted
Latex in AsciidocFX

[math]
--
\begin{align}
\dot{x} & = \sigma(y-x) \\
\dot{y} & = \rho x - y - xz \\
\dot{z} & = -\beta z + xyp
\end{align}
--

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted
FileSystem View
[tree]
--
mydir
|--file.docx
|--file.mp4
|--file.sh
|--file.docx
`--subdir
`--subfile.xlsx
--

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted
JavaFX Charts in AsciidocFX

[chart,pie,file="chart.png"]
--
Java 8,65.66,red
Java 6,4.82
Java 7,29.52
--

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted
Slideshow - Reveal.jsExtension

== Slide 1
Slide content

== Slide 2
Slide content

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted
REST API Documentation

DEMO
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted
THANK YOU! :)

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted

Potrebbero piacerti anche