You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+17-30Lines changed: 17 additions & 30 deletions
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,6 @@ An elegant, extensible typesetter with a friendly interface and decent output.
29
29
* [Useful Functions](#useful-functions)
30
30
* [Useful classes](#useful-classes)
31
31
* [Useful Values](#useful-values)
32
-
* [Useful Classes](#useful-classes-1)
33
32
* [Events](#events)
34
33
* [Input Drivers](#input-drivers)
35
34
* [Output Drivers](#output-drivers)
@@ -567,27 +566,28 @@ The following functions are defined in Emblem’s standard library and are likel
567
566
|`std.util`|`extend`| Takes input of two lists and returns their concatenation (pure) |
568
567
|`std.util`|`is_list`| Returns whether a given value represents a list, that is, it is a table whose indices are all numeric and which range from one to the length of the table. |
569
568
|`std.util`|`non_nil`| Returns whether its input is not `nil`. |
570
-
| `std.util` | `on_iter_wrap` | Takes a function `f` and returns a function which takes input of a value `n` and a list of arguments `...`, and only calls `f(...)` if the current iteration is equal to the number evaluated from `n`.
569
+
|`std.util`|`on_iter_wrap`| Takes a function `f` and returns a function which takes input of a value `n` and a list of arguments `...`, and only calls `f(...)` if the current iteration is equal to the number evaluated from `n`.|
571
570
|`std.util`|`sorted`| Sorts a list in-place and returns it. |
572
571
573
572
#### Useful classes
574
573
575
-
The following classes are defined in Emblem’s standard library and are likely useful to extension writers.
574
+
The Emblem standard library is written in [Moonscript][moonscript], which compiles to [Lua][lua].
575
+
The following concepts are easily described in terms of classes and objects.
|`std.ast`|`Call`| Represents a document directive-call node. |
580
-
|`std.ast`|`Content`| Represents a document content node. |
581
-
|`std.ast`|`Word`| Represents a document word node |
582
-
|`std.bib`|`Bib`| Constructs a bibliography object, optionally takes the name of the header to use. |
583
-
|`std.events`|`Component`| Represents an object which responds to the events: `on_start`, `on_iter_start`, `on_iter_end` and `on_end`. |
584
-
|`std.events`|`Counter`| Represents an integer which is incremented with each use and is reset at the start of each iteration, or when another counter which lists it as a sub-counter is incremented. |
585
-
|`std.events`|`SyncBox`| A container for a single value, requests a typesetting loop re-run if value at the end of the current iteration is different from that at the end of the previous. Can be passed an initial value, default `0`. |
586
-
|`std.events`|`SyncContainer`| A container for a compound value, requests a typesetting loop re-run if value at the end of the current iteration is different from that at the end of the previous. Can be passed an initial value, default `{}`. |
587
-
|`std.events`|`SyncList`| A `SyncContainer` which represents a list. |
588
-
|`std.events`|`SyncMap`| A `SyncContainer` which represents a mapping. |
589
-
|`std.events`|`SyncSet`| A `SyncContainer` which represents a set. |
590
-
|`std.hdr`|`Toc`| Constructs a table of contents object |
|`std.ast`|`Call`|`Node`|Represents a document directive-call node. |
580
+
|`std.ast`|`Content`|`Node`|Represents a document content node. |
581
+
|`std.ast`|`Word`|`Node`|Represents a document word node |
582
+
|`std.bib`|`Bib`|`SyncSet`|Constructs a bibliography object, optionally takes the name of the header to use. |
583
+
|`std.events`|`Component`|N/A |Represents an object which responds to the events: `on_start`, `on_iter_start`, `on_iter_end` and `on_end`. |
584
+
|`std.events`|`Counter`|`Component`|Represents an integer which is incremented with each use and is reset at the start of each iteration, or when another counter which lists it as a sub-counter is incremented. |
585
+
|`std.events`|`SyncBox`|`Component`|A container for a single value, requests a typesetting loop re-run if value at the end of the current iteration is different from that at the end of the previous. Can be passed an initial value, default `0`. |
586
+
|`std.events`|`SyncContainer`|`Component`|A container for a compound value, requests a typesetting loop re-run if value at the end of the current iteration is different from that at the end of the previous. Can be passed an initial value, default `{}`. |
587
+
|`std.events`|`SyncList`|`Component`|A `SyncContainer` which represents a list (ordered elements)|
588
+
|`std.events`|`SyncMap`|`Component`|A `SyncContainer` which represents a mapping (indexable key-value pairs).|
589
+
|`std.events`|`SyncSet`|`Component`|A `SyncContainer` which represents a set (unique elements).|
590
+
|`std.hdr`|`Toc`|`SyncList`|Constructs a table of contents object |
591
591
592
592
#### Useful Values
593
593
@@ -603,19 +603,6 @@ The following variables are created by Emblem’s core and are likely useful to
603
603
|`std.lingo`|`known_file_extensions`| Map of file extensions to their respective languages for use with `.include` directives. |
604
604
|`std.style`|`stylers`| A map of common styling functions such as italic and bold |
605
605
606
-
#### Useful Classes
607
-
608
-
The Emblem standard library is written in [Moonscript][moonscript], which compiles to [Lua][lua].
609
-
The following concepts are easily described in terms of classes and objects.
|`Component`| none | Describes a part of the document which reacts to events, registers itself for updates |
614
-
|`Counter`|`Component`| Represents a number which has its value reset at the start of each typesetting run. Can be incremented, can also automatically be reset in response to another counter being incremented |
615
-
|`SyncContainer`|`Component`| Represents a container of arbitrary an arbitrary value which, if the value at the end of the current iteration is different to that at the end of the previous, requests another typesetting iteration |
616
-
|`SyncList`|`SyncContainer`| Represents a sync container which holds a list (items ordered, not necessarily unique) |
617
-
|`SyncSet`|`SyncContainer`| Represents a sync container which holds a set (items unordered, unique) |
618
-
619
606
#### Events
620
607
621
608
To help extensions react to how the document is being processed, there are several events which are triggered.
0 commit comments