MarcosNicolau / obsidian-for-academia

The ultimate collaborative guide to convert obsidian into an academic writing tool!
30 stars 1 forks source link

Links of exported PDFs hijack entire line(s) #1

Closed carlgustavh closed 5 months ago

carlgustavh commented 6 months ago

In my notes, I like to cite my sources in a reference list at the bottom. Furthermore, I always make sure to archive a website I've cited. This means and entry in my reference list usually looks somethign like this: image The problem is, that when I export it with your CSS snippet, the initial link has hijacked both the first and the second line completely, meaning clickign anywhere on those two lines just leads me to https://www.social-engineer.org/framework/general-discussion/social-engineering-defined/. Even when I click on Archived, and would like to be led to the Internet Archive snapshot of the webpage. I have tested this by making a new line and placing the Archived link on, and there it works just fine.

MarcosNicolau commented 6 months ago

Hi @carlgustavh,

Ok, I think I understand your problem. I can't currently test it on my end right now. I'll make sure to check it asap.

But, for the moment, can you confirm that the css snippet is creating the issue and it is not an Obsidian problem or another plugin maybe, coz I don't know how the css could be changing the behavior of the anchors.

And thank you for opening the issue and contributing!

carlgustavh commented 6 months ago

Seems to be an obsidian issue.

carlgustavh commented 6 months ago

Nvm it is not. I disabled your CSS-Snippet and it functioned perfectly again. Which is weird, considering that means your CSS is somehow interfering with the CSS for the default exporting. I have linked two files below to show the difference: Your CSS on.pdf Your CSS off.pdf

MarcosNicolau commented 6 months ago

Ok. Is it possible that you didn't include the pdf with the css snippet? Coz they look the same and they both work.

carlgustavh commented 6 months ago

I just checked, and you can see the issue in this line:

Wiley & Sons. ISSBN: 0470068523. https://books.google.dk/books?

Where upon clicking places that isn't the link, it still acts as the line link.

MarcosNicolau commented 6 months ago

Alright now I see clearly what is going on. One last thing, could you provide the markup, please?

Thanks.

carlgustavh commented 6 months ago

Of course! Source mode:

cssclass:
  - academic
  - twocolumn
---
# Title!
###### A very cool subtitle
~~Author~~

In the context of computing, social engineering is the psychological manipulation of people into performing actions or divulging confidential information. A type of confidence trick for the purpose of information gathering, fraud, or system access, it differs from a traditional "con" in that it is often one of many steps in a more complex fraud scheme ([[Anderson, 2008]]). It has also been defined as "any act that influences a person to take an action that may or may not be in their best interests ([[Security Through Education, 2023]]).
## Phishing
Phishing is a form of social engineering and scam where attackers deceive people into revealing sensitive information ([[Pickle & Christensson, 2023, Phishing|Pickle & Christensson, 2023]]) or installing [[Malware|malware]].
## References
Anderson, R. J., & Anderson, R. J. (2008). Chapter 2. In _Security engineering: A guide to building dependable distributed systems_ (2nd ed., p. 17). essay, John Wiley & Sons. ISSBN: 0470068523. https://books.google.dk/books?id=ILaY4jBWXfcC

Pickle, B., & Christensson, P. (2023, November 9). _Phishing_. Definition - What is a phishing attack? https://techterms.com/definition/phishing - [Archived](https://web.archive.org/web/20230417074951/https://techterms.com/definition/phishing)

Security Through Education. (2023, March 15). _Social Engineering defined_. https://www.social-engineer.org/framework/general-discussion/social-engineering-defined/ - [Archived](https://web.archive.org/web/20230925062024/https://www.social-engineer.org/framework/general-discussion/social-engineering-defined/)
MarcosNicolau commented 6 months ago

Great, thank you! I'll be debugging this next week probably! I'll let you know!!

MarcosNicolau commented 5 months ago

Hi @carlgustavh,

I've been debugging this issue and it is an Obsidian thing. For some reason, Obsidian makes the entire line clickable when the link is broken into two lines :man_shrugging:. You see the reason it changes when you activate the CSS is because it adds more margin to the page and so it breaks the link into two, creating the bug mentioned before. I could not find any related issue in their forums, so maybe it would be good to let them know.

Anyway, I realize that it would be better to make the user aware of the changes in the margin when exporting to pdf by adding a comment explaining the behavior.

I am closing this issue and thank you for contributing :smile:!