# Replace “quotes” with „quotes“?

I live in a funny part of the world where we're required to quote text like this: „quotes“ (note the difference between the opening and closing quote).

Is there an easy way to set up a LaTeX document so that I could just type the usual double quotes that are on my keyboard ("like this"), and the LaTeX document processor would replace them to the ones that I need („like this“)?

I know I could just use ,, (two commas) and  (two grave accents) in the LaTeX source file, but this seems like a step-back from what Microsoft Word has to offer at this point ;-)

If LaTeX (or XeTeX, or whatever) can't do that by itself, is there a way to preprocess the LaTeX document with some sort of an regular expression (somehow embed the regexp in the document)?

EDIT:

The language in question is Lithuanian.

babel doesn't do what I want; I don't know if it's supposed to.

What I would like to achieve is the automatic "" => „“ replacement. Quoting text with anything more than a single keystroke doesn't seem efficient to me ;-)

-
Why don't you use the csquotes package? – Thorsten Dec 21 '11 at 6:48
Just out of curiosity what language is that? – Canageek Dec 21 '11 at 6:51
@Linas Did you try babel with Lithuanian? – Yiannis Lazarides Dec 21 '11 at 7:10
@Thorsten, could you give an example of how this would work with csquotes? – Linas Dec 21 '11 at 8:38
For single occurrence also \documentclass{article} \usepackage[T1]{fontenc} \begin{document} Text \quotedblbase text\textquotedblright{} text. \end{document} might be noted. – Stephen Dec 21 '11 at 9:29

Using the csquotes package allows logical mark up of quotes. That includes 'short' quotes, which I personally would avoid but was asked for so ...

\documentclass{article}
\usepackage[german]{babel}
\usepackage{csquotes}
\MakeOuterQuote{"}
\begin{document}
\enquote{Labas rytas}

"Labas rytas"
\end{document}


(Lithuanian babel doesn't seem to work 'out of the box', so I've used German as the standard quotation style is the same.)

-
But if the wanted language is Lithuanian, doesn't the \usepackage[german]{babel} load the German hyphenation patterns? – morbusg Dec 21 '11 at 11:12
@morbusg Yes, this was just so that the demo worked. I'm assuming that someone writing in Lithuanian will have a working babel set up for that language, and can therefore make the necessary adjustments to the above. (As it stands, the question does not only apply to Lithuanian, so I hope this is reasonable. After all, you could ask the same thing for German!) – Joseph Wright Dec 21 '11 at 11:16
Ah, I see. Thanks for the explanation. – morbusg Dec 21 '11 at 11:18
I ended up doing this: \usepackage[lithuanian,german]{babel} \usepackage{csquotes} \MakeOuterQuote{"} \selectlanguage{lithuanian} – Linas Feb 16 '12 at 19:10

If you're in Windows, TeXnicCenter can also do it for you... (replacing " with the correct replacement as you type).

-

For Czech, I get better results when using german quotations, as both German and Czech quote using 99text66, whereas croatian uses 99text99. According to https://en.wikipedia.org/wiki/Quotation_mark, the Lithuanian style should be the same as the Czech one, so I assume german would be a better option than croatian for Lithuanian as well.

The code I use to get Czech quotes is the following:

\usepackage[czech]{babel}
\usepackage{csquotes}
\DeclareQuoteAlias{german}{czech}
\MakeOuterQuote{"}


I assume this should be the correct way for Lithuanian as well, just swap czech with lithuanian in the code. I see no need to load german into babel or to use selectlanguage.

-