Plugin: Sidenotes

I’m glad you dig it too. Let me know if you have any issues with it - actual bugs or just feature suggestions.

I haven’t tried adding it to the Community Plugins yet because I’ve been viewing it as still in a beta stage. However, its been a few weeks now where I haven’t really heard about any bugs. So I’ll consider adding it soon.

1 Like

Will this plugin be adapted for the Android version?

Thank you

By Android, I’m guessing you mean using this in the mobile context? While the plugin should run in any Obsidian installation, it hides the sidenotes if the screen is under a certain width so this makes mobile use impractical.

Sidenotes are meant to sit in the left or right margin and smartphone screens are typically vertically oriented so there’s not much left/right margin.

Realistically, in a mobile context, I think it makes sense just to use traditional footnotes but if you have any suggestions let me know.

I published an updated version: 0.3.8.

This fixes some reported issues:

  • Collision detection. It should keep sidenotes from overlapping. If you see this still happening please create an issue.
  • Font size inconsistencies. If a sidenote or margin note was added to a header, the font size would display as larger. Now it will retain default font size.
1 Like

I pubished version 0.3.9

The PDF export feature should work much better.

Fixed:

  • PDF export with HTML sidenotes: Bug with PDF export with HMTL sidenotes that caused the sidenote text to show in the main content of the exported file.
  • Source Mode with Footnotes: It was still displaying sidenotes in the margin. Now it hides these in favor of showing the bare Markdown content.

New:

  • PDF Export with Footnotes: PDF export now works with both footnotes and HTML sidenotes

I have been looking for something like this for —I swear, months.

Everything was either defunct, used some kind of comment structure that took it outside of the note, coding that made it totally unreadable as a comment if I turned off the plugin / was looking at the source (might be useful for agents, I don’t use agents!), requires css classes that I’m guaranteed to forget to put in, Cornell Notes styling that (while also cool - love m/Marginalia! - doesn’t quite work for really nitpicky, non-whole-topic Tufte/Genius-Lyrics-type annotations, which is a lot of what I’m trying to do) or makes use of an aside (which I like and use in other ways, but which are INCREDIBLY hard to get in the right place because callouts naturally need to be on their own line to indicate the Markdown).

This — at least from what I can tell — has neatly solved my problems and I wasn’t even looking for it when I came over here! I hope you do consider putting it on the official plugins!

1 Like

Glad to hear it @winged. I made it for the same reasons. I’d been looking for it and none of them fully worked.

If you have any problems with it, or suggestions let me know. Cheers.

Edit: Btw I will be submitting it for the official Community Plugins soon. I just wanted to give it time enough to make sure it’s stable. I think it’s almost there. I recently still had a user report that sidenotes colliding with each other occasionally. Part of the code is meant to keep this from happening. I reworked it so that, hopefully, it’s working better. If so, then I’ll submit it.

The plugin is now being renamed Side-Notes**.**

Another plugin existed in the Community Plugins called “SideNotes” so I had to change mine slightly.

For those already using the plugin: Change the folder name of the plugin to side-noteswhen you update to 0.4.2.

I released 0.4.3, fixing a bug in the “export to PDF” functions.

Also, Side-Notes is now officially listed in Community Plugins.

1 Like

I released 0.4.4

This primarily fixed a bug with HTML sidenotes that caused sidenotes to display inconsistently in Reading Mode.

I released 0.4.6

This finally added the functionality of adding a sidenotes in either margin (the crowd goes wild).

You heard me. Both. Margins.

Thanks @RepresentatiON and @Clueless-coder for the suggestions. It took me a while to get back around to it but hopefully its helpful.

New:

  • Command Insert sidenotes (opposite margin) - If the default is the left margin, this will add a sidenote in the right margin. Here’s how this is written in the note:
    • HTML: add a right or left class, e.g. <span class="sidenote right">text</span>
    • Footnotes: append -r or -l to the footnote ID, e.g. [^3-r]
  • Command Insert margin note (opposite margin) -
    • HTML: add a right/left class
    • Footnotes: -r/-l suffix to the margin note ID, e.g. [^mn-2-l]).

Fixes:

  • When adding a new sidenote (footnotes), the default text is now selected, making it easy to type over this

  • Code cleanup

2 Likes

In 0.4.8

New

I’ve disabled editing sidenotes while in Reading Mode. This was originally included at the request of a user but it has caused a number of little bugs. In favor of simplifying things I’m removing it for the time being.

Fixes

  • Export to PDF cache issue: Immediately after updating a sidenote, if one exported to PDF it would display the sidenote as it was before it was changed
  • Alignment of sidenotes in Reading Mode: Some sidenotes, especially ones referenced from lists, were displaying misaligned horizontally, colliding with the note text
  • Lots of code refactoring

Known issue

  • Sidenotes don’t work in callouts. Hopefully I’ll have this worked out in an upcoming release.
1 Like

Hello, first of all, congratulations on the plugin. The design is very nice. I would like to know how to make the cursor return to where I left off in the text. Specifically, when I finish typing the note, the cursor jumps back to before the [^1].

1 Like

That’s a useful suggestion. I’ll see what I can do place the cursor after the new side note.

In 0.5.1, I’ve fixed a few things related to cursor placement:

  • Cursor placement after editing (footnotes only): When creating a new sidenote, after pressing enter, it now places the cursor back in the note right after the sidenote reference. When editing an existing one, it puts the cursor back wherever it was last.
  • Cursor movement around superscript numbers (footnotes only): If, in the settings, the plugin is set to replace footnote references (e.g. [^1]) with a superscript number visually, this superscript number is added “artificially” by the plugin - the raw Markdown still says something like [^1]. This meant that it took pressing an arrow key 4-5 times to move past that spot in the text. Now one can move past these more seamlessly like it’s any other character in the note.

Congratulations one more time! Thank you so much!

1 Like