Skip to content

Commit

Permalink
wip: add latexalign(Dict).
Browse files Browse the repository at this point in the history
  • Loading branch information
korsbo committed Jun 28, 2018
1 parent 0896397 commit 474b24f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Latexify.jl supplies functionalities for converting a range of different Julia o
- Symbolic expressions from SymEngine.jl,
- ParameterizedFunctions and ReactionNetworks from DifferentialEquations.jl

as well as arrays of any supported types.
as well as arrays or dicts of supported types.



Expand Down Expand Up @@ -54,7 +54,12 @@ latexify(arr)
```
![matrix](/assets/demo_matrix.png)


```julia
d = Dict(:X => 10, "dx/dt" => :(e^(-t)), 2//3 => "atan(x)")
latexify(d)
latexify(d; transpose=true)
latexify(d; env=:align)
```


### Use with DifferentialEquations.jl
Expand Down
4 changes: 4 additions & 0 deletions src/latexalign.jl
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ function latexalign(nested::AbstractVector{AbstractVector}; kwargs...)
return latexalign(hcat(nested...); kwargs...)
end

function latexalign(d::Associative; kwargs...)
latexalign(collect(keys(d)), collect(values(d)); kwargs...)
end

"""
latexalign(vec::AbstractVector)
Expand Down

0 comments on commit 474b24f

Please sign in to comment.