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 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)?


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 ;-)

share|improve this question
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

2 Answers 2

up vote 36 down vote accepted

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

\enquote{Labas rytas}

"Labas rytas"

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

share|improve this answer
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).

share|improve this answer

Your Answer


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.