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

Can't copy to clipboard when displaying reaction network reactions #195

Open
TorkelE opened this issue Dec 9, 2021 · 2 comments
Open

Can't copy to clipboard when displaying reaction network reactions #195

TorkelE opened this issue Dec 9, 2021 · 2 comments

Comments

@TorkelE
Copy link
Contributor

TorkelE commented Dec 9, 2021

I try this code:

using Latexify, Catalyst
rn = @reaction_network begin  
    mm(XY,v,K), 0 --> X
    p, 0 --> Y
    d, (X,Y) --> 0
    (kB,kD), X+Y <--> XY
end v K p d kB kD
latexify(rn)

and get an error:

UndefVarError: clipboard not defined

Stacktrace:
 [1] chemical_arrows(rn::ReactionSystem{Nothing}; expand::Bool, double_linebreak::Bool, mathjax::Bool, starred::Bool, kwargs::Base.Pairs{Symbol, Any, Tuple{Symbol, Symbol}, NamedTuple{(:cdot, :env), Tuple{Bool, Symbol}}})
   @ Catalyst ~/.julia/packages/Catalyst/tYKtI/src/latexify_recipes.jl:127
 [2] process_latexify(args::ReactionSystem{Nothing}; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
   @ Latexify ~/.julia/packages/Latexify/Kg8HA/src/latexify_function.jl:25
 [3] process_latexify
   @ ~/.julia/packages/Latexify/Kg8HA/src/latexify_function.jl:18 [inlined]
 [4] latexify(args::ReactionSystem{Nothing}; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
   @ Latexify ~/.julia/packages/Latexify/Kg8HA/src/latexify_function.jl:3
 [5] latexify(args::ReactionSystem{Nothing})
   @ Latexify ~/.julia/packages/Latexify/Kg8HA/src/latexify_function.jl:2
 [6] top-level scope
   @ In[112]:8
 [7] eval
   @ ./boot.jl:373 [inlined]
 [8] include_string(mapexpr::typeof(REPL.softscope), mod::Module, code::String, filename::String)
   @ Base ./loading.jl:1196

However, this do work:

using Latexify, Catalyst
rn = @reaction_network begin  
    mm(XY,v,K), 0 --> X
    p, 0 --> Y
    d, (X,Y) --> 0
    (kB,kD), X+Y <--> XY
end v K p d kB kD
latexify(convert(ODESystem,rn))
@korsbo
Copy link
Owner

korsbo commented Dec 14, 2021

Hmm, that is a bit odd. My initial suspicion is that Catalyst or ModelingToolkit is doing something funky in one of the latexify recipes.

@TorkelE
Copy link
Contributor Author

TorkelE commented Dec 14, 2021

Yeah, could be that. Another time I would just have gone through the Latexify recipes in ModelingToolkit to fix them, but probably not right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants