Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
newsletter:markuplanguages [2011/05/27 14:02] – frlan | newsletter:markuplanguages [2011/06/05 17:13] (current) – frlan | ||
---|---|---|---|
Line 6: | Line 6: | ||
* Output in HTML, plain text, PDF | * Output in HTML, plain text, PDF | ||
* Including images to HTML and PDF version | * Including images to HTML and PDF version | ||
+ | * Easy generating of plain text version w/o markup and unresolved image links etc. | ||
* Lists and simple tables | * Lists and simple tables | ||
+ | * Customizable styles/ | ||
+ | * Free Software (Free as in freedom -- GPL, BSD, PD etc.) | ||
+ | * Available on Debian, Ubuntu, Fedora, SuSE, *BSD (and at least a little chance for Windowsuser to contribute something) | ||
===== Languages / Toolkits ===== | ===== Languages / Toolkits ===== | ||
==== LaTeX ==== | ==== LaTeX ==== | ||
+ | |||
+ | Pros (for this application) Latex is a combined content structure, layout and formatting language, all the lightweight markup languages are content structure only and a different backend configuration language must be used for layout/ | ||
+ | |||
+ | Con fewer contributions may come in Latex so more conversion effort may be needed by the production team. | ||
+ | |||
==== ReST ==== | ==== ReST ==== | ||
+ | |||
+ | Is the current used markup language. Its seems to support all points mentioned above either as build in or with some little manuel work after. | ||
+ | |||
+ | The only unsolved issue is the generating of plain text with table of content and section numbering. This could be done using the HTML/PDF output but will need some further effort to investigate. | ||
+ | |||
==== Sphinx ==== | ==== Sphinx ==== | ||
==== AsciiDoc ==== | ==== AsciiDoc ==== | ||
- | Asciidoc provides table of contents, automatic section numbering and output in all three formats. As shown in the example at: [[https:// | + | Asciidoc provides table of contents, automatic section numbering and output in all three formats, images in PDF and HTML. As shown in the example at: [[https:// |
+ | |||
+ | The lightweight markup language is similar to most such languages, eg ReST, Markdown etc and like them you could almost use the source as the text version. | ||
+ | |||
+ | To generate PDF needs a docbook toolchain such as free open source dblatex (uses your installed latex) or Apache project' | ||
+ | |||
+ | Asciidoc configuration is by 1) setting attribute values on the command line or in the source file 2) for complex changes cascading (like css) configuration files control input format and generated output (HTML and docbook). | ||
+ | |||
+ | dblatex configuration is by 1) attributes set on the command line or in a config file or 2) latex stylesheets for complex changes | ||
+ | FOP configuration is by 1) attributes set on the command line or 2) XSL stylesheets | ||
+ | |||
+ | Pros are this is what Asciidoc is designed for, writing human documents, it isn't a code docstring extractor that is being forced into another role. It also provides a Python script to assist in running the backend toolchains | ||
+ | |||
+ | Cons isn't used in Geany so its an extra tool. | ||
+ | |||
+ | But it is just Python and can be just installed in a user directory | ||
==== Doxygen ==== | ==== Doxygen ==== | ||
Line 22: | Line 51: | ||
==== Pandoc ==== | ==== Pandoc ==== | ||
- | As mentioned | + | You can format your file in [[http:// |
+ | |||
+ | Once your newsletter source file is written, create an html version like so: | ||
+ | |||
+ | pandoc -s --toc -N --css=style.css -o newsletter_n.html newsletter_n.txt | ||
+ | |||
+ | To create a pdf version: | ||
+ | |||
+ | pandoc -s --toc -N -o newsletter_n.tex newsletter_n.txt | ||
+ | pdflatex newsletter_n.tex | ||
+ | pdflatex newsletter_n.tex | ||
+ | |||
+ | where you run that pdflatex command twice in order to correctly generate the table of contents. | ||
+ | |||
+ | === Installation === | ||
+ | |||
+ | On Debian-based GNU/Linux systems, you can install Pandoc in the usual way: '' | ||
+ | |||
+ | For generating the pdf, you'll also need a LaTeX distribution installed, such as texlive. On Debian-based systems: '' | ||
{{tag> | {{tag> | ||