From a3f26f79a7922fd0a031527622bbaa61a3f2676f Mon Sep 17 00:00:00 2001 From: Yu Cong Date: Mon, 13 Oct 2025 15:20:39 +0800 Subject: [PATCH] add an example --- README.md | 11 +++++++---- What is a group.pdf => example/What is a group.pdf | Bin .../algebraic_structures.md | 0 .../algebraic_structures.processed.md | 0 4 files changed, 7 insertions(+), 4 deletions(-) rename What is a group.pdf => example/What is a group.pdf (100%) rename algebraic_structures.md => example/algebraic_structures.md (100%) rename algebraic_structures.processed.md => example/algebraic_structures.processed.md (100%) diff --git a/README.md b/README.md index 9e1959d..4e345ac 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,17 @@ # Piecewise Readable Filter -This is a pandoc filter manipulating [fenced_divs](https://pandoc.org/MANUAL.html#extension-fenced_divs) in pandoc markdown. +This is a pandoc lua filter that manipulates [fenced_divs](https://pandoc.org/MANUAL.html#extension-fenced_divs) in pandoc markdown. -Inspired by [this joke](https://www.zhihu.com/question/586807834/answer/2973535981). +Inspired by [this joke](https://www.zhihu.com/question/586807834/answer/2973535981)(in chinese). -useful refs: +Example: `example/What is a group.pdf` + +Useful refs: - https://pandoc.org/lua-filters.html +- https://hackage-content.haskell.org/package/pandoc-types-1.23.1/docs/Text-Pandoc-Definition.html -# How does this work? +## How does this work? `filter.lua` walks the AST. There are some special leaf nodes with a `include` attr which is a string containing labels of some other divs to be included here. diff --git a/What is a group.pdf b/example/What is a group.pdf similarity index 100% rename from What is a group.pdf rename to example/What is a group.pdf diff --git a/algebraic_structures.md b/example/algebraic_structures.md similarity index 100% rename from algebraic_structures.md rename to example/algebraic_structures.md diff --git a/algebraic_structures.processed.md b/example/algebraic_structures.processed.md similarity index 100% rename from algebraic_structures.processed.md rename to example/algebraic_structures.processed.md