Commit 5fdde0eb authored by Guillaume Grossetie's avatar Guillaume Grossetie 😅 Committed by Dan Allen
Browse files

Replace master document by main document (PR #41)

parent 4a89f498
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
A document can include the same file any number of times. A document can include the same file any number of times.
The problem comes if there are IDs in the included file; the output document (HTML or DocBook) will then have duplicate IDs which will make it not well-formed. The problem comes if there are IDs in the included file; the output document (HTML or DocBook) will then have duplicate IDs which will make it not well-formed.
To fix this, you can reference a dynamic variable from the main document in the ID. To fix this, you can reference a dynamic variable from the primary document in the ID.
For example, let's say you want to include the same subsection describing a bike chain in both the operation and maintenance chapters: For example, let's say you want to include the same subsection describing a bike chain in both the operation and maintenance chapters:
......
...@@ -21,7 +21,7 @@ This practice is recommended whenever including AsciiDoc content to avoid unexpe ...@@ -21,7 +21,7 @@ This practice is recommended whenever including AsciiDoc content to avoid unexpe
== Manipulate heading levels with leveloffset == Manipulate heading levels with leveloffset
The `leveloffset` attribute can help here by pushing all headings in the included document down by the specified number of levels. The `leveloffset` attribute can help here by pushing all headings in the included document down by the specified number of levels.
This allows you to publish each chapter as a standalone document (complete with a document title), but still be able to include the chapters into a master document (which has its own document title). This allows you to publish each chapter as a standalone document (complete with a document title), but still be able to include the chapters into a primary document (which has its own document title).
You can easily assemble your book so that the chapter document titles become level 1 headings using: You can easily assemble your book so that the chapter document titles become level 1 headings using:
......
...@@ -74,8 +74,8 @@ The path used in an include directive can be relative or absolute. ...@@ -74,8 +74,8 @@ The path used in an include directive can be relative or absolute.
If the path is relative, the processor resolves the path using the following rules: If the path is relative, the processor resolves the path using the following rules:
* If the include directive is used in the main (top-level) document, relative paths are resolved relative to the base directory. * If the include directive is used in the primary (top-level) document, relative paths are resolved relative to the base directory.
(The base directory defaults to the directory of the main document and can be overridden from the CLI or API). (The base directory defaults to the directory of the primary document and can be overridden from the CLI or API).
* If the include directive is used in a file that has itself been included, the path is resolved relative to the including (i.e., current) file. * If the include directive is used in a file that has itself been included, the path is resolved relative to the including (i.e., current) file.
//TODO show examples to contrast a relative vs an absolute include //TODO show examples to contrast a relative vs an absolute include
...@@ -128,7 +128,7 @@ If the file is recognized as an AsciiDoc file (i.e., it has one of the following ...@@ -128,7 +128,7 @@ If the file is recognized as an AsciiDoc file (i.e., it has one of the following
* preprocessor conditionals (e.g., `ifdef`) * preprocessor conditionals (e.g., `ifdef`)
//* front matter (if enabled) //* front matter (if enabled)
This allows includes to be nested, and provides lot of flexibility in constructing radically different documents with a single master document and a few command line attributes. This allows includes to be nested, and provides lot of flexibility in constructing radically different documents with a single primary document and a few command line attributes.
Including non-AsciiDoc files is normally done to merge output from other programs or populate table data: Including non-AsciiDoc files is normally done to merge output from other programs or populate table data:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment