tex2lyx/text.cpp: support for all quotation marks (bug2703).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_5_X@22033 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Uwe Stöhr 2007-12-09 13:41:58 +00:00
parent d8aa6654f1
commit 235e9f5ef7
2 changed files with 29 additions and 8 deletions

View File

@ -134,12 +134,16 @@ char const * const known_jurabib_commands[] = { "cite", "citet", "citep",
"citefield", "citetitle", "cite*", 0 };
/// LaTeX names for quotes
char const * const known_quotes[] = { "glqq", "grqq", "quotedblbase",
"textquotedblleft", "quotesinglbase", "guilsinglleft", "guilsinglright", 0};
char const * const known_quotes[] = { "dq", "guillemotleft", "flqq", "og",
"guillemotright", "frqq", "fg", "glq", "glqq", "textquoteleft", "grq", "grqq",
"quotedblbase", "textquotedblleft", "quotesinglbase", "textquoteright", "flq",
"guilsinglleft", "frq", "guilsinglright", 0};
/// the same as known_quotes with .lyx names
char const * const known_coded_quotes[] = { "gld", "grd", "gld",
"grd", "gls", "fls", "frs", 0};
char const * const known_coded_quotes[] = { "prd", "ard", "ard", "ard",
"ald", "ald", "ald", "gls", "gld", "els", "els", "grd",
"gld", "grd", "gls", "ers", "fls",
"fls", "frs", "frs", 0};
/// LaTeX names for font sizes
char const * const known_sizes[] = { "tiny", "scriptsize", "footnotesize",
@ -1190,8 +1194,7 @@ void parse_text(Parser & p, ostream & os, unsigned flags, bool outer,
// extended to other quotes, but is not so easy (a
// left english quote is the same as a right german
// quote...)
else if (t.asInput() == "`"
&& p.next_token().asInput() == "`") {
else if (t.asInput() == "`" && p.next_token().asInput() == "`") {
context.check_layout(os);
begin_inset(os, "Quotes ");
os << "eld";
@ -1199,8 +1202,7 @@ void parse_text(Parser & p, ostream & os, unsigned flags, bool outer,
p.get_token();
skip_braces(p);
}
else if (t.asInput() == "'"
&& p.next_token().asInput() == "'") {
else if (t.asInput() == "'" && p.next_token().asInput() == "'") {
context.check_layout(os);
begin_inset(os, "Quotes ");
os << "erd";
@ -1209,6 +1211,24 @@ void parse_text(Parser & p, ostream & os, unsigned flags, bool outer,
skip_braces(p);
}
else if (t.asInput() == ">" && p.next_token().asInput() == ">") {
context.check_layout(os);
begin_inset(os, "Quotes ");
os << "ald";
end_inset(os);
p.get_token();
skip_braces(p);
}
else if (t.asInput() == "<" && p.next_token().asInput() == "<") {
context.check_layout(os);
begin_inset(os, "Quotes ");
os << "ard";
end_inset(os);
p.get_token();
skip_braces(p);
}
else if (t.asInput() == "<"
&& p.next_token().asInput() == "<" && noweb_mode) {
p.get_token();

View File

@ -87,6 +87,7 @@ What's new
and shaded notes in LyX)
- \selectlanguage, \foreignlanguage, and \inputencoding (bug 27).
- all font settings that are natively supported by LyX.
- all quotation marks (bug 2703).
- xdg-open and sensible-editor are now detected as possible viewer (wrappers).