💾 Archived View for thatit.be › 2023-03-12-10-34-45.gmi captured on 2024-05-26 at 14:48:48. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2024-05-10)

➡️ Next capture (2024-06-16)

🚧 View Differences

-=-=-=-=-=-=-

citations

I have a convoluted method whereby I insert citations into notes. It’s an ongoing process.

Pandoc supports a mechanism for this that I somehow missed completely. You create a single bibliography (in BibTex format) and use a bracketed syntax to reference the bibliographic entry. I may have skipped over it because it didn’t have a means for recording the page number.

In Markdown

Assuming there is a BibTex file, like this:

@misc{ enwiki:1091149211,
    author = "{Wikipedia contributors}",
    title = "Enthymeme --- {Wikipedia}{,} The Free Encyclopedia",
    year = "2022",
    url = "https://en.wikipedia.org/w/index.php?title=Enthymeme&oldid=1091149211",
    note = "[Online; accessed 18-August-2022]"
}

And a markdown file like this:

---
bibliography: bib.bib
---

> Phrase to be cited. [@enwiki:1091149211]

Then invoking Pandoc like this:

pandoc -C doc.md -t markdown_strict

Would produce output like this:

Front matter.

> Here is a reference to enthymemes. (Wikipedia contributors 2022)

End matter.

Wikipedia contributors. 2022. “Enthymeme — Wikipedia, the Free
Encyclopedia.”
<https://en.wikipedia.org/w/index.php?title=Enthymeme&oldid=1091149211>.

That isn’t too bad, aside from the lack of automatic title for where references are injected.

In the Capsule

So instead of the real Pandoc method, I have multiple .bib files, that I expand into .md files as though they were their own separate Reference sections, and these show up okay because they’re just links to other documents.

I would have something like this wikipedia-enthymeme.md file:

---
bibliography: wikipedia-enthymeme.bib
tags: [cite, gemini, publish]
nocite: '@*'
title: "citation: Wikipedia Enthymeme article"
---

::: {#refs}
:::

And a bib file like this:

@misc{ enwiki:1091149211,
    author = "{Wikipedia contributors}",
    title = "Enthymeme --- {Wikipedia}{,} The Free Encyclopedia",
    year = "2022",
    url = "https://en.wikipedia.org/w/index.php?title=Enthymeme&oldid=1091149211",
    note = "[Online; accessed 18-August-2022]"
}

And then a Pandoc call like this:

pandoc -C -t markdown_strict wikipedia-enthymeme.md

Which produces output like this:

Wikipedia contributors. 2022. “Enthymeme — Wikipedia, the Free
Encyclopedia.”
<https://en.wikipedia.org/w/index.php?title=Enthymeme&oldid=1091149211>.

That output goes into a new file of the same name as the old one, but in a new directory. The new directory content is converted en masse to Gemtext.

How is it broken?

The way I do it lets me link to a separate citation, but requires I embed a particular notation style in the note where I want to make the reference so I can include a page number. And I do it inconsistently. If I were using the actual Pandoc method, the citation style could be agnostic, but I don’t know how to include a page number when I do that. I’ll continue to think on this, but for now I wont be changing anything.

Tags

#index

#pandoc

Navigation

index

tags

prev ⏰

⏰ next

updated: 2023-03-12 11:33:39

generated: 2024-05-25