Build Notes
| This document is a work in progress, thus is currently incomplete and may contain inaccuracies… |
1. AsciiDoc
1.1. Editing Software
1.1.2. AsciiDocFX
Installation
-
AsciidocFX can be downloaded from here.
Features
-
Can be installed as a
Portable Appbut can’t run from a network share in this mode. -
Real-Time preview with accurate rendering of.
-
Admonitions.
-
Syntax highlighting of code blocks.
-
-
Offers functionality similar to a full-fledged WYSIWYG editor.
-
Has menu strip allowing for bold, italicize, quote, etc. of text.
-
1.1.3. Visual Studio Code
Installation
-
Download Visual Studio Code.
-
Install the AsciiDoc extension.
1.1.4. Atom
Installation
-
Download Atom
-
Then install the AsciiDoc Assistant package.
1.2. Useful AsciiDoc Stuff
1.2.1. A Standard Header
-
This is an example header that can be placed at the top of an AsciiDoc:
= About Codey Martinez ; Dhante :description: About for Xackley Studio Tech Docs //Enable TOC. Values = auto, left, right :toc: auto //Name the TOC :toc-title: Table of Contents //Set TOC Depth :toclevels: 5 //Enable Numbered Sections :sectnums: |,all| //Enable image-based icons :icons: font //Enable Source Code Highlighting :source-highlighter: highlightjs :highlightjs-theme: vs //Set image directory :imagesdir: ./images //Embed images in HTML :data-uri: //Use `experimental` for keyboard, button, and menu macros :experimental:
1.2.2. Applying Styles
-
Download style sheets from here.
-
Create a folder to contain your style sheets.
-
Reference a stylesheet in your AsciiDoc file via:
= How To Codey Martinez ; Dhante :stylesdir: ..\..\..\my-styles (1) (2) :stylesheet: adoc-golo.css (3)1 This attribute indicates where the style folder is located. 2 The attribute must appear at the top of your AsciiDocfile.3 This attribute will allow you to reference a style from the my-stylesfolder.
1.2.3. Code Blocks
-
Code block
Asciidoc[source,C#] var a=5; for (var x=1;x<a;x++) { }Renderedvar a=5; for (var x=1;x<a;x++) { }
1.2.4. Color Text
-
To add color to text
Text color can be set when formatted [red]#this way#.Example 1. ResultsText color can be set when formatted this way.
1.2.5. Highlight Text
-
To highlight text:
Text can be #highlighted# when enclosed between '#'s.Example 2. ResultsText can be highlighted when enclosed between '#'s.
1.2.6. Button Macros
Set the :experimental: attribute within the document’s header in order to enable UI macros!
|
-
To clearly indicate to a reader of your documentation when a button should be pressed, compose AsciiDoc like the following:
Press the btn:[OK] button when you are finished. Select a file in the file navigator and click btn:[Open].Example 3. ResultPress the OK button when you are finished.
Select a file in the file navigator and click Open.
1.2.7. Keybinding Macros
Set the :experimental: attribute to enable UI macros!
|
-
To clearly indicate keyboard shortcuts, write AsciiDoc like the following:
Press kbd:[esc] to exit insert mode. Use the shortcut kbd:[Ctrl+T] to open a new tab in your browser. kbd:[Ctrl+Shift+N] will open a new incognito window.Example 4. ResultPress esc to exit insert mode.
Use the shortcut Ctrl+T to open a new tab in your browser.
Ctrl+Shift+N will open a new incognito window.
1.2.8. Menu Macros
Set the :experimental: attribute to enable UI macros!
|
-
To clearly indicate menu navigation, write AsciiDoc like the following:
To save the file, select menu:File[Save]. Select menu:View[Zoom > Reset] to reset the zoom level to the default setting.Example 5. ResultTo save the file, select .
Select to reset the zoom level to the default setting.
1.2.9. Admonitions List
-
The following AsciiDoc will create a
Noteadmonition:Admonition.Note NOTE: Additional informationAdmonition with block level content.Note [NOTE] ==== Additional information ==== -
There are 5 built in admonitions:
NoteAdditional information
TipUseful information or trick:
A document regarding creating custom admonitions can be found here.ImportantEnsure something is known
CautionAdvise the reader to act carefully (i.e., exercise care)
WarningInform the reader of danger, harm, or consequences that exist.
1.2.10. Horizontal Rule
-
This is simply one of the following:
--- - - - *** * * *Example 6. The rendered horizontal rules
1.2.11. Tables
-
A table with cell widths
Source[cols="1,10"] |=== |OS | Command |Unix| This is a long line |Windows| This is another long line |===Table 1. The rendered table OS Command Unix
This is a long line
Windows
This is another long line
-
The following
AsciiDocwill create a table. It also shows how to include a block level element within a cell.
Use these two characters a| as the cell separator:.Commands |==== | OS | Command | Description | Unix | ls a| * *-l* _Long format_ * *-a* _Show hidden files_ | Windows | dir a| * */q* _file ownership_ * *-a* _Show hidden files_ |==== -
The rendered table
Table 2. Commands OS Command Description Unix
ls
-
-l Long format
-
-a Show hidden files
Windows
dir
-
/q file ownership
-
-a Show hidden files
-
-
To make a CSV table:
,=== Artist,Track,Genre Snoop Dogg,Gin and Juice,Hip Hop ,=== -
The rendered table:
Artist Track Genre Baauer
Harlem Shake
Hip Hop
-
To make a CSV Table from a CSV data file with this CSV data:
Artist,Track,Genre Baauer,Harlem Shake,Hip Hop -
Use this AsciiDoc
[%header,format=csv] |=== include::../attachments/sample.csv[] |=== -
The rendered table:
Artist Track Genre Baauer
Harlem Shake
Hip Hop