RyotaUshio / obsidian-pdf-plus

The most Obsidian-native PDF annotation, viewing & editing tool ever. Comes with optional Vim keybindings.
https://ryotaushio.github.io/obsidian-pdf-plus/
MIT License
730 stars 15 forks source link

Allow us bi directional linking [FR] #57

Closed KuecukMimarBey closed 7 months ago

KuecukMimarBey commented 7 months ago

First of all thank you for this great plug in

It would be great if we could insert links into the pdf

It would be so much simplier if we could handle any pdf like an normal file, why ? so we can bi-directional linking ...

Is this possible ?

RyotaUshio commented 7 months ago

Can you explain your request more clearly? For example, links from what to what?

KuecukMimarBey commented 7 months ago

Creating links inside our pdfs to our md - files

Could you tell me which part you didnt get ?

RyotaUshio commented 7 months ago

I see. What I didn't get was

for linking files to e.g images & graphs

but now it's clear.

The current status of this plugin is:

  1. Markdown to PDF: possible with Obsidian's built-in features.
  2. A PDF to the same PDF: already possible with PDF++.
  3. A PDF to a different PDF: not implemented yet, but possible.
  4. PDF to markdown: not implemented yet, but possible.

For 2, all the links you copy within a PDF can be "pasted" into any text selection in the same PDF file if you enable PDF file editing.

3 & 4 are technically possible, but probably I will not add them to PDF++ in the short term. This is because it is hard to auto-update links inside PDFs when the target file is renamed, unlike in the case of markdown files. I don't want to have a lot of links in my PDFs that will not work once I rename the target files.

However, you can achieve something like bi-directional linking without these kinds of concerns with the existing features of PDF++.

Demo videos can be found here: https://ryotaushio.github.io/obsidian-pdf-plus/backlink-highlighting-basics.html

RyotaUshio commented 7 months ago

From the docs

(Obsidian's native PDF deep linking) doesn't work in the opposite way. While jumping to a text selection in a PDF from a markdown file works like a charm, you can't go to the markdown file linking to the text selection. ...

Here's where PDF++ comes in.

RyotaUshio commented 7 months ago

So if you want to jump from a text in the PDF to a markdown file, just copy a link to the text selection in the PDF viewer and paste it into the markdown file.

Then, you will be able to go to the markdown file by double-clicking on the text highlight in the PDF. Of course, you can go the other way by clicking the link pasted in the markdown file.

KuecukMimarBey commented 7 months ago

"However, you can achieve something like bi-directional linking without these kinds of concerns with the existing features of PDF++.

You can double-click a text highlight or annotation to open the backlink (i.e. the markdown file that links to the highlight)"

Thank you i just tested it and it works

it is with some friction, so i was thinking ... Is it possible to add the automatic window which apears when we use the bracklets [[ ]] to insert the right - obsidian file link ?

right know it would be more than enough if the above feature would be possible my conserns about the automatic updating of links when i rename them are quite less and i can see myself to do it manuelly

RyotaUshio commented 7 months ago

Is it possible to add the automatic window which apears when we use the bracklets [[ ]] to insert the right - obsidian file link ?

Where and when do you want the popup to show up? And what do you expect to happen after you select one of the suggestions? (Please describe your idea clearly)

my conserns about the automatic updating of links when i rename them are quite less and i can see myself to do it manually

I'm still very concerned so it's unlikely to happen in the near future, but if you could do pull requests I will happily review them.

KuecukMimarBey commented 7 months ago

Thank you

Where and when do you want the popup to show up? And what do you expect to happen after you select one of the suggestions? (Please describe you idea clearly

  1. When I use the tool "Write highlight to pdf & copy link with format XXXX"
  2. It creates me a highlight with - the authors name - date and time - copy link button / edit button / delet button
  3. There I want to edit the highlight | edit means, inserting the obsidian file link into the contents text box
  4. Exactly there i want the popup show up when i tipe the bracklets [[...]]

Right know i do it exactly like that, i like the workflow, but it is manuelly, so it creates friction when i want to enter a flowstate of productivity & learning

RyotaUshio commented 7 months ago

Thanks now it's clear

It is not impossible but will definitely require a lot of work. Probably I will have to re-implement the whole logic of Obsidian's link suggested all by myself.

I DO agree that will be a nice feature to have. But it's not what I can add in the short term.

KuecukMimarBey commented 7 months ago

Take your time, it will be better if you do it properly

I can imagine that it would benefit a lot of obsidan users which struggle with the current restricted pdf interface of obsidian

i cant code, i would have loved to help :/

RyotaUshio commented 7 months ago

Plus, I wouldn't suggest writing your notes inside the contents box in the first place. That's the conventional way of PDF annotation and is not the main purpose of this plugin.

To make the best of Obsidian's power, I recommend writing down your thoughts in normal markdown files. Then you can connect the md to any pdfs or any other markdown notes. Also, all the cool markdown editing feature are already there, including link suggestions.

There might be some frictions until you get used to it, but eventually you will feel comfortable with it (if not, then probably PDF++ is not the tool that works best for you)

KuecukMimarBey commented 7 months ago

No, i agree with you.

The context box whole purpose for me was to link to any other md - file in obsidian

in this files

i get that handling the linking system of md files and implementing it to pdf files in obsidian is hard, but i can imagine that the learning, productivity in obsidan gets a strong boost ⚡ by getting this done

RyotaUshio commented 7 months ago

The context box whole purpose for me was to link to any other md - file in obsidian

Then, I would suggest just using PDF++'s existing features. Your original request was bi-directional linking, and it can be achieved by the existing features but not by putting wikilink inside the content box.

Implementing link suggestions in the content box is not impossible but so far from the main line of this plugin's principle that it can degrade the maintainability of the project. Therefore I'm afraid it is unlikely to happen unless someone sends me a pull request.