* r <<russian>> (,,inner quotation``)
* j [U+300C]cjk[U+300D] ([U+300E]inner quotation[U+300F]) [CORNER BRACKETS]
* k [U+300A]cjkangle[U+300B] ([U+3008]inner quotation[U+3009]) [ANGLE BRACKETS]
+ * h ,,hungarian'' (>>inner quotation<<)
* x dynamic style (inherits document settings)
*/
-char const * const style_char = "esgpcaqbwfirjkx";
+char const * const style_char = "esgpcaqbwfirjkhx";
char const * const side_char = "lr" ;
char const * const level_char = "sd";
right_secondary = 0x3009; // RIGHT ANGLE BRACKET
break;
}
+ case QuoteStyle::Hungarian: {
+ left_primary = 0x201e; // ,,
+ right_primary = 0x201d; // ''
+ left_secondary = 0x00bb; // >>
+ right_secondary = 0x00ab; // <<
+ break;
+ }
case QuoteStyle::Dynamic:
default:
// should not happen
bool dynamic = false;
if (buf) {
global_style_ = buf->masterBuffer()->params().quotes_style;
- fontenc_ = buf->masterBuffer()->params().main_font_encoding();
dynamic = buf->masterBuffer()->params().dynamic_quotes;
fontspec_ = buf->masterBuffer()->params().useNonTeXFonts;
- } else {
- fontenc_ = "OT1";
}
if (style.empty())
style_ = dynamic ? QuoteStyle::Dynamic : global_style_;
qs = QuoteStyle::CJK;
else if (s == "cjkangle")
qs = QuoteStyle::CJKAngle;
+ else if (s == "hungarian")
+ qs = QuoteStyle::Hungarian;
else if (s == "dynamic")
qs = QuoteStyle::Dynamic;
docstring qstr;
// In pass-thru context, we output plain quotes
- if (runparams.pass_thru)
+ if (runparams.pass_thru || runparams.find_effective())
qstr = (level_ == QuoteLevel::Primary) ? from_ascii("\"") : from_ascii("'");
else if (style == QuoteStyle::Plain && fontspec_) {
// For XeTeX and LuaTeX,we need to disable mapping to get straight
// Use internal commands in headings with hyperref
// (ligatures not featured in PDF strings)
qstr = quoteparams.getLaTeXQuote(quotechar, "int", rtl_);
- } else if (fontenc_ == "T1"
+ } else if (runparams.main_fontenc == "T1"
&& !runparams.local_font->language()->internalFontEncoding()) {
// Quotation marks for T1 font encoding
// (using ligatures)
#else
} else if ((!runparams.use_babel
#endif
- || (fontenc_ != "T1" && fontenc_ != "OT1"))
+ || (runparams.main_fontenc != "T1" && runparams.main_fontenc != "OT1"))
|| runparams.isFullUnicode()) {
// Standard quotation mark macros
// These are also used by babel
int InsetQuotes::plaintext(odocstringstream & os,
- OutputParams const &, size_t) const
+ OutputParams const & op, size_t) const
{
- docstring const str = displayString();
- os << str;
- return str.size();
+ if (!op.find_effective()) {
+ docstring const str = displayString();
+ os << str;
+ return str.size();
+ }
+ else {
+ if (level_ == QuoteLevel::Primary)
+ os << from_ascii("\"");
+ else
+ os << from_ascii("'");
+ return 1;
+ }
}
pass_thru_ = it.paragraph().isPassThru();
context_lang_ = font.language()->code();
internal_fontenc_ = font.language()->internalFontEncoding();
- fontenc_ = bp.main_font_encoding();
global_style_ = bp.quotes_style;
fontspec_ = bp.useNonTeXFonts;
rtl_ = font.isRightToLeft();
#else
if (!features.useBabel()
#endif
- && !features.runparams().isFullUnicode() && fontenc_ != "T1") {
+ && !features.runparams().isFullUnicode()
+ && features.runparams().main_fontenc != "T1") {
switch (type) {
case 0x201a:
features.require("quotesinglbase");
case 0x0022: {
if (features.runparams().isFullUnicode() && fontspec_)
features.require("textquotedblp");
- else if (fontenc_ != "T1" || internal_fontenc_)
+ else if (features.runparams().main_fontenc != "T1" || internal_fontenc_)
features.require("textquotedbl");
break;
}