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

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

[nongnu] elpa/toc-org 2c4ff18a4e 092/128: document quote functionality


From: ELPA Syncer
Subject: [nongnu] elpa/toc-org 2c4ff18a4e 092/128: document quote functionality
Date: Sun, 2 Jan 2022 09:59:12 -0500 (EST)

branch: elpa/toc-org
commit 2c4ff18a4ed56395ead1bb2efa0e844e5f954709
Author: Sergei Nosov <sergei.nosov@gmail.com>
Commit: Sergei Nosov <sergei.nosov@gmail.com>

    document quote functionality
---
 README.org      | 12 +++++++++++-
 toc-org-test.el |  4 ++--
 2 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/README.org b/README.org
index 8897bc68d7..40934e3848 100644
--- a/README.org
+++ b/README.org
@@ -10,7 +10,8 @@ It is similar to the 
[[https://github.com/ardumont/markdown-toc][markdown-toc]]
 *NOTE:* Previous name of the package is =org-toc=. It was changed because of a
 name conflict with one of the org contrib modules.
 
-* Table of Contents                                                     :TOC:
+* Table of Contents                                                     
:TOC:QUOTE:
+#+BEGIN_QUOTE
 - [[#about][About]]
 - [[#installation][Installation]]
   - [[#via-packageel][via package.el]]
@@ -18,9 +19,11 @@ name conflict with one of the org contrib modules.
 - [[#use][Use]]
   - [[#follow-links][Follow links]]
   - [[#exclude-headings][Exclude headings]]
+  - [[#quote-table-of-contents][Quote table of contents]]
   - [[#shortcut-for-toc-tag][Shortcut for TOC tag]]
 - [[#different-href-styles][Different href styles]]
 - [[#example][Example]]
+#+END_QUOTE
 
 * Installation
 ** via package.el
@@ -92,6 +95,13 @@ has a similar meaning in =org-mode=, which I hope is a Good 
Thing (tm). However,
 =:noexport_1:= and friends won't be recognized by =org-mode= as anything
 special. Look at =org-export-exclude-tags= variable for more details.
 
+** Quote table of contents
+
+For presentation purposes, you might want to put the table of contents in a
+quote block (i.e. =#+BEGIN_QUOTE= / =#+END_QUOTE=). In that case, GitHub, for
+example, will add a vertical line to the left of the TOC that makes it distinct
+from the main text. To do this, just add a =:QUOTE:= tag to the TOC heading.
+
 ** Shortcut for TOC tag
 
 In your emacs' setup, you can bind a tag =:TOC:= to a binding =T=:
diff --git a/toc-org-test.el b/toc-org-test.el
index 9a51d33b57..a9b34a4157 100644
--- a/toc-org-test.el
+++ b/toc-org-test.el
@@ -222,8 +222,8 @@
      "* About\n:TOC:\n drawer\n:END:\n\ntoc-org is a utility to have an 
up-to-date table of contents in the\norg files without exporting (useful 
primarily for readme files on\nGitHub).\n\nIt is similar to the 
[[https://github.com/ardumont/markdown-toc][markdown-toc]] package, but works 
for org files.\n:TOC:\n  drawer\n:END:\n* Hello\n** Good-bye\n*** Salut\n* 
Table of Contents                                                     
:TOC_3:QUOTE:\n#+BEGIN_QUOTE\n- [[#about][About]]\n- [[#hell [...]
 
     (test-toc-org-insert-toc-gold-test
-     (concat beg ":QUOTE:TOC_3_gh:")
-     "* About\n:TOC:\n drawer\n:END:\n\ntoc-org is a utility to have an 
up-to-date table of contents in the\norg files without exporting (useful 
primarily for readme files on\nGitHub).\n\nIt is similar to the 
[[https://github.com/ardumont/markdown-toc][markdown-toc]] package, but works 
for org files.\n:TOC:\n  drawer\n:END:\n* Hello\n** Good-bye\n*** Salut\n* 
Table of Contents                                                     
:QUOTE:TOC_3_gh:\n#+BEGIN_QUOTE\n- [[#about][About]]\n- [[#h [...]
+     (concat beg ":QUOTE:hello:TOC_3_gh:")
+     "* About\n:TOC:\n drawer\n:END:\n\ntoc-org is a utility to have an 
up-to-date table of contents in the\norg files without exporting (useful 
primarily for readme files on\nGitHub).\n\nIt is similar to the 
[[https://github.com/ardumont/markdown-toc][markdown-toc]] package, but works 
for org files.\n:TOC:\n  drawer\n:END:\n* Hello\n** Good-bye\n*** Salut\n* 
Table of Contents                                                     
:QUOTE:hello:TOC_3_gh:\n#+BEGIN_QUOTE\n- [[#about][About]]\n [...]
 
     (test-toc-org-insert-toc-gold-test
      "* H1\n* H2\n* TOC           :TOC:\n - [[#header-1][Header 1]]\n - 
[[#header-2][Header 2]]\n"



reply via email to

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