diff options
| author | Grégoire Duchêne <gduchene@fastmail.net> | 2010-12-06 08:26:12 +0100 |
|---|---|---|
| committer | Grégoire Duchêne <gduchene@fastmail.net> | 2010-12-06 08:26:12 +0100 |
| commit | 792bc5386756a42d622d5f023b40808553b912de (patch) | |
| tree | 0007b98f5b8d0b25f31af011edb4533e8af04d9e | |
| parent | 52abe044a7b6b8be364f91be4ab52d4972431163 (diff) | |
Inline quotation support added.
| -rw-r--r-- | src/elements.h | 3 | ||||
| -rw-r--r-- | src/generators/latex/text_g.cpp | 3 | ||||
| -rw-r--r-- | src/parser/document_p.cpp | 2 | ||||
| -rw-r--r-- | src/parser/text_p.cpp | 3 |
4 files changed, 7 insertions, 4 deletions
diff --git a/src/elements.h b/src/elements.h index 7f77914..964b036 100644 --- a/src/elements.h +++ b/src/elements.h @@ -34,7 +34,8 @@ enum stattribute_t { SALT, CODE, MATH, - SUPER + SUPER, + QUOTE }; struct stext_t { diff --git a/src/generators/latex/text_g.cpp b/src/generators/latex/text_g.cpp index 3a4d066..ced4bf3 100644 --- a/src/generators/latex/text_g.cpp +++ b/src/generators/latex/text_g.cpp @@ -28,7 +28,8 @@ latex::text_g::text_g() : text_g::base_type(text_) { | &uint_(SALT) << L"\\textit{\\textbf{" << +text_ << L"}}" | &uint_(CODE) << L"\\texttt{" << +text_ << '}' | &uint_(MATH) << L"$" << +text_ << '$' - | &uint_(SUPER) << L"^{" << +text_ << '}'; + | &uint_(SUPER) << L"^{" << +text_ << '}' + | &uint_(QUOTE) << L"_{" << +text_ << '}'; ptext_ = +char_; } diff --git a/src/parser/document_p.cpp b/src/parser/document_p.cpp index 1c1a884..25679e9 100644 --- a/src/parser/document_p.cpp +++ b/src/parser/document_p.cpp @@ -16,5 +16,5 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #include "document_p.h" document_p::document_p() : document_p::base_type(document_) { - document_ = +text_(ph::val(L"*'`$^")); + document_ = +text_(ph::val(L"*'`$^@")); } diff --git a/src/parser/text_p.cpp b/src/parser/text_p.cpp index 658aad0..878336d 100644 --- a/src/parser/text_p.cpp +++ b/src/parser/text_p.cpp @@ -30,7 +30,8 @@ text_p::text_p() : text_p::base_type(text_) { | lit('`') >> attr(CODE) >> +ptext_(val(L"`")) >> '`' | lit('$') >> attr(MATH) >> +ptext_(val(L"$")) >> '$' | lit("^{") >> attr(SUPER) >> +text_(val(L"*'`$^}")) >> '}' - | lit('^') >> attr(SUPER) >> +text_(val(L"*'`$ ")); + | lit('^') >> attr(SUPER) >> +text_(val(L"*'`$ ")) + | lit(L"@_") >> attr(QUOTE) >> +text_(val(L"*'`$_")) >> '_'; ptext_ = +(echar_ | rchar_(_r1)); echar_ = lit('\\') >> char_; |
