|
|
back to boardHint: use Java (+) Posted by ASK 23 Mar 2010 20:49 It is possible to get AC with a 10-lines program. Simply use regular expressions: Q = "(?<!\\\\)\"" for " which is not preceded by \ ".*?(?:\n\r?\n|\\\\par(?![A-Za-z])|$)" for paragraph (note \r) For each paragraph you get with Scanner.findWithinHorizon, do replaceAll matching Q+"(.*?)"+Q with "``$1''" and then replaceFirst Q with an empty string. Btw, the real TeX parsing is much more complicated, e.g., \\par would not end a paragraph. |
|
|