diff --git a/create-presentation b/create-presentation index 9b142ae..853439c 100755 --- a/create-presentation +++ b/create-presentation @@ -41,16 +41,20 @@ G.prez = sfig.presentation(); // Useful functions (not standard enough to put into an sfig library). -G.frameBox = function(a) { return frame(a).padding(5).bg.strokeWidth(1).fillColor('white').end; } +G.frameBox = function(a) { return frame(a).bg.strokeWidth(1).fillColor('white').end; } +G.bigFrameBox = function(a) { return frameBox(a).padding(10).scale(1.4); } + +G.bigLeftArrow = function(s) { return leftArrow(s || 100).strokeWidth(10).color('brown'); } +G.bigRightArrow = function(s) { return rightArrow(s || 100).strokeWidth(10).color('brown'); } +G.bigUpArrow = function(s) { return upArrow(s || 100).strokeWidth(10).color('brown'); } +G.bigDownArrow = function(s) { return downArrow(s || 100).strokeWidth(10).color('brown'); } -G.bigLeftArrow = function() { return leftArrow(100).strokeWidth(10).color('brown'); } -G.bigRightArrow = function() { return rightArrow(100).strokeWidth(10).color('brown'); } -G.bigUpArrow = function() { return upArrow(100).strokeWidth(10).color('brown'); } -G.bigDownArrow = function() { return downArrow(100).strokeWidth(10).color('brown'); } G.red = function(x) { return x.fontcolor('red'); } G.green = function(x) { return x.fontcolor('green'); } G.blue = function(x) { return x.fontcolor('blue'); } G.darkblue = function(x) { return x.fontcolor('darkblue'); } +G.brown = function(x) { return x.fontcolor('brown'); } +G.purple = function(x) { return x.fontcolor('purple'); } G.xseq = function() { return new sfig.Table([arguments]).center().margin(5); } G.yseq = function() { return ytable.apply(null, arguments).margin(10); } @@ -68,7 +72,7 @@ G.headerList = function(title) { G.node = function(x, shaded) { return overlay(circle(20).fillColor(shaded ? 'lightgray' : 'white') , x).center(); } G.indent = function(x, n) { return frame(x).xpadding(n != null ? n : 20).xpivot(1); } -G.stagger = function(b1, b2) { b1 = std(b1); b2 = std(b2); return overlay(b1, pause(), b2.replace(b1)); } +G.stagger = function(b1, b2) { b1 = std(b1); b2 = std(b2); return overlay(b1.numLevels(1), pause(), b2); } G.dividerSlide = function(text) { return slide(null, nil(), parentCenter(text)).titleHeight(0); diff --git a/examples/simple-presentation-node.js b/examples/simple-presentation-node.js deleted file mode 100644 index def218f..0000000 --- a/examples/simple-presentation-node.js +++ /dev/null @@ -1,4 +0,0 @@ -require('../internal/sfig.js'); -require('../internal/metapost.js'); -require('./simple-presentation.js'); -prez.writePdf({outPrefix: 'simple-presentation'}); diff --git a/examples/simple-presentation.js b/examples/simple-presentation.js index f4383d3..e8c4cb6 100644 --- a/examples/simple-presentation.js +++ b/examples/simple-presentation.js @@ -1,5 +1,7 @@ // Shows an example of a really simple presentation. -// Feel free to copy this to use as a template. + +require('../internal/sfig.js'); +require('../internal/metapost.js'); // Don't need math for this simple example sfig.enableMath = false; @@ -35,3 +37,5 @@ prez.addSlide(slide('Conclusion', bulletedText('Tutorial').linkToExternal('tutorial'), bulletedText('GitHub').linkToUrl('http://github.com/percyliang/sfig'), _)); + +prez.writePdf({outPrefix: 'simple-presentation'}); diff --git a/internal/sfig.js b/internal/sfig.js index dbe5a89..51f60fa 100644 --- a/internal/sfig.js +++ b/internal/sfig.js @@ -1532,7 +1532,7 @@ sfig.down = function(x) { return x * sfig.downSign; }; } sfig_.addProperty(Text, 'content', null, 'The string to be displayed.'); - sfig_.addProperty(Text, 'font', 'Noto Sans', 'Font to use to display the text.'); + sfig_.addProperty(Text, 'font', 'Arial', 'Font to use to display the text.'); sfig_.addProperty(Text, 'fontSize', 28, 'Font size to use to display the text.'); sfig_.addProperty(Text, 'width', null, 'Affects wrapping (default: Slide width)'); sfig_.addProperty(Text, 'bulleted', null, 'Whether to prepend a bullet');