emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/org-superstar 4e5bccbb2b 128/162: Adding demos for Org Sup


From: Stefan Kangas
Subject: [nongnu] elpa/org-superstar 4e5bccbb2b 128/162: Adding demos for Org Superstar.
Date: Fri, 31 Dec 2021 19:35:37 -0500 (EST)

branch: elpa/org-superstar
commit 4e5bccbb2bcd216a6302d56b6b060896195b6071
Author: D. Williams <d.williams@posteo.net>
Commit: D. Williams <d.williams@posteo.net>

    Adding demos for Org Superstar.
---
 DEMO.org         | 105 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 README.org       |   6 +++-
 org-superstar.el |   2 +-
 3 files changed, 111 insertions(+), 2 deletions(-)

diff --git a/DEMO.org b/DEMO.org
new file mode 100644
index 0000000000..ddf532bb30
--- /dev/null
+++ b/DEMO.org
@@ -0,0 +1,105 @@
+#+TITLE:Demo Reel
+
+Here I present a couple of screen shots for a variety of simple
+configurations (source included).  Regarding the primary fonts used, I
+picked:
+ * *DejaVu Sans Mono* for graphical sessions
+ * *Liberation Mono* for terminal sessions.
+
+The file used for all demos can be found in ~tests/sample.org~.
+
+* Vanilla
+
+This is the current default experience you get when using vanilla
+Emacs (~emacs -q~) and only do the absolute minimum to set up Superstar
+automatically.
+
+  #+BEGIN_SRC emacs-lisp
+  (add-hook 'org-mode-hook
+            (lambda ()
+              (org-superstar-mode 1)))
+  #+END_SRC
+
+** Graphical Session
+[[file:demos/vanilla.png]]
+** Terminal Session
+[[file:demos/vanilla_term.png]]
+
+* LaTeX-style headings
+  As the title suggests, this setup provides a quick alternative to
+  the Emacs typical [[https://www.emacswiki.org/emacs/AngryFruitSalad][angry 
fruit salad look]], replacing it with a more
+  in-print style.
+  #+BEGIN_SRC emacs-lisp
+    ;;; Titles and Sections
+    ;; hide #+TITLE:
+    (setq org-hidden-keywords '(title))
+    ;; set basic title font
+    (set-face-attribute 'org-level-8 nil :weight 'bold :inherit 'default)
+    ;; Low levels are unimportant => no scaling
+    (set-face-attribute 'org-level-7 nil :inherit 'org-level-8)
+    (set-face-attribute 'org-level-6 nil :inherit 'org-level-8)
+    (set-face-attribute 'org-level-5 nil :inherit 'org-level-8)
+    (set-face-attribute 'org-level-4 nil :inherit 'org-level-8)
+    ;; Top ones get scaled the same as in LaTeX (\large, \Large, \LARGE)
+    (set-face-attribute 'org-level-3 nil :inherit 'org-level-8 :height 1.2) 
;\large
+    (set-face-attribute 'org-level-2 nil :inherit 'org-level-8 :height 1.44) 
;\Large
+    (set-face-attribute 'org-level-1 nil :inherit 'org-level-8 :height 1.728) 
;\LARGE
+    ;; Only use the first 4 styles and do not cycle.
+    (setq org-cycle-level-faces nil)
+    (setq org-n-level-faces 4)
+    ;; Document Title, (\huge)
+    (set-face-attribute 'org-document-title nil
+                        :height 2.074
+                        :foreground 'unspecified
+                        :inherit 'org-level-8)
+
+    ;; Auto-start Superstar with Org
+    (add-hook 'org-mode-hook
+              (lambda ()
+                (org-superstar-mode 1)))
+  #+END_SRC
+
+** Graphical Session
+[[file:demos/LaTeX.png]]
+** Terminal Session
+[[file:demos/LaTeX_term.png]]
+
+* Customized Bullets and Terminal Fallback
+  This time we want all of the above but a little more personalized.
+  First off, lets make bullets a little more chunky.  Mind that the
+  height we provide for bullet faces is not the /actual/ height of a
+  bullet, but its height /relative to/ its surroundings.  Additionally,
+  let's hide the leading stars for terminal, as the default leader
+  does not look all that good in my chosen terminal font.  I make use
+  of the fact that ~org-superstar-leading-fallback~ can be set to the
+  space character.  This has the nice advantage over
+  ~org-hide-leading-stars~ that it does not just "paint over" the
+  asterisks, but makes them completely indistinguishable from white
+  space, neat!
+
+  #+BEGIN_SRC emacs-lisp
+    (with-eval-after-load 'org-superstar
+      (set-face-attribute 'org-superstar-item nil :height 1.2)
+      (set-face-attribute 'org-superstar-header-bullet nil :height 1.2)
+      (set-face-attribute 'org-superstar-leading nil :height 1.3))
+    ;; Set different bullets, with one getting a terminal fallback.
+    (setq org-superstar-headline-bullets-list
+          '("◉" ("🞛" ?◈) "○" "▷"))
+    ;; Stop cycling bullets to emphasize hierarchy of headlines.
+    (setq org-superstar-cycle-headline-bullets nil)
+    ;; Hide away leading stars on terminal.
+    (setq org-superstar-leading-fallback ?\s)
+  #+END_SRC
+
+** Graphical Session
+[[file:demos/bullets.png]]
+** Terminal Session
+[[file:demos/bullets_term.png]]
+
+* Org Inline Tasks
+  Inline tasks behave as you would expect them to, for the most part.
+  They have two bullets instead of one, but are otherwise treated the
+  same as regular headlines by Org Superstar.
+
+
+#  LocalWords:  demos DejaVu inline Org
diff --git a/README.org b/README.org
index 244c6a19e2..92fed145e8 100644
--- a/README.org
+++ b/README.org
@@ -2,7 +2,7 @@
 #+STARTUP: showeverything
 
[[https://melpa.org/#/org-superstar][file:https://melpa.org/packages/org-superstar-badge.svg]]
 
[[https://stable.melpa.org/#/org-superstar][file:https://stable.melpa.org/packages/org-superstar-badge.svg]]
 
-[[sample_image.png]]
+[[file:sample_image.png]]
 
 * About
   Prettify headings and plain lists in Org mode.  This package is a
@@ -52,6 +52,10 @@ used, allowing the user to inherit the level-dependent 
default look.
         contribute (for example, by testing the volatile version) see
         [[https://github.com/integral-dw/org-superstar-mode/issues/5][this 
issue]].  The README will be updated soon.
 
+* Demos
+  You can find a small demo reel with a variety of configurations
+  [[file:DEMO.org][here]].
+
 * Installation
 
   The package is available [[https://melpa.org/#/org-superstar][on MELPA]]!
diff --git a/org-superstar.el b/org-superstar.el
index 618e614652..d6bf387a0b 100644
--- a/org-superstar.el
+++ b/org-superstar.el
@@ -49,7 +49,7 @@
 ;; the goal of inheriting features the author liked about org-bullets
 ;; while being able to introduce compatibility-breaking changes to it.
 ;; It is largely rewritten, to the point of almost no function being
-;; identical to it's org-bullets counterpart.
+;; identical to its org-bullets counterpart.
 
 ;; This package is versioned using (the author's understanding of)
 ;; semantic versioning: "<major>.<minor>.<patch>".



reply via email to

[Prev in Thread] Current Thread [Next in Thread]