Skip to content

Latest commit

 

History

History

docs_src

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Hugo Book AsciiDoc Sources

This folder contains the AsciiDoc source files of the The Hugo Book.


Table of Contents


Folder Contents

Book Sources

List of The Hugo Book AsciiDoc sources and contents-assets:

Build Toolchain

NOTE 1 — Since the overhead introduced by using the external Highlight tool is considerable on a big document like this one, the preview.sh script is very handy when editing the document, for it provides a very fast-updating preview of the changes (without syntax highlighting and custom style).

Furthermore, the preview.html doesn't embed graphics via data-URIs, so you won't need to rebuild the whole document to view changed images, but only refresh the page since images are loaded from disk.

NOTE 2 — In the future more build scripts will be added, to create other versions of the book in HTML format (e.g. splitting Book I and Book II into independent files, or dividing the book into single chapters for the WWW), as well as targeting other formats (PDF, CHM, ePub, etc.).

Toolchain Dependencies

The build process depends on further assets stored elsewhere inside this project:

These assets are required to introduce support for Hugo highlighting in the Asciidoctor toolchain via the external Highlight tool and our custom syntax definition for Hugo.

Annotations Conventions

In the AsciiDoc sources of the book I've added comments to annotate contents changes, pending tasks, and other points of interest. To simplify looking up these notes via editors S&R functionality, I've adopted a formal convention of comment prefixes:

comment prefix indicates
// @DELME Commented-out contents to delete on final release.
// @EDITED Changes to the original contents.
// @FIXME An issue that needs to be addressed.
// @FOOTNOTE An issue regarding footnotes.
// @HUGO SYNTAX Syntax highlighting problems.
// @NOTE Generic note of interest.
// @TEXT Problem or error in original text.
// @TODO A pending task.
// @XREF An issue regarding cross references.

Often you'll find these prefixes followed by another keyword which narrows down its context. E.g. // @XREF INTERNAL, to mark internal cross references inside tables; // @EDITED TYPO and // @EDITED XREF to distinguish between typo corrections and amended cross references; and so on. Again, the idea is to use those added words to simplify filtering annotations via S&R, allowing to target specific sets of annotations.

Since annotation prefixes follow an established convention, it's always possible to check if any prefix is present elsewhere in the project, or you're dealing with an isolate issue of that type.

Some of the above prefixes pertain to work in progress which is usually deleted when merging into master branch, while others might be left in the sources for the benefit of other contributors. In any case, the above system will always be used in development branches, as it simplifies looking up what needs to be done or what is the status for any of the topics associated to these prefixes.

XRefs

The following tables list all the cross references currently used in The Hugo Book, and the number of times they occur (Qt. column).

For more details on the custom IDs conventions adopted in this book, see CONVENTIONS.md.

Chapters, Appendices and Sections

All the cross-references to chapters, appendices and sections:

Section Qt. XRef ID
The Hugo Programming Manual 5 book1
1.5. Packing List 1 sec_1-5
1.9. Compiler Switches 1 sec_1-9
1.10. Limit Settings 1 sec_1-10
1.11. Directories 1 sec_1-11
2.3. Data Types 2 sec_2-3
3.5. Classes 1 sec_3-5
4.5. Operators and Assignments 1 sec_4-5
4.7. Conditional Expressions and Program Flow 2 sec_4-7
5.1. Routines 1 sec_5-1
5.3. Before and After Routines 1 sec_5-3
7.1. Grammar Definition 1 sec_7-1
7.2. The Parser 1 sec_7-2
8.7. Perform 1 sec_8-7
9. The Game Loop 2 chapter_9
11.1. The Display Object 1 sec_11-1
12. Resources 1 chapter_12
App. B: The Hugo Library 3 appendix_b
App. B.4. Constants 1 sec_b-4
App. C: Limit Settings 1 appendix_c
App. D: HugoFix and the Hugo Debugger 5 appendix_d
App. E: Precompiled Headers 3 appendix_e
App. F. Hugo Versions 2 appendix_f
App. G: Additional Resources 1 appendix_g
14.2. The Header 1 sec_14-2
15.2. Data Types 1 sec_15-2
23.2. Special Words 1 sec_23-2
25.2. The Linker 1 sec_25-2
App. H: Code Patterns 2 appendix_h

Tables and Figures

All custom IDs for formal tables, figures, and other captioned block-elements.

Sec. Type Caption File Ref XRef ID
§2.3 Table 1 List of Hugo Data Types hugo-book1_02# table-hugo-data-types
§4.1 Table 2 Predefined Global Variables hugo-book1_04# table-engine-variables
§4.3 Table 3 Standard Colors Defined by the Hugo Library hugo-book1_04# table-hugolib-colors
§8.1 Table 4 Predefined Global Variables and Properties hugo-book1_08# table-engine-globals
§8.3 Table 5 Default ParseError Responses hugo-book1_08# table-parseerror-responses
§14.1 [Table 6] Memory Map of a .HEX File hugo-book2_02# table-hex-file-map
§14.2 [Table 7] Memory Map of a .HEX File Header hugo-book2_02# table-hex-file-header-map
§25 Figure 1 Flowchart of the Hugo Compiler hugo-book2_13# fig-compiler-flowchart
§26 Figure 2 Flowchart of the Hugo Engine hugo-book2_14# fig-engine-flowchart
§27 Figure 3 Flowchart of the Hugo Debugger hugo-book2_15# fig-debugger-flowchart
§27.2 [Table 8] Memory Map of a .HDX File hugo-book2_15# table-hdx-file-map

Custom Anchors

These are the custom inline anchors pointing to specific points in the text:

File Ref XRef ID Qt. Description Section
hugo-book1_04# hugolib-colors 1 Colors defined by Hugo Library §4.3.
hugo-book1_07# dynamic-grammars1 1 Dynamic grammars definitions §7.1.
hugo-book1_12# system_status_values 1 system_status return values §12.1.
hugo-book1_14# token-case 1 Tokens table: case App. H
hugo-book1_14# token-if 3 Tokens table: if App. H
hugo-book2_05# dynamic-grammars2 1 Dynamic grammars definitions Ch. 17

System Requirements

In order to convert The Hugo Book to HTML you'll need to install the following tools on your system:

This project was build by its maintainer under MS Windows 10 x64, using:

  • Asciidoctor 2.0.10
  • Ruby 2.7.0p0
  • Highlight 3.54

The Travis CI build tests the project against the latest stable versions of these packages, to ensure that any compatibility breaking updates are caught in time.

[Table 6]: https://tajmone.github.io/hugo-book/#table-hex-file-map"Live HTML Preview of captioned Table" [Table 7]: https://tajmone.github.io/hugo-book/#table-hex-file-header-map"Live HTML Preview of captioned Table" [Table 8]: https://tajmone.github.io/hugo-book/#table-hdx-file-map"Live HTML Preview of captioned Table"