使用python,我想“教育”纯文本输入的引号并将它们转换为上下文语法。这是一个(递归)示例:
原文:
Using python, I would like "educate" quotes of
a plain text input and turn them into the Context syntax.
Here is a (recursive) example:
输出:
Using python, I would like \quotation{educate} quotes of
a plain text input and turn them into the Context syntax.
Here is a (recursive) example:
我希望它也能处理嵌套引号:
原文:
Original text: "Using python, I would like 'educate' quotes of
a plain text input and turn them into the Context syntax.
Here is a (recursive) example:"
输出:
Original text: \quotation {Using python, I would like \quotation{educate} quotes of
a plain text input and turn them into the Context syntax.
Here is a (recursive) example:}
当然,我应该处理边缘情况,例如:
She said "It looks like we are back in the '90s"
上下文引用的规范在这里:
http://wiki.contextgarden.net/Nested_quotations#Nested_quotations_in_MkIV
对这种情况最敏感的方法是什么?非常感谢!