From 2ea605f85ac8785c42ffba6305fc16707cc4b8e9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Uwe=20St=C3=B6hr?= Date: Sun, 9 Dec 2007 13:40:03 +0000 Subject: [PATCH] tex2lyx/text.cpp: support for all quotation marks (bug2703). git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22032 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/tex2lyx/text.cpp | 36 ++++++++++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 8 deletions(-) diff --git a/src/tex2lyx/text.cpp b/src/tex2lyx/text.cpp index eefee3192c..7705c9a6d4 100644 --- a/src/tex2lyx/text.cpp +++ b/src/tex2lyx/text.cpp @@ -132,12 +132,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", @@ -1189,8 +1193,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"; @@ -1198,8 +1201,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"; @@ -1208,6 +1210,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(); -- 2.39.2