From 38e9be7b09e6fc53537fb85ebfb630b29f8df15e Mon Sep 17 00:00:00 2001 From: SebastianMC Date: Sat, 6 Aug 2022 17:01:20 +0200 Subject: [PATCH] Documentation updates (added examples for sorting by Roman and compound Roman) --- README.md | 44 +++++++++++++++++++++++++++ docs/svg/roman-chapters.svg | 60 +++++++++++++++++++++++++++++++++++++ docs/svg/roman-suffix.svg | 60 +++++++++++++++++++++++++++++++++++++ 3 files changed, 164 insertions(+) create mode 100644 docs/svg/roman-chapters.svg create mode 100644 docs/svg/roman-suffix.svg diff --git a/README.md b/README.md index c4f7f96..6883619 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,8 @@ Take full control of the order of your notes and folders in File Explorer - order configuration stored directly in your note(s) front matter - use a dedicated key in YAML +## Table of contents + ## TL;DR Usage For full version of the manual go to [./docs/manual.md]() and [./docs/syntax-reference.md]() @@ -247,6 +249,48 @@ The effect is: ![Order by numerical suffix](./docs/svg/by-suffix.svg) +### Example 10: Sample book structure with Roman numbered chapters + +Roman numbers are also supported. This example uses the `\R+` token in connection with the wildcard `...` + +The line `Chapter \.R+ ...` says: notes (or folders) with a name starting with 'Chapter ' followed by a Roman number (e.g. I, or iii or x) should be grouped. +Then ` < a-z` (the leading space indentation is important) tells to use ascending order by that number (alphabetical is equivalent to ascending for numbers) + +```yaml +--- +sorting-spec: | + target-folder: Book + Preface + Chapter \R+ ... + < a-z + Epi... +--- +``` + +it gives: + +![Book - Roman chapters](./docs/svg/roman-chapters.svg) + +### Example 11: Sample book structure with compound Roman number suffixes + +Roman compound numbers are also supported. This example uses the `\.R+` token (a Roman compound number with '.' as separator) in connection with the wildcard `...` (and the important SPACE inbetween). + +The line `... \.R+` says: notes (or folders) with a name ending with a compound Roman number (e.g. I, or i.iii or iv.vii.x) should be grouped with ascending order by that compound number (no additional specification of sorting defaults to alphabetical or ascending for numbers) + +```yaml +--- +sorting-spec: | + target-folder: Research pub + Summ... + ... \.R+ + Final... +--- +``` + +the result is: + +![Book - Roman compond suffixes](./docs/svg/roman-suffix.svg) + ## Location of sorting specification YAML entry You can keep the custom sorting specifications in any of the following locations (or in all of them): diff --git a/docs/svg/roman-chapters.svg b/docs/svg/roman-chapters.svg new file mode 100644 index 0000000..973bee0 --- /dev/null +++ b/docs/svg/roman-chapters.svg @@ -0,0 +1,60 @@ + + + + + Produced by OmniGraffle 7.20\n2022-08-06 14:46:09 +0000 + + Roman chapters + + Layer 1 + + + + + + Book + + + + + Preface + + + + + Chapter I - How it all began + + + + + Chapter V - Expect the unexpected + + + + + Chapter XIII - Why? + + + + + + + My Vault + + + + + Chapter L - Happy ending? + + + + + + + + Epilogue + + + + + diff --git a/docs/svg/roman-suffix.svg b/docs/svg/roman-suffix.svg new file mode 100644 index 0000000..ef6a95b --- /dev/null +++ b/docs/svg/roman-suffix.svg @@ -0,0 +1,60 @@ + + + + + Produced by OmniGraffle 7.20\n2022-08-06 14:27:13 +0000 + + Roman sections + + Layer 1 + + + + + + Research pub + + + + + Summary + + + + + Why is this needed? I + + + + + Additional rationale. I.iii + + + + + All the details. vii + + + + + + + My Vault + + + + + The promising outcomes. L + + + + + + + + Final words + + + + +