Skip to content

Commit 852660d

Browse files
committed
docs: update docs
1 parent 0ecc6d6 commit 852660d

File tree

2 files changed

+34
-28
lines changed

2 files changed

+34
-28
lines changed

README.md

Lines changed: 29 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,15 @@ pnpm add reoff-unified-latex
4646

4747
### `default()`
4848

49-
Plugin to bridge or mutate to relatex
49+
Plugin to bridge or mutate to unified-latex
5050

5151
If a destination is given, runs the destination with the new jast
5252
tree (bridge-mode).
5353
Without destination, returns the jast tree: further plugins run on that
5454
tree (mutate-mode).
5555

56+
This is done so that you can use this plugin as either the plugin before the stringify plugin, or the plugin before another mutate plugin
57+
5658
#### Signature
5759

5860
```ts
@@ -72,13 +74,15 @@ default(this: Processor<void, Root, void, void>, ...settings: [Processor, Option
7274
7375
Defined in: node\_modules/.pnpm/unified\@10.1.2/node\_modules/unified/index.d.ts:531
7476
75-
Plugin to bridge or mutate to relatex
77+
Plugin to bridge or mutate to unified-latex
7678
7779
If a destination is given, runs the destination with the new jast
7880
tree (bridge-mode).
7981
Without destination, returns the jast tree: further plugins run on that
8082
tree (mutate-mode).
8183
84+
This is done so that you can use this plugin as either the plugin before the stringify plugin, or the plugin before another mutate plugin
85+
8286
#### Signature
8387
8488
```ts
@@ -112,7 +116,7 @@ A bibliography you can add manually
112116
113117
Needs to be in CSL format, which will be converted to BibTeX, or in BibTeX format
114118
115-
Defined in: [libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts:145](https://github.com/TrialAndErrorOrg/parsers/blob/fd7e969/libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts#L145)
119+
Defined in: [libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts:145](https://github.com/TrialAndErrorOrg/parsers/blob/d1cc864/libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts#L145)
116120
117121
##### `bibname?`
118122
@@ -124,7 +128,7 @@ Name of the bibliography file
124128
125129
'bibliography.bib'
126130
127-
Defined in: [libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts:46](https://github.com/TrialAndErrorOrg/parsers/blob/fd7e969/libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts#L46)
131+
Defined in: [libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts:46](https://github.com/TrialAndErrorOrg/parsers/blob/d1cc864/libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts#L46)
128132
129133
##### `citationType?`
130134
@@ -136,7 +140,7 @@ What type of citation is used?
136140
137141
'zotero'
138142
139-
Defined in: [libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts:69](https://github.com/TrialAndErrorOrg/parsers/blob/fd7e969/libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts#L69)
143+
Defined in: [libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts:69](https://github.com/TrialAndErrorOrg/parsers/blob/d1cc864/libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts#L69)
140144
141145
##### `collectCitation?`
142146
@@ -161,7 +165,7 @@ Defined in: [libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts:69](http
161165
162166
`any`
163167
164-
Defined in: [libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts:71](https://github.com/TrialAndErrorOrg/parsers/blob/fd7e969/libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts#L71)
168+
Defined in: [libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts:71](https://github.com/TrialAndErrorOrg/parsers/blob/d1cc864/libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts#L71)
165169
166170
##### `columnSeparator?`
167171
@@ -174,7 +178,7 @@ i.e. should `|` be added to the beginning and end of each row?
174178
175179
false
176180
177-
Defined in: [libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts:51](https://github.com/TrialAndErrorOrg/parsers/blob/fd7e969/libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts#L51)
181+
Defined in: [libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts:51](https://github.com/TrialAndErrorOrg/parsers/blob/d1cc864/libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts#L51)
178182
179183
##### `defaultCol?`
180184
@@ -188,7 +192,7 @@ e.g `l` for left, `r` for right, `c` for center
188192
189193
'l'
190194
191-
Defined in: [libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts:126](https://github.com/TrialAndErrorOrg/parsers/blob/fd7e969/libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts#L126)
195+
Defined in: [libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts:126](https://github.com/TrialAndErrorOrg/parsers/blob/d1cc864/libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts#L126)
192196
193197
##### `displayMath?`
194198
@@ -206,13 +210,13 @@ What type of display math should be used?
206210
207211
'equation'
208212
209-
Defined in: [libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts:85](https://github.com/TrialAndErrorOrg/parsers/blob/fd7e969/libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts#L85)
213+
Defined in: [libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts:85](https://github.com/TrialAndErrorOrg/parsers/blob/d1cc864/libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts#L85)
210214
211215
##### `document?`
212216
213217
> `boolean`
214218
215-
Defined in: [libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts:26](https://github.com/TrialAndErrorOrg/parsers/blob/fd7e969/libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts#L26)
219+
Defined in: [libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts:26](https://github.com/TrialAndErrorOrg/parsers/blob/d1cc864/libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts#L26)
216220
217221
##### `documentClass?`
218222
@@ -236,7 +240,7 @@ Options for the document class
236240
| `name` | `string` | Name of the document class `Default` 'article' |
237241
| `options`? | `string`[] | Options for the document class `Default` undefined |
238242
239-
Defined in: [libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts:55](https://github.com/TrialAndErrorOrg/parsers/blob/fd7e969/libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts#L55)
243+
Defined in: [libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts:55](https://github.com/TrialAndErrorOrg/parsers/blob/d1cc864/libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts#L55)
240244
241245
##### `handlers?`
242246
@@ -250,7 +254,7 @@ Handlers for specific node types
250254
251255
###### Type declaration
252256
253-
Defined in: [libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts:25](https://github.com/TrialAndErrorOrg/parsers/blob/fd7e969/libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts#L25)
257+
Defined in: [libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts:25](https://github.com/TrialAndErrorOrg/parsers/blob/d1cc864/libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts#L25)
254258
255259
##### `inlineMath?`
256260
@@ -264,7 +268,7 @@ What type of inline math should be used?
264268
265269
'$'
266270
267-
Defined in: [libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts:101](https://github.com/TrialAndErrorOrg/parsers/blob/fd7e969/libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts#L101)
271+
Defined in: [libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts:101](https://github.com/TrialAndErrorOrg/parsers/blob/d1cc864/libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts#L101)
268272
269273
##### `italics?`
270274
@@ -276,13 +280,13 @@ Should italics be rendered as \textit or \emph?
276280
277281
'emph'
278282
279-
Defined in: [libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts:42](https://github.com/TrialAndErrorOrg/parsers/blob/fd7e969/libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts#L42)
283+
Defined in: [libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts:42](https://github.com/TrialAndErrorOrg/parsers/blob/d1cc864/libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts#L42)
280284
281285
##### `newLines?`
282286
283287
> `boolean`
284288
285-
Defined in: [libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts:27](https://github.com/TrialAndErrorOrg/parsers/blob/fd7e969/libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts#L27)
289+
Defined in: [libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts:27](https://github.com/TrialAndErrorOrg/parsers/blob/d1cc864/libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts#L27)
286290
287291
##### `packages?`
288292
@@ -301,7 +305,7 @@ by default, the following packages are added:
301305
* `caption`
302306
* `tabularx` (if `tabularx` is enabled)
303307
304-
Defined in: [libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts:157](https://github.com/TrialAndErrorOrg/parsers/blob/fd7e969/libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts#L157)
308+
Defined in: [libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts:157](https://github.com/TrialAndErrorOrg/parsers/blob/d1cc864/libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts#L157)
305309
306310
##### `parseCitation?`
307311
@@ -325,7 +329,7 @@ Defined in: [libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts:157](htt
325329
326330
`any`
327331
328-
Defined in: [libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts:70](https://github.com/TrialAndErrorOrg/parsers/blob/fd7e969/libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts#L70)
332+
Defined in: [libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts:70](https://github.com/TrialAndErrorOrg/parsers/blob/d1cc864/libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts#L70)
329333
330334
##### `preamble?`
331335
@@ -366,13 +370,13 @@ const options = {
366370
}
367371
```
368372
369-
Defined in: [libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts:191](https://github.com/TrialAndErrorOrg/parsers/blob/fd7e969/libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts#L191)
373+
Defined in: [libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts:191](https://github.com/TrialAndErrorOrg/parsers/blob/d1cc864/libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts#L191)
370374
371375
##### `quotes?`
372376
373377
> `string`[]
374378
375-
Defined in: [libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts:28](https://github.com/TrialAndErrorOrg/parsers/blob/fd7e969/libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts#L28)
379+
Defined in: [libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts:28](https://github.com/TrialAndErrorOrg/parsers/blob/d1cc864/libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts#L28)
376380
377381
##### `relations?`
378382
@@ -384,13 +388,13 @@ Defined in: [libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts:28](http
384388
385389
###### Type declaration
386390
387-
Defined in: [libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts:73](https://github.com/TrialAndErrorOrg/parsers/blob/fd7e969/libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts#L73)
391+
Defined in: [libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts:73](https://github.com/TrialAndErrorOrg/parsers/blob/d1cc864/libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts#L73)
388392
389393
##### `strikethrough?`
390394
391395
> `"st"` | `"sout"` | `"s"`
392396
393-
Defined in: [libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts:102](https://github.com/TrialAndErrorOrg/parsers/blob/fd7e969/libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts#L102)
397+
Defined in: [libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts:102](https://github.com/TrialAndErrorOrg/parsers/blob/d1cc864/libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts#L102)
394398
395399
##### `tabularx?`
396400
@@ -404,7 +408,7 @@ Should tabularx be used instead of tabular?
404408
405409
false
406410
407-
Defined in: [libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts:131](https://github.com/TrialAndErrorOrg/parsers/blob/fd7e969/libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts#L131)
411+
Defined in: [libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts:131](https://github.com/TrialAndErrorOrg/parsers/blob/d1cc864/libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts#L131)
408412
409413
##### `title?`
410414
@@ -418,7 +422,7 @@ If this is not set, the title will be taken from the heading with the "Title" st
418422
419423
undefined
420424
421-
Defined in: [libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts:118](https://github.com/TrialAndErrorOrg/parsers/blob/fd7e969/libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts#L118)
425+
Defined in: [libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts:118](https://github.com/TrialAndErrorOrg/parsers/blob/d1cc864/libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts#L118)
422426
423427
##### `topSection?`
424428
@@ -433,7 +437,7 @@ What the top section should be
433437
4 = paragraph
434438
5 = subparagraph
435439
436-
Defined in: [libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts:38](https://github.com/TrialAndErrorOrg/parsers/blob/fd7e969/libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts#L38)
440+
Defined in: [libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts:38](https://github.com/TrialAndErrorOrg/parsers/blob/d1cc864/libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts#L38)
437441
438442
##### `xcolor?`
439443
@@ -448,7 +452,7 @@ and remove color related commands from the output.
448452
449453
true
450454
451-
Defined in: [libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts:110](https://github.com/TrialAndErrorOrg/parsers/blob/fd7e969/libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts#L110)
455+
Defined in: [libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts:110](https://github.com/TrialAndErrorOrg/parsers/blob/d1cc864/libs/ooxast/ooxast-util-to-unified-latex/src/lib/types.ts#L110)
452456
453457
## Syntax tree
454458

src/lib/reoff-unified-latex.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { Root } from '@unified-latex/unified-latex-types'
66
type Processor = UnifiedProcessor<any, any, any, any>
77
/**
88
* Bridge-mode.
9-
* Runs the destination with the new mdast tree.
9+
* Runs the destination with the new unified-latex tree.
1010
*
1111
*/
1212
function bridge(
@@ -22,7 +22,7 @@ function bridge(
2222

2323
/**
2424
* Mutate-mode.
25-
* Further transformers run on the texast tree.
25+
* Further transformers run on the unified-latex tree.
2626
*/
2727
function mutate(
2828
options: void | Options | undefined = {},
@@ -35,13 +35,15 @@ function mutate(
3535
}
3636

3737
/**
38-
* Plugin to bridge or mutate to relatex
38+
* Plugin to bridge or mutate to unified-latex
3939
*
4040
* If a destination is given, runs the destination with the new jast
4141
* tree (bridge-mode).
4242
* Without destination, returns the jast tree: further plugins run on that
4343
* tree (mutate-mode).
4444
*
45+
* This is done so that you can use this plugin as either the plugin before the stringify plugin, or the plugin before another mutate plugin
46+
*
4547
* @param destination
4648
* Optional unified processor.
4749
* @param options

0 commit comments

Comments
 (0)