}
}
} else if (i >= start_pos && (end_pos == -1 || i < end_pos)) {
- if (!bparams.useNonTeXFonts)
- script = Encodings::isKnownScriptChar(c);
+ if (!bparams.useNonTeXFonts && !runparams.pass_thru
+ && !contains(runparams.pass_thru_chars, c))
+ script = Encodings::isKnownScriptChar(c);
if (script != alien_script) {
if (!alien_script.empty()) {
os << "}";
bool Paragraph::needsCProtection(bool const fragile) const
{
// first check the layout of the paragraph, but only in insets
+ // and not in tables
InsetText const * textinset = inInset().asInsetText();
bool const maintext = textinset
- ? textinset->text().isMainText()
+ ? textinset->text().isMainText() || inInset().lyxCode() == CELL_CODE
: false;
if (!maintext && layout().needcprotect) {
else if (c == META_INSET && (options & AS_STR_INSETS)) {
if (c == META_INSET && (options & AS_STR_PLAINTEXT)) {
LASSERT(runparams != nullptr, return docstring());
- if (runparams->find_effective() && getInset(i)->hasToString())
+ if (runparams->find_effective() && getInset(i)->findUsesToString())
getInset(i)->toString(os);
else
getInset(i)->plaintext(os, *runparams);