[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
howtos:software:asciidoc_mini_howto [2014/12/17 14:52 (UTC)] – [System Attributes] pdi | howtos:software:asciidoc_mini_howto [2019/02/21 10:35 (UTC)] – markand | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | <!-- Add your text below. We strongly advise | + | Moved to [[asciidoc]] |
- | ====== asciidoc Mini HOWTO ====== | + | |
- | For an interesting read about // | + | |
- | + | ||
- | ===== Helper Packages and Files ===== | + | |
- | ==== Asciidoctor ==== | + | |
- | Consider installing [[http:// | + | |
- | + | ||
- | ==== Dblatex ==== | + | |
- | To convert //asciidoc// files to PDF, install | + | |
- | [[http:// | + | |
- | [[http:// | + | |
- | + | ||
- | ==== Source-highlight ==== | + | |
- | To highlight source listings, install | + | |
- | [[http:// | + | |
- | This: | + | |
- | < | + | |
- | [source, | + | |
- | | + | |
- | # | + | |
- | | + | |
- | | + | |
- | </ | + | |
- | + | ||
- | renders as (...) | + | |
- | <code bash> | + | |
- | # | + | |
- | export LANG=en_US.UTF-8 | + | |
- | </ | + | |
- | + | ||
- | + | ||
- | ==== Vim Syntax Highlighter ==== | + | |
- | If // | + | |
- | < | + | |
- | $ [[ -d $HOME/ | + | |
- | $ cp / | + | |
- | </ | + | |
- | and see [[http:// | + | |
- | + | ||
- | Highlighting can also work by inserting at the bottom of the file: | + | |
- | + | ||
- | < | + | |
- | + | ||
- | + | ||
- | + | ||
- | ===== User Guide ===== | + | |
- | The user guide file is found in /// | + | |
- | < | + | |
- | $ asciidoc -b xhtml11 -a icons -a iconsdir=/ | + | |
- | </ | + | |
- | and see /// | + | |
- | + | ||
- | ===== Source Files ===== | + | |
- | ==== TXT ==== | + | |
- | It is a // | + | |
- | + | ||
- | ==== Common Variables ==== | + | |
- | To organize the use of common variables in all files, make a directory // | + | |
- | + | ||
- | < | + | |
- | :pathname: {pathname=/ | + | |
- | </ | + | |
- | + | ||
- | Then, at the header of each file put: | + | |
- | + | ||
- | < | + | |
- | include::/ | + | |
- | </ | + | |
- | + | ||
- | and in text use as: | + | |
- | + | ||
- | < | + | |
- | {pathname}/ | + | |
- | </ | + | |
- | + | ||
- | ==== System Attributes ==== | + | |
- | Any variable that can be defined in //bash// with | + | |
- | **'' | + | |
- | can also be defined in // | + | |
- | < | + | |
- | :NAME: {sys: | + | |
- | </ | + | |
- | then use in text as: | + | |
- | < | + | |
- | {NAME} | + | |
- | </ | + | |
- | + | ||
- | ==== Man ==== | + | |
- | Linking to man pages in HTML is very useful. See man2html Mini HOWTO on how to set the infrastructure. To see grep(1) use | + | |
- | < | + | |
- | http:// | + | |
- | </ | + | |
- | + | ||
- | ===== Output ===== | + | |
- | ==== XHTML ==== | + | |
- | To make an HTML file: | + | |
- | < | + | |
- | $ asciidoc -b xhtml11 FILENAME | + | |
- | </ | + | |
- | To use icons, mainly for admonition paragraphs, add the options: | + | |
- | < | + | |
- | -a icons -a iconsdir=/ | + | |
- | </ | + | |
- | + | ||
- | To have a fixed-width HTML, add: | + | |
- | < | + | |
- | -a max-width=45em | + | |
- | </ | + | |
- | + | ||
- | To use additional custom CSS, add: | + | |
- | < | + | |
- | -a stylesheet=/ | + | |
- | </ | + | |
- | + | ||
- | It may be helpful to put an alias in // | + | |
- | <code bash> | + | |
- | alias ad="/ | + | |
- | -b xhtml11 \ | + | |
- | -a icons -a max-width=45em \ | + | |
- | -a iconsdir=/ | + | |
- | -a stylesdir=/ | + | |
- | -a stylesheet=/ | + | |
- | </ | + | |
- | + | ||
- | ==== PDF ==== | + | |
- | To make a PDF file, first install [[# | + | |
- | < | + | |
- | $ asciidoc -b docbook45 FILENAME | + | |
- | $ dblatex FILENAME.xml | + | |
- | </ | + | |
- | + | ||
- | ==== Txt2tags ==== | + | |
- | Use // | + | |
- | < | + | |
- | $ txt2tags -i FILENAME.txt -o FILENAME.dw -t doku | + | |
- | </ | + | |
- | + | ||
- | ====== Sources ====== | + | |
- | <!-- If you are copying information from another source, then specify that source --> | + | |
- | <!-- * Original source: [[http:// | + | |
- | <!-- Authors are allowed to give credit to themselves! --> | + | |
- | <!-- * Originally written by [[wiki: | + | |
- | <!-- * Contributions by [[wiki: | + | |
- | + | ||
- | <!-- Please do not modify anything below, except adding new tags.--> | + | |
- | <!-- You must remove the tag-word " | + | |
- | {{tag> | + |