Skip to content

Commit 78fcee6

Browse files
include-files: Changed "prerequisites" to "note" and reworded section content. (#260)
* changed ##prerequisites to ##note and rewrote text * reworded Note section * wrapped text
1 parent 1a5393c commit 78fcee6

File tree

1 file changed

+27
-30
lines changed

1 file changed

+27
-30
lines changed

include-files/README.md

Lines changed: 27 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,30 @@
22

33
Filter to include other files in the document.
44

5-
## Prerquisites
5+
## Note
66

7-
This filter needs to be executed before most other filters. Any
8-
filter that runs before this will only see the empty codeblocks.
7+
Do not run other filters before executing `include-files`, unless you are
8+
certain the other filter does not require `include-files` to function properly.
9+
Executing most filters without first using `include-files` will result in the
10+
other filter seeing an empty code block.
911

1012
## Usage
1113

12-
Use a special code block with class `include` to include files of
13-
the same format as the input. Each code line is treated as the
14-
filename of a file, parsed, and the result is added to the
15-
document.
14+
Use a special code block with class `include` to include files of the same
15+
format as the input. Each code line is treated as the filename of a file,
16+
parsed, and the result is added to the document.
1617

1718
Metadata from included files is discarded.
1819

1920
### Shifting Headings
2021

21-
The default is to include the subdocuments unchanged, but it can
22-
be convenient to modify the level of headers; a top-level header
23-
in an included file should be a second or third-level header in
24-
the final document.
22+
The default is to include the subdocuments unchanged, but it can be convenient
23+
to modify the level of headers; a top-level header in an included file should be
24+
a second or third-level header in the final document.
2525

2626
#### Manual shifting
2727

28-
Use the `shift-heading-level-by` attribute to control header
29-
shifting.
28+
Use the `shift-heading-level-by` attribute to control header shifting.
3029

3130
#### Automatic shifting
3231

@@ -54,32 +53,30 @@ file-a.md
5453

5554
### Comments
5655

57-
Comment lines can be added in the include block by beginning a
58-
line with two `//` characters.
56+
Comment lines can be added in the include block by beginning a line with two
57+
`//` characters.
5958

6059
### Different formats
6160

62-
Files are assumed to be written in Markdown, but sometimes one
63-
will want to include files written in a different format. An
64-
alternative format can be specified via the `format` attribute.
65-
Only plain-text formats are accepted.
61+
Files are assumed to be written in Markdown, but sometimes one will want to
62+
include files written in a different format. An alternative format can be
63+
specified via the `format` attribute. Only plain-text formats are accepted.
6664

6765
### Recursive transclusion
6866

69-
Included files can in turn include other files. Note that all
70-
filenames must be relative to the directory from which they are
71-
included. I.e., if a file `a/b.md` is included in the main
72-
document, and another file `a/b/c.md` should be included from
73-
`a/b.md`, then the relative path from `a/b.md` must be used, in
74-
this case `b/c.md`. The full relative path will be automatically
75-
generated in the final document. The same goes for image paths and
76-
codeblock file paths using the `include-code-files` filter.
67+
Included files can in turn include other files. Note that all filenames must be
68+
relative to the directory from which they are included. I.e., if a file `a/b.md`
69+
is included in the main document, and another file `a/b/c.md` should be included
70+
from `a/b.md`, then the relative path from `a/b.md` must be used, in this case
71+
`b/c.md`. The full relative path will be automatically generated in the final
72+
document. The same goes for image paths and codeblock file paths using the
73+
`include-code-files` filter.
7774

7875
## Example
7976

80-
Let's assume we are writing a longer document, like a thesis.
81-
Each chapter and appendix section resides in its own file, with
82-
some additional information in the main file `main.md`:
77+
Let's assume we are writing a longer document, like a thesis. Each chapter and
78+
appendix section resides in its own file, with some additional information in
79+
the main file `main.md`:
8380

8481
---
8582
author: me

0 commit comments

Comments
 (0)