Last active
August 29, 2015 14:14
-
-
Save roncat/4f55215fc48b23b67a24 to your computer and use it in GitHub Desktop.
asciidoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
asciidoctor | |
=========== | |
AsciiDoc is a text document format for writing notes, documentation, articles, books, ebooks, slideshows, web pages, man pages and blogs. AsciiDoc files can be translated to many formats including HTML, PDF, EPUB, man page. | |
Asciidoctor is a fast text processor and publishing toolchain for converting AsciiDoc content to HTML5, DocBook 5 (or 4.5) and other formats. Asciidoctor is written in Ruby, packaged as a RubyGem and published to RubyGems.org. | |
Packages instalation: | |
- yum -y install asciidoc gem dblatex which source-highlight | |
- gem install asciidoctor | |
Use: | |
Create simple file with extention ".adoc" | |
# vim first_text.adoc | |
= Olá Mundo, AsciiDoc! | |
Uma introdução ao http://asciidoc.org[AsciiDoc]. | |
== Primeira Seção | |
* item 1 | |
* item 2 | |
[source,ruby] | |
puts "Hello, World!" | |
Execute the simple command below: | |
# asciidoctor first_text.adoc | |
See the file created: | |
# first_text.html | |
Generating PDF | |
The command below generete a file type ".xml" (DocBook) | |
# asciidoctor -b docbook5 first_text.adoc | |
And secund command generete a file type ".pdf" | |
# dblatex -T db2latex first_text.xml | |
External preview | |
# ruby -run -e httpd . -p 4242 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment