12

In tex file:

  Toks\"{o}z

It produces

enter image description here

lockstep
  • 250,273
yanfyon
  • 291
  • 2
    Welcome to TeX.SX! Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. In this case, I can't reproduce the problem with the code you've provided; it works as expected and produces a proper ö. – Sean Allred Jul 02 '14 at 23:49
  • Make sure you are using " but not strange unicode madness in case you have copied it from a website etc. such as '' – percusse Jul 02 '14 at 23:52
  • It is very obvious I am using " not ' '. At least in my tex file it looks like " to me. I have used "shift" key to input ". – yanfyon Jul 03 '14 at 02:37

3 Answers3

26

It is difficult to see in some editors, but in the first case you have \" acting on o, in the second: \' acting on ', hence the strange result.

\documentclass{article}

\begin{document}

 Toks\"{o}z

Toks\''{o}z

\end{document}

enter image description here

BTW: your question gives an interesting example, why " and '' should never be mixed. Improper usage of " as a quote does not give so visible result.

  • I use TeXworks as editor. I agree that two separate ' without space between them looks same as ". But I use "shift" key to input ". The result is still same to me. – yanfyon Jul 03 '14 at 03:27
  • 8
    @yanfyon TeXworks, by default, auto-converts " to '' (Format -> Smart Quotes). I always turn this off from the Preferences, but some people clearly find it useful. (This happens even if you type in " using the standard input method, so you may not be aware of it.) – Joseph Wright Jul 03 '14 at 05:54
9

Maybe that's very naive, but why not simply input direcly ö in the editor?

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}

\begin{document}

 Toksöz

\textsc{Toksöz}

 TOKSÖZ

\end{document}

enter image description here

Bernard
  • 271,350
7

I just found out why this happened. In the TeXworks editor I use, the original setup is: "Format"--> "Smart Quotes"-->"Tex ligatures", after I changed the setup to: "Format"--> "Smart Quotes"-->"None", then it works as expected !!!!

yanfyon
  • 291
  • I am really confused. When I changed the setup of "Smart Quotes" from "None" back to "Tex ligatures" again, it still works normal. But I still believe the abnormal behavior has something to do with the "Smart Quotes" setup. – yanfyon Jul 03 '14 at 03:55
  • I make one more test. If I set the "Smart Quotes" as "Tex ligatures" and re-input Toks"{o}z, it still comes out as abnormal. So now I am sure the abnormal out is indeed related to the "Smart Quotes" setup. – yanfyon Jul 03 '14 at 04:16
  • 2
    The Smart Quotes setting has an effect only at the time you press the " key. Changing Smart Quotes on or off doesn't go through your document and replace existing " characters. – cjm Jul 03 '14 at 07:38
  • 3
    I petition to have this "feature" renamed "dumb quotes". (Especially since all the editor has to do is to check if the previous character is \ and, if so, leave the " alone.) – David Richerby Jul 03 '14 at 10:47