Comments (3)
Sorry i have way too much on my hands right now. I saw the other issue and PR but choose not to participate bacause... well too much to do rn.
But i should at least try to explain my intention on that PR.
I introduced that rule in order to strip out the grouping braces which are sometimes used in BibTex titles or publisher names (e.g. capital letter abbreviations) (see: BibTex.org : Text enclosed in braces ).
I intended for it to be applied in the last step of substitutions.
But as you are stating, that example might be is doing it wrong. It depends on how you want to see the 'Text enclosed in braces'-Rule. I tried not to step into that (never ending 'have to fix that too') pitfall back then.
One big problem (imo) with regular expression substitution rules are braces. You can not account for all cases with regex.
And i did not want to implement a BibTex parser or even LaTeX parser. I was satisfied by adding some further cases well knowing that the package does not fully supports the syntax.
I just remembered that i had another PR prepared where i wanted to add
r"\\\\\"\{\\i\}" => s"\u0069\u308", # \"{\i} ï Latin Small Letter I with Diaeresis
link
to the substitution rules. As i do not see any movement on the related PR in Documenter.jl
you could ad that to the substitutions in case if you want to add LaTeX support.
Or you could use \={M}
instead of $\overline{M}$
?
from documentercitations.jl.
@LazyScholar thank you for the explanation, now at least I understand the motivation and that helps finding alternatives.
I don't think removing {}
blindly like this is easily salvageable, and I would suggest to remove it: as long as it is there, it always has a chance of wrecking user input, with no recourse open to the user. But if we instead don't remove it, then the user can easily deal with this, by tweaking the bib data suitably.
from documentercitations.jl.
Unfortunately, {}
is pretty common in bibtex text, as its the desired way to enforce capitalization, e.g. https://tex.stackexchange.com/a/10775/245, which we would want to remove, so it's helpful to keep.
Honestly, at this point we probably need a proper TeX parser to do this properly. @Kolaru has a basic math-mode tex parser in MathTeXEngine.jl (https://github.com/Kolaru/MathTeXEngine.jl/tree/master/src/parser), it might be possible to adapt that to handle text mode as well.
from documentercitations.jl.
Related Issues (20)
- Change `CitationBibliography` to `DocumenterBibliography`? HOT 6
- Switch to GitHub Actions
- Support for custom citation and bibliography styles HOT 6
- Docs compilation error HOT 10
- Bibliography for page HOT 6
- Sorting of bibliography entries HOT 6
- Volume should be an optional field for article HOT 6
- More compact citing, with verbose option HOT 2
- fullcite command to print citation in-place HOT 1
- Documentation build breaks when using @contents block HOT 2
- TagBot trigger issue HOT 13
- Year is printed twice
- Convert TeX umlauts and accents also in `@ref` commands, not just the bibliography HOT 1
- When using `doctest=:fix`, I get `ERROR: KeyError: key Markdown.Code(...` HOT 1
- Edition missing HOT 2
- Option to print last name only for citations HOT 2
- Replace (@cite) in REPL help mode. HOT 2
- Allow arbitrary link texts HOT 1
- Merge into Documenter.jl 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 documentercitations.jl.