Take the 2-minute tour ×
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.

I am using Mac OS X, Standard US English Keyboard. I have written a full document using TeXShop. I have several double quote and single quote for single word or two words (not a quotation of many lines), like

"MyWord"

'MyWord'

However, when the PDF is produced, the opening quote mark looks like a closing one.

Now, how can I set globally so that it looks like normal. I wish I could set a global definition or package without rewriting or editing text. Searching this forum, I found one solution:

\usepackage[T1]{fontenc}  

But it has two problem. It produces straight quote mark, also only working for double quote.

Could any one provide simple solution for:

1) global setting that works for both single and double CURLY quote, so that it looks normal in Mac

2) global setting that works also for single STRAIGHT quote with option: \usepackage[T1]{fontenc}

Note that I am using following package:

\usepackage[catalan,english]{babel}
\usepackage[T1]{fontenc}
\usepackage{upquote}
share|improve this question
    
Don't use straight quotes: they're out of place in typographically sound documents. –  egreg Apr 4 '12 at 12:51
    
This is essentially a duplicate of tex.stackexchange.com/questions/50712/… which was asked by another user at exactly the same time. –  David Carlisle Apr 4 '12 at 12:59
    
@DavidCarlisle:I tried, it did not solve the problem in my case. Mac key board has only one symbol for quote (back quote). I don't see opening: ``text'' .Also, it suggested search for "underscore" and replace it. I did not use underscore. –  khademul Apr 4 '12 at 13:14
    
I tried:\usepackage{quotes} "MyWord" .... but it still making opening curly quote bacward direction in Mac OS X; US key board. Any help please? –  khademul Apr 4 '12 at 13:27
add comment

2 Answers

up vote 2 down vote accepted

I wouldn't use upquote generally as normally it's better to use the quotes designed for the font you are using. If your keyboard makes typing left and right quotes difficult I would use your editor to change

"text"

to

\mydoubleq{text}

and

'text'

to

\mysingleq{text}

Then you can define those commands as

\def\mydoubleq#1{``#1''}
\def\mysingleq#1{`#1'}

so then you never need to type any of the quote characters (you can cut and paste the definitions from this page so you don't need the keyboard to enter those either).

share|improve this answer
    
@ David Carlisle : Many thanks, It works. Well, now it hard to replace those I that I have already written... by global find and replace...difficult for me to find a suitable regular expression to make this change throught the document as bot quote marks exactly same. –  khademul Apr 4 '12 at 13:55
    
What editor are you using? In TeXShop, for example, quotes can be automatically converted to TeX style quotes as you type them. As for converting your existing text, the free text editor TextWrangler has methods for turning " into “ and ”; these could then be easily replaced with TeX style quotes with search and replace. –  Alan Munn Apr 4 '12 at 14:44
add comment

You can use the csquotes package to have almost any mixture of quotation marks in your source, along with sophisticated versions of David's macros (sophisticated in that they are language sensitive, using babel.)

Here's an example:

\documentclass{article}
\usepackage{csquotes}
\usepackage[utf8]{inputenc}
\MakeOuterQuote{"}
\begin{document}
\begin{enumerate}
\item "This was \enquote{quoted} using upright quotes".

\item \enquote{This was \enquote{quoted} quoted using {\texttt{\textbackslash enquote}}}.

\item ``This was \enquote{quoted} using regular TeX quotes''

\item “This was ‘quoted’ using real quotes in the input”
\end{enumerate}
\end{document}

enter image description here

As you can see from the output, upright double quotes in your source can be automatically changed to proper quotes as in (1). You can also use the \enquote macro This automatically changes the quotes correctly when embedded in another quotation as in (1) and (2). You can also use regular TeX source quotes as in (3) but then an embedded quote will not be automatically changed to single quotes. Finally in (4) you can enter the quotation marks directly assuming you save your file with the proper encoding and either load the inputenc package (UTF-8 recommended) or use XeLaTeX or LuaLaTeX (which expect UTF-8 by default). On a US Mac keyboard, the the double quotes are Option-[ and Option-} and the single quotes are Option-] and Option-}.

share|improve this answer
add comment

Your Answer

 
discard

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.