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

asciidoctor

A fast text processor & publishing toolchain for converting AsciiDoc to HTML5, DocBook & more.

sudo apt-get install asciidoc
sudo gem install asciidoctor

packages asciidoc for atom editor

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

Convert AsciiDoc to PDF

asciidoctor-pdf example.adoc

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

Convert AsciiDoc to epub3

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

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

Convert AsciiDoc to LaTeX

Asciidoctor LaTeX

Asciidoctor LaTeX defines an extended syntax for the AsciiDoc markup language (AsciiDoc-LaTeX) that closely parallels LaTeX for inline and display mathematical formulas and for environments. Documents written in this extended markup language can be converted into HTML or LaTeX

https://github.com/asciidoctor/asciidoctor-latex

Avec pandoc

  edit your document in asciidoc or asciidoctor
  convert your document to docbook: asciidoctor -b docbook5 your asciidoc document.
  convert your docbook document to (xe)latex using pandoc: pandoc -f docbook your docbook document --pdf-engine=xelatex

source: https://stackoverflow.com/questions/48419521/converting-asciidoc-to-latex#49694173

Generate EPUB Ebooks from Markdown Files with Bash PubKit

Asciidoctor stylesheet factory

This project is a factory for stylesheets that can be used to style the HTML generated by an AsciiDoc processor (specifically the html5 backend). In addition to being a general purpose AsciiDoc stylesheet generator, it is used to generate the default stylesheet that is bundled with Asciidoctor.

https://github.com/asciidoctor/asciidoctor-stylesheet-factory

https://asciidoctor.org/docs/produce-custom-themes-using-asciidoctor-stylesheet-factory/#build-the-stylesheets

Issues

https://github.com/asciidoctor/asciidoctor/issues

Pagination différenciée, une piste: https://github.com/asciidoctor/asciidoctor/issues/1113

Il semble que tous ces problèmes soient à régler via une css personnalisée

Exemple de script fait par mapomme

#! /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: 2020/01/14 13:24
  • par radeff