I did not know that latex had different symbol for opening and closing quotation marks. I've used it like "abc" every where and just realised that I really should have used ``abc"
. Is there anyway I can convert all the quotations to become like ``abc"? Doing it manually will take forever as I have a lot of quotations.
4 Answers
An alternative to quotes
is csquotes
from 2011, while quotes
is from 1997 …
\documentclass[english]{article}
\usepackage{babel}
\usepackage{csquotes}
\MakeOuterQuote{"}
\begin{document}
Hello "World"!
\end{document}
-
Ack, I knew this was too good to be true:
Package csquotes Error: ucs package not supported
Sep 25, 2018 at 4:50
The package csquotes
has many more goodies than the one mentioned. If you use the command \enquote{. . .}
, you can nest several levels of quotations, while LaTeX preserves the correct couples of signs. You can even set localization preferences in order to use the proper signs for a language.
For instance, \enquote{\enquote{This is a quote within a quote}}
will be rendered as:
“‘This is a quote within a quote’”
(with a thin space in between the contiguous signs).
But if you load the csquotes
package thus (as I usually do):
\usepackage[autostyle=false, style=british]{csquotes}
the previous code will be rendered thus:
‘“This is a quote within a quote”’
See the documentation of the package for further details (texdoc csquotes
).
There is a package for this: quotes
. With this package, "text"
is typeset correctly as ``text''
.
-
10
Edit 2 solution suggested by Boris seems to be the easier way.
Depending on which editor you use you can perform a search an replace. You would be searching for
_"
(replace the underscore with a white space, its just there to make my point) and then replace it by
_``
again, the underscore stands for a white space.
Edit
As David Carlisle pointed out that you should also change the right quote to ''
so you get the proper right quote.
However there you have to account for the following characters after the right quote. I know no better way than trying to think of all possibilities (I can think of 4 that are likely)
"_ %your quote is followed by a white space
". %your quote is followed by a period
", %your quote is followed by a comma
"! %your quote is followed by an exclamation mark
then replace each of them with their respective version
''_
etc.
Edit 3 MWE with quotes package
% !TEX encoding = UTF-8 Unicode
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{quotes}
\begin{document}
\noindent "test" \\
``test''
\end{document}
-
4Note that in addition to changing the left quote to `` ` `` you should change the right one to
''
it is only by accident, and only in some encodings, that the input of"
produces the right double quote ligature. Apr 4, 2012 at 12:27 -
I tried:\usepackage{quotes} ...... "MyWord" .... but it still making opening curly quote back-ward direction I am using Mac OS X, Standard US english Key-board. I have written full document using TexShop. An did not use underscore...so that I do find and replace as suggested by @Philipp....... Any help please?– khademulApr 4, 2012 at 13:29
-
I tried a MWE with the
quotes
package and it works fine. I added the MWE to my answer at the end.– PhilippApr 4, 2012 at 14:53
sed
for this (sed
is awesome). It does require some escaping on the command line, since you are trying to replace quotes. I can't put it in here, since it contains backticks. So a link will have to do."
with the correct quotation form when you type the character. I know for a fact kile does this, and I believe AUCTeX does so as well.pgf
math engine and in that case I need actual quotes, not the converted ones. Which mostly ends up in me typing\"
and then removing the ``. This doesn't happen often enough for me to disable the autoreplace though. I know what I want in what case and how to obtain it. If you are using mostly quotes as in quotations it's an option though :)