Asciidoc

Asciidoc est un langage de balisage léger. C'est aussi le nom de la suite logicielle qui permet de transformer les fichiers “texte source” en documents publiables.

La suite logicielle comprend les programmes spécialisés de conversion asciidoc et a2x.

Le texte du fichier source forme déjà un document lisible. Le programme de conversion asciidoc permet de transformer le document source au format XHTML, DocBook ou HTML. Le programme a2x permet d'obtenir d'autres formats tels que PDF, TeX, Unix manpages ou Epub.

source: https://fr.wikipedia.org/wiki/Asciidoc

official website: http://www.methods.co.nz/asciidoc/

Combiné à git, nous voici prêt à partir dans l'aventure de l'écriture collaborative!

voir aussi

http://www.methods.co.nz/asciidoc/userguide.html

a2x

A DocBook toolchain manager that translates an AsciiDoc text file SOURCE_FILE to PDF, EPUB, DVI, PS, LaTeX, XHTML (single page or chunked), man page, HTML Help or plain text formats using asciidoc and other applications.

http://www.methods.co.nz/asciidoc/a2x.1.html

sudo apt-get install asciidoc
sudo gem install asciidoctor

http://asciidoctor.org/

http://asciidoctor.org/news/2016/04/05/debuter-avec-asciidoctor/#packages-pour-atom

https://atom.io/packages/asciidoc-assistant

This package adds extra functionality to Atom for the AsciiDoc(octor) language by installing the following packages:

  language-asciidoc
  asciidoc-preview
  autocomplete-asciidoc
  asciidoc-image-helper

Convert

asciidoctor-pdf example.adoc

http://asciidoctor.org/docs/convert-asciidoc-to-pdf/

asciidoctor-epub3 -D output -a ebook-validate example.adoc

http://asciidoctor.org/docs/convert-asciidoc-to-epub/

#! /usr/bin/bash
 
###########################################################################
#   Script to generate html, pdf and odt from an asciidoc                 #
#                                                                         #
#   Copyright information                                                 #
#                                                                         #
#	Copyright (C) 2018 Fred Radeff <fradeff@akademia.ch>              #
#                                                                         #
#   License                                                               #
#   This program is free software; you can redistribute it and/or modify  #
#   it under the terms of the GNU General Public License as published by  #
#   the Free Software Foundation; either version 2 of the License, or     #
#   (at your option) any later version.                                   #
#                                                                         #
#   This program is distributed in the hope that it will be useful,       #
#   but WITHOUT ANY WARRANTY; without even the implied warranty of        #
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the          #
#   GNU General Public License for more details.                          #
#                                                                         #
#   You should have received a copy of the GNU General Public License     #
#   along with this program. If not, see <http://www.gnu.org/licenses/>.  #
#                                                                         #
###########################################################################
 
chemin=/home/radeff/ebooks/polars/Radeff_Fred_polars/Funkei/
livre=book
 
echo "destroy old versions"
rm $livre.html
rm $livre.epub
rm $livre.odt
rm $livre.pdf
echo "create html5 " $livre.html
#asciidoctor -a toc --attribute stylesheet=asciidoctor.css $livre.adoc
#no toc
asciidoctor --attribute stylesheet=asciidoctor.css $livre.adoc
#exit
echo "create epub " $livre.epub
 
pandoc -s $livre.html -t epub3 -o $livre.epub
echo "create pdf " $livre.pdf
pandoc -c print.css $livre.html --variable=fontfamily:arev --latex-engine=xelatex -o $livre.pdf
 
echo "create odt " $livre.odt
pandoc  --base-header-level=3 -V date:"" -V title:"" -f html $livre.html -o $livre.odt
  • info/asciidoc.txt
  • Dernière modification: 2018/10/10 18:46
  • par radeff