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

strange behavior - results in wrong inline numbering #107

Closed
epogrebnyak opened this issue Feb 12, 2022 · 6 comments
Closed

strange behavior - results in wrong inline numbering #107

epogrebnyak opened this issue Feb 12, 2022 · 6 comments

Comments

@epogrebnyak
Copy link

I have paper.bib file like:

@book{PM18,
  author = {Pearl, Judea and Mackenzie, Dana},
  publisher = {Basic Books},
  title = {The Book of Why: The New Science of Cause and Effect},
  year = {2018},
  address = {New York}
}

@book{Hamilton,
  author = {Hamilton, James D.},
  publisher = {Princeton University Press},
  title = {Time Series Analysis},
  year = {1994},
}

and index.md as

# Citations

- Book of Why[@PM18]
- Time Series Analysis[@Hamilton]

\bibliography 

but the resulting html is not quite right:

    Book of Why[1](file:///Q:/bib/site/index.html#fn:1)
    Time Series Analysis[^2]

    James D. Hamilton. Time Series Analysis. Princeton University Press, 1994. [↩](file:///Q:/bib/site/index.html#fnref:1)

What can be going wrong? I tried runnng mkdocs on bith Windows and WSL. Many thanks for clues.

@epogrebnyak epogrebnyak changed the title strange bahavior - results in wrong inline numbering strange behavior - results in wrong inline numbering Feb 12, 2022
@epogrebnyak
Copy link
Author

In quads third element is always 1:

quads = [('[@PM18]', 'PM18', '1', 'Judea Pearl and Dana Mackenzie. *The Book of Why: The New Science of Cause and Effect*. Basic Books, New York, 2018.'), ('[@Hamilton]', 'Hamilton', '1', 'James D. Hamilton. *Time Series Analysis*. Princeton University Press, 1994.')]

because of:

quads.append((key_set, key, "1", self.all_references[key]))

so then we get:

>>> format_bibliography(quads)
'[^1]: James D. Hamilton. *Time Series Analysis*. Princeton University Press, 1994.'

@epogrebnyak
Copy link
Author

So then here new_bib is always a dictionary like {"1": ...}:

new_bib = {quad[2]: quad[3] for quad in citation_quads}

@epogrebnyak
Copy link
Author

@shyamd
Copy link
Owner

shyamd commented Feb 18, 2022

Ooh! Good catch! Thanks for the test as well. I'll go ahead and get this in over the weekend.

@shyamd
Copy link
Owner

shyamd commented Feb 21, 2022

Should be fixed as of v2.0.1 from changes in #108

@shyamd shyamd closed this as completed Feb 21, 2022
@epogrebnyak
Copy link
Author

@shyamd - thanks for doing a fix!

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

No branches or pull requests

2 participants