TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a report written in MS Word which I would like to turn into a LaTeX document. I copy-pasted the content of the document in my LaTeX editor (TeXShop, LaTeX, pdfTeX) and everything comes out fine except for the apostrophes ' which come out as ? (so for example, instead of outputting I'm, I?m is output instead).

In my LaTeX editor, the apostrophes appear as they should, it's only in the compiled pdf document that they are turned into ?.

For a strange reason, I've noticed that if I delete (in the editor) an apostrophe and retype the same apostrophe in the editor, then they are output normally. This trick doesn't work if I do Find and Replace, so the solution I have up to now is simply to manually delete and retype each apostrophe in the text.

This however is very time consuming so I would love to find a better solution!

share|improve this question
It sounds like your latex file is using an input encoding that's not compatible with your version of MS Word. (Unlike the basic letters and numerals, for which most input encodings use the same representations, this is not the case for "auxiliary" glyphs such as single and double apostrophes.) With a MWE (minimum working example) it's going to be well-nigh impossible to indicate a robust fix to the problem you're facing. Hence, please consider posting such an MWE. Alternatively, you could try a command such as \usepackage[utf8]{inputenc} and see if this solves the issues you're reporting. – Mico Sep 3 '12 at 16:56
You should put an example document (at best in a zip-file, so that the encoding is not changed by copy&paste) somewhere for download. – Ulrike Fischer Sep 3 '12 at 16:58
up vote 9 down vote accepted

Word auto corrects input ' to the typographically correct . LaTeX does this, too.

  1. You can try to search-and-replace all to ' in Word itself or
  2. Use another input encoding, for example UTF8: \usepackage[utf8]{inputenc}
share|improve this answer
Solution 1 worked for me, thanks. – Percy Sep 3 '12 at 21:55

I have had such problems too. To me it seems Word does dark replacement magic with all kinds of special characters that are neither "," nor ".". What exactly it does seems to depend on language settings and Word versions.

I'm using my own voodoo to deal with that, amongs which is this sed-script

#!/bin/sed -f

For your purposes the first 4-5 rules should be the most interesting. As always, YMMV.

share|improve this answer
Your script works well if the file is saved in utf8 (2Byte). How can I extend it so that it can works well with utf8 2Byte? – lazyboy Sep 3 '12 at 19:55
I don't understand your question, but if you want to fiddle with character encondings and Word exports, have a look at tidy and iconv. – user1129682 Sep 3 '12 at 20:40
Oh, I'm sorry. I means utf-16 (A character is saved in 2 bytes if necessary). But it is not so important. I have a look in tidy and iconv and solved my trouble. – lazyboy Sep 5 '12 at 10:15
I'm glad you had your problem solved. UTF-16 is up to 4 bytes IIRC, UTF-8 already can be 2 bytes a character if necessary – user1129682 Sep 5 '12 at 10:41

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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