should be handled by this function:
- abc \j{} xyz
- abc \j {} xyz
- - abc \j
+ - abc \j
{} xyz
- abc \j %comment
{} xyz
while (optargs < context.layout->optargs) {
eat_whitespace(p, os, context, false);
if (p.next_token().cat() == catEscape ||
- p.next_token().character() != '[')
+ p.next_token().character() != '[')
break;
p.get_token(); // eat '['
begin_inset(os, "Argument\n");
// the inner env
if (!inner_type.empty() && (inner_flags & FLAG_END))
active_environments.pop_back();
-
+
// Ensure that the end of the outer box is parsed correctly:
// The opening brace has been eaten by parse_outer_box()
if (!outer_type.empty() && (outer_flags & FLAG_ITEM)) {
while (optargs < context.layout->optargs) {
eat_whitespace(p, os, context, false);
if (p.next_token().cat() == catEscape ||
- p.next_token().character() != '[')
+ p.next_token().character() != '[')
break;
p.get_token(); // eat '['
if (need_layout) {
end_inset(os);
skip_spaces_braces(p);
}
-
+
else if (t.cs() == "lyxline") {
// swallow size argument (it is not used anyway)
p.getArg('{', '}');
end_inset(os);
preamble.registerAutomaticallyLoadedPackage("nomencl");
}
-
+
else if (t.cs() == "label") {
context.check_layout(os);
begin_command_inset(os, "label", "label");
else if (t.cs() == "selectlanguage") {
context.check_layout(os);
// save the language for the case that a
- // \foreignlanguage is used
+ // \foreignlanguage is used
context.font.language = babel2lyx(p.verbatim_item());
os << "\n\\lang " << context.font.language << "\n";
handle_ert(os, t.asInput(), context);
// accents (see Table 6 in Comprehensive LaTeX Symbol List)
- else if (t.cs().size() == 1
+ else if (t.cs().size() == 1
&& contains("\"'.=^`bcdHkrtuv~", t.cs())) {
context.check_layout(os);
// try to see whether the string is in unicodesymbols
docstring rem;
- string command = t.asInput() + "{"
+ string command = t.asInput() + "{"
+ trimSpaceAndEol(p.verbatim_item())
+ "}";
set<string> req;
Encodings::TEXT_CMD | Encodings::MATH_CMD, rem, &req);
if (!s.empty()) {
if (!rem.empty())
- cerr << "When parsing " << command
+ cerr << "When parsing " << command
<< ", result is " << to_utf8(s)
<< "+" << to_utf8(rem) << endl;
os << to_utf8(s);
Encodings::TEXT_CMD, rem, &req);
if (!s.empty()) {
if (!rem.empty())
- cerr << "When parsing " << t.cs()
+ cerr << "When parsing " << t.cs()
<< ", result is " << to_utf8(s)
<< "+" << to_utf8(rem) << endl;
context.check_layout(os);