Skip to content

BUG?: References always have an errant second link #169

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

Closed
larsoner opened this issue Apr 11, 2018 · 7 comments
Closed

BUG?: References always have an errant second link #169

larsoner opened this issue Apr 11, 2018 · 7 comments

Comments

@larsoner
Copy link
Collaborator

Why do the references have a link that points nowhere? For example for this:

http://scipy.github.io/devdocs/generated/scipy.signal.windows.dpss.html#id1

Each ref is used once but there are two links, the second of which points to a tag that does not seem to exist.

@jnothman
Copy link
Member

jnothman commented Apr 11, 2018 via email

@larsoner
Copy link
Collaborator Author

On master for my minimal example code min.zip it looks like:

[1] | (1, 2) Hyvarinen, A., 1999. Fast and robust fixed-point algorithms for independent component analysis. IEEE transactions on Neural Networks, 10(3), pp.626-634.

I checked out the commit that immediately preceded #136 (21a194e) and it still occurs and looks like:

[R1] | (1, 2) Hyvarinen, A., 1999. Fast and robust fixed-point algorithms for independent component analysis. IEEE transactions on Neural Networks, 10(3), pp.626-634.

So the problem appears to precede your PR.

@jnothman
Copy link
Member

jnothman commented Apr 11, 2018 via email

@larsoner
Copy link
Collaborator Author

Secondly we only need this hack where a reference is not otherwise cited, but that solution may be a bit hacky.

Maybe we should look at what HTML and LaTeX PDFs are produced by this only-add-ref-if-needed solution? It seems like the easier route.

@jnothman
Copy link
Member

jnothman commented Apr 12, 2018 via email

@jnothman
Copy link
Member

jnothman commented Jun 6, 2018

Another option might be to pass builder information into SphinxDocString and only generate this latex-only code if in a latex builder, rather than relying on reST directives.

@jnothman
Copy link
Member

jnothman commented Jun 6, 2018

The fix in #180 simply removes backreferences where the reference does not exist.

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