bids-standard / bids-specification

Brain Imaging Data Structure (BIDS) Specification
https://bids-specification.readthedocs.io/
Creative Commons Attribution 4.0 International
267 stars 154 forks source link

Some links do not rendered in the PDF #1712

Closed Remi-Gau closed 3 months ago

Remi-Gau commented 4 months ago

Note that some links are not rendered in the pdf.

For example the link at the top of the genetic section:

[`UK biobank`](https://github.com/bids-standard/bids-examples/tree/master/genetics_ukbb)

I think this is because of the back tick in the square brackets.

Originally posted by @Remi-Gau in https://github.com/bids-standard/bids-specification/issues/1711#issuecomment-1961685078

Remi-Gau commented 3 months ago

OK the solution to this one (so far)

The following won't be turned into a link during the pdd build
-   [`UK biobank`](https://github.com/bids-standard/bids-examples/tree/master/genetics_ukbb)
-   [UK biobank](https://github.com/bids-standard/bids-examples/tree/master/genetics_ukbb) 

This will
[`UK biobank`](https://github.com/bids-standard/bids-examples/tree/master/genetics_ukbb)
sappelhoff commented 3 months ago

interesting, thanks for investigating!

So we'd have to:

  1. in the PDF build, check if list items are links
  2. turn these selective lists that contain such items into non-lists

??

what about:

will this link render?
    -   A link follows: [`a link`](https://google.com)
Remi-Gau commented 3 months ago

OK I tried a bunch of things:


!!! example "Example datasets"

    The following example dataset with genetics data have been formatted using this specification
    and can be used for practical guidance when curating a new dataset.

    -   [`UK biobank`](https://github.com/bids-standard/bids-examples/tree/master/genetics_ukbb)
    -   foo bar [`UK biobank`](https://github.com/bids-standard/bids-examples/tree/master/genetics_ukbb)
    -   [UK biobank](https://github.com/bids-standard/bids-examples/tree/master/genetics_ukbb)

-   [`UK biobank`](https://github.com/bids-standard/bids-examples/tree/master/genetics_ukbb)
-   foo bar [`UK biobank`](https://github.com/bids-standard/bids-examples/tree/master/genetics_ukbb)
-   [UK biobank](https://github.com/bids-standard/bids-examples/tree/master/genetics_ukbb)

- [UK biobank](https://github.com/bids-standard/bids-examples/tree/master/genetics_ukbb)
- foo bar [UK biobank](https://github.com/bids-standard/bids-examples/tree/master/genetics_ukbb)

[`UK biobank`](https://github.com/bids-standard/bids-examples/tree/master/genetics_ukbb)

and I got this:

image

sappelhoff commented 3 months ago

so the admonitions are the problem 🤔

don't get it though, as your script removes the admonition completely: https://github.com/bids-standard/bids-specification/blob/4c642bd19e8834bf7c5988e100fc8441d6bbf06b/pdf_build_src/remove_admonitions.py#L16-L54

Remi-Gau commented 3 months ago

let me test the script the blurb above

Remi-Gau commented 3 months ago

OK if I run the remove_admonition code on the blurb above it gives this

The following example dataset with genetics data have been formatted using this specification
and can be used for practical guidance when curating a new dataset.

    -   [`UK biobank`](https://github.com/bids-standard/bids-examples/tree/master/genetics_ukbb)
    -   foo bar [`UK biobank`](https://github.com/bids-standard/bids-examples/tree/master/genetics_ukbb)
    -   [UK biobank](https://github.com/bids-standard/bids-examples/tree/master/genetics_ukbb)

-   [`UK biobank`](https://github.com/bids-standard/bids-examples/tree/master/genetics_ukbb)
-   foo bar [`UK biobank`](https://github.com/bids-standard/bids-examples/tree/master/genetics_ukbb)
-   [UK biobank](https://github.com/bids-standard/bids-examples/tree/master/genetics_ukbb)

- [UK biobank](https://github.com/bids-standard/bids-examples/tree/master/genetics_ukbb)
- foo bar [UK biobank](https://github.com/bids-standard/bids-examples/tree/master/genetics_ukbb)

[`UK biobank`](https://github.com/bids-standard/bids-examples/tree/master/genetics_ukbb)

So my code is too silly... Will try to fix.