You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
BUG?: References always have an errant second link #169
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.
thanks for thoroughly debunking my kneejerk guess! I see that you're right.
I can fix the bug locally by reverting 0970cdb.
firstly this may be deemed a sphinx/docutils bug since the backref is used
despite being in a LaTeX only environment.
Secondly we only need this hack where a reference is not otherwise cited,
but that solution may be a bit hacky.
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.
Activity
jnothman commentedon Apr 11, 2018
larsoner commentedon Apr 11, 2018
On
masterfor my minimal example code min.zip it looks like:I checked out the commit that immediately preceded #136 (21a194e) and it still occurs and looks like:
So the problem appears to precede your PR.
jnothman commentedon Apr 11, 2018
larsoner commentedon Apr 12, 2018
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 commentedon Apr 12, 2018
jnothman commentedon 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.
FIX remove duplicated citation back-references
jnothman commentedon Jun 6, 2018
The fix in #180 simply removes backreferences where the reference does not exist.