Comments (4)
Thanks for the report!
The way betterbib works under the hood is that it parses the file using pybtex – and at that point, all formatting information is lost already. So, yeah, to preserve the formatting, I'd have to write my own parser, which is probably outside the scope of betterbib.
I'll implement your second suggestion though and add a small tool for bib file formatting.
from betterbib.
Alright, I've made a few changed to make things easier for you and everyone else.
betterbib
is nowbetterbib-sync
- There's now a new tool
betterbib-format
- They read/write from/to standard i/o, so they can be chained together.
What you can do to preserve tabs in the the output is to run
betterbib-sync in.bib | betterbib-format -t - out.bib
from betterbib.
The ability to pipe is nice, but since betterbib rearranges the order of the fields in an entry, it isn't as useful from a diff point of view. True, with the tabs I no longer get whole entries marked as changed, but some parts of each entry are still marked as changed because of the reordered fields. What I have to do to use diff to check betterbib's work is as follows:
betterbib-format in.bib temp.bib
betterbib-sync temp.bib out.bib
diff temp.bib out.bib
In this way the only changes that are marked are due to the actual data correction step.
Still, the fact that I can now do this is a big improvement. Thanks.
from betterbib.
Alright, fixed that now too. The only thing I cannot influence is the fact that the author name is always separate from the rest; I deliberately put it first all the time. The other entries should remain in order.
from betterbib.
Related Issues (20)
- Character escaping HOT 2
- Run update as pre-commit hook: libenchant HOT 7
- Dashes HOT 11
- Feature request: Protect entries HOT 1
- UnicodeDecodeError on Windows HOT 8
- Search for retractions HOT 5
- Allow project-local configuration, optionally ignoring global config HOT 1
- ERROR: ImportError: cannot import name 'specs' from partially initialized module 'pylatexenc.latexwalker._defaultspecs' (most likely due to a circular import) HOT 3
- Bug encountered HOT 2
- Openretraction name unresolved & Betterbib not working HOT 4
- Handle of MathMl in bib file HOT 2
- Bug? UnicodeDecodeError: 'gbk' codec can't decode byte 0x81 in position 1072: illegal multibyte sequence HOT 4
- Unintended conversion from LaTex to typesetted symbol HOT 4
- license HOT 1
- Spellchecker-based case protection at the word level is inadequate HOT 2
- Updating a bibtex with a doi may result in totally different article HOT 2
- doi-to-bib should be able to accept a list and/or file HOT 2
- Make checking openretractions optional/have an "offline" mode? HOT 3
- ConnectionError newly installed betterbib does not work HOT 1
- openretractions.com failed HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from betterbib.