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

Add Bibtex referencing #69

Merged
merged 40 commits into from
Feb 6, 2022
Merged

Add Bibtex referencing #69

merged 40 commits into from
Feb 6, 2022

Conversation

JosephusPaye
Copy link
Member

@JosephusPaye JosephusPaye commented Sep 30, 2020

By @moosahassanx, @samtarino94, and myself.

This PR adds a Bibtex referencing system to NUbook, much like the one in Overleaf.

Tasks

  • Add Gatsby transformer to parse bib files and make their content available to pages in React
  • Add the <cite> element to show inline citations, with an error when a citation used is not found in the bib file
  • Add the <References> element
  • Use the IEEE referencing style (or whatever our Faculty uses at the uni)
    • Format different reference types differently
  • Update NUbook page on how to use with examples

Extensions (for future PRs)

  • Add a popup to show the reference inline when a citation is hovered (like Wikipedia)
  • Add a back link in the references list to jump back to where the citation was clicked
  • Detect URLs in references and turn them into clickable links

Preview

https://deploy-preview-69--nubook.netlify.app/kitchen-sink/referencing

Docs

https://deploy-preview-69--nubook.netlify.app/system/tools/nubook#bibtex-referencing

JosephusPaye and others added 11 commits September 30, 2020 15:31
…lable to the page in React

Co-Authored-By: Moosa Hassan <[email protected]>
Co-Authored-By: Moosa Hassan <[email protected]>
Co-Authored-By: SinisterSamtaro94 <[email protected]>
Co-Authored-By: Moosa Hassan <[email protected]>
Co-Authored-By: SinisterSamtaro94 <[email protected]>
Co-Authored-By: Moosa Hassan <[email protected]>
Co-Authored-By: SinisterSamtaro94 <[email protected]>
Co-Authored-By: Moosa Hassan <[email protected]>
Co-Authored-By: SinisterSamtaro94 <[email protected]>
Co-Authored-By: Moosa Hassan <[email protected]>
Co-Authored-By: SinisterSamtaro94 <[email protected]>
Co-Authored-By: Moosa Hassan <[email protected]>
Co-Authored-By: SinisterSamtaro94 <[email protected]>
<references/> tag reads .bib
Copy link
Member Author

@JosephusPaye JosephusPaye left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good start 👍.

Just needs a few changes and perhaps some custom styling, which I can help with.

src/components/markdown/references/references.jsx Outdated Show resolved Hide resolved
src/components/markdown/references/references.jsx Outdated Show resolved Hide resolved
src/components/markdown/references/references.jsx Outdated Show resolved Hide resolved
src/components/markdown/references/references.jsx Outdated Show resolved Hide resolved
@JosephusPaye
Copy link
Member Author

This should be ready to review and merge now.

Copy link
Member

@ysims ysims left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some comments on the styling, but these are just opinions.

  1. From a user point of view, I'm not keen on actually having unknown references shown on the page. Is it possible to just throw an error? I don't see any benefit to showing it, and I was confused for a couple of seconds when I saw the first reference because I initially interpretted it as 'the first reference in the list is an unknown reference' before realising it was two separate references next to each other.
  2. I don't know if I really like the way the inline citations look. After looking at it in dark mode, I think it's just that the darkness of the background in light mode feels a bit too noticable. Maybe it'd be better to have a light background with dark text like the references list at the bottom?

@JosephusPaye JosephusPaye requested a review from ysims February 4, 2022 01:41
Copy link
Member

@ysims ysims left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Styling looks good. Looked through some of the code and didn't see anything concerning but I can't say I know js well enough to comment.
@lach-j can you check out the js? If that's good and no one has any other issues then I think it can be approved.

@ysims
Copy link
Member

ysims commented Feb 4, 2022

@JosephusPaye probs also make an issue for those extensions.

@JosephusPaye JosephusPaye mentioned this pull request Feb 4, 2022
3 tasks
Copy link
Contributor

@lach-j lach-j left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@JosephusPaye JosephusPaye merged commit c543cec into main Feb 6, 2022
@JosephusPaye JosephusPaye deleted the paye-hassan-dearie/referencing branch February 6, 2022 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants