Comments (8)
I have an issue with homogeneize_latex_encoding().
One of my article is called something_2010
and it get escaped as something\_2010
using homogeneize_latex_encoding. But such an ident is not working in Latex (error on the \cite line).
Did I miss something ?
from python-bibtexparser.
No, you don't. It's because homogeneize_latex_encoding() does not distinguish data and metadata (point 1).
I'm working on a partial fix.
from python-bibtexparser.
Another question about this.
I'm using a custom Bibtex field called "file" to store filenames to pdf files of my articles. If I use homogeneize_latex_encoding(), the special characters (such as _) in my filename get escaped and I can't use it in my python scripts.
However, I'd rather have an homogeneous latex encoding in the bibtex file I write.
So, maybe it could be a good idea to implement also a unhomogeneize_latex_encoding function, or (easier I think), to be able to specify the customization at writing time.
What do you think of this ?
from python-bibtexparser.
I do not think it's a good way to go to write a unhomogeneize_latex_encoding function. It would not be natural to do so from the user point of view.
However, homogeneize_latex_encoding() must have an extra optional argument, a dict, to specify either:
- the record treated by string_to_latex (title, author, abstract)
- or NOT treated.
For now, I'm in favor of the solution 1, probably shorter and a default list might work for a broader range of usecases.
from python-bibtexparser.
I agree with the unhomogeneize_latex_encoding function.
But maybe homogeneize_latex_encoding could be called when writing with bwriter ? This is possible for now, by explicitly calling it before writing. But I think maybe the writing functions could have a customizations param just as the reader have ?
And I'm in favor of an extra optional argument with default fields to treat as well.
from python-bibtexparser.
OK for the extra arg in homogeneize_latex_encoding.
I do not understand why you need a customization callback in bwriter functions? What prevents you to pass your customization functions in the parser itself?
from python-bibtexparser.
Actually, yes I can pass it myself. I was just thinking that a symmetric behaviour of the reader and writer with the customization option could be nice. But it may be a stupid ideaβ¦
from python-bibtexparser.
Issue is 10 years old, much has changed since. Should similar problems still pop up, it would probably be best to open a new issue.
from python-bibtexparser.
Related Issues (20)
- Separator first names HOT 3
- Custom middleware HOT 3
- Errors in name-split HOT 3
- β¨ Nice way to handle enclosings for months while writing with the default stack HOT 1
- Suppress warnings HOT 3
- `DuplicateFieldKeyBlock.ignore_error_block` retains `{}` in field values HOT 4
- some suggestions from a first-time user HOT 1
- How to replace bp.bparser.BibTexParser() ? HOT 2
- Enclosing middleware fails for certain content HOT 3
- Use case sensitive entry type HOT 4
- Make behaviour entry closer to `dict`: check if field is present
- Default `allow_parallel_execution=True` HOT 3
- Discussion: closer `dict` mimicking `Entry` HOT 1
- Apply style using pre-commit HOT 1
- Normalize field keys (to lowercase) HOT 8
- docs: links to code not working
- docs: switch themes? HOT 4
- Error in latex_to_unicode
- split_multiple_persons_names() bug HOT 1
- More flexible handling of case sensitivity in all keys HOT 3
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 python-bibtexparser.