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

Stripping out { curly } braces? #9

Open
ali-ramadhan opened this issue Oct 23, 2020 · 6 comments
Open

Stripping out { curly } braces? #9

ali-ramadhan opened this issue Oct 23, 2020 · 6 comments
Assignees
Milestone

Comments

@ali-ramadhan
Copy link
Contributor

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}
}
@Azzaare
Copy link
Member

Azzaare commented Oct 23, 2020

Yes, it should not be hard.

I will check in a couple of days the implications of doing so. Maybe I will make it default with a warning when braces are deleted automatically.

That should be enough for people who need those braces to pay attention.

Give me a couple of days though ;)

EDIT: also, we can make a separate export formating for documenter. Instead of hacking the one for StaticWebPages.jl. Not that it is really required at the moment, but don't feel dependent of the needs of other packages

@Azzaare
Copy link
Member

Azzaare commented Oct 28, 2020

I hacked the function to remove '{' and '}' in the title. However, it is just a temporary measure (I won't tag it), as I need to make something robust (with possibilities to escape and such).

@Azzaare
Copy link
Member

Azzaare commented Apr 16, 2021

I will try to go back to this issue in next version!

@Azzaare Azzaare self-assigned this Apr 16, 2021
@Azzaare Azzaare added this to the v1.0 milestone Jun 5, 2021
@LazyScholar
Copy link
Contributor

Not sure if the bracket removal should be done before a tex2unicode conversion which is done in DocumenterCitation.jl. Wouldn't it be better to do that there or to move the conversion to Bibliograph.jl (as the tex escape codes rely on those brackets)?

@Azzaare
Copy link
Member

Azzaare commented Jun 25, 2021

I think it should be done in Bibliography. Of course meanwhile a temporary hack in DocumenterCitations can be useful.

I will try to have a global solution for Tex2Unicode during summer.

@aramirezreyes
Copy link

aramirezreyes commented Mar 18, 2022

Has there been any improvement on this?
I am trying to use Bibliography in my academic website (built with Franklin). But when building I end up with these strings:

Spontaneous {{Cyclogenesis}} without {{Radiative}} and {{Surface-Flux Feedbacks}}

Argel Ram{\'i}rez Reyes, Da Yang

instead of

Spontaneous Cyclogenesis without Radiative and Surface-Flux Feedbacks

Argel Ramírez Reyes, Da Yang

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

4 participants