add scale macro to template#11
Conversation
with this macro, as per gnab/remark#72, one can now do ````julia # A plot ```@example index using Plots; gr() Plots.plot(rand(10)) savefig("statplot.png"); ```  ````
|
How about naming the macro remark.macros.img = function (altText, width) {
var url = this;
return '<img alt="' + altText + '" src="' + url + '" style="width: ' + width + '" />';
};Are there any other options we might want to support? Adding a macro like this to the main library means that it will be hard in the future to change it. |
|
Somehow I'm not sure we should add some specific macros here: if they didn't make it to Remark.js, then it's just confusing to have them here. OTOH it could be nice to add a way to add custom macros (either as a text file or a Julia string: I would tend to prefer the text file as there are no problems in escaping and it's easier for the user to write some normal javascript in a .js file with the highlighting provided by the editor). So maybe the easiest is to allow the user to pass a filepath to |
|
Possible to revisit this? |
|
How do things work with plain Remark.js? Is the |
|
Sorry, I meant the idea to include custom macros in general. I agree with what you said above about perhaps just somehow inserting an external file into the index as a good way to support it. |
with this macro, as per gnab/remark#72, one can now do
this solves my issue #9 at least somehow (it's not automatic, but it works).