TeXShopMissing apostrophe?

Information and discussion about TeXShop, an integrated LaTeX environment for Mac OS X
Post Reply
karpen
Posts: 1
Joined: Sat Aug 09, 2008 1:20 am

Missing apostrophe?

Post by karpen »

Hi,
I just came across this forum, and hope to be able to help others as well as receiving help. Right now I have encountered a really odd problem in TeXShop that has me stumped. I am running MacOS 10.5.4 and the latest version of TeXShop over the TeX-Live2007 distribution. I am writing a paper with equations, using mathmode (either by $$ or the \begin{equation} method, I've tested both). For some reason, I cannot get a prime symbol (single quote, or apostrophe) to appear in the PDF previewer although it is in my LaTeX file. In fact, there isn't even a space where the symbol would appear (although it is a pretty narrow symbol so it may not be easy to tell). I guess this is called the back quote symbol; on my keyboard it is beneath the double quotes. The left single quote works fine but isn't the right symbol for a derivative. Has anyone else encountered this problem? Thanks for whatever advice you can give, this is so bizarre and frustrating!

regards, Judy K

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX books
User avatar
Stefan Kottwitz
Site Admin
Posts: 10308
Joined: Mon Mar 10, 2008 9:44 pm

Missing apostrophe?

Post by Stefan Kottwitz »

Hi Judy,

welcome to the board!
Could you post a (compilable) minimal working example, where the apostrophe doesn't appear? Then we have a piece of code to test and to discuss. In this case it should be just some lines, but we could see your input encoding and font encoding then.
Alternatively you could use \prime like $x^\prime$.

Stefan
LaTeX.org admin
SaulGood
Posts: 1
Joined: Tue Sep 16, 2008 11:43 pm

Re: Missing apostrophe?

Post by SaulGood »

Judy,
I had the same problem when pasting text into TexShop from Word. Try retyping your apostrophes by hand within TexShop. That solved my problem.
Saul
sealestt
Posts: 4
Joined: Fri Sep 12, 2008 11:37 am

Re: Missing apostrophe?

Post by sealestt »

Judy,

I had the same problem and resolved it in the same way as SaulGood. Mine is a simple document without any equations, but it seems as if TexShop doesn't like the apostrophe character when copied over from (in my case) Word. I simply deleted the character and re-entered it while in TexShop then it rendered correctly.

By the way does anyone know how to make changes like that on a global scale. I did it the painful way by deleting and re-entering each apostrophe character that appeared in my document.

Thanks,
sealestt
------------
"To learn anything you must put aside the safety of your ignorance." --Messiah's Handbook
Sportchek
Posts: 1
Joined: Tue Jan 25, 2011 1:58 am

Re: Missing apostrophe?

Post by Sportchek »

You could use the $\prime$ method but you get apostrophes that look weird cause they're the same size as the letters. If you want a regular apostrophe do $'$ or for quotes use $''$

Simple and easy to use. Works for me!
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Re: Missing apostrophe?

Post by frabjous »

Hey, Sportchek, this thread is well over two years old. I don't think people are still looking for answers, and I don't think they were looking for straight quotes anyway. If you did want straight quotes, the usual methods of getting them would to be use the commands \textquotedbl or \textquotesingle (from textcomp).

But I think the issue was rather than TeXshop was saving characters copied over from Word with the wrong character encoding. I imagine newer versions of TeXshop would support UTF-8 encoding, and that should work provided you loaded the inputenc package with the right option, If you needed to globally replace them, a sed script could do it on a mac if it couldn't be done from within TeXshop.
Andy Ruina
Posts: 4
Joined: Wed Nov 09, 2011 1:47 am

Re: Missing apostrophe?

Post by Andy Ruina »

The problem is not gone. And the solutions above don't work!

I have now, starting this week, missing apostrophe's.
To read this comment you really have to squint to see the
problematic symbol.

The basic problem is that when I type right quote (under ")
in TeXshop I get

’ instead of ' . (squint to see the difference)

The former gives no .pdf output quote, the latter does.

If I can get this symbol (') into my tex document I get a proper
right quote or apostrophe. But I can only get it in by cutting
and pasting from another part of the document, created last week
or before, or by typing it in, say, email and then cutting and pasting.
If I type rightquote in TeXshop I get this symbol (’) in my TeX source
which gives no output in the PDF.

Now it's more weird than that. If I cut and paste this symbol (') to create, say

Sam's

All is good. Then if I add a left quote to create

`Sam's

It is still good and the output pdf says `Sam's.
Then just for fun I try to create

`Sa’m's

Then all of a sudden the TeXshop editor changes it to

`Sa’m’s

(note change in the final right quote) which has the pdf output

`Sams.

I feel like the problem started when I cut and pasted some text that
someone sent me from a PC. But I am not sure about that.

I am using 10.6.8 with TeXshop 2.43. Please email me a response as I am not a regular reader here. Thanks.
Last edited by Andy Ruina on Wed Nov 16, 2011 8:29 pm, edited 1 time in total.
Andy Ruina
Posts: 4
Joined: Wed Nov 09, 2011 1:47 am

Re: Missing apostrophe?

Post by Andy Ruina »

Another clue.

If I type the symbol under " in my TeXshop editor I see
this has-output symbol (') for one second, and then it changes before my
eyes to this has-no-output symbol (’). But if I cut and paste this
has-output symbol (') it is stable and works.

Thus the only way I can make legible documents now is by copying and
pasting whenever I want an apostrophe or right quote.

Frustrating.
Last edited by Andy Ruina on Wed Nov 16, 2011 8:30 pm, edited 1 time in total.
Andy Ruina
Posts: 4
Joined: Wed Nov 09, 2011 1:47 am

Re: Missing apostrophe?

Post by Andy Ruina »

Is this a TeXshop issue or a system keyboard issue?
In the Tex preferences I tried changing the font encoding to Unicode - 8 and this
did not change anything I could note.
Last edited by Andy Ruina on Wed Nov 16, 2011 8:30 pm, edited 1 time in total.
Andy Ruina
Posts: 4
Joined: Wed Nov 09, 2011 1:47 am

Missing apostrophe?

Post by Andy Ruina »

The problem is solved now. The fix comes from personal email from
Richard Koch, who should know! THANKS TO HIM. I give the short fix, then paste his whole email.

Short Fix:
In TeXshop go to the Edit pulldown menu.
Select "Substitutions".
Deselect "Smart quotes".
Done.
The details from the expert:
Andy,

There is sometimes justice in the world. This is a case of that. About a week ago,
I noticed the problem you report on my machine. I was doing other things,
so my first reaction was that apparently you have to type some escape sequence in TeX to get an apostrophy. But I didn’t remember having to do that before.

You email caused me to look more closely, and with some experimentation
I figured out the cause of the problem and how to fix it. Please spread the
fix among the forums you mention.

TeXShop has a menu named “Substitutions” under the Edit menu. This menu activates some features which Apple added for text editing in Leopard. Among the additions are

Smart Copy/Paste
Smart Quotes
Smart Dashes
Smart Links


It turns out that once the menu is added, the items actually work in the editor without any code from me, due to the magic of the Cocoa Programming Environment. At first, I just added the menu and forgot about it.

When I did that, the items were automatically off. A user could turn them
on for a particular file, but once the user quit TeXShop and then restarted, they would again be off.

More recently, I added code to remember the last change. So if you choose “Smart Dashes”, then it will also be on the next time you restart TeXShop.

However, Apple turns “Smart Quotes” on by default. So the code to remember settings has the side effect that “Smart Quotes” are now on unless the user turns them off.

Many of these items in the “Substitutions” menu make little sense for TeX. For example, Smart Quotes inserts non-ascii characters into the source which looks correct on the screen by aren’t recognized by TeX. So the addition of this menu wasn’t really necessary except for a few of the most obscure items, which a few users requested.

OK: So here’s the solution. Turn “Smart Quotes” off. This will fix the problem. After that, smart quotes will always be off, even across restarts of TeXShop.


Dick Koch
Post Reply