Some macros I've created for Remark.
SourceCreator uses brings modules together to create a class.
Here is the JavaScript code:
var sourceCreator = new SourceCreator();
var source = sourceCreator.createSource("class.json");
Here is the JSON for the class.json
file:
{
"classname" : "Name of the class",
"classdescription" : "Option class description",
"classmodules" : [
{"filename" : "path/to/remark/foo.md"},
{"filename" : "another/path/to/remark/bar.md", "include" : "1-2 5-7", "exclude" : "6"}
]
}
The Include Source macro allows you to import code from a file in a project without embedding it in the Markdown.
Here is the JavaScript code:
var includeSource = new IncludeSource();
includeSource.importSources(sourceObj, callbackfunction)
Here is how to use it in the Markdown:
![:includesource "Class.java"]
Will include Class.java with source code and add the code block with the file extension "java"
![:includesource "Class.java", 2-4, 3, *]
Will include lines 2 to 4 from Class.java and highlight line 3 with an *
![:includesource "Class.java", 2-4, 3 4, * trim]
Will include lines 2 to 4 from Class.java and highlight lines 3 and 4 with an * then trim the whitespace to the minimum needed for lines 2 to 4.
Source Stats does a time calculation based on number of slides you have in your slideshow and about many slides per hour you cover.
var sourceStats = new SourceStats();
sourceStats.outputStats(slideshow, 25);
The output goes to the console.log
for now.