int const index = quote_index[side_][language_];
docstring retdisp = docstring(1, display_quote_char[times_][index]);
// in french, spaces are added inside double quotes
int const index = quote_index[side_][language_];
docstring retdisp = docstring(1, display_quote_char[times_][index]);
// in french, spaces are added inside double quotes
- if (times_ == DoubleQuotes && prefixIs(loclang->code(), "fr")) {
+ // FIXME: this should be done by a separate quote type.
+ if (times_ == DoubleQuotes && loclang && prefixIs(loclang->code(), "fr")) {
{
// FIXME: should we add a language or a font parameter member?
docstring const text = displayString();
{
// FIXME: should we add a language or a font parameter member?
docstring const text = displayString();
- pi.pain.text(x, y, text[0], pi.base.font);
- int const t = theFontMetrics(pi.base.font)
+ pi.pain.text(x, y, text[0], font);
+ int const t = theFontMetrics(font)
- pi.pain.text(x + t, y, text[0], pi.base.font);
+ pi.pain.text(x + t, y, text[0], font);
- pi.pain.text(x, y, text, pi.base.font);
+ pi.pain.text(x, y, text, font);
{
const int quoteind = quote_index[side_][language_];
string qstr;
if (language_ == FrenchQuotes && times_ == DoubleQuotes
{
const int quoteind = quote_index[side_][language_];
string qstr;
if (language_ == FrenchQuotes && times_ == DoubleQuotes
qstr = latex_quote_t1[times_][quoteind];
#ifdef DO_USE_DEFAULT_LANGUAGE
} else if (doclang == "default") {
#else
} else if (!runparams.use_babel) {
#endif
qstr = latex_quote_t1[times_][quoteind];
#ifdef DO_USE_DEFAULT_LANGUAGE
} else if (doclang == "default") {
#else
} else if (!runparams.use_babel) {
#endif
qstr = latex_quote_ot1[times_][quoteind];
} else {
qstr = latex_quote_babel[times_][quoteind];
}
// Always guard against unfortunate ligatures (!` ?`)
qstr = latex_quote_ot1[times_][quoteind];
} else {
qstr = latex_quote_babel[times_][quoteind];
}
// Always guard against unfortunate ligatures (!` ?`)
- if (prefixIs(qstr, "`"))
- qstr.insert(0, "{}");
+ if (prefixIs(qstr, "`")) {
+ char_type const lastchar = os.lastChar();
+ if (lastchar == '!' || lastchar == '?')
+ qstr.insert(0, "{}");
+ }
void InsetQuotes::validate(LaTeXFeatures & features) const
{
bool const use_babel = features.useBabel();
void InsetQuotes::validate(LaTeXFeatures & features) const
{
bool const use_babel = features.useBabel();