Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible solution to the citation problem! #200

Open
jeetsukumaran opened this issue Dec 23, 2023 · 2 comments
Open

Possible solution to the citation problem! #200

jeetsukumaran opened this issue Dec 23, 2023 · 2 comments

Comments

@jeetsukumaran
Copy link

I, like [you](https://github.com/OliverBalfour/obsidian-pandoc/wiki/Citations-(work-in-progress), really want to have my Obsidian internal links / wikilinks AND markdown citations rolled into one :)

I've been fiddling about with an "emergency" project that grew into a plugin which overlaps a bit with this one, "https://github.com/jeetsukumaran/obsidian-impresario". The motivation behind that was primarily I wanted to build in the full compile instructions into the document YAML properties because I kept forgetting the way I mean the document to be compiled when revisiting it (e.g., slide level), and wanted an easier way to make sure all the filters/templates/javascript assets etc. would be bundled.

There is a Lua filter with that plugin:

https://github.com/jeetsukumaran/obsidian-impresario/blob/main/resources/publication/pandoc/filters/pdcites.lua

that works on wikilinks parsed when the "wikilinks_title_after_pipe" extension is specified, and takes the title string and wraps it up as a Pandoc citation.

The following:

---
bibliography: "+system/testing/pd-cites/p1.bib"
---

## Pandoc native

The following formats are native Pandoc:

[@shannon-1948-mathematical-theory] 
[@{shannon-1948-mathematical-theory}]

## Obsidian native

The following must work through the filter:

- [[@shannon-1948-mathematical-theory]]
- [[discovery/sources/references/s/@shannon-1948-mathematical-theory|@shannon-1948-mathematical-theory]]
- [[Untitled|@shannon-1948-mathematical-theory]]


Here, we have multiple citations, separated by semicolons [ [[discovery/sources/references/s/@shannon-1948-mathematical-theory|@shannon-1948-mathematical-theory]];
[[discovery/sources/references/m/@morlon-2014-phylogenetic-approaches|@morlon-2014-phylogenetic-approaches]];
[[discovery/sources/references/k/@kingman-1982-coalescent|@kingman-1982-coalescent]] 
].


## Explicit vs. implicit citation based on title

- [[discovery/sources/references/k/@kingman-1982-coalescent|@kingman-1982-coalescent]]
- [[discovery/sources/references/s/@shannon-1948-mathematical-theory|@shannon-1948-mathematical-theory]]
- [[discovery/sources/references/k/@kingman-1982-coalescent]]
- [[discovery/sources/references/s/@shannon-1948-mathematical-theory]]

results in:

image

@jeetsukumaran
Copy link
Author

Hi @universvm and @mokeyish -- we have had this ^ discussion before. Tagging you here in case you might be interested in adopting as well.

@devinat1
Copy link

devinat1 commented Jan 5, 2024

Writing here to express interest in this solution. It would be really great to have the citations and links rolled into one!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants