diff --git a/easy2acl.py b/easy2acl.py index 0120a22..799cf9d 100755 --- a/easy2acl.py +++ b/easy2acl.py @@ -17,17 +17,17 @@ from csv import DictReader from glob import glob from shutil import copy, rmtree -from unicode_tex import unicode_to_tex from pybtex.database import BibliographyData, Entry +from pylatex.utils import escape_latex from PyPDF2 import PdfFileReader def texify(string): - """Return a modified version of the argument string where non-ASCII symbols have - been converted into LaTeX escape codes. + """Return a modified version of the argument string where characters that + are special in LaTeX have been converted into LaTeX escape codes. """ - return ' '.join(map(unicode_to_tex, string.split())).replace(r'\textquotesingle', "'") + return str(escape_latex(string)) #,---- diff --git a/requirements.txt b/requirements.txt index 14c04ef..f7bf08e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -unicode_tex +pylatex pybtex PyPDF2