Removing the mathpazo
package and including babel
with USenglish, I've got the result desired with no errors or warnings.
\documentclass[12pt]{article}
\usepackage[USenglish]{babel}
\usepackage{geometry}
\geometry{letterpaper}
\usepackage{graphicx}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{epstopdf}
\usepackage{txfonts}
\usepackage{enumerate}
\usepackage[autostyle]{csquotes}
\usepackage{tikz}
\usetikzlibrary{shapes,arrows,positioning}
\tikzstyle{int}=[draw, minimum size=2em]
\tikzstyle{init} = [pin edge={to-,thin,black}]
%\usepackage{mathpazo}
\usepackage{lettrine}
\DeclareGraphicsRule{.tif}{png}{.png}{`convert #1 `dirname #1`/`basename #1 .tif`.png}
\DeclareMathSymbol{\boxright}{\mathrel}{symbolsC}{128}
\DeclareMathOperator*{\Max}{Max}
\usepackage[round]{natbib}
\def\Vox{$^{\fbox {\/}}$}
\def\dalem{\mbox{\Vox}}
\def\prom{
\newtheorem{prop}{Proposition}[section]
\newtheorem{cor}[prop]{Corollary}
\newtheorem{lem}[prop]{Lemma}
\newtheorem{exa}[prop]{Example}
\newtheorem{sch}[prop]{Scholium}
\newtheorem{rem}[prop]{Remark}
\newtheorem{axi}[prop]{Axiom System}
\newtheorem{con}[prop]{Conjecture}
\newtheorem{theor}[prop]{Theorem}
\newtheorem{cla}[prop]{Claim}
\newtheorem{hypo}[prop]{Hypothesis}
\newtheorem{tef}[prop]{Definition}}
\pagestyle {myheadings}
\prom
\tikzset
{
box/.style={rectangle,rounded corners,draw=black, very thick, text width=7.5em, minimum height=2em,text centered},
}
\title{XXX}
\author{XXX}
\date{\today}
\begin{document}
Do not be alarmed. This is a `kindness'.
\end{document}
Disclaimer: I discovered regular expressions less than a month ago.
This is the easiest way I can think of, since, as others have said, `
and '
are ligatures in the font. This solution works at least in your example.
You need a system that lets you use regular expresions. In my case I used my text editor. Here you have, for instance, an online one (I don't know its limitations) regex101.
Once there, you paste your code in test string. And also open the substitution “tab” which is at the bottom. Now you are going to search and replace with regular expressions which leaves you with the replaced text at the bottom, so each step you need to copy the code in the bottom and paste it again in the top.
- Regular expression
(\W)``
and substitution \1„
.
- Regular expression
''(\W)
and substitution “\1
.
- Regular expression
(\W)`
and substitution \1,
. (I used a comma here in the replacemente text since I don't know what you need)
- Regular expression
'(\W)
and substitution ‘\1
.
That will leave your example text like
\documentclass{scrartcl}
\usepackage[polutonikogreek,ngerman]{babel}%
\usepackage[babel,german=quotes]{csquotes}
\begin{document}
„Double quotes“
,Single quotes‘
\foreignlanguage{polutonikogreek}{o>uko~un t~w m`en >agenn'htw patr`i o>ike~ion >ax'iwma fulakt'eon, mhd'ena to~u e@inai a>ut~w t`on a>'ition l'egontas; t~w d`e u<i~w t`hn <arm'ozousan tim`hn >aponemht'eon, t`hn >'anarqon a>ut~w par`a to~u patr`os g'ennhsin >anatij'entas; ka`i <ws >afj'asamen a>ut~w s'ebas >apon'emontes, m'onon e>usebos ka`i e>uf'hmws t`o @hn ka`i t`o >ae`i ka`i t`o pr`o a>i'wnwn l'egontes >ep> a>uto~u, t`hn m'entoi je'othta a>uto~u m`h paraitou'menoi, >all`a t~h e>ik'oni ka`i t~w qarakt~hri to~u patr`os >aphkribwm'enhn >emf'ereian kat`a p'anta >anatij'entes, t`o d`e >ag'ennhton t~w patr`i m'onon >id'iwma pare~inai dox'azontes, <'ate d`h ka`i a>uto~u f'askontos to~u swt~hros; »<o pat'hr mou me'izwn mo'u >estin«.}
\end{document}
Which seems right (except for the comma I used instead of an opening low quote :D).
A little explanation. \W
searches for a non-letter (that is, something that is not [a-zA-Z0-9_]
, with the parenthesis (\W)
you save its content into \1
. So searching for '(\W)
will search for a quote and a non letter which removes the possibility of selecting it when it's inside a word. Now the replacement is ‘\1
which is what you want, you change the quote and re-insert the non-letter you grabbed in the search (so you don't loose it).
Best Answer
Probably this will cause some other troubles, but here it is.
Elaborating a bit on this answer of Martin Scharrer, this is the result:
Code:
If the meaning of
'
in math mode is to be preserved, some other hacks are needed:This last solution also transforms single quotes into German ones: