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

[downloadnb-comparison] external links in footnotes not working in both RST and MYST notebooks #54

Open
shlff opened this issue Jan 27, 2021 · 10 comments

Comments

@shlff
Copy link
Member

shlff commented Jan 27, 2021

Hi @mmcky , the 4th issue I find is

  • external links in footnotes are not working in both RST and MYST versions of all notebooks with footnotes.

For example, please find a screenshot for lecture 04_linear_algebra (left: RST, right: MYST):

Screen Shot 2021-01-27 at 1 44 36 pm

The issue occurs in the following lectures (TBD):

@mmcky
Copy link
Contributor

mmcky commented Feb 1, 2021

thanks @shlff -- looks like markdown isn't rendered in the list -- is the link formed over two lines? If you edit the notebook can you get the link to work. If so please add solution here.

@shlff
Copy link
Member Author

shlff commented Feb 3, 2021

Thanks @mmcky . Please see the whole part of this footnote

<p><a id=fn-mdt href=#fn-mdt-link><strong>[1]</strong></a> Although there is a specialized matrix data type defined in NumPy, it’s more standard to work with ordinary NumPy arrays. See [this discussion](https://python-programming.quantecon.org/numpy.html#matrix-multiplication).

It seems that the link does not form over two lines.

@mmcky
Copy link
Contributor

mmcky commented Feb 8, 2021

@shlff would you mind copying the notebook here? Your right -- not split over lines. I wonder why jupyter isn't picking up the link in that context.

@shlff
Copy link
Member Author

shlff commented Feb 9, 2021

Sure @mmcky . Please find the notebook here.

@mmcky
Copy link
Contributor

mmcky commented Feb 9, 2021

hey @shlff it looks like the leading html causes the jupyter notebook to not parse the paragraph as markdown

Perhaps we should use:

**Footnotes**

<p><a id=fn-mdt href=#fn-mdt-link><strong>[1]</strong></a> 
    
Although there is a specialized matrix data type defined in NumPy, it’s more standard to work with ordinary NumPy arrays. See [this discussion](https://python-programming.quantecon.org/numpy.html#matrix-multiplication).

<p><a id=cfn href=#cfn-link><strong>[2]</strong></a> 
    
Suppose that $ \|S \| < 1 $. Take any nonzero vector $ x $, and let $ r := \|x\| $. We have $ \| Sx \| = r \| S (x/r) \| \leq r \| S \| < r = \| x\| $. Hence every point is pulled towards the origin.

@mmcky
Copy link
Contributor

mmcky commented Feb 9, 2021

Actually we should probably update sphinx-tojupyter to use markdown

**Footnotes**

**[1]** Although there is a specialized matrix data type defined in NumPy, it’s more standard to work with ordinary NumPy arrays. See [this discussion](https://python-programming.quantecon.org/numpy.html#matrix-multiplication).

**[2]** Suppose that $ \|S \| < 1 $. Take any nonzero vector $ x $, and let $ r := \|x\| $. We have $ \| Sx \| = r \| S (x/r) \| \leq r \| S \| < r = \| x\| $. Hence every point is pulled towards the origin.

@shlff
Copy link
Member Author

shlff commented Feb 9, 2021

I love the 2nd change, @mmcky . Do you think we should manually update the leading in footnotes of all lectures with markdown?

@mmcky
Copy link
Contributor

mmcky commented Feb 9, 2021

This will need to be done in sphinx-tojupyter as the download notebook is generated from the source.

@shlff
Copy link
Member Author

shlff commented Mar 11, 2021

Thanks @mmcky , this issue has not been solved yet and please see the screenshot of the notebook for lecture 04_linear_algebra downloaded from the site:

Screen Shot 2021-03-11 at 11 10 33 am

@shlff
Copy link
Member Author

shlff commented Jun 8, 2023

This issue still exists.

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

No branches or pull requests

2 participants