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

What is the equivalent of %%html and %%javascript when using the perl kernel? #94

Open
adamcrussell opened this issue Mar 8, 2019 · 0 comments

Comments

@adamcrussell
Copy link

adamcrussell commented Mar 8, 2019

If you use Jupyter with a Python kernel you can use aliases such as %%html and %%javascript. For example:

%%html
<div id="d3-example"></div>
<style>
.node {stroke: #fff; stroke-width: 1.5px;}
.link {stroke: #999; stroke-opacity: .6;}
</style>

will create a new div which could be populated by some d3.js code

%%javascript
 var svg = d3.select("#d3-example").select("svg")
 if (svg.empty()) {
svg = d3.select("#d3-example").append("svg")
      .attr("width", width)
      .attr("height", height);
}

Is there some equivalent syntax for this when using the Perl kernel?

Edit:

Apparently these are called "magics" https://ipython.readthedocs.io/en/stable/interactive/magics.html
perhaps my question should then be, more broadly, is there any support for magics with the Perl kernel?

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

1 participant