Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new latexify setup to support colored trees #100

Merged
merged 5 commits into from
Feb 5, 2023
Merged

Conversation

ranocha
Copy link
Member

@ranocha ranocha commented Feb 4, 2023

This allows us to create LaTeX code rendered as follows:

rooted_trees-1

Code to reproduce:

julia> using BSeries, Latexify

julia> ark = let # Störmer-Verlet method
       As = [
           [0 0; 1//2 1//2],
           [1//2 0; 1//2 0],
       ]
       bs = [
           [1 // 2, 1 // 2],
           [1 // 2, 1 // 2],
       ]
       AdditiveRungeKuttaMethod(As, bs)
       end

julia> series = bseries(ark, 3)

julia> latexify(series; cdot = false)

Compared to the previous version, the LaTeX code of plain (single-colored) rooted trees is a bit more verbose since it includes an additional . after each opening bracket [, e.g.,

julia> using RootedTrees

julia> t = rootedtree([1, 2, 2])
RootedTree{Int64}: [1, 2, 2]

julia> RootedTrees.latexify(t) |> println
\rootedtree[.[.][.]]

@ranocha ranocha self-assigned this Feb 4, 2023
@ranocha ranocha added the enhancement New feature or request label Feb 4, 2023
@ranocha ranocha merged commit fb51bc3 into main Feb 5, 2023
@ranocha ranocha deleted the hr/new_latexify branch February 5, 2023 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant