mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-07 12:32:26 +00:00
Correct ^ catcode for \cprotect
This commit is contained in:
parent
4c11ba11fd
commit
2746fdf7dd
@ -442,8 +442,8 @@ void InsetBox::latex(otexstream & os, OutputParams const & runparams) const
|
||||
os << "\\fcolorbox{" << params_.framecolor << "}{" << params_.backgroundcolor << "}";
|
||||
else {
|
||||
if (!cprotect.empty() && contains(runparams.active_chars, '^')) {
|
||||
// cprotect relies on ^ being ignored
|
||||
os << "\\begingroup\\catcode`\\^=9";
|
||||
// cprotect relies on ^ being on catcode 7
|
||||
os << "\\begingroup\\catcode`\\^=7";
|
||||
needendgroup = true;
|
||||
}
|
||||
os << cprotect << "\\fbox";
|
||||
|
@ -462,8 +462,8 @@ void InsetText::latex(otexstream & os, OutputParams const & runparams) const
|
||||
// commands, but we do not provide this information yet.
|
||||
if (hasCProtectContent(runparams.moving_arg)) {
|
||||
if (contains(runparams.active_chars, '^')) {
|
||||
// cprotect relies on ^ being ignored
|
||||
os << "\\begingroup\\catcode`\\^=9";
|
||||
// cprotect relies on ^ being on catcode 7
|
||||
os << "\\begingroup\\catcode`\\^=7";
|
||||
needendgroup = true;
|
||||
}
|
||||
os << "\\cprotect";
|
||||
|
@ -681,8 +681,8 @@ void parStartCommand(Paragraph const & par, otexstream & os,
|
||||
case LATEX_COMMAND:
|
||||
if (par.needsCProtection(runparams.moving_arg)) {
|
||||
if (contains(runparams.active_chars, '^'))
|
||||
// cprotect relies on ^ being ignored
|
||||
os << "\\begingroup\\catcode`\\^=9";
|
||||
// cprotect relies on ^ being on catcode 7
|
||||
os << "\\begingroup\\catcode`\\^=7";
|
||||
os << "\\cprotect";
|
||||
}
|
||||
os << '\\' << from_ascii(style.latexname());
|
||||
|
Loading…
Reference in New Issue
Block a user