biblatex-csl-converter
Version:
Bibliography format converter: BibLaTeX, BibTeX, CSL-JSON, RIS, ENW, EndNote XML, Citavi, DOCX citations, ODT citations — parse, convert, and export with round-trip fidelity
16 lines (15 loc) • 438 B
text/typescript
// A much smaller list for export than for import, as biblatex does understand utf8
export const TexSpecialChars: [RegExp, string][] = [
[/\\/g, "\\textbackslash "],
[/\{/g, "\\{ "],
[/\}/g, "\\} "],
[/&/g, "{\\&}"],
[/%/g, "{\\%}"],
[/\$/g, "{\\$}"],
[/#/g, "{\\#}"],
[/_/g, "{\\_}"],
[/~/g, "{\\textasciitilde}"],
[/\^/g, "{\\textasciicircum}"],
[/ and /g, " {and} "],
[/\uFFFD/g, ""],
]