- Fix the horizontal lines when the header is omitted. (#201)
- The algorithm to check whether
io
isstdout
in HTML backend was not working in Jupyter after the commit that implemented circular reference check. This commit fixed this bug.
- The rendered
show
was not escaping the newline character when the object was not a string. ([#194][gh-issue-194]) - PrettyTables.jl can now handle tables with no row or column. In this case, it shows only the header or the row label, if available. (#156)
- PrettyTables.jl can now detect circular dependency when showing an object.
- PrettyTables.jl now supports LaTexStrings. (#186)
- The first row when accessing a Table.jl table with row
access must be obtained using
first
instead of assuming that the first row state is 1. (PR #182)
- The header must always be printed regardless of the display size. This bug was leading to access of undefined memory if the number of rows in the display was smaller than that in the header. (Issue #179)
- The minimum Julia version was bumped to v1.6. Notice that this is not breaking because StringManipulation.jl already requires Julia 1.6.
- The table style (CSS) can be customized in HTML
output using the keyword
table_style
.
- The default option of
standalone
in HTML backend is newfalse
instead oftrue
. - The filters were removed to improve the code
maintainability. Table filtering must be done now before calling
pretty_table
. - The cells with undefined reference is now handled
differently to avoid confusion with cells that contains
undef
. (Issue #170) - The support of Julia 1.0 was dropped.
- The following options and structures were
renamed (the old versions are now deprecated):
HTMLDecoration => HtmlDecoration
HTMLHighlighter => HtmlHighlighter
HTMLTableFormat => HtmlTableFormat
URLTextCell => UrlTextCell
crop_num_lines_at_beginning => reserved_display_lines
noheader => show_header
nosubheader => show_subheader
row_name* => row_label*
rownum_header_crayon => row_number_header_crayon
- Many bugs in LaTeX escaping were fixed.
- Two new options were added to limit the number of
rows and columns that will be printed in all backends:
max_num_of_columns
andmax_num_of_rows
. - The HTML backend now shows the omitted cell summary.
- The HTML backend now have vertical cropping.
- The HTML backend now have a top bar where the user can print information.
- The HTML highlight now has an option to change the font style.
- The type
HtmlCell
can now be used to add raw HTML code to a table cell. (Issue #166) - The row number and label can now be decorated in HTML.
- The option
maximum_columns_width
can be used in HTML to limit the maximum width of the cells. - The option
title
can now be customized for the header cells in HTML (header_cell_titles
). - Many internal changes allowed to drastically increase the performance. The input tables are now wrapped in a new structure that is responsible to merge the data to be printed (header, additional columns, etc.).
- The algorithm to obtain the cells from tables with row access (Tables.jl) were improved. (Issue #174)
- OffsetArrays.jl is now supported. (Issue #110)
- The function
pretty_table
was returning an error when the alignment regex anchor contained a columns that does not exists. (Issue #154)
- The alignment anchor regex algorithm was not computing the alignment row correctly in lines with UTF-8 symbols. (Issue #147)
- Two predefined formatters were added:
ft_nomissing
andft_nonothing
. They can be used to transform, respectively,missing
andnothing
into an empty string. (Issue #150)
- We were not considering the column width configuration
(
maximum_columns_width
,minimum_columns_width
, etc.) when computing the number of columns we can display in the available size. This behavior was leading to incorrect cropping in many situation. (Issue #149)
- Newlines must be kept in
AnsiTextCell
. Otherwise, it will be impossible to align text between those cells.
- The deprecations removed in v1.2.0 were added again so that this new version is not breaking. (Issue #146)
- All deprecations introduced in v0.12 are now removed.
- The HTML decoration can now used any custom style. (PR #135)
- The HTML backend now has an option to minify the output.
- The HTML backend now has the option
allow_html_in_cells
so that the user can use HTML code inside the table. - The alignment option in HTML backend can now be set
to
:n
so that no alignment annotation is added. - The option
HTML
can be passed topretty_table
so that an HTML object is returned. (Issue #130) - The text backend has now a new custom cell called
AnsiTextCell
, which allows adding a cell with ANSI escape sequences inside the table. (Issue #142) (PR #143) - The keyword
color
can now be used when converting a table to string to render the ANSI escape sequences. - The HTML rendering now uses the section
thead
andtbody
. - Some special characters in HTML are now escaped to ensure a correct rendering.
- The vectors related to filtering are now set
to
UnitRange
if filtering is not present. Hence, the performance when printing huge tables cropped to the display size is highly improved by avoiding allocating big vectors. (Issue #140) (PR [#144][gh-issue-144]) - The horizontal line selection is now consistent if the
vertical cropping is set to
:middle
. (Issue #133)
- The text backend now supports custom text cells that
can have escape characters to apply, for example, decorations. The custom cell
URLTextCell
is bundled with PrettyTables.jl to add hyperlinks to text using the escape sequence\e]8
. (Issue #129) - The character
%
is now escaped in LaTeX. (Issue #125)
- The alignment regex keys are now sorted before processing. This introduces a slight delay, but avoid a huge wait time for very large tables. (Ref: JuliaData/DataFrames.jl#2739)
In this version, the API of text backend is stabilized. It means that current functionality will always work during the lifespan of v1. There can be new features, but none will be breaking. The only exception is if Julia printing system has a breaking change, which is allowed.
The HTML and LaTeX APIs are not stabilized. They can and will likely change during the lifespan of v1. However, any breaking change will only occur when the minor version is bumped. Those two backend must be considered beta.
- The minimum column width must be 1, otherwise
pretty_table
will crash when cropping an empty column in text backend. (Issue #118) - Some despecializations were performed and type instabilities were fixed, leading to a slightly performance increase.
- The backend
selection is not handled by a
Symbol
anymore. It is now selected using aVal
. Hence,backend = :text
must be replaced bybackend = Val(:text)
. The old API still works but it is marked as deprecated and will be removed in the next version. This drastically reduced the time to print the first table in LaTeX and HTML backends. - The header
is not selected by an argument anymore, but by a keyword called
header
. The format has also changed. It must be now a tuple of vectors instead of a matrix. The first vector is the header whereas the others are the subheaders. The old API still works but it is marked as deprecated and will be removed in the next version. - Many internal code enhancements allowed to
improve a lot the performance (despecializations, type instabilities fixes,
code refactoring to avoid unnecessary allocations, tweaking
@inline
annotations, etc.). (Issue #116) - The package now has a precompilation script that reduced a lot the time to print the first table in all backends.
- End of support of Julia 1.5. The supported versions are 1.0 and 1.6.
- In specific situations, the algorithm that aligns columns based on regexes was trying to align columns that were not printed, leading to segmentation fault. (Issue #112)
- By default, all the cells are now rendered using
the option
:limit => true
ofIOContext
. To return to the old behavior, uselimit_printing = false
. - HTML backend now supports row names.
- LaTeX backend now supports row names.
- A new LaTeX pre-defined format was added:
tf_latex_modern
. - A new LaTeX pre-defined format was added:
tf_latex_booktabs
. - The wrap table environment of LaTeX backend can now
be changed using the keyword
wrap_table_environment
. - A new table type of LaTeX backend was added:
:array
. - In Text backend, it is now possible to align the
column cells using regexes (see
alignment_regex_anchor
). - It is now possible to select the table label in LaTeX backend. (Issue #103)
- LaTeX tables can now control whether to use
the
table
environment or not. - HTML classes in CSS are now surrounded by quotes.
- An unnecessary space in HTML tags was removed.
- The color of omitted cell text in Text backend was changed from red to cyan. (Issue [#94])
- The compat bounds of Reexport.jl was updated. (Issue #105)
- PrettyTables.jl now support Tables.jl that returns tuples as columns. (Issue #90)
- The option
sortkeys
can now be used when printing dictionaries using HTML backend. - The first header is now correctly set when using
longtable
in LaTeX backend, avoiding multiple entries in list of tables. (Issue #95) - The formatter
ft_latex_sn
now only modifiesNumber
. - The arguments of
@ptconf
was not being escaped. (Issue #107)
- The cell width computation when the column has a maximum allowed size was fixed. (Issue [#93][gh-issue-93])
-
same_column_size
was renamed toequal_columns_width
. - Remove dependency Parameters.jl. This reduced the loading time in 30% but some features related to structure copying are now missing. (Issue #79)
- All table format variables now has the prefix
tf_
. This was required to avoid naming conflicts since some variables likematrix
have common names. -
screen_size
was renamed todisplay_size
. - If a table is cropped in
text back-end, then a summary indicating the number of omitted rows and
columns is now printed. This can be disable by the option
show_omitted_cell_summary
. - PrettyTables.jl now uses compact printing by default.
- LaTeX tables when
using
tabular
is now wrapped inside atable
environment. - PrettyTables.jl does not print trailing spaces anymore.
- Option
crop_subheader
in text back-end. If this option istrue
, PrettyTables.jl neglects the subheader length when computing the row size, cropping it if necessary. - Option
minimum_columns_width
in text back-end. This option allows the user the specify the minimum allowed size of each column. - Option
maximum_columns_width
in text back-end. This option allows the user the specify the maximum allowed size of each column. - Option
title
. It is now possible to define the table title in all back-ends. (Issue #32) - Header cells can now be aligned independently from the column alignment. (Issue #66)
- Option
hlines
in LaTeX back-end. The user can now define where they want horizontal lines in the LaTeX back-end. (Issue #70) - Option
cell_first_line_only
. Iftrue
, then only the first line of the cells are printed. - Option
row_number_alignment
in text back-end. This option can be used to select the alignment of the row number column in text back-end. - PrettyTables.jl can now render Markdown cells in all back-ends. (PR #63 and other commits)
- Option
crop_num_lines_at_beginning
in text back-end. This option defines how many lines are skipped at the beginning when cropping the table. - Option
newline_at_end
in text back-end. Iffalse
, then the table is printed without a newline character at end. - Option
continuation_row_alignment
in text back-end. This option allows the user to select the alignment of the continuation row. - Option
row_number_column_title
. This selects the title of the row number column. - A new configuration system is added so that the user can create structures storing printing configurations to be reused.
- PrettyTables.jl can now use the function
print
orshow
to render the cells. This is selected by the keywordrenderer
. - Option
ellipsis_line_skip
in text back-end. This option configures how many lines are skipped when showing ellipsis to indicate that the lines were cropped. - Text back-end can now crop a table in the middle.
The behavior can be selected by the keyword
vcrop_mode
. - PrettyTables.jl can now handle UTF-8 strings with variable character size.
- PrettyTables.jl now supports
#undef
cells. - A lot of optimizations were performed to decrease the time to print the first table, which is now almost 45% less.
- LaTeX output is now indented.
- HTML output is now indented.
- The types when printing Tables.jl now has a compact representation.
-
show_row_number
is now available in all back-ends. - Revamp of internal mechanism of text back-end, leading to a much more organized code base.
- The original data is now passed to highlighters and filters when the table complies with Tables.jl API. (Issue #65)
- LaTeX alignment was wrong in filtered columns.
- Fix row name crayons in text back-end. (Issue #68)
- Do not throw an error is a table is empty.
- End of support of Julia 1.4. The supported versions are 1.0 and 1.5.
- The option
overwrite
was added to the text back-end. It deletes the same amount of lines that will be printed. This can be used to provide a way to display a table that updates with time. (PR #56) - The object that complies with Table.jl API
can now return any
AbstractVector
as column or row names. (PR #53 and #54)
- The table format of the
text back-end now has the variable
vlines
which defines the vertical lines that should be drawn by default. In this case, the variablesleft_border
andright_border
were removed because they were not necessary anymore. - The compatibility with Tables.jl API was improved. Now, tables without a schema can be printed. Furthermore, if a table has a schema but the user pass a header, then the user's header will be used instead. Thus, this can be breaking. (Issue #45)
- The behavior of
the keyword
hlines
was modified in text back-end. Now, it can be used to draw any horizontal line, including the bottom, header, and top lines. A variable also namedhlines
was added to the structureTextFormat
to defined which horizontal lines should be drawn by default. Thus, the variablestop_line
,header_line
, andbottom_line
of the same structure were removed since they were not necessary anymore. Furthermore, the old behavior ofhlines
andhlines_format
can be replicated in this version usingbody_hlines
andbody_hlines_format
, respectively. - The vertical
lines behavior in LaTeX back-end was modified to match the behavior selected
for the text back-end. Thus, the keyword
row_number_vline
was removed, since it was not necessary anymore. - The API of
formatters was drastically change to improve the consistency of the package.
Now, as we have in
highlighters
, the formatters are composed of a function or a tuple of functions with the signaturef(value,i,j)
, wherevalue
is the cell value that must be formatted,i
is the row number, andj
is the column number. These function must return the formatted value for the cell(i,j)
. Since it is now possible to define multiple formatters, the keyword name was changed fromformatter
toformatters
. The old API still works, but it marked as deprecated. - The vertical lines in text back-end can now be
controlled by the keyword
vlines
. (Issue #46) - The option
row_names
can be used to append a column to the left of the table with the names of the columns. - The
highlighters
format of text back-end was improved. The user can now create highlighters that will dynamically applycrayons
depending on the data value and the cell coordinate, as it was possible with the LaTeX and HTML back-ends. - The API of
cell_alignment
was changed to improve the consistency of the package. Now, as we have inhighlighters
, thecell_alignment
must be a function or a tuple of functions with the signaturef(data,i,j)
, wheredata
is the matrix that is being printed,i
is the row number, andj
is the column number. These function must return the alignment symbol for the cell(i,j)
. For convenience, the old API using dictionaries is still available for the simple cases. - End of support of Julia 1.3. The supported versions are 1.0 and 1.4.
- The method
pretty_table(String, ...)
can be used to return the printed table as a string. Furthermore, all the tests were modified to use this function instead ofsprint
. (Issue #29)
- The table format
matrix
was added to the text and HTML back-ends. Thanks @DhruvaSambrani. (PR #39, Issue #33)
- The back-end is now automatically inferred from the
table type keyword (
tf
). Thanks @DhruvaSambrani. (PRs #41 and #42, Issue #40) - LaTeX back-end was failing when printing a table with an UTF-8 character on it. (Issue #38)
-
Tables.jl API is now the priority
when printing tables. This means that if an object complies with this API,
then it will be used, even if the object is also derived from a supported type
like
AbstractVecOrMat
. (Issue #28)
- The keyword
standalone = false
can be used with HTML back-end to print only the table. - An experimental version of a LaTeX back-end is now available. Notice that it still lacks tests and many bugs are expected.
- A table can now be added to a text file using the
function
include_pt_to_file
. You can define marks that will be used to place the table in the file. It works with all back-ends. - The support for
Tables.jl API were fixed for cases
in which
Tables.columns
did not return a matrix. Thanks @pdeffebach for the PR! (Issue #24) (PR #25) - End of support of Julia 1.2. The supported versions are 1.0 and 1.3.
- The keyword
columns_width
can be used to select the desired width for each column. - Add the possibility to automatically wrap the table
cells when using the text back-end and the column size is fixed. This can be
triggered by the keyword
autowrap
. (Issue #21) - Initial version of HTML back-end. Notice that this is the first version with a minimal set of features. This implementation should be considered beta.
- The character
"
is not escaped anymore when printing cells of typeAbstractString
. (Issue #22) - When using the text back-end, passing the
table format as an option to
pretty_table
function is now deprecated. The table format in all back-ends must be passed using the keywordtf
. Thus, for example,pretty_table(data, unicode_rounded)
must be converted topretty_table(data, tf = unicode_rounded)
.
- The format of the horizontal line in the table,
which are drawn using the option
hlines
, can now be selected using the keywordhlines_format
. - The alignment of a single cell can now be changed
regardless of the column alignment. This can be achieve by the keyword
cell_alignment
. - The line between the header and the data can now be
hide using the variable
header_line
of the structurePrettyTableFormat
. (Issue #15) - New predefined highlighters:
hl_cell
,hl_col
,hl_row
, which can be used to apply highlights to single cells or to entire columns or rows, respectively. - The formatter
ft_printf
is now only applied to cells that are of typeNumber
. (Issue #19) - The formatter
ft_printf
can now receive one integer if the user wants to format only a single column. - End of support of Julia 1.1. The supported versions are 1.0 and 1.2.
- DataFrames with strings were being printed surrounded by quotes, which were leading to a wrong escaping. (Issue #16)
- The macro
@pt
can be used to print tables with global configurations. Those configurations can be set by the macro@ptconf
. - There is now the option
nosubheader
to suppress printing sub-headers. This can be useful when printingDataFrame
orDict
and it is desired to hide the types of the columns. (Issue #14) - PrettyTables.jl is now compatible with
Tables.jl 0.2. It means that if an elements that is passed to
pretty_table
is not one of those natively supported, then it will callTables.columns
to automatically convert it. If it fails, than Tables.jl will throw an error instead of PrettyTables.jl. (Issue #13) - If only one highlighter is wanted, then an
instance of
Highlighter
can now be directly passed to the keywordhighlighters
, i.e. it does not must be aTuple
anymore.
- Dummy release to add
Project.toml
and switch to Registrator.jl.
- If the user wants to crop the output, then the printing function does not need to process the entire matrix. Thus, now it will only process the columns and rows that will be actually printed, which yielded a huge performance gain when big matrices are printed with crop on.
- Matrices with
nothing
andmissing
are now correctly printed.
- The text can now be
horizontally and / or vertically cropped to fit the available screen size.
Notice that, by default, the screen size is obtained and the text is cropped,
which is a breaking change compared to the previous version. This behavior can
be modified by the keywords
crop
andscreen_size
. -
Vector
can now be printed natively. - The user can now specify filters for the data using
the keywords
filters_col
andfilters_row
, so that only a partial subset of the input is printed. -
Dict
can now be printed natively. (Issue #6) - The formatting was wrong when printing a table with sub-headers and the row number column. (Issue #9)
- The row number column size is now correctly computed when the header is omitted. (Issue #10)
-
Vector
was replaced byAbstractVector
in predefined formatters. Hence, it is now possible to use range notation. Thus, for exampleft_printf("%4.2f", [2,3,4,5,6,7,8,9,10])
can now be rewritten asft_printf("%4.2f", 2:10)
. (PR #8)
- Every styling option is now handled by Crayons.jl.
- Strings are escaped before printing the header. This avoids problems in formatting if escape sequences are present. (Issue #4)
- The text inside the cells can have multiple lines.
- The header can be suppressed when printing the table. (Issue #3)
- Many performance improvements.
- The
hlines
keywords can accept ranges. (PR #5) - The pre-defined formatter
ft_printf
uses the functionsprintf1
from the package Formatting.jl instead of the macro@sprintf
, leading to a huge performance gain. (Issue #7)
- The header is not assumed to be on the data
anymore. It is now specified by a new parameter called
header
. - Only
Matrix{Any}
was allowed to be printed. - Support for highlighters.
- Some pre-defined highlighters were added.
- Some pre-defined formatters were added.
- Initial support for Tables.jl API.
- New package documentation using Documenter.jl.
- Support for sub-headers.
- There is now an option called
hlines
to draw horizontal lines between selected rows. - New pre-defined formats:
unicode_rounded
andborderless
.
- Initial version.