mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Hack to display section symbol
This commit is contained in:
parent
80dac0e52a
commit
5cb80b867f
@ -68,7 +68,6 @@
|
|||||||
0x00a5 "\\textyen" "textcomp" "force=cp862;cp1255;cp1256;euc-jp;euc-jp-platex;jis;shift-jis-platex" "\\yen" "amssymb" # YEN SIGN
|
0x00a5 "\\textyen" "textcomp" "force=cp862;cp1255;cp1256;euc-jp;euc-jp-platex;jis;shift-jis-platex" "\\yen" "amssymb" # YEN SIGN
|
||||||
0x00a6 "\\textbrokenbar" "textcomp" "force=cp1255;cp1256;iso8859-7;euc-jp;euc-jp-platex;utf8-platex" # BROKEN BAR
|
0x00a6 "\\textbrokenbar" "textcomp" "force=cp1255;cp1256;iso8859-7;euc-jp;euc-jp-platex;utf8-platex" # BROKEN BAR
|
||||||
0x00a7 "\\textsection" "textcomp" "force=cp1255;cp1256;iso8859-7;euc-cn;euc-jp;euc-kr;euc-tw;gbk;jis;shift-jis-platex" "\\mathsection" "" # SECTION SIGN
|
0x00a7 "\\textsection" "textcomp" "force=cp1255;cp1256;iso8859-7;euc-cn;euc-jp;euc-kr;euc-tw;gbk;jis;shift-jis-platex" "\\mathsection" "" # SECTION SIGN
|
||||||
0x00a7 "\\S" ""
|
|
||||||
0x00a8 "\\textasciidieresis" "textcomp" "force=cp1255;cp1256;iso8859-7;euc-cn;euc-jp;euc-kr;gbk;jis;shift-jis-platex" # DIAERESIS
|
0x00a8 "\\textasciidieresis" "textcomp" "force=cp1255;cp1256;iso8859-7;euc-cn;euc-jp;euc-kr;gbk;jis;shift-jis-platex" # DIAERESIS
|
||||||
0x00a9 "\\textcopyright" "textcomp" "force=cp1255;cp1256;koi8-u;iso8859-7;euc-jp;euc-jp-platex;utf8-platex" # COPYRIGHT SIGN
|
0x00a9 "\\textcopyright" "textcomp" "force=cp1255;cp1256;koi8-u;iso8859-7;euc-jp;euc-jp-platex;utf8-platex" # COPYRIGHT SIGN
|
||||||
0x00a9 "\\copyright" ""
|
0x00a9 "\\copyright" ""
|
||||||
|
@ -333,6 +333,7 @@ docstring convertLaTeXCommands(docstring const & str)
|
|||||||
|
|
||||||
bool scanning_cmd = false;
|
bool scanning_cmd = false;
|
||||||
bool scanning_math = false;
|
bool scanning_math = false;
|
||||||
|
bool is_section = false;
|
||||||
bool escaped = false; // used to catch \$, etc.
|
bool escaped = false; // used to catch \$, etc.
|
||||||
while (!val.empty()) {
|
while (!val.empty()) {
|
||||||
char_type const ch = val[0];
|
char_type const ch = val[0];
|
||||||
@ -355,13 +356,24 @@ docstring convertLaTeXCommands(docstring const & str)
|
|||||||
// discard characters until we hit something that
|
// discard characters until we hit something that
|
||||||
// isn't alpha.
|
// isn't alpha.
|
||||||
if (scanning_cmd) {
|
if (scanning_cmd) {
|
||||||
|
if (!is_section && ch == 'S') {
|
||||||
|
is_section = true;
|
||||||
|
val = val.substr(1);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (isAlphaASCII(ch)) {
|
if (isAlphaASCII(ch)) {
|
||||||
|
is_section = false;
|
||||||
val = val.substr(1);
|
val = val.substr(1);
|
||||||
escaped = false;
|
escaped = false;
|
||||||
continue;
|
continue;
|
||||||
|
} else if (is_section) {
|
||||||
|
ret.push_back(0x00a7);
|
||||||
|
is_section = false;
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
// so we're done with this command.
|
// so we're done with this command.
|
||||||
// now we fall through and check this character.
|
// now we fall through and check this character.
|
||||||
|
is_section = false;
|
||||||
scanning_cmd = false;
|
scanning_cmd = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user