I'm translating some documents from MS Word (written by someone else) to TeX for my own uses. There are quotation marks all over the place, some of which are "weird" (e.g., unicode character 201c “ as opposed to ASCII 34 "). What is the best way to replace all of these with matching `` '' pairs?

I'd prefer a solution using VIM but if there are other methods I'll accept them

  • Why do you want to replace them? 201c is an ordinary left double quotation mark which should appear as intended in your output file, given you use a unicode input. – Marco Aug 6 '12 at 17:12
  • Personally, I prefer Unicode quotes to the horrible TeX quote syntax. Modern TeX engines (xetex and luatex) handle unicode just fine. I am more familiar with ConTeXt. In ConTeXt MkIV (luatex engine), unicode quotes work out of the box; In ConTeXt MkII (pdftex and xetex engine), unicode quotes work once you add \enableregime[utf-8]. I am sure similar options exist for LaTeX (most likely using the inputenc package). – Aditya Aug 6 '12 at 17:12
  • I'm using pdflatex. Nothing at all shows up where the unicode characters are. Am I doing something wrong? Or alternatively, can someone answer with how to use inputenc or related as per @Aditya 's comment? EDIT: tex.stackexchange.com/questions/13067/utf8x-vs-utf8-inputenc has the solution – keflavich Aug 6 '12 at 17:20
  • 1
    Alright, google wins this round: answer to corollary (on a mac): Alt-{ and Shift-Alt-{ – keflavich Aug 6 '12 at 17:45
  • 1
    This totally depends on your operating system, keyboard layout and configuration. On a Debian system <RightAlt-B produces and <RightAlt-N yields by default, but this already fails on an Ubuntu system. – Marco Aug 6 '12 at 17:45

I would not change them. They are much more readable than the “traditional” TeX syntax. If you use unicode input they should work in your document. If you really want to:


This line changes “ to ``" in the entire document. Use a similar mapping for ”:

  • That's straightforward enough. In order to use the unicode, I needed to add \usepackage[utf8]{inputenc} to my document. – keflavich Aug 6 '12 at 17:23

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.