lecture-python.myst icon indicating copy to clipboard operation
lecture-python.myst copied to clipboard

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

Open shlff opened this issue 4 years ago • 11 comments

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):

shlff avatar Jan 27 '21 02:01 shlff

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.

mmcky avatar Feb 01 '21 23:02 mmcky

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.

shlff avatar Feb 03 '21 02:02 shlff

@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.

mmcky avatar Feb 08 '21 06:02 mmcky

Sure @mmcky . Please find the notebook here.

shlff avatar Feb 09 '21 00:02 shlff

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 avatar Feb 09 '21 01:02 mmcky

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.

mmcky avatar Feb 09 '21 01:02 mmcky

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

shlff avatar Feb 09 '21 02:02 shlff

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

mmcky avatar Feb 09 '21 02:02 mmcky

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 avatar Mar 11 '21 00:03 shlff

This issue still exists.

shlff avatar Jun 08 '23 03:06 shlff