jupyter-book / jupyterlab-myst

Use MyST Markdown directly in Jupyter Lab
https://jupyter-book.github.io/jupyterlab-myst/
BSD 3-Clause "New" or "Revised" License
140 stars 18 forks source link

Implement citations, DOI Links, and bibliography in JupyterLab #127

Open arinbasu opened 1 year ago

arinbasu commented 1 year ago

Hi All, I was working on a paper in Jupyterlab using jupyterlab-myst (OS: MacOS Big Sur 11.7.4) on Firefox browser. I typed
{cite:p}`doi:https://doi.org/10.18637/jss.v040.i01` in a markdown cell.

Doing shift+return would not render the citation in the jupyter lab interface, but it rendered correctly in the rendered webpage. It also rendered correctly in the exported Word document as (Wickham, 2011) for reference. This is a minor issue but if you can kindly fix this or explain this, that'd be excellent. Best, Arindam Basu

welcome[bot] commented 1 year ago

Thanks for opening your first issue here! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.
If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).
Welcome to the EBP community! :tada:

agoose77 commented 1 year ago

Hi @arinbasu,

Citations and references are on our todo list, but currently not implemented for jupyterlab-myst. See this issue for more information! :)

rowanc1 commented 1 year ago

🔜🚀

Glad to see you over here, @arinbasu, this is very high on the priority list!! It requires extracting some tools from the myst-cli and bringing them over to be used by juptyerlab-myst!

arinbasu commented 1 year ago

Thank you Rowan and Angus. I believe this issue can be closed now.

rowanc1 commented 1 year ago

Can we keep this one open and I will close the other one -- this issue is more focused on citations, and you will be notified when we complete this work!

wragge commented 1 year ago

Glad to hear this is being worked on -- just building my first Jupyter Book, so thanks!

I understand that citations are not rendering yet, but I'm finding that if a Markdown cell contains a a citation, like {cite:p}`aReference`, the whole cell collapses and becomes invisible when I hit shift+enter.

If I click around where the cell is supposed to be I can open it again for editing, and the citations render fine when I build the Jupyter book. They just disappear in Lab.

I've got jupyterlab==3.6.3 and jupyterlab-myst==1.2.0.

It's easy enough to work around, but it does seem very odd.

rowanc1 commented 1 year ago

@wragge I have a fix for that incoming, thank you for letting us know! There was a bug in some of the new hover-citations that is working differently in JupyterLab and caused a full crash!

This is addressed in:

rowanc1 commented 1 year ago

Some progress on this in #161, still need to implement DOIs, but getting closer!