Skip to content

Commit 53f57be

Browse files
committed
📚 Fix documentation spelling and grammar
1 parent 0a0e722 commit 53f57be

File tree

11 files changed

+54
-55
lines changed

11 files changed

+54
-55
lines changed

docs/src/man/html/html_backend.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ HtmlHighlighter(f::Function, fd::Function)
6161
```
6262
6363
The first will apply a fixed decoration to the highlighted cell specified in `decoration`,
64-
whereas the second let the user select the desired decoration by specifying the function
64+
whereas the second lets the user select the desired decoration by specifying the function
6565
`fd`.
6666
6767
!!! note
@@ -75,8 +75,8 @@ whereas the second let the user select the desired decoration by specifying the
7575
**will not** affect the parameter `data` passed to the highlighter function `f`. It will
7676
always receive the original, unformatted value.
7777
78-
For example, we if want to highlight the cells with value greater than 5 in red, and all the
79-
cells with value less than 5 in blue, we can define:
78+
For example, if we want to highlight the cells with values greater than 5 in red, and all
79+
the cells with values less than 5 in blue, we can define:
8080
8181
```julia
8282
hl_gt5 = HtmlHighlighter(
@@ -134,8 +134,7 @@ contains the following fields:
134134
Each field is a vector of [`HtmlPair`](@ref), *i.e.* `Pair{String, String}`, describing
135135
properties and values compatible with the HTML style attribute.
136136
137-
For example, we if want that the stubhead label is bold and red, we must define:
138-
137+
For example, if we want the stubhead label to be bold and red, we must define:
139138
```julia
140139
style = HtmlTableStyle(
141140
stubhead_label = ["font-weight" => "bold", "color" => "red"]

docs/src/man/latex/latex_backend.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ where the user select the desired decoration by specifying the function `fd`.
5151
**will not** affect the parameter `data` passed to the highlighter function `f`. It will
5252
always receive the original, unformatted value.
5353

54-
For example, we if want to make the cells with value greater than 5 in bold, and all the
55-
cells with value less than 5 to be small, we can define:
54+
For example, if we want to make the cells with value greater than 5 bold, and all the
55+
cells with value less than 5 small, we can define:
5656

5757
```julia
5858
hl_gt5 = LatexHighlighter(
@@ -91,7 +91,7 @@ contains the following fields:
9191
- `horizontal_line_before_summary_rows::Bool`: If `true`, a horizontal line will be drawn
9292
before the summary rows. Notice that this line is the same as the one drawn if
9393
`horizontal_line_after_data_rows` is `true`. However, in this case, the line is omitted
94-
if there is no summary rows.
94+
if there are no summary rows.
9595
- `horizontal_line_after_summary_rows::Bool`: If `true`, a horizontal line will be drawn
9696
after the summary rows.
9797
- `vertical_line_at_beginning::Bool`: If `true`, a vertical line will be drawn at the

docs/src/man/quick_start.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ CurrentModule = PrettyTables
88
using PrettyTables
99
```
1010

11-
The following commands prints the table in `matrix` using the text backend with all the
11+
The following command prints the table in `matrix` using the text backend with all the
1212
available sections:
1313

1414
```julia-repl

docs/src/man/text/predefined_formats.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ CurrentModule = PrettyTables
88
using PrettyTables
99
```
1010

11-
The text backend has some predefined borders and formats to print the tables.
11+
The text backend has some predefined borders and formats to print tables.
1212

1313
```@setup text_backend_predefined_formats
1414
data = Any[
@@ -105,7 +105,7 @@ pretty_table(
105105

106106
## Formats
107107

108-
The text backend also defined some pre-defined formats to print the tables that can be used
108+
The text backend also defines some pre-defined formats to print tables that can be used
109109
through the keyword `table_format` in [`pretty_table`](@ref).
110110

111111
`text_table_format__matrix`

docs/src/man/text/text_backend.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ the output.
1212
anchor. Otherwise, the end of the line will be aligned with the anchor.
1313
(**Default** = `:l`)
1414
- `alignment_anchor_regex::Union{Vector{Regex}, Vector{Pair{Int, Vector{Regex}}}}`: This
15-
keyword can be used to provide regexes to aligh the data values in the table columns. It
15+
This keyword can be used to provide regexes to align the data values in the table columns. If
1616
it is `Vector{Regex}`, the regexes will be used to align all the columns. If it is
17-
`Vector{Pair{Int, Vector{Regex}}}`, the `Int` element specify the column to which the
17+
`Vector{Pair{Int, Vector{Regex}}}`, the `Int` element specifies the column to which the
1818
regexes in `Vector{Regex}` will be applied. The regex match is searched in the same order
1919
as the regexes appear on the vector. The regex matching is applied after the cell
2020
conversion to string, which includes the formatters. If no match is found for a specific
@@ -79,7 +79,7 @@ keyword. Each highlighter is an instance of the structure [`TextHighlighter`](@r
7979
contains three fields:
8080

8181
- `f::Function`: Function with the signature `f(data, i, j)` in which should return `true`
82-
if the element `(i, j)` in `data` must be highlighter, or `false` otherwise.
82+
if the element `(i, j)` in `data` must be highlighted, or `false` otherwise.
8383
- `fd::Function`: Function with the signature `f(h, data, i, j)` in which `h` is the
8484
highlighter. This function must return the `Crayon` to be applied to the cell that must be
8585
highlighted.
@@ -131,7 +131,7 @@ where it will apply the `Crayon` returned by the function `fd` to the highlighte
131131
**will not** affect the parameter `data` passed to the highlighter function `f`. It will
132132
always receive the original, unformatted value.
133133

134-
For example, we if want to highlight the cells with value greater than 5 in red, and all the
134+
For example, if we want to highlight the cells with value greater than 5 in red, and all the
135135
cells with value less than 5 in blue, we can define:
136136

137137
```julia
@@ -140,7 +140,7 @@ hl_gt5 = TextHighlighter(
140140
crayon"red"
141141
)
142142

143-
hl_lt5 = HtmlHighlighter(
143+
hl_lt5 = TextHighlighter(
144144
(data, i, j) -> data[i, j] < 5,
145145
crayon"blue"
146146
)
@@ -175,7 +175,7 @@ contains the following fields:
175175
- `horizontal_line_before_summary_rows::Bool`: If `true`, a horizontal line will be drawn
176176
before the summary rows. Notice that this line is the same as the one drawn if
177177
`horizontal_line_after_data_rows` is `true`. However, in this case, the line is omitted
178-
if there is no summary rows.
178+
if there are no summary rows.
179179
- `horizontal_line_after_summary_rows::Bool`: If `true`, a horizontal line will be drawn
180180
after the summary rows.
181181
- `vertical_line_at_beginning::Bool`: If `true`, a vertical line will be drawn at the
@@ -211,7 +211,7 @@ contains the following fields:
211211
- `subtitle::Crayon`: Crayon with the style for the subtitle.
212212
- `row_number_label::Crayon`: Crayon with the style for the row number label.
213213
- `row_number::Crayon`: Crayon with the style for the row numbers.
214-
- `stubhead_label::Crayon`: Crayon with the style for the stubhead label.
214+
- `stubhead_label::Crayon`: Crayon with the style for the stubhead label.
215215
- `row_label::Crayon`: Crayon with the style for the row labels.
216216
- `row_group_label::Crayon`: Crayon with the style for the row group label.
217217
- `first_line_column_label::Crayon`: Crayon with the style for the first column label lines.
@@ -229,7 +229,7 @@ contains the following fields:
229229

230230
Each field is a `Crayon` describing the style for the corresponding element in the table.
231231

232-
For example, we if want that the stubhead label is bold and red, we must define:
232+
For example, if we want the stubhead label to be bold and red, we must define:
233233

234234
```julia
235235
style = TextTableStyle(

docs/src/man/usage.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ can be specified using a symbol: `:l` for left, `:c` for center, or `:r` for rig
177177

178178
!!! warning
179179

180-
Some backends does not support all the alignment options. For example, it is impossible
180+
Some backends do not support all the alignment options. For example, it is impossible
181181
to define cell-specific alignment in the markdown backend.
182182

183183
### Other Arguments
@@ -403,7 +403,7 @@ v = f2(v, i, j)
403403
v = f3(v, i, j)
404404
```
405405

406-
Thus, the user must be ensure that the type of `v` between the calls are compatible.
406+
Thus, the user must ensure that the type of `v` between the calls is compatible.
407407

408408
PrettyTables.jl provides some predefined formatters for common tasks as described in the
409409
next section.

src/backends/html/documentation.jl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Description #############################################################################
22
#
3-
# Documentation the HTML backend.
3+
# Documentation for the HTML backend.
44
#
55
############################################################################################
66

@@ -64,14 +64,14 @@ A HTML highlighter can be constructed using three helpers:
6464
```julia
6565
HtmlHighlighter(f::Function, decoration::Vector{Pair{String, String}})
6666
67-
HtmlHighlighter(f::Function, decorations::NTuple{N, Pair{String, String})
67+
HtmlHighlighter(f::Function, decorations::NTuple{N, Pair{String, String}})
6868
6969
HtmlHighlighter(f::Function, fd::Function)
7070
```
7171
72-
The first will apply a fixed decoration to the highlighted cell specified in `decoration`,
73-
whereas the second let the user select the desired decoration by specifying the function
74-
`fd`.
72+
The first will apply a fixed decoration to the highlighted cell specified in `decoration`,
73+
the second allows specifying decorations as a `Tuple`, and the third lets the user select
74+
the desired decoration by specifying the function `fd`.
7575
7676
!!! note
7777
@@ -84,8 +84,8 @@ whereas the second let the user select the desired decoration by specifying the
8484
**will not** affect the parameter `data` passed to the highlighter function `f`. It will
8585
always receive the original, unformatted value.
8686
87-
For example, we if want to highlight the cells with value greater than 5 in red, and
88-
all the cells with value less than 5 in blue, we can define:
87+
For example, if we want to highlight the cells with value greater than 5 in red, and all
88+
cells with values less than 5 in blue, we can define:
8989
9090
```julia
9191
hl_gt5 = HtmlHighlighter(
@@ -141,7 +141,7 @@ contains the following fields:
141141
Each field is a vector of [`HtmlPair`](@ref), *i.e.* `Pair{String, String}`, describing
142142
properties and values compatible with the HTML style attribute.
143143
144-
For example, we if want that the stubhead label is bold and red, we must define:
144+
For example, if we want the stubhead label to be bold and red, we must define:
145145
146146
```julia
147147
style = HtmlTableStyle(

src/backends/latex/documentation.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Description #############################################################################
22
#
3-
# Documentation the LaTeX backend.
3+
# Documentation for the LaTeX backend.
44
#
55
############################################################################################
66

@@ -35,7 +35,7 @@ contains the following two public fields:
3535
highlighter. This function must return a `Vector{String}` with the LaTeX environments to
3636
be applied to the cell.
3737
38-
A LaTeX highlighter can be constructured using two helpers:
38+
A LaTeX highlighter can be constructed using two helpers:
3939
4040
```julia
4141
LatexHighlighter(f::Function, envs::Vector{String})
@@ -61,8 +61,8 @@ where the user select the desired decoration by specifying the function `fd`.
6161
**will not** affect the parameter `data` passed to the highlighter function `f`. It will
6262
always receive the original, unformatted value.
6363
64-
For example, we if want to make the cells with value greater than 5 in bold, and all the
65-
cells with value less than 5 to be small, we can define:
64+
For example, if we want to make the cells with value greater than 5 bold, and all the cells
65+
with value less than 5 small, we can define:
6666
6767
```julia
6868
hl_gt5 = LatexHighlighter(

src/backends/markdown/documentation.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ MarkdownHighlighter(f::Function, decoration::MarkdownStyle)
6262
MarkdownHighlighter(f::Function, fd::Function)
6363
```
6464
65-
The first will apply a fixed decoration to the highlighted cell specified in `decoration`
66-
whereas the second let the user select the desired decoration by specifying the function
65+
whereas the second lets the user select the desired decoration by specifying the function
66+
`fd`.
6767
`fd`.
6868
6969
!!! note
@@ -94,7 +94,7 @@ that contains the following fields:
9494
9595
- `row_number_label::MarkdownStyle`: Style for the row number label.
9696
- `row_number::MarkdownStyle`: Style for the row number.
97-
- `stubhead_label::MarkdownStyle`: Style for the stubhead label.
97+
- `first_column_label::MarkdownStyle`: Style for the first line of the column labels.
9898
- `row_label::MarkdownStyle`: Style for the row label.
9999
- `row_group_label::MarkdownStyle`: Style for the row group label.
100100
- `first_column_label::MarkdownStyle`: Style for the first line of the column

src/backends/text/documentation.jl

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Description #############################################################################
22
#
3-
# Documentation the text backend.
3+
# Documentation for the text backend.
44
#
55
############################################################################################
66

@@ -19,24 +19,24 @@ the output.
1919
anchor. Otherwise, the end of the line will be aligned with the anchor.
2020
(**Default** = `:l`)
2121
- `alignment_anchor_regex::Union{Vector{Regex}, Vector{Pair{Int, Vector{Regex}}}}`: This
22-
keyword can be used to provide regexes to aligh the data values in the table columns. It
22+
keyword can be used to provide regexes to align the data values in the table columns. If
2323
it is `Vector{Regex}`, the regexes will be used to align all the columns. If it is
24-
`Vector{Pair{Int, Vector{Regex}}}`, the `Int` element specify the column to which the
24+
`Vector{Pair{Int, Vector{Regex}}}`, the `Int` element specifies the column to which the
2525
regexes in `Vector{Regex}` will be applied. The regex match is searched in the same
2626
order as the regexes appear on the vector. The regex matching is applied after the cell
2727
conversion to string, which includes the formatters. If no match is found for a specific
28-
line, the alignment of this line depends on the options `alignment_anchor_fallback`.
28+
line, the alignment of this line depends on the option `alignment_anchor_fallback`.
2929
Example: `[2 => [r"\\."]]` aligns the decimal point of the cells in the second column.
3030
(**Default** = `Regex[]`)
3131
- `apply_alignment_regex_to_summary_rows::Bool`: If `true`, the alignment regexes in
3232
`alignment_anchor_regex` will also be applied to the summary rows.
3333
(**Default** = `false`)
34-
- `auto_wrap::Bool`: If `true`, the text will be wrapped on spaces to fit the column. Notice
34+
- `auto_wrap::Bool`: If `true`, the text will be wrapped on spaces to fit the column. Note
3535
that this function requires `linebreaks = true` and the column must have a fixed size
3636
(see `fixed_data_column_widths`).
3737
(**Default** = `false`)
3838
- `column_label_width_based_on_first_line_only::Bool`: If `true`, the column label width is
39-
based on the first line of the column. Hence, if the other column labels have a text
39+
based on the first line of the column. Hence, if the other column labels have text
4040
width larger than the computed column width, they will be cropped to fit.
4141
(**Default** = `false`)
4242
- `display_size::Tuple{Int, Int}`: A tuple of two integers that defines the display size
@@ -54,18 +54,18 @@ the output.
5454
(**Default** = `true`)
5555
- `fixed_data_column_widths::Union{Int, Vector{Int}}`: If it is a `Vector{Int}`, this vector
5656
specifies the width of each column. If it is a `Int`, this number will be used as the
57-
width of all columns. If the width is equal or lower than 0, it will be automatically
57+
width of all columns. If the width is equal to or lower than 0, it will be automatically
5858
computed to fit the large cell in the column.
5959
(**Default** = 0)
6060
- `highlighters::Vector{TextHighlighter}`: Highlighters to apply to the table. For more
6161
information, see the section **Text Highlighters** in the **Extended Help**.
6262
- `line_breaks::Bool`: If `true`, a new line character will break the line inside the cells.
6363
(**Default** = `false`)
6464
- `maximum_data_column_widths::Union{Int, Vector{Int}}`: If it is a `Vector{Int}`, this
65-
vector specifies the maximum width of each column. If it is a `Int`, this number will be
66-
used as the maximum width of all columns. If the maximum width is equal or lower than 0,
67-
it will be ignored. Notice that the parameter `fixed_data_column_widths` has precedence
68-
over this one.
65+
vector specifies the maximum width of each column. If it is an `Int`, this number will
66+
be used as the maximum width of all columns. If the maximum width is equal or lower than
67+
0, it will be ignored. Notice that the parameter `fixed_data_column_widths` has
68+
precedence over this one.
6969
(**Default** = 0)
7070
- `overwrite_display::Bool`: If `true`, the same number of lines in the printed table will
7171
be deleted from the output `io`. This can be used to update the table in the display
@@ -88,8 +88,8 @@ keyword. Each highlighter is an instance of the structure [`TextHighlighter`](@r
8888
contains three fields:
8989
9090
- `f::Function`: Function with the signature `f(data, i, j)` in which should return `true`
91-
if the element `(i, j)` in `data` must be highlighter, or `false` otherwise.
92-
- `fd::Function`: Function with the signature `f(h, data, i, j)` in which `h` is the
91+
if the element `(i, j)` in `data` must be highlighted, or `false` otherwise.
92+
- `fd::Function`: Function with the signature `fd(h, data, i, j)` in which `h` is the
9393
highlighter. This function must return the `Crayon` to be applied to the cell that must
9494
be highlighted.
9595
- `crayon::Crayon`: The `Crayon` to be applied to the highlighted cell if the default `fd`
@@ -140,7 +140,7 @@ where it will apply the `Crayon` returned by the function `fd` to the highlighte
140140
**will not** affect the parameter `data` passed to the highlighter function `f`. It will
141141
always receive the original, unformatted value.
142142
143-
For example, we if want to highlight the cells with value greater than 5 in red, and
143+
For example, if we want to highlight the cells with value greater than 5 in red, and
144144
all the cells with value less than 5 in blue, we can define:
145145
146146
```julia
@@ -149,7 +149,7 @@ hl_gt5 = TextHighlighter(
149149
crayon"red"
150150
)
151151
152-
hl_lt5 = HtmlHighlighter(
152+
hl_lt5 = TextHighlighter(
153153
(data, i, j) -> data[i, j] < 5,
154154
crayon"blue"
155155
)

0 commit comments

Comments
 (0)