Code Monkey home page Code Monkey logo

bibliography.jl's People

Contributors

ali-ramadhan avatar azzaare avatar charleskawczynski avatar drelatgithub avatar fingolfin avatar github-actions[bot] avatar lazyscholar avatar mcmarius avatar pitmonticone avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

bibliography.jl's Issues

`xnames(entry; names=:last)` does not include initials

The documentation for Bibliography.xnames says that with names=:last it should return "last names + first name abbreviation". However, in reality, it only returns the last names without first name initials. Thus, there is a mismatch between the documentation and the actual behavior.

Should this be fixed to that names=:last indeed includes the first name initials?

Having only the last names might still be useful in certain situations. So if the implementation of names=:last is fixed, should there also be a different option for names that returns only the last names? Maybe names=:lastonly?

.cff support

Hi! Thanks for writing this package.
I was wondering if you would consider adding support for reading bibliography data from .cff files. I'm not sure if this feature request is in the scope of this package / org. I would like to add support for .cff files in PkgCite.jl (SebastianM-C/PkgCite.jl#12), and a first step would be to have a package that can read the bibliography info.

`xin` for conferences

Hi,
I may not fully understand how to use this package but from test/staticweb.jl I found that Bibliography.xin(val) provides a compact string of "in where it is published".

In the case of conference proceedings, it often requires "location and month" in formatted citation. How about add a method or function that provides "location and month" in addition to the basic result of xin?

booktitle not exported with export_bibtex

Great job with Bibliography.jl!

Some of my references don't survive the roundtrip from bibtex via Bibliography.jl and back to bibtex, it seems like the booktitle is lost during the export_bibtex:

using Bibliography

testdata = """@inproceedings{demo2020proceedings,
 organization  = {DemoOrg},
 pages         = {1--10},
 doi           = {10.1000/001-1-001-00001-1_001},
 author        = {Demo, D},
 note          = {cited by 0},
 year          = {2020},
 booktitle     = {Demo Booktitle},
 title         = {Demo Title}
}"""

write("demo.bib",testdata)
mybib = Bibliography.import_bibtex("demo.bib")
Bibliography.export_bibtex("demo_export.bib",mybib)
mybib2 = Bibliography.import_bibtex("demo_export.bib")

gives the error:

mybib2
Entry demo2020proceedings is missing the booktitle field(s).

error(::String)@error.jl:33
make_bibtex_entry(::String, ::Dict{String, String})@bibtex.jl:81
parse_file(::String)@bibtex.jl:174
#parse_file#[email protected]:19[inlined]
[email protected]:18[inlined]
import_bibtex(::String)@bibtex.jl:6
top-level scope@Local: 1[inlined]

Would that neat `join` trick also work in https://github.com/Humans-of-Julia/Bibliography.jl/blob/b23a0265a5e6ea4a5bad4e656d5699a458cc2fdd/src/staticweb.jl#L66-L133 ?

From @LazyScholar in #28 (thanks by the way)

Would that neat join trick also work in

function xin(entry)
str = ""
if entry.type == "article"
str *= entry.in.journal * ", " * entry.in.volume
str *= entry.in.number != "" ? "($(entry.in.number))" : ""
str *= entry.in.pages != "" ? ", $(entry.in.pages)" : ""
str *= ", " * entry.date.year
elseif entry.type == "book"
str *= entry.in.publisher
str *= entry.in.address != "" ? ", $(entry.in.address)" : ""
str *= ", " * entry.date.year
elseif entry.type == "booklet"
str *= entry.access.howpublished * ", " * entry.date.year
elseif entry.type == "eprint"
if entry.eprint.archive_prefix == ""
str *= entry.eprint.eprint
else
str *= "$(entry.eprint.archive_prefix):$(entry.eprint.eprint) [$(entry.eprint.primary_class)]"
end
elseif entry.type == "inbook"
aux = entry.in.chapter == "" ? entry.in.pages : entry.in.chapter
str *= entry.booktitle * ", " * aux * ", " * entry.in.publisher
str *= entry.in.address != "" ? ", " * entry.in.address : ""
elseif entry.type == "incollection"
str = "In " * xnames(entry, true) * ", editors, " * entry.booktitle * ", " * entry.in.pages * "."
str *= " " * entry.in.publisher
str *= entry.in.address != "" ? ", $(entry.in.address)" : ""
str *= ", " * entry.date.year
elseif entry.type == "inproceedings"
str *= " In " * entry.booktitle
str *= entry.in.series != "" ? ", " * entry.in.series : ""
str *= entry.in.pages != "" ? ", $(entry.in.pages)" : ""
str *= entry.in.address != "" ? ", $(entry.in.address)" : ""
str *= ", " * entry.date.year
str *= entry.in.publisher != "" ? ". $(entry.in.publisher)" : ""
elseif entry.type == "manual"
str *= entry.in.organization
str *= entry.in.address != "" ? ", $(entry.in.address)" : ""
str *= ", " * entry.date.year
elseif entry.type ["mastersthesis", "phdthesis"]
str *= entry.type == "mastersthesis" ? "Master's" : "PhD"
str *= " thesis, " * entry.in.school
str *= entry.in.address != "" ? ", $(entry.in.address)" : ""
str *= ", " * entry.date.year
elseif entry.type == "misc"
aux = entry.access.howpublished != "" != entry.date.year ? ", " : ""
str *= entry.access.howpublished * aux * entry.date.year
str *= aux != "" && get(entry.fields, "note", "") != "" ? ". " : ""
str *= get(entry.fields, "note", "")
elseif entry.type == "proceedings"
str *= entry.in.volume != "" ? "Volume " * entry.in.volume * " of " : ""
str *= entry.in.series
str *= entry.in.address != "" ? ", $(entry.in.address)" : ""
str *= ", " * entry.date.year
str *= entry.in.publisher != "" ? ". $(entry.in.address)" : ""
elseif entry.type == "techreport"
str *= entry.in.number != "" ? "Technical Report " * entry.in.number * ", " : ""
str *= entry.in.institution
str *= entry.in.address != "" ? ", $(entry.in.address)" : ""
str *= ", " * entry.date.year
elseif entry.type == "unpublished"
aux = get(entry.fields, "note", "")
str *= aux != "" != entry.date.year ? aux * ", " : ""
str *= entry.date.year
end
str *= str == "" ? "" : "."
return str
end
?
I noticed in your example that it might be useful.
ex

Edit:
And

"""
xlink(entry)
Format the download link of an `Entry` for web export.
"""
function xlink(entry)
if entry.access.doi != ""
return "https://doi.org/" * entry.access.doi
elseif entry.access.url != ""
return entry.access.url
end
return ""
end
could also return the arXiv link.

Originally posted by @LazyScholar in #28 (comment)

`import_bibtex` fails when the BibTeX file has comments

I usually use comments in my .bib files to organize them but it seems that import_bibtex stops processing the .bib file once it hits a comment line.

julia> using Bibliography

shell> cat test.bib
@article{ahu61,
   author={Arrow, Kenneth J. and Leonid Hurwicz and Hirofumi Uzawa},
   title={Constraint qualifications in maximization problems},
   journal={Naval Research Logistics Quarterly},
   volume={8},
   year=1961,
   pages={175-191},
   doi={10.1002/nav.3800080206}
}

@book{ab94,
   author = {Charalambos D. Aliprantis and Kim C. Border},
   year = {1994},
   title = {Infinite Dimensional Analysis},
   publisher = {Springer},
   address = {Berlin},
   url = {https://www.springer.com/gp/book/9783540295860}
}

julia> import_bibtex("test.bib")
OrderedCollections.OrderedDict{String,BibInternal.AbstractEntry} with 2 entries:
  "ahu61" => Article("ahu61", "Arrow, Kenneth J. and Leonid Hurwicz and Hirofumi Uzawa", "Naval Research Logistics Quarterly", "Constraint qualifications in maximization problems", "8", "1…
  "ab94"  => Book("ab94", "Charalambos D. Aliprantis and Kim C. Border", "", "Springer", "Infinite Dimensional Analysis", "1994", "Berlin", "", "", "", "", "", "", "https://www.springer.co…
shell> cat test_with_top_comments.bib
% Some example entries!

@article{ahu61,
   author={Arrow, Kenneth J. and Leonid Hurwicz and Hirofumi Uzawa},
   title={Constraint qualifications in maximization problems},
   journal={Naval Research Logistics Quarterly},
   volume={8},
   year=1961,
   pages={175-191},
   doi={10.1002/nav.3800080206}
}

@book{ab94,
   author = {Charalambos D. Aliprantis and Kim C. Border},
   year = {1994},
   title = {Infinite Dimensional Analysis},
   publisher = {Springer},
   address = {Berlin},
   url = {https://www.springer.com/gp/book/9783540295860}
}

julia> import_bibtex("test_with_top_comments.bib")
OrderedCollections.OrderedDict{String,BibInternal.AbstractEntry} with 0 entries
shell> cat test_with_middle_comments.bib
@article{ahu61,
   author={Arrow, Kenneth J. and Leonid Hurwicz and Hirofumi Uzawa},
   title={Constraint qualifications in maximization problems},
   journal={Naval Research Logistics Quarterly},
   volume={8},
   year=1961,
   pages={175-191},
   doi={10.1002/nav.3800080206}
}

% Some example entries!

@book{ab94,
   author = {Charalambos D. Aliprantis and Kim C. Border},
   year = {1994},
   title = {Infinite Dimensional Analysis},
   publisher = {Springer},
   address = {Berlin},
   url = {https://www.springer.com/gp/book/9783540295860}
}

julia> import_bibtex("test_with_middle_comments.bib")
OrderedCollections.OrderedDict{String,BibInternal.AbstractEntry} with 1 entry:
  "ahu61" => Article("ahu61", "Arrow, Kenneth J. and Leonid Hurwicz and Hirofumi Uzawa", "Naval Research Logistics Quarterly", "Constraint qualifications in maximization problems", "8", "1…
shell> cat test_with_bottom_comments.bib
@article{ahu61,
   author={Arrow, Kenneth J. and Leonid Hurwicz and Hirofumi Uzawa},
   title={Constraint qualifications in maximization problems},
   journal={Naval Research Logistics Quarterly},
   volume={8},
   year=1961,
   pages={175-191},
   doi={10.1002/nav.3800080206}
}

@book{ab94,
   author = {Charalambos D. Aliprantis and Kim C. Border},
   year = {1994},
   title = {Infinite Dimensional Analysis},
   publisher = {Springer},
   address = {Berlin},
   url = {https://www.springer.com/gp/book/9783540295860}
}

% Some example entries!


julia> import_bibtex("test_with_bottom_comments.bib")
OrderedCollections.OrderedDict{String,BibInternal.AbstractEntry} with 2 entries:
  "ahu61" => Article("ahu61", "Arrow, Kenneth J. and Leonid Hurwicz and Hirofumi Uzawa", "Naval Research Logistics Quarterly", "Constraint qualifications in maximization problems", "8", "1…
  "ab94"  => Book("ab94", "Charalambos D. Aliprantis and Kim C. Border", "", "Springer", "Infinite Dimensional Analysis", "1994", "Berlin", "", "", "", "", "", "", "https://www.springer.co…

`import_bibtex` errors upon encountering an article without a volume field

Maybe I am not using the BibTeX article class correctly but I use it for arXiv articles and it seems that import_bibtex errors once it encounters an article without a volume field. Is it possible to accept articles without a volume field? Or maybe I should update my arXiv BibTeX entries?

julia> using Bibliography

shell> cat arxiv.bib
@article{Besard16,
        title = {High-level {GPU} programming in {Julia}},
        journal = {arXiv:1604.03410 [cs]},
        author = {Besard, Tim and Verstraete, Pieter and De Sutter, Bjorn},
        year = {2016}
}

julia> import_bibtex("arxiv.bib")
ERROR: Missing the volume field(s).
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] BibInternal.BibTeX.Article(::String, ::String, ::String, ::String, ::String, ::String, ::String, ::String, ::String, ::String, ::String, ::String, ::Dict{String,String}) at /home/alir/.julia/packages/BibInternal/mZf28/src/bibtex.jl:102
 [3] BibInternal.BibTeX.Article(::String, ::Dict{String,String}) at /home/alir/.julia/packages/BibInternal/mZf28/src/bibtex.jl:137
 [4] make_bibtex_entry(::String, ::String, ::Dict{String,String}) at /home/alir/.julia/packages/BibInternal/mZf28/src/bibtex.jl:14
 [5] macro expansion at /home/alir/.julia/packages/Automa/fyalL/src/codegen.jl:137 [inlined]
 [6] parse(::String) at /home/alir/.julia/packages/BibParser/Qhq5E/src/bibtex.jl:137
 [7] parse_file at /home/alir/.julia/packages/BibParser/Qhq5E/src/bibtex.jl:144 [inlined]
 [8] import_bibtex(::String) at /home/alir/.julia/packages/Bibliography/ywTv6/src/bibtex.jl:2
 [9] top-level scope at REPL[3]:1

Sorry to keep opening issues but hopefully these are easy fixes!

Export bibtex to a string

Is there a way to turn a bibtex string into a formatted citation using this package? I can get the parsed citation with import_bibtex, but I'm looking for the next step, so to speak.

Give more information when `import_bibtex` fails to parse an entry?

I'm parsing a large-ish BibTeX file (~1,000 lines, ~80 entries) and it seems that when import_bibtex fails to parse an entry it prints an error

julia> import_bibtex("oceananigans.bib")
ERROR: Missing the volume field(s).
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] BibInternal.BibTeX.Article(::String, ::String, ::String, ::String, ::String, ::String, ::String, ::String, ::String, ::String, ::String, ::String, ::Dict{String,String}) at /home/alir/.julia/packages/BibInternal/mZf28/src/bibtex.jl:102
 [3] BibInternal.BibTeX.Article(::String, ::Dict{String,String}) at /home/alir/.julia/packages/BibInternal/mZf28/src/bibtex.jl:137
 [4] make_bibtex_entry(::String, ::String, ::Dict{String,String}) at /home/alir/.julia/packages/BibInternal/mZf28/src/bibtex.jl:14
 [5] macro expansion at /home/alir/.julia/packages/Automa/fyalL/src/codegen.jl:137 [inlined]
 [6] parse(::String) at /home/alir/.julia/packages/BibParser/Qhq5E/src/bibtex.jl:137
 [7] parse_file at /home/alir/.julia/packages/BibParser/Qhq5E/src/bibtex.jl:144 [inlined]
 [8] import_bibtex(::String) at /home/alir/.julia/packages/Bibliography/ywTv6/src/bibtex.jl:2
 [9] top-level scope at REPL[2]:1

Is it possible for import_bibtex to also print maybe the specific entry or a line number in the .bib file so it is easy to find and fix the bad entry?

ERROR: KeyError: key "software" not found

Hi, I'm getting the following error when trying to import a .bib file containing the software key (as reported in SebastianM-C/PkgCite.jl#16).

To reproduce, you can do the following
First, in pkg mode:

pkg> activate --temp
pkg> add Bibliography
pkg> Noise#master

code:

using Bibliography
using Noise

path = joinpath((dirnamedirname)(pathof(Noise)), "CITATION.bib")
Bibliography.import_bibtex(path)

which gives:

ERROR: KeyError: key "software" not found
Stacktrace:
  [1] getindex
    @ .\dict.jl:482 [inlined]
  [2] check_entry(fields::Dict{String, String})
    @ BibInternal C:\Users\sebastian\.julia\packages\BibInternal\dfnbw\src\bibtex.jl:49
  [3] make_bibtex_entry(id::String, fields::Dict{String, String})
    @ BibInternal C:\Users\sebastian\.julia\packages\BibInternal\dfnbw\src\bibtex.jl:77
  [4] dump!(parser::BibParser.BibTeX.Parser, char::Char, #unused#::Val{:field_out})
    @ BibParser.BibTeX C:\Users\sebastian\.julia\packages\BibParser\adUeP\src\bibtex.jl:571
  [5] dump!(parser::BibParser.BibTeX.Parser, char::Char)
    @ BibParser.BibTeX C:\Users\sebastian\.julia\packages\BibParser\adUeP\src\bibtex.jl:672
  [6] parse!(parser::BibParser.BibTeX.Parser, char::Char)
    @ BibParser.BibTeX C:\Users\sebastian\.julia\packages\BibParser\adUeP\src\bibtex.jl:684
  [7] #6
    @ C:\Users\sebastian\.julia\packages\BibParser\adUeP\src\bibtex.jl:700 [inlined]
  [8] foreach
    @ .\abstractarray.jl:2141 [inlined]
  [9] parse_string(str::String)
    @ BibParser.BibTeX C:\Users\sebastian\.julia\packages\BibParser\adUeP\src\bibtex.jl:700
 [10] parse_file
    @ C:\Users\sebastian\.julia\packages\BibParser\adUeP\src\bibtex.jl:710 [inlined]
 [11] #parse_file#1
    @ C:\Users\sebastian\.julia\packages\BibParser\adUeP\src\BibParser.jl:20 [inlined]
 [12] parse_file
    @ C:\Users\sebastian\.julia\packages\BibParser\adUeP\src\BibParser.jl:20 [inlined]
 [13] import_bibtex(input::String)
    @ Bibliography C:\Users\sebastian\.julia\packages\Bibliography\WhKuF\src\bibtex.jl:6
 [14] top-level scope
    @ REPL[24]:1

`parse_file` Error on newest versions

I'm getting this error

ERROR: LoadError: MethodError: no method matching parse_file(::String; check=:error)
Closest candidates are:
  parse_file(::Any) at ~/.julia/packages/BibParser/6k5hX/src/BibParser.jl:27 got unsupported keyword argument "check"
  parse_file(::Any, ::Val{:BibTeX}) at ~/.julia/packages/BibParser/6k5hX/src/BibParser.jl:24 got unsupported keyword argument "check"
  parse_file(::Any, ::Val{:CFF}) at ~/.julia/packages/BibParser/6k5hX/src/BibParser.jl:25 got unsupported keyword argument "check"
  ...
Stacktrace:
 [1] import_bibtex(input::String; check::Symbol)
   @ Bibliography ~/.julia/packages/Bibliography/pJF8G/src/bibtex.jl:7
 [2] import_bibtex
   @ ~/.julia/packages/Bibliography/pJF8G/src/bibtex.jl:7 [inlined]
 [3] CitationBibliography(filename::String; sorting::Symbol)
   @ DocumenterCitations ~/.julia/packages/DocumenterCitations/EbCiQ/src/DocumenterCitations.jl:24
 [4] CitationBibliography(filename::String)
   @ DocumenterCitations ~/.julia/packages/DocumenterCitations/EbCiQ/src/DocumenterCitations.jl:23
 [5] top-level scope
   @ ~/.julia/dev/Mill/docs/make.jl:16
 [6] include(fname::String)
   @ Base.MainInclude ./client.jl:451
 [7] top-level scope
   @ REPL[21]:1
 [8] top-level scope
   @ ~/.julia/packages/CUDA/YpW0k/src/initialization.jl:52

on 0.2.17

Looks like definitions changed (https://github.com/Humans-of-Julia/BibParser.jl/blob/f86de83796fca07c4f905a22a10dd00f10fd8c02/src/BibParser.jl#L28)

TagBot trigger issue

This issue is used to trigger TagBot; feel free to unsubscribe.

If you haven't already, you should update your TagBot.yml to include issue comment triggers.
Please see this post on Discourse for instructions and more details.

Improve handling of capitalization of field names.

Consider the two following articles

@article{A,
    name = {A, B.},
    title = {A Title},
    jornal = {A Journal},
    year = {2020},
}

@article{B,
    NAME   = {A, B.},
    TITLE  = {A Title},
    JORNAL = {A Journal},
    YEAR   = {2020}
}

Both are valid bib(la)tex entries, and the second one is (up to renaming of the Key) even the paste of the first (parsed/improved by VS Code LaTeXWorkshop).

The first one loads perfectly fine, while the second one yields an error that all four fields author, title, journal and year are missing.

Could we maybe improve this and also accept capitalized field names?

`:nyt` being "authors-editors-date-title" is misleading

I tried to get entries sorted by author-year-title, but the :nyt leads to an unexpected behaviour, that I'm still trying to properly understand. One part of this is that the sorting includes editors, which I did not expect at all. Maybe we should have separate sortings for these so that the user can choose if editors should be included or not?

For context: I'm trying to add a bibliography to my docs with DocumenterCitations.jl, but right now I'm failing to get the order right.

`xnames` for inline citations?

Was wondering if it's within the scope of the xnames function to return short versions of the list suitable for inline citations. For example, for the author list "Kenneth J. Arrow, Leonid Hurwicz, Hirofumi Uzawa" we would have

julia> xnames(entry, last_names_only=true, max_authors=1)
"Arrow et al."

julia> xnames(entry, last_names_only=true, max_authors=2)
"Arrow & Hurwicz et al."

julia> xnames(entry, last_names_only=true)
"Arrow, Hurwicz, & Uzawa"

or maybe this functionality deserves its own separate function. But with keyword arguments perhaps there just needs to be one nice xnames function.

Cannot find title field for this BibTeX article

Not sure if the BibTeX entry is bad but it seems that import_bibtex could not pull the title field out for some reason.

julia> using Bibliography

shell> cat bad_article.bib
@article{Hholami16,
        title = {{FFT}, {FMM}, or {Multigrid}? {A} comparative {Study} of {State}-{Of}-the-{Art} {Poisson} {Solvers} for {Uniform} and {Nonuniform} {Grids} in the {Unit} {Cube}},
        volume = {38},
        doi = {10.1137/15M1010798},
        number = {3},
        journal = {SIAM Journal on Scientific Computing},
        author = {Gholami, Amir and Malhotra, Dhairya and Sundar, Hari and Biros, George},
        year = {2016},
        pages = {C280--C306}
}

julia> import_bibtex("bad_article.bib")
ERROR: Missing the title field(s).
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] BibInternal.BibTeX.Article(::String, ::String, ::String, ::String, ::String, ::String, ::String, ::String, ::String, ::String, ::String, ::String, ::Dict{String,String}) at /home/alir/.julia/packages/BibInternal/mZf28/src/bibtex.jl:102
 [3] BibInternal.BibTeX.Article(::String, ::Dict{String,String}) at /home/alir/.julia/packages/BibInternal/mZf28/src/bibtex.jl:137
 [4] make_bibtex_entry(::String, ::String, ::Dict{String,String}) at /home/alir/.julia/packages/BibInternal/mZf28/src/bibtex.jl:14
 [5] macro expansion at /home/alir/.julia/packages/Automa/fyalL/src/codegen.jl:137 [inlined]
 [6] parse(::String) at /home/alir/.julia/packages/BibParser/Qhq5E/src/bibtex.jl:137
 [7] parse_file at /home/alir/.julia/packages/BibParser/Qhq5E/src/bibtex.jl:144 [inlined]
 [8] import_bibtex(::String) at /home/alir/.julia/packages/Bibliography/MZcl2/src/bibtex.jl:2
 [9] top-level scope at REPL[2]:1

Reverse the order of bib entries

Related to #36.

What should I do to reverse the order of the OrderedDict of bib entries?

For example,

julia> bib = Bibliography.import_bibtex(joinpath("references", file * ".bib"))
OrderedCollections.OrderedDict{String, BibInternal.Entry} with 4 entries:
  "kimNeuralNetworkBasedPathReplanning2021"         => Entry(Access("10.1109/ACCESS.2021.3083734", "", "https://ieeexplore.ieee.org/document/9440908"), BibInternal.Name[Name("", "Kim", "", "Jinrae", ""), Name("", "Lee", "", "Suwon", ""), Name("", "Lee", "", "Sangmin", ""), Name("
  "kimPartiallyConvexNeuralNetworks_in_preparation" => Entry(Access("", "", ""), BibInternal.Name[Name("", "Kim", "", "Jinrae", ""), Name("", "Kim", "", "Youdan", "")], "", Date("", "", "2099"), BibInternal.Name[], Eprint("", "", ""), "kimPartiallyConvexNeuralNetworks_in_preparat…
  "kimFieldofViewConstrainedImpactAngle2021"        => Entry(Access("10.1177/0954410020942010", "", "http://journals.sagepub.com/doi/10.1177/0954410020942010"), BibInternal.Name[Name("", "Kim", "", "Jinrae", ""), Name("", "Cho", "", "Namhoon", ""), Name("", "Kim", "", "Youdan", "
  "choWindCompensationFramework2020a"               => Entry(Access("10.1109/TAES.2019.2920219", "", "https://ieeexplore.ieee.org/document/8727399/"), BibInternal.Name[Name("", "Cho", "", "Namhoon", ""), Name("", "Lee", "", "Suwon", ""), Name("", "Kim", "", "Jinrae", ""), Name(""

julia> sort_bibliography!(bib, :y)
OrderedCollections.OrderedDict{String, BibInternal.Entry} with 4 entries:
  "choWindCompensationFramework2020a"               => Entry(Access("10.1109/TAES.2019.2920219", "", "https://ieeexplore.ieee.org/document/8727399/"), BibInternal.Name[Name("", "Cho", "", "Namhoon", ""), Name("", "Lee", "", "Suwon", ""), Name("", "Kim", "", "Jinrae", ""), Name(""
  "kimNeuralNetworkBasedPathReplanning2021"         => Entry(Access("10.1109/ACCESS.2021.3083734", "", "https://ieeexplore.ieee.org/document/9440908"), BibInternal.Name[Name("", "Kim", "", "Jinrae", ""), Name("", "Lee", "", "Suwon", ""), Name("", "Lee", "", "Sangmin", ""), Name(""kimFieldofViewConstrainedImpactAngle2021"        => Entry(Access("10.1177/0954410020942010", "", "http://journals.sagepub.com/doi/10.1177/0954410020942010"), BibInternal.Name[Name("", "Kim", "", "Jinrae", ""), Name("", "Cho", "", "Namhoon", ""), Name("", "Kim", "", "Youdan", "
  "kimPartiallyConvexNeuralNetworks_in_preparation" => Entry(Access("", "", ""), BibInternal.Name[Name("", "Kim", "", "Jinrae", ""), Name("", "Kim", "", "Youdan", "")], "", Date("", "", "2099"), BibInternal.Name[], Eprint("", "", ""), "kimPartiallyConvexNeuralNetworks_in_preparat…

But I wanna get the reverse-ordered result.

Even if there is a simple way of reversing the order of an OrderedDict, I think it would be much convenient if a keyword argument is provided for "reversing the order".

Current sorting rules look like:

const sorting_rules = Dict{Symbol, Vector{Symbol}}(
    :nty  => [:authors;:editors;:title;:date],
    :nyt  => [:authors;:editors;:date;:title],
    :y    => [:date]
);

so maybe we need something like

:nty
:n-ty  # reverse only t
:-y  # reverse y
...  # etc

Stripping out { curly } braces?

Was wondering if it's possible to strip out curly braces { and } from titles (or apply the formatting) in Bibliography.xtitle?

Example:

julia> using Bibliography

julia> bib = import_bibtex("example.bib")

julia> [Bibliography.xtitle(entry) for entry in values(bib)]
3-element Array{String,1}:
 "Walking with coffee: { Why } does it spill?"
 "Principia { Mathematica }"
 "Fourth-order \$2N\$-storage Runge--Kutta schemes"

Bibliography file:

@article{Mayer2012,
  title = {Walking with coffee: {Why} does it spill?},
  author = {Mayer, H. C. and Krechetnikov, R.},
  journal = {Physical Review E},
  volume = 85,
  issue = 4,
  pages = {046117},
  numpages = 7,
  year = 2012,
  doi = {10.1103/PhysRevE.85.046117}
}

@book{useful_proof,
    author = {Alfred North Whitehead and Bertrand Russell},
    title = {Principia {Mathematica}},
    volume = 1,
    year = 1925,
    address = {Cambridge},
    publisher = {Cambridge {University} {Press}},
    isbn = {978-0521067911},
    url = {https://archive.org/details/PrincipiaMathematicaVolumeI}
}

@techreport{CK1994,
  author = {Carpenter, Mark H and Kennedy, Christopher A},
  title = {Fourth-order $2N$-storage Runge--Kutta schemes},
  institution = {National Aeronautics and Space Administration},
  year = {1994},
  number = {NASA TM-109112},
  address = {Langley Research Center, Hampton, VA},
  url={https://ntrs.nasa.gov/api/citations/19940028444/downloads/19940028444.pdf}
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.