Skip to content

Commit

Permalink
add fix to latex for empty disj
Browse files Browse the repository at this point in the history
  • Loading branch information
hdavid16 committed May 20, 2024
1 parent b138597 commit ddd25a9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/print.jl
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,11 @@ function JuMP.constraint_string(
disjuncts = Vector{String}(undef, length(d.indicators))
for (i, lvar) in enumerate(d.indicators)
disjunct = string("\\begin{bmatrix}\n ", JuMP.function_string(mode, lvar), "\\\\\n ")
cons = (JuMP.constraint_string(mode, JuMP.constraint_object(cref)) for cref in mappings[lvar])
if haskey(mappings, lvar)
cons = (JuMP.constraint_string(mode, JuMP.constraint_object(cref)) for cref in mappings[lvar])
else
cons = ""
end
disjuncts[i] = string(disjunct, join(cons, "\\\\\n "), "\\end{bmatrix}")
end
return join(disjuncts, " $(_dor_symbol(mode)) ")
Expand Down

0 comments on commit ddd25a9

Please sign in to comment.