From 653e135b1ae74da7c98e582cc8e42f44473b2bc0 Mon Sep 17 00:00:00 2001 From: whatacold Date: Tue, 13 Nov 2018 12:58:12 +0800 Subject: [PATCH] Fix #356: support width and height in percentage. --- ox-reveal.el | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ox-reveal.el b/ox-reveal.el index b744daa..6798406 100644 --- a/ox-reveal.el +++ b/ox-reveal.el @@ -671,11 +671,15 @@ overview: %s, ;; slide width (let ((width (plist-get info :reveal-width))) - (if (> width 0) (format "width: %d,\n" width) "")) + (cond ((and (integerp width) (> width 0)) (format "width: %d,\n" width)) + ((stringp width) (format "width: '%s',\n" width)) + (t ""))) ;; slide height (let ((height (plist-get info :reveal-height))) - (if (> height 0) (format "height: %d,\n" height) "")) + (cond ((and (integerp height) (> height 0)) (format "height: %d,\n" height)) + ((stringp height) (format "height: '%s',\n" height)) + (t ""))) ;; slide margin (let ((margin (string-to-number (plist-get info :reveal-margin))))