mirror of
https://github.com/wassname/template.git
synced 2026-06-27 17:50:45 +08:00
Remove brackets in bibtex entries that are used for plaintext rendering
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
@article{gregor2015draw,
|
||||
title={DRAW: A recurrent neural network for image generation},
|
||||
title={{D}{R}{A}{W}: A recurrent neural network for image generation},
|
||||
author={Gregor, Karol and Danihelka, Ivo and Graves, Alex and Rezende, Danilo Jimenez and Wierstra, Daan},
|
||||
journal={arXiv preprint arXiv:1502.04623},
|
||||
year={2015},
|
||||
|
||||
@@ -18,7 +18,8 @@ function normalizeTag(string) {
|
||||
return string
|
||||
.replace(/[\t\n ]+/g, ' ')
|
||||
.replace(/{\\["^`.'acu~Hvs]( )?([a-zA-Z])}/g, (full, x, char) => char)
|
||||
.replace(/{\\([a-zA-Z])}/g, (full, char) => char);
|
||||
.replace(/{\\([a-zA-Z])}/g, (full, char) => char)
|
||||
.replace(/[{}]/gi,''); // Replace curly braces forcing plaintext in latex.
|
||||
}
|
||||
|
||||
export function parseBibtex(bibtex) {
|
||||
|
||||
Reference in New Issue
Block a user