Coder Social home page Coder Social logo

Accepting strings about bibtex-tidy HOT 4 CLOSED

flamingtempura avatar flamingtempura commented on July 21, 2024
Accepting strings

from bibtex-tidy.

Comments (4)

FlamingTempura avatar FlamingTempura commented on July 21, 2024

@string is supported but there was a bug with parsing the line author=aubert#{ and }#Varacca.

I've fixed the bug and the above bibtex should now be correctly tidied.

from bibtex-tidy.

aubertc avatar aubertc commented on July 21, 2024

Thanks a lot for this patch!

But there is an additional difficulty, in that particular case…

As of now,

@string{Aubert={Aubert, Clément}}
@string{Varacca={Varacca, Daniele}}

@Inproceedings{Aubert2021h,
	author=aubert#{ and }#Varacca,
	title     =  {Processes, Systems \& Tests: Defining Contextual Equivalences},
	pages     = {1-21},
	doi       = {10.4204/EPTCS.347.1},
}

is tidied as

@string{Aubert={Aubert, Clément}}
@string{Varacca={Varacca, Daniele}}
@inproceedings{Aubert2021h,
	title        = {Processes, Systems \& Tests: Defining Contextual Equivalences},
	author       = aubert # {and} # Varacca,
	pages        = {1--21},
	doi          = {10.4204/EPTCS.347.1}
}

but "and" is not just any string: there must be a space before and after it to be treated correctly by bibtex.

Otherwise, when "substituting" the strings, we get

	author       = {Aubert, ClémentandVaracca, Daniele},

which will trigger complaints of the form

Too many commas in name 1 of "Aubert, ClémentandVaracca, Daniele}" for entry Aubert2021h

Indeed, bibtex expects to see

	author       = {Aubert, Clément and Varacca, Daniele},

i.e., with the spaces preserved.

from bibtex-tidy.

FlamingTempura avatar FlamingTempura commented on July 21, 2024

Interesting, yeah I see that it's not ideal that bibtex-tidy always trims whitespace in braced values.

I've updated bibtex-tidy so that it will not trim braced values that are concatenated.

For your example we now get:

@string{Aubert={Aubert, Clément}}
@string{Varacca={Varacca, Daniele}}
@inproceedings{Aubert2021h,
	title        = {Processes, Systems \& Tests: Defining Contextual Equivalences},
	author       = aubert # { and } # Varacca,
	pages        = {1--21},
	doi          = {10.4204/EPTCS.347.1}
}

Let me know if that's solved your issue.

from bibtex-tidy.

aubertc avatar aubertc commented on July 21, 2024

Let me know if that's solved your issue.

It absolutely does, thanks!

from bibtex-tidy.

Related Issues (20)

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.