@@ -249,6 +249,7 @@ function Base.show(io::IO, ::MIME"text/plain", ocp::Model)
249249 __is_objective_set (ocp) ? " V" : " X" ,
250250 )
251251 println (" " )
252+ # ### PrettyTables v2
252253 h1 = Highlighter ((data, i, j) -> data[i, j] == " X" ; bold= true , foreground= :red )
253254 h2 = Highlighter ((data, i, j) -> data[i, j] == " V" ; bold= true , foreground= :green )
254255 pretty_table (
@@ -262,6 +263,19 @@ function Base.show(io::IO, ::MIME"text/plain", ocp::Model)
262263 alignment= :c ,
263264 compact_printing= true ,
264265 )
266+ # ### PrettyTables v3
267+ # h1 = TextHighlighter((data, i, j) -> data[i, j] == "X", crayon"bold red")
268+ # h2 = TextHighlighter((data, i, j) -> data[i, j] == "V", crayon"bold green")
269+ # style = TextTableStyle(first_line_column_label = crayon"yellow bold")
270+ # pretty_table(
271+ # io,
272+ # data;
273+ # column_labels=header,
274+ # style= style,
275+ # highlighters=[h1, h2],
276+ # alignment=:c,
277+ # compact_printing=true,
278+ # )
265279
266280 #
267281 return nothing
@@ -537,6 +551,7 @@ function Base.show(io::IO, ::MIME"text/plain", ocp::PreModel)
537551 __is_objective_set (ocp) ? " V" : " X" ,
538552 )
539553 println (" " )
554+ # ### PrettyTables v2
540555 h1 = Highlighter ((data, i, j) -> data[i, j] == " X" ; bold= true , foreground= :red )
541556 h2 = Highlighter ((data, i, j) -> data[i, j] == " V" ; bold= true , foreground= :green )
542557 pretty_table (
@@ -550,6 +565,19 @@ function Base.show(io::IO, ::MIME"text/plain", ocp::PreModel)
550565 alignment= :c ,
551566 compact_printing= true ,
552567 )
568+ # ### PrettyTables v3
569+ # h1 = TextHighlighter((data, i, j) -> data[i, j] == "X", crayon"bold red")
570+ # h2 = TextHighlighter((data, i, j) -> data[i, j] == "V", crayon"bold green")
571+ # style = TextTableStyle(first_line_column_label = crayon"yellow bold")
572+ # pretty_table(
573+ # io,
574+ # data;
575+ # column_labels=header,
576+ # style= style,
577+ # highlighters=[h1, h2],
578+ # alignment=:c,
579+ # compact_printing=true,
580+ # )
553581
554582 #
555583 return nothing
0 commit comments