Block reference

For me, it is because, instead of just a line with text around the [[topic]], a block of text retains more meaningful information. Therefore, you won’t need to go back to the original back an fourth to capture that information. So everything you need is within one page for you to review.

Another way is to let user manually control how many words (or sentences) around the [[topic]] can be shown. I remember the original idea of the system mentioned that the “card board” should contains around 3 sentences. I think it make sense. I don’t need a whole paragraph, but a few concise sentences would be sufficient to convey a meaningful information.

2 Likes

For me, it’s not so much wanting block references, but instead just wanting the paragraph/ bullet point that the backlink refers to in the backlink sidebar. Seeing what everyone has said so far, I guess it’s not as easy as detecting a where a paragraph/ bullet point starts and ends for the backlink. Being able to edit it in the backlink itself in the sidebar is secondary to me.

3 Likes

it is not necessary to link to a line, paragraph/bullet is just enough.

I have a simple solution and I have already implemented it in Python. By this implement, you could refer any paragraph of all existed document in all vault in the time complexity of O(1). but I don’t know if you could port the python version code to obsidian.md .

1 Like

O(1) is certainly good. Mind sharing the code?

So markdown already has a block feature, but it’s currently only used for code. But what if it didn’t have to be. I think you can totally use a code block for block references without breaking markdown.

You do it by decorating the start and end tags for the code block like this.

```text
This is some very fancy text I want to quote elsewhere
```[fancy_quote_link]

In code blocks, the header token decorator usually tells the linter what language is in the code block, but what if it could be used for more than that. In this example, I just called it text, but Obsidian could create it’s own tag just for block references. With plugins, you have one for quotes and one for bible verses, both handled (and displayed) differently in the Markdown engine.

At the other end, the bottom of a code block is a wasted line with the footer token. Why not use that line to demarcate the name of the block. This could be a GUID that’s generated by Obsidian, or some memorable text created by you.

From there, you toss around [fancy_quote_link], and Obsidian handles the block reference in the background.

16 Likes

I will gladly second this feature request and emphasize a use case scenario that utilizes block references in a way that I am not sure how to duplicate in obsidian at present (if anyone has suggestions though please let me know!)

When I am taking notes from a mathematical text, there are many definitions that one has to keep track of when attempting to write proofs. For example the following definitions are in my page corresponding to notes from a math text:

image

Some way down through the notes, there is another entry which refers to a theorem and linked note page containing the proof.

image

On the page which contains the actual proof, I use block references which pull in relevant definitions or theorems that are required for actually proving the theorem.

In roam this has the added benefit of allowing me to also see all the places where I have used the block reference, and hence give me knowledge context as to how the theorem or definition is used in practice (e.g. this definition is used in these proofs or problems…)

image

8 Likes

I think the area formed by ### H123·· can be used to replace the block, but the premise is that these H1, H2, H3 can be searched out by (()), instead of finding the page first and then looking for these titles

2 Likes

fantastic idea.

I use reverse index which is the basic principle of elasticsearch to reindex the file name, title and the paragraph. It is a terminal program based on Python, when you type the keywords on it, it will show suggestions while you are typing. you could use keyboards to select the correct one and then this one will be copied to your pasteboard automaticlly. then, just paste the copied content at obsidian.

2 Likes

I strongly agree with you. Limited by the system structure based on markdown files, it is easier to make a little upgrade on searching mechanism in (()).

fantastic!!
only if with an upgrade of searching mechanism to enable quick searching for blocks.

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.