【发布时间】:2012-02-16 12:44:36
【问题描述】:
我有一个包含许多 " 标记的文档,但我想将其转换为在 TeX 中使用。
TeX 使用 2 个 ` 标记作为开始引号,使用 2 个 ' 标记作为结束引号。
我只想在" 以偶数出现在单行上时对这些进行更改(例如,一行中有 2、4 或 6 个")。例如
"This line has 2 quotation marks."
--> ``This line has 2 quotation marks.''
"This line," said the spider, "Has 4 quotation marks."
--> ``This line,'' said the spider, ``Has 4 quotation marks.''
"This line," said the spider, must have a problem, because there are 3 quotation marks."
--> (unchanged)
我的句子从不跨行,因此无需检查多行。
单引号的引号很少,所以我可以手动更改。
如何转换这些?
【问题讨论】: