God i want that so much. Is what i always did, still do when i use Notion and what i miss most about OneNote.
Some hackways of achieving something close to it would be tables or a fold (bullet point or headings, with the settings set to fold then), but wouldnt be the same. A 2 collum table can work but it would squeeze both contents (and would require part of the main text to be inside of the table). Making a bullet point for folding you could write the sidenote bellow it, and it would be hideable (folding the bullet point).
+1 for a snippet that helps with that, or a theme, anything
I was more thinking about using the footnotes as sidenotes because it makes to me more sense to see them right were they got referenced then at the bottom of a long document.
I got to an elegant snippet solution I really love (works only in live preview) that reformats both comments (the markdown syntax being %% on either side) and inline footnotes (written as so: ^[your footnote here]) into side comments in the right margin. I prefer using this with the inline footnote syntax instead of comments. & of course feel free to change the colors to your preference. See below:
Can you elaborate on the variables that might be tweaked? (I know… That’s basically “teach me how to internet… plez…”)
Maybe addressing my use case(s)?
Would like to be able to utilize [[ ]]-type links from within the %%comment and ^[footnote] but my tweaks to what seems tweakable in the snippet ain’t working.
I just get loops of shaded boxes with one [ or some such.
Have also been toying with sub-/super-scripts as another inline, ‘linkable’ annotation within the text. Idea is to just have sub/sup display smaller, offset, inline comments/footnotes.
Example Snippets: (from a rabbit trail leading back to Gwern’s website and discussion of Tufte CSS and sidenotes, as implemented there: https://www.gwern.net/Sidenotes#)
sub, sup {
/* Specified in % so that the sup/sup is the
right size relative to the surrounding text */
font-size: 75%;
/* Zero out the line-height so that it doesn't
interfere with the positioning that follows */
line-height: 0;
/* Where the magic happens: makes all browsers position
the sup/sup properly, relative to the surrounding text */
position: relative;
/* Note that if you're using Eric Meyer's reset.css, this
is already set and you can remove this rule */
vertical-align: baseline;
/* Prevent sup and sub from rendering text-decoration */
display: inline-block;
}
<style>
sup {
/* Move the superscripted text up */
top: -0.7em;
color: #eee;
}
sub {
/* Move the subscripted text down, but only
half as far down as the superscript moved up */
bottom: -0.5em;
}
and this one, which was an attempt to inline a sup directly over a sub:
Works relatively well, but would be great if we had a native/add-on function that allowed for inline annotation and disambiguation which also made use of the graphing functionality within Obsidian.
I’ve found that this snippet workaround doesn’t work with any syntax inside the comment or inline footnote! Aka you can only have plain, unformatted text as a comment — no italic, bold, wikilinks, external links, highlight, etc.
Thanks for sharing this solution. It works great for leaving notes/reminders/ideas to myself while drafting. I changed the colors for a more subdued look, going in light and dark mode. I switch back and forth. I think a cool comments plugin could be made to flesh out this functionality. A toggle to show/hide comments for a document would be cool. This could switch css snippets from regular to display none. Maybe I could use the snippet manager plugin to do that. Seems clunky, but just thinking out loud. Another nice thing about this solution is that the comment box dims when using focus mode. I like the typewriter scroll plugin, with it’s separate focus mode toggle.
I recreated the document navigator panel I loved in Writemonkey by using query blocks. You can get a list of all the comments in a list form. My file Has three ways of navigating, overkill, but can be useful.
Thanks again for sharing your css. I like how this creates a comment system that is non intrusive.
I’m using Duo.
Some hack css, but I am hiding the comment box for non active lines in focus mode with the comment icon still showing. So I am hiding the element, but showing the ‘after’ part. You can’t use display none. That is why I had to use a hackish work around.
This could be cleaned up, and maybe there is a better way to do it, but I got it working. Now when I toggle zen mode, the comments disappear. Also works in dark mode. I took a little css from the typewriter zen focus css and used it in your css snippet.
This css sidenotes solution is really useful and impressive, but the biggest problem is what you had mentioned… It can only work with plain text without any extra syntax. I am glad to know if there is any solution to solve this problem.