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

[references] sorting #89

Open
tlienart opened this issue Nov 2, 2018 · 3 comments
Open

[references] sorting #89

tlienart opened this issue Nov 2, 2018 · 3 comments
Labels
Milestone

Comments

@tlienart
Copy link
Owner

tlienart commented Nov 2, 2018

Idea

Would be nice to maybe have a simple "bib" environment where references are sorted in a way depending on a jdvar.

  1. alphabetically by name of first author
  2. by order of appearance in the paper
  3. by year

Possible implementation

By order of appearance is the one that requires memory so might as well consider that as default case.

  • have a dictionary like for eqref which keeps track of when things appear first (so just if key already defined then pass)
  • maybe have api similar to biblatex for references though would need to be flexible to allow "simple" references (link)
@bibitem{diakonikolas16,
    year = 2016,
    author = {Diakonikolas, Kamath, Kane, Li, Moitra, Stewart},
    title = [Robust estimators in high dimensions without the computational intractability](https://arxiv.org/pdf/1604.06443.pdf)
}

might be better to keep it simple in first pass (and complexify ifneedbe) and maybe different than latex to avoid confusion

@bib short > cite_appear > ref_appear
@bib cisse17 > Cisse et al. (2017) > **Cisse** ... [Parseval ...](...), Arxiv 2017.

when these are read, they would fill a specific dictionary which could then be re-used later for sorting.

@tlienart tlienart added this to the future milestone Sep 6, 2019
@tlienart
Copy link
Owner Author

@stephen-huan
Copy link

I'm not sure if this is what you're referring to, but I wrote a small Python shim bib2md (based on this blog post) that uses pandoc's citeproc library to generate pages like this one. It takes a standard BibTeX file like the below

@book{abbott2015understanding,
  title = {Understanding {{Analysis}}},
  author = {Abbott, Stephen},
  year = {2015},
  series = {Undergraduate {{Texts}} in {{Mathematics}}},
  publisher = {{Springer New York}},
  address = {{New York, NY}},
  doi = {10.1007/978-1-4939-2712-8},
  isbn = {978-1-4939-2711-1 978-1-4939-2712-8},
  langid = {english}
}

@article{bezanson2017julia,
  title = {Julia: {{A Fresh Approach}} to {{Numerical Computing}}},
  shorttitle = {Julia},
  author = {Bezanson, Jeff and Edelman, Alan and Karpinski, Stefan and Shah, Viral B.},
  year = {2017},
  month = jan,
  journal = {SIAM Review},
  volume = {59},
  number = {1},
  pages = {65--98},
  publisher = {{Society for Industrial and Applied Mathematics}},
  issn = {0036-1445},
  doi = {10.1137/141000671}
}

@article{schafer2021sparse,
  title = {Sparse {{Cholesky}} Factorization by {{Kullback-Leibler}} Minimization},
  author = {Sch{\"a}fer, Florian and Katzfuss, Matthias and Owhadi, Houman},
  year = {2021},
  month = oct,
  journal = {arXiv:2004.14455 [cs, math, stat]},
  eprint = {2004.14455},
  eprinttype = {arxiv},
  primaryclass = {cs, math, stat},
  archiveprefix = {arXiv}
}

which renders into html like

<div class="references"><h2 id="references"><a href="#references" class="header-anchor">References</a></h2>
<p><a href="/assets/blog/multiplicative-additive/references.bib">BibTeX</a></p>
<ol>
<li><p><a id="abbott2015understanding" class="anchor"></a> &#91;1&#93; S. Abbott, <em>Understanding Analysis</em>. New York, NY: Springer New York, 2015. doi: <a href="https://doi.org/10.1007/978-1-4939-2712-8">10.1007/978-1-4939-2712-8</a>.</p>
</li>
<li><p><a id="bezanson2017julia" class="anchor"></a> &#91;2&#93; J. Bezanson, A. Edelman, S. Karpinski, and V. B. Shah, &quot;Julia: A Fresh Approach to Numerical Computing,&quot; <em>SIAM Review</em>, vol. 59, no. 1, pp. 65–98, Jan. 2017, doi: <a href="https://doi.org/10.1137/141000671">10.1137/141000671</a>.</p>
</li>
<li><p><a id="schafer2021sparse" class="anchor"></a> &#91;3&#93; F. Schäfer, M. Katzfuss, and H. Owhadi, &quot;Sparse Cholesky factorization by Kullback-Leibler minimization,&quot; <em>arXiv:2004.14455 &#91;cs, math, stat&#93;</em>, Oct. 2021, Available: <a href="https://arxiv.org/abs/2004.14455">https://arxiv.org/abs/2004.14455</a></p>
</li>
</ol></div>

There are two big advantages to using pandoc and citeproc rather than writing a boutique implementation. The first is that it consumes standard BibTeX, so all your standard tools (Zotero, etc.) apply. The second is that it's easy to customize what style the references should be in since it uses the citation style language (CSL). Zotero maintains a style repository with over 10,000 different styles for a variety of journals making it easy to find one that suits your needs.

@tlienart
Copy link
Owner Author

tlienart commented Mar 22, 2023

I think what you ended up doing is what was referred to in this comment

this is a very old issue which should be closed as the gist is that indeed it's too ambitious to have a bib system in Franklin

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

No branches or pull requests

2 participants