I recently switched from Google Docs to LaTeX and I've written half of my Thesis in Goolge Docs. The problem is that I c&p-ed the Text to my LaTeX editor and now the double quotation marks (") are doing weird stuff.

Can you help me with a regex function to transform this pattern "word" into \enquote{word}, so I can exchange this quickly?

\"\($*\)\" => \\enquote{\$\} 

This somehow doesn't work.

Or is it even possible that there's a config for doing that and I can keep writing the standard quotation marks (")?

PS: I'm using the sharelatex.com editor

  • 3
    I wouldn't use l3regex for this I'd use your editor, typically the syntax would be something like "\([^"]*)" --> \\enquote{\1} although systems differ some need \( rather than ( and some use $1 rather than \1 to reference the group. – David Carlisle May 10 '16 at 9:06

Thanks to David I got the solution:

([^"]*)" ->  \enquote{\$1} 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.