Block reference

Can you share that python code this thread ? Thank you. Indeed nice work around.

Agreed, this is a great workaround – would love to utilize the code if available and willing to share @kingname

In the long run, the idea is to have block reference at the level of headings. We still have a lot of work to do ahead. We have to first improve the update mechanism when you rename or move files/folders, we have to improve the handling/update of heading references and then there is a lot of work to do on building a search/query language on top of it.
After that, you can have block references at heading level.

Right now, I think you can achieve block reference at file level.

My anecdotal experience in the chat and forum is that users coming from other file based zettelkasten software (The Archive, etc) are used to file level reference/blocks and are already okay(ish).
Users coming from Roam, who are used to a fine(r ) level linking/addressing/embedding, feel the pain.

Obsidian will get better, it’ll take time, though.

17 Likes

Can’t you use ![[Page#definition]] ?

2 Likes

Thank you for the suggestion! This almost works for my use case, when I tried it in the above note example I get the following output:

Original file setup:
Markdown:


Rendered:

Markdown using the note embedding syntax

)

rendered result:

I am not sure why it has chosen to render it this way. Did I do something incorrect or should I reformat the original notes in a way that makes this type of cross referencing render correctly?

Thanks again!

EDIT: Fixed images

What I meant is that you have in your first file

# Definition
your definition

and in the other file you embed as

![[firstfile#definition]]

I think you are trying to use Obsidian as Roam, or better, you are trying to use obsidian as an outliner with bullet-level reference. Obsidian is not that.

2 Likes

I understand now, thank you for clarifying. You are correct that I was trying to use it as Roam – I will need to adapt the way that I take literature notes but your suggestion will work for my purposes at this stage.

Thanks again.

Why don’t we just use [[paragraph]] to implement paragraph block references? Since we can automatically update internal links now. It would be better if we create and see a internal link page without generate a .md file.

ok, let me publish the code to github.

Does that mean you have use it through a terminal?

For those who like inline embed…

.internal-embed {
	display: inline-flex;
}

5 Likes

Multi-line support

.internal-embed, 
.internal-embed > .markdown-embed,
.internal-embed > .markdown-embed > .markdown-embed-content,
.markdown-embed-content > * {
	display: inline;
}

.markdown-embed-link {
	position: static;
	display: inline;
}

8 Likes

yes, it does.

This works in most cases and is my recommended solution for most people for now: How to do block referencing in Obsidian

1 Like

Thanks, it’s helpful. I think it would be a good solution if these [[]] links with no actually content don’t generate .md files in the file explorer. Maybe we can open a temp file when we open this kind of link to see backlinks. What do you think about that?

I have to say that I’m with @ryanjamurphy . I’m actually doing legal work, and trying to incorporate that with Roam/Obisidian. I’m finding that block linking leads me to be less disciplined. I suppose that block level linking allows for longer notes, but right now I’m finding that my Roam is a mess. Maybe I’m just not getting it.

One plus with this feature in Roam is that it might help with epiphany thinking, for lack of a better word. Many folks want to use Roam as a generator of new knowledge and block level linking might aid with that.

I’ve seen Nate Eliason and Tiago Forte and David Perell (in reference to the response to @ryanjamurphy) do this type of content creation by swimming through their zettelkasten, but it feels a little artificial to me and falsely equates content creation with knowledge creation, but that’s just my opinion. It reminds me of when I was in undergrad and I found two or three quotes I liked then just researched around that to write a paper. Luhman’s zettelkasten approach, in my view, is a step or two beyond that, and I’m not sure block level linking necessarily aids greater understanding or knowledge creation, but it does generate greater potential for content creation.

In my context, which is the sphere of labour law and arbitration, I’m thinking I can get by with Obsidian - a note for each case law summary, and a note for each legal concept, and finally a note for each novel new idea I have (i.e. permanent notes). But since the application of labour law is so fact specific and precedent dependent, it is very rare that I would need a “permanent note”, I think. So maybe what I really need is a wiki rather than Roam or Obsidian. LOL.

6 Likes

Just because of block referencing? That does not sound convincing.

Block references and being an outliner are two sides of the same Roam coin. I suspect this is what produces the frequently described writing more and the possibility of mess is the other side of that coin.

1 Like

I’ve made a crude autohotkey script to create .md files out of text selections, then it puts the transclusion link in the clipboard ready for pasting… maybe someone can use it as a poor man’s ersatz of block reference.

details :
. choose a folder to store the snippets (edit the script to configure the folder’s location first). the script will create folder by month and store all snippers here
. select some text (from an obsidian doc, browser, etc…)
. CTRL+SHIFT+C (copy) or CTRL+SHIFT+X (cut) will create a new .md file in /snippets/yyyyMM/ :

vault/snippets/yyyyMM/xx_yyyyMMhhmmss-msec_%sourcewindowtitle%.md

. the link to the .md file is automatically copied in the clipboard and ready to be pasted in another obsidian doc as a transclusion (the script generates ![[linktosnippet]] and puts it in the clipboard).

my current css makes inline transclusion visible with a blue border on the left + red icon on the upper left side :

my use case is to split long files into smaller snippets that can be referenced elsewhere (poor-man’s text blocks in a way). So I select a piece of text, CTRL+SHIFT+X to cut and immediately CTRL+V at the same place : the original block of text has been replaced by a transclusion. The transcluded file is located in /snippets (at the very bottom of the list), I can then rename/move it elsewhere for storage (links will be updated as long as the file opration is made in obsidian).
Alternatively, I use CTRL+SHIFT+C to make “children blocks” that can be transcluded/edited without modifying the original reference.

DISCLAIMER :
The script is very limited, it’s text only, no images, no formatting. I’m not a coder, so it’s use at your own risk. backup/clone your docs before testing… It only work with AutoHotkey ANSI (autoHotkeyA32.exe) because it’s easier to deal with accents.

odsbn-autosnipp.zip (1.2 KB)

a small gif to see what it does
pbn3rlCJpx

13 Likes

Off topic, but what was the css you used to make embed logo and long line spanning the paragraphs of the embed?