BabelName slovak
PolyglossiaName slovak
QuoteStyle german
- ActiveChars -
+ ActiveChars -^
Encoding iso8859-2
FontEncoding T1|OT1
DateFormats "d. MMMM yyyy|d. MMM yyyy|d.M.yyyy"
if (stdwidth && !(buffer().params().paragraph_separation))
os << "\\noindent";
+ bool needendgroup = false;
switch (btype) {
case Frameless:
break;
} else {
if (params_.framecolor != "black" || params_.backgroundcolor != "none")
os << "\\fcolorbox{" << params_.framecolor << "}{" << params_.backgroundcolor << "}";
- else
+ else {
+ if (!cprotect.empty() && contains(runparams.active_chars, '^')) {
+ // cprotect relies on ^ being ignored
+ os << "\\begingroup\\catcode`\\^=9";
+ needendgroup = true;
+ }
os << cprotect << "\\fbox";
+ }
}
os << "{";
break;
if (!params_.inner_box && !width_string.empty()
&& (params_.framecolor != "black" || params_.backgroundcolor != "none"))
os << "}";
- if (separation_string != defaultSep || thickness_string != defaultThick)
+ if (separation_string != defaultSep || thickness_string != defaultThick)
os << "}";
+ if (needendgroup)
+ os << "\\endgroup";
break;
case ovalbox:
os << "}";
InsetLayout const & il = getLayout();
if (il.forceOwnlines())
os << breakln;
+ bool needendgroup = false;
if (!il.latexname().empty()) {
if (il.latextype() == InsetLayout::COMMAND) {
// FIXME UNICODE
// FIXME \protect should only be used for fragile
// commands, but we do not provide this information yet.
- if (hasCProtectContent(runparams.moving_arg))
+ if (hasCProtectContent(runparams.moving_arg)) {
+ if (contains(runparams.active_chars, '^')) {
+ // cprotect relies on ^ being ignored
+ os << "\\begingroup\\catcode`\\^=9";
+ needendgroup = true;
+ }
os << "\\cprotect";
- else if (runparams.moving_arg)
+ } else if (runparams.moving_arg)
os << "\\protect";
os << '\\' << from_utf8(il.latexname());
if (!il.latexargs().empty())
os << "}";
if (!il.postcommandargs().empty())
getArgs(os, runparams, true);
+ if (needendgroup)
+ os << "\\endgroup";
} else if (il.latextype() == InsetLayout::ENVIRONMENT) {
// A comment environment doesn't need a % before \n\end
if (il.isDisplay() || runparams.inComment)
{
switch (style.latextype) {
case LATEX_COMMAND:
- if (par.needsCProtection(runparams.moving_arg))
+ if (par.needsCProtection(runparams.moving_arg)) {
+ if (contains(runparams.active_chars, '^'))
+ // cprotect relies on ^ being ignored
+ os << "\\begingroup\\catcode`\\^=9";
os << "\\cprotect";
+ }
os << '\\' << from_ascii(style.latexname());
// Command arguments
// I did not create a parEndCommand for this minuscule
// task because in the other user of parStartCommand
// the code is different (JMarc)
- if (style.isCommand())
- os << "}\n";
+ if (style.isCommand()) {
+ os << "}";
+ if (par.needsCProtection(runparams.moving_arg)
+ && contains(runparams.active_chars, '^'))
+ os << "\\endgroup";
+ os << "\n";
+ }
else
os << '\n';
if (!style.parbreak_is_newline) {
os << runparams.post_macro;
runparams.post_macro.clear();
}
+ if (par.needsCProtection(runparams.moving_arg)
+ && contains(runparams.active_chars, '^'))
+ os << "\\endgroup";
if (runparams.encoding != prev_encoding) {
runparams.encoding = prev_encoding;
os << setEncoding(prev_encoding->iconvName());
os << runparams.post_macro;
runparams.post_macro.clear();
}
+ if (par.needsCProtection(runparams.moving_arg)
+ && contains(runparams.active_chars, '^'))
+ os << "\\endgroup";
if (runparams.encoding != prev_encoding) {
runparams.encoding = prev_encoding;
os << setEncoding(prev_encoding->iconvName());