commit 14dbaa76083a4fdd2bd52aaf67d8da6d60557633
Author: Juergen Spitzmueller <[email protected]>
Date: Fri Dec 16 10:20:25 2016 +0100
context-sensitive command termination at some more places.
---
src/Paragraph.cpp | 24 ++++++++++++------------
src/insets/InsetIndex.cpp | 2 +-
src/insets/InsetNewpage.cpp | 10 +++++-----
src/insets/InsetNomencl.cpp | 3 ++-
4 files changed, 20 insertions(+), 19 deletions(-)
diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp
index 135ba96..6238033 100644
--- a/src/Paragraph.cpp
+++ b/src/Paragraph.cpp
@@ -1079,7 +1079,7 @@ void Paragraph::Private::latexInset(BufferParams const &
bparams,
// decorations at all
&& inset->lyxCode() != ERT_CODE) {
if (running_font.language()->lang() == "farsi")
- os << "\\beginL{}";
+ os << "\\beginL" << termcmd;
else
os << "\\L{";
close = true;
@@ -1135,7 +1135,7 @@ void Paragraph::Private::latexInset(BufferParams const &
bparams,
if (close) {
if (running_font.language()->lang() == "farsi")
- os << "\\endL{}";
+ os << "\\endL" << termcmd;
else
os << '}';
}
@@ -1194,19 +1194,19 @@ void Paragraph::Private::latexSpecialChar(otexstream &
os,
// Otherwise, we use what LaTeX provides us.
switch (c) {
case '\\':
- os << "\\textbackslash{}";
+ os << "\\textbackslash" << termcmd;
column += 15;
break;
case '<':
- os << "\\textless{}";
+ os << "\\textless" << termcmd;
column += 10;
break;
case '>':
- os << "\\textgreater{}";
+ os << "\\textgreater" << termcmd;
column += 13;
break;
case '|':
- os << "\\textbar{}";
+ os << "\\textbar" << termcmd;
column += 9;
break;
case '-':
@@ -1223,7 +1223,7 @@ void Paragraph::Private::latexSpecialChar(otexstream & os,
}
break;
case '\"':
- os << "\\char`\\\"{}";
+ os << "\\char`\\\"" << termcmd;
column += 9;
break;
@@ -1236,12 +1236,12 @@ void Paragraph::Private::latexSpecialChar(otexstream &
os,
break;
case '~':
- os << "\\textasciitilde{}";
+ os << "\\textasciitilde" << termcmd;
column += 16;
break;
case '^':
- os << "\\textasciicircum{}";
+ os << "\\textasciicircum" << termcmd;
column += 17;
break;
@@ -1339,7 +1339,7 @@ bool Paragraph::Private::latexSpecialT1(char_type const
c, otexstream & os,
// but we should avoid ligatures
if (i + 1 >= int(text_.size()) || text_[i + 1] != c)
return true;
- os << "\\textcompwordmark{}";
+ os << "\\textcompwordmark" << termcmd;
column += 19;
return true;
case '|':
@@ -1347,7 +1347,7 @@ bool Paragraph::Private::latexSpecialT1(char_type const
c, otexstream & os,
return true;
case '\"':
// soul.sty breaks with \char`\"
- os << "\\textquotedbl{}";
+ os << "\\textquotedbl" << termcmd;
column += 14;
return true;
default:
@@ -1367,7 +1367,7 @@ bool Paragraph::Private::latexSpecialT3(char_type const
c, otexstream & os,
os.put(c);
return true;
case '|':
- os << "\\textvertline{}";
+ os << "\\textvertline" << termcmd;
column += 14;
return true;
default:
diff --git a/src/insets/InsetIndex.cpp b/src/insets/InsetIndex.cpp
index f8dca3b..455b09f 100644
--- a/src/insets/InsetIndex.cpp
+++ b/src/insets/InsetIndex.cpp
@@ -562,7 +562,7 @@ void InsetPrintIndex::latex(otexstream & os, OutputParams
const & runparams_in)
{
if (!buffer().masterBuffer()->params().use_indices) {
if (getParam("type") == from_ascii("idx"))
- os << "\\printindex{}";
+ os << "\\printindex" << termcmd;
return;
}
OutputParams runparams = runparams_in;
diff --git a/src/insets/InsetNewpage.cpp b/src/insets/InsetNewpage.cpp
index e83f56d..e062e8b 100644
--- a/src/insets/InsetNewpage.cpp
+++ b/src/insets/InsetNewpage.cpp
@@ -215,21 +215,21 @@ void InsetNewpage::latex(otexstream & os, OutputParams
const & runparams) const
{
switch (params_.kind) {
case InsetNewpageParams::NEWPAGE:
- os << "\\newpage{}";
+ os << "\\newpage" << termcmd;
break;
case InsetNewpageParams::PAGEBREAK:
if (runparams.moving_arg)
os << "\\protect";
- os << "\\pagebreak{}";
+ os << "\\pagebreak" << termcmd;
break;
case InsetNewpageParams::CLEARPAGE:
- os << "\\clearpage{}";
+ os << "\\clearpage" << termcmd;
break;
case InsetNewpageParams::CLEARDOUBLEPAGE:
- os << "\\cleardoublepage{}";
+ os << "\\cleardoublepage" << termcmd;
break;
default:
- os << "\\newpage{}";
+ os << "\\newpage" << termcmd;
break;
}
}
diff --git a/src/insets/InsetNomencl.cpp b/src/insets/InsetNomencl.cpp
index 76bd7b3..7395b6c 100644
--- a/src/insets/InsetNomencl.cpp
+++ b/src/insets/InsetNomencl.cpp
@@ -407,7 +407,8 @@ void InsetPrintNomencl::latex(otexstream & os, OutputParams
const & runparams_in
<< from_ascii(getCmdName())
<< '['
<< from_ascii(width)
- << "]{}";
+ << "]"
+ << termcmd;
return;
}
// output the command \printnomenclature