Skip to content

思源笔记插件,用块引实现脚注功能 A plugin of SiYuan Note, using block references to implement footnote annotations

License

Notifications You must be signed in to change notification settings

Achuan-2/siyuan-plugin-blockref-footnote

Repository files navigation

✨Features

Implement footnotes and remarks function using SiYuan's blockref.

Using the Tsundoku theme for demonstration, the style of nested blockquote has been optimized.

📝Usage Instructions

The minimum required version of Siyuan Notes for this plugin is v3.1.13.

This plugin supports high customization with the following settings:

  • Footnote Storage Settings

    • Footnote Location: You can set footnotes to be stored in the current document, specified document, sub-document, or after parent block. Default is Current Document.
    • Document ID for Specified Document: When footnote location is "Specified Document", set a document to store all footnotes.
    • Container Title in Current Document: When using current document storage, set the h2 heading for footnotes.
    • Container Title in Specified Document: When using specified document storage, set the h2 heading for footnotes.
    • Container Title in Sub-document: When using sub-document storage, set the document title for footnotes.
    • Auto Update Container Title: Whether to automatically update the container title to match template settings when creating footnotes.
    • Footnote Insertion Order: Ascending or descending order, default: Ascending.
  • Footnote Style Settings

    • Reference Style: Choose between "Block Reference" or "Block Link".

    • Reference Anchor Text: Set the anchor text for footnote references, default: [Note].

    • Selected Text Style: Choose between no style or custom style, default: No Style. Note: For overlapping text footnotes, disable custom styling to avoid conflicts.

    • Footnote Content Template: Set template for footnotes using nested quotes or super blocks. Variables: ${selection} (selected text), ${content} (footnote content), ${refID} (block ID). Supports kramdown syntax for block styling.

      • Nested Quote Template:
      >> ${selection} [[↩️]](siyuan://blocks/${refID})
      >> 
      > 💡${content}
      • Vertical Super Block Template:
      {{{row
      > ${selection} [[↩️]](siyuan://blocks/${refID})
      
      ${content}
      }}}
      {: style="border: 2px dashed var(--b3-border-color);"}
      • List Item Template with Backlinks:
      -  ((${refID} "${selection}"))
      
        {{{row
        ${content}
        }}}

Supports simultaneous deletion of footnote references and content via right-click menu [Plugin -> Delete Footnote].

Supports multiple annotations for the same text.

🙏Acknowledgments

❤️Donation

A poor graduate student in the process of studying. If you like my plugin, feel free to star the GitHub repository and donate. This will motivate me to continue improving this plugin and developing new ones.

2024.11.20, thanks to muhaha for donating ¥30

2024.11.27, thanks to 若为雄才 for donating ¥1

2024.11.28, thanks to sweesalt for donating ¥20

2024.11.30, thanks to 赐我一月半 for donating ¥10

About

思源笔记插件,用块引实现脚注功能 A plugin of SiYuan Note, using block references to implement footnote annotations

Resources

License

Stars

Watchers

Forks

Packages

No packages published