From 381f491b3eecbf90f2202a37f3c43c7f487f8713 Mon Sep 17 00:00:00 2001 From: GrĂ©goire DuchĂȘne Date: Tue, 7 Dec 2010 06:19:44 +0100 Subject: Bogus inline quotation implementation corrected. OK, I implemented subscript text instead of inline quotations, but I called it "inline quotation support" anyway. My bad, it is now fixed, and subscript text is coming right away. --- src/elements.h | 3 ++- src/generators/latex/text_g.cpp | 2 +- src/parser/text_p.cpp | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/elements.h b/src/elements.h index 964b036..c0e392c 100644 --- a/src/elements.h +++ b/src/elements.h @@ -35,7 +35,8 @@ enum stattribute_t { CODE, MATH, SUPER, - QUOTE + QUOTE, + SUB }; struct stext_t { diff --git a/src/generators/latex/text_g.cpp b/src/generators/latex/text_g.cpp index ced4bf3..338172a 100644 --- a/src/generators/latex/text_g.cpp +++ b/src/generators/latex/text_g.cpp @@ -29,7 +29,7 @@ latex::text_g::text_g() : text_g::base_type(text_) { | &uint_(CODE) << L"\\texttt{" << +text_ << '}' | &uint_(MATH) << L"$" << +text_ << '$' | &uint_(SUPER) << L"^{" << +text_ << '}' - | &uint_(QUOTE) << L"_{" << +text_ << '}'; + | &uint_(QUOTE) << L"``" << +text_ << L"''"; ptext_ = +char_; } diff --git a/src/parser/text_p.cpp b/src/parser/text_p.cpp index 878336d..16cb703 100644 --- a/src/parser/text_p.cpp +++ b/src/parser/text_p.cpp @@ -31,7 +31,7 @@ text_p::text_p() : text_p::base_type(text_) { | lit('$') >> attr(MATH) >> +ptext_(val(L"$")) >> '$' | lit("^{") >> attr(SUPER) >> +text_(val(L"*'`$^}")) >> '}' | lit('^') >> attr(SUPER) >> +text_(val(L"*'`$ ")) - | lit(L"@_") >> attr(QUOTE) >> +text_(val(L"*'`$_")) >> '_'; + | lit(L"@\"") >> attr(QUOTE) >> +text_(val(L"*'`$@\"")) >> '"'; ptext_ = +(echar_ | rchar_(_r1)); echar_ = lit('\\') >> char_; -- cgit v1.2.3-70-g09d2