|  | 
| 3 | 3 | 
 | 
| 4 | 4 | HtmlHighlighter(f::Function, decorations::NTuple{N, Pair{String, String}) | 
| 5 | 5 | 
 | 
| 6 |  | -HtmlHighlighter(f::Function, fd::Function)</code></pre><p>The first will apply a fixed decoration to the highlighted cell specified in <code>decoration</code>, whereas the second let the user select the desired decoration by specifying the function <code>fd</code>.</p><div class="admonition is-info" id="Note-6f89df7f3521f102"><header class="admonition-header">Note<a class="admonition-anchor" href="#Note-6f89df7f3521f102" title="Permalink"></a></header><div class="admonition-body"><p>If multiple highlighters are valid for the element <code>(i, j)</code>, the applied style will be equal to the first match considering the order in the vector <code>highlighters</code>.</p></div></div><div class="admonition is-info" id="Note-d5229be055cebafd"><header class="admonition-header">Note<a class="admonition-anchor" href="#Note-d5229be055cebafd" title="Permalink"></a></header><div class="admonition-body"><p>If the highlighters are used together with <a href="../../usage/#Formatters">Formatters</a>, the change in the format <strong>will not</strong> affect the parameter <code>data</code> passed to the highlighter function <code>f</code>. It will always receive the original, unformatted value.</p></div></div><p>For example, we if want to highlight the cells with value greater than 5 in red, and all the cells with value less than 5 in blue, we can define:</p><pre><code class="language-julia hljs">hl_gt5 = HtmlHighlighter( | 
|  | 6 | +HtmlHighlighter(f::Function, fd::Function)</code></pre><p>The first will apply a fixed decoration to the highlighted cell specified in <code>decoration</code>, whereas the second lets the user select the desired decoration by specifying the function <code>fd</code>.</p><div class="admonition is-info" id="Note-6f89df7f3521f102"><header class="admonition-header">Note<a class="admonition-anchor" href="#Note-6f89df7f3521f102" title="Permalink"></a></header><div class="admonition-body"><p>If multiple highlighters are valid for the element <code>(i, j)</code>, the applied style will be equal to the first match considering the order in the vector <code>highlighters</code>.</p></div></div><div class="admonition is-info" id="Note-d5229be055cebafd"><header class="admonition-header">Note<a class="admonition-anchor" href="#Note-d5229be055cebafd" title="Permalink"></a></header><div class="admonition-body"><p>If the highlighters are used together with <a href="../../usage/#Formatters">Formatters</a>, the change in the format <strong>will not</strong> affect the parameter <code>data</code> passed to the highlighter function <code>f</code>. It will always receive the original, unformatted value.</p></div></div><p>For example, if we want to highlight the cells with values greater than 5 in red, and all the cells with values less than 5 in blue, we can define:</p><pre><code class="language-julia hljs">hl_gt5 = HtmlHighlighter( | 
| 7 | 7 |     (data, i, j) -> data[i, j] > 5, | 
| 8 | 8 |     ["color" => "red"] | 
| 9 | 9 | ) | 
|  | 
| 13 | 13 |     ["color" => "blue"] | 
| 14 | 14 | ) | 
| 15 | 15 | 
 | 
| 16 |  | -highlighters = [hl_gt5, hl_lt5]</code></pre><h2 id="HTML-Table-Format"><a class="docs-heading-anchor" href="#HTML-Table-Format">HTML Table Format</a><a id="HTML-Table-Format-1"></a><a class="docs-heading-anchor-permalink" href="#HTML-Table-Format" title="Permalink"></a></h2><p>The HTML table format is defined using an object of type <a href="../../../lib/library/#PrettyTables.HtmlTableFormat"><code>HtmlTableFormat</code></a> that contains the following fields:</p><ul><li><code>css::String</code>: CSS to be injected at the end of the <code><style></code> section.</li><li><code>table_width::String</code>: Table width.</li></ul><p>Notice that this format is only applied if <code>stand_alone = true</code>.</p><h2 id="HTML-Table-Style"><a class="docs-heading-anchor" href="#HTML-Table-Style">HTML Table Style</a><a id="HTML-Table-Style-1"></a><a class="docs-heading-anchor-permalink" href="#HTML-Table-Style" title="Permalink"></a></h2><p>The HTML table style is defined using an object of type <a href="../../../lib/library/#PrettyTables.HtmlTableStyle"><code>HtmlTableStyle</code></a> that contains the following fields:</p><ul><li><code>top_left_string::Vector{HtmlPair}</code>: Style for the top left string.</li><li><code>top_right_string::Vector{HtmlPair}</code>: Style for the top right string.</li><li><code>table::Vector{HtmlPair}</code>: Style for the table.</li><li><code>title::Vector{HtmlPair}</code>: Style for the title.</li><li><code>subtitle::Vector{HtmlPair}</code>: Style for the subtitle.</li><li><code>row_number_label::Vector{HtmlPair}</code>: Style for the row number label.</li><li><code>row_number::Vector{HtmlPair}</code>: Style for the row number.</li><li><code>stubhead_label::Vector{HtmlPair}</code>: Style for the stubhead label.</li><li><code>row_label::Vector{HtmlPair}</code>: Style for the row label.</li><li><code>row_group_label::Vector{HtmlPair}</code>: Style for the row group label.</li><li><code>first_line_column_label::Vector{HtmlPair}</code>: Style for the first line of the column labels.</li><li><code>column_label::Vector{HtmlPair}</code>: Style for the column label.</li><li><code>first_line_merged_column_label::Vector{HtmlPair}</code>: Style for the merged cells at the first column label line.</li><li><code>merged_column_label::Vector{HtmlPair}</code>: Style for the merged cells at the rest of the column labels.</li><li><code>summary_row_cell::Vector{HtmlPair}</code>: Style for the summary row cell.</li><li><code>summary_row_label::Vector{HtmlPair}</code>: Style for the summary row label.</li><li><code>footnote::Vector{HtmlPair}</code>: Style for the footnote.</li><li><code>source_notes::Vector{HtmlPair}</code>: Style for the source notes.</li><li><code>first_line_of_column_labels::Vector{HtmlPair}</code>: Style for the first line of the column labels.</li></ul><p>Each field is a vector of <a href="@ref"><code>HtmlPair</code></a>, <em>i.e.</em> <code>Pair{String, String}</code>, describing properties and values compatible with the HTML style attribute.</p><p>For example, we if want that the stubhead label is bold and red, we must define:</p><pre><code class="language-julia hljs">style = HtmlTableStyle( | 
|  | 16 | +highlighters = [hl_gt5, hl_lt5]</code></pre><h2 id="HTML-Table-Format"><a class="docs-heading-anchor" href="#HTML-Table-Format">HTML Table Format</a><a id="HTML-Table-Format-1"></a><a class="docs-heading-anchor-permalink" href="#HTML-Table-Format" title="Permalink"></a></h2><p>The HTML table format is defined using an object of type <a href="../../../lib/library/#PrettyTables.HtmlTableFormat"><code>HtmlTableFormat</code></a> that contains the following fields:</p><ul><li><code>css::String</code>: CSS to be injected at the end of the <code><style></code> section.</li><li><code>table_width::String</code>: Table width.</li></ul><p>Notice that this format is only applied if <code>stand_alone = true</code>.</p><h2 id="HTML-Table-Style"><a class="docs-heading-anchor" href="#HTML-Table-Style">HTML Table Style</a><a id="HTML-Table-Style-1"></a><a class="docs-heading-anchor-permalink" href="#HTML-Table-Style" title="Permalink"></a></h2><p>The HTML table style is defined using an object of type <a href="../../../lib/library/#PrettyTables.HtmlTableStyle"><code>HtmlTableStyle</code></a> that contains the following fields:</p><ul><li><code>top_left_string::Vector{HtmlPair}</code>: Style for the top left string.</li><li><code>top_right_string::Vector{HtmlPair}</code>: Style for the top right string.</li><li><code>table::Vector{HtmlPair}</code>: Style for the table.</li><li><code>title::Vector{HtmlPair}</code>: Style for the title.</li><li><code>subtitle::Vector{HtmlPair}</code>: Style for the subtitle.</li><li><code>row_number_label::Vector{HtmlPair}</code>: Style for the row number label.</li><li><code>row_number::Vector{HtmlPair}</code>: Style for the row number.</li><li><code>stubhead_label::Vector{HtmlPair}</code>: Style for the stubhead label.</li><li><code>row_label::Vector{HtmlPair}</code>: Style for the row label.</li><li><code>row_group_label::Vector{HtmlPair}</code>: Style for the row group label.</li><li><code>first_line_column_label::Vector{HtmlPair}</code>: Style for the first line of the column labels.</li><li><code>column_label::Vector{HtmlPair}</code>: Style for the column label.</li><li><code>first_line_merged_column_label::Vector{HtmlPair}</code>: Style for the merged cells at the first column label line.</li><li><code>merged_column_label::Vector{HtmlPair}</code>: Style for the merged cells at the rest of the column labels.</li><li><code>summary_row_cell::Vector{HtmlPair}</code>: Style for the summary row cell.</li><li><code>summary_row_label::Vector{HtmlPair}</code>: Style for the summary row label.</li><li><code>footnote::Vector{HtmlPair}</code>: Style for the footnote.</li><li><code>source_notes::Vector{HtmlPair}</code>: Style for the source notes.</li><li><code>first_line_of_column_labels::Vector{HtmlPair}</code>: Style for the first line of the column labels.</li></ul><p>Each field is a vector of <a href="@ref"><code>HtmlPair</code></a>, <em>i.e.</em> <code>Pair{String, String}</code>, describing properties and values compatible with the HTML style attribute.</p><p>For example, if we want the stubhead label to be bold and red, we must define:</p><pre><code class="language-julia hljs">style = HtmlTableStyle( | 
| 17 | 17 |     stubhead_label = ["font-weight" => "bold", "color" => "red"] | 
| 18 |  | -)</code></pre></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../../text/text_examples/">« Examples</a><a class="docs-footer-nextpage" href="../../latex/latex_backend/">LaTeX Backend »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.14.1 on <span class="colophon-date" title="Thursday 10 July 2025 19:46">Thursday 10 July 2025</span>. Using Julia version 1.11.6.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> | 
|  | 18 | +)</code></pre></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../../text/text_examples/">« Examples</a><a class="docs-footer-nextpage" href="../../latex/latex_backend/">LaTeX Backend »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.14.1 on <span class="colophon-date" title="Friday 11 July 2025 00:17">Friday 11 July 2025</span>. Using Julia version 1.11.6.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> | 
0 commit comments