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
8888contains 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
144144all 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