+ }
+ }
+ } else if (token == "\\index") {
+ lex.eatLine();
+ docstring index = lex.getDocString();
+ docstring shortcut;
+ indiceslist().add(index);
+ while (true) {
+ lex.next();
+ string const tok = lex.getString();
+ if (tok == "\\end_index")
+ break;
+ Index * index_ptr = indiceslist().find(index);
+ if (tok == "\\shortcut") {
+ lex.next();
+ shortcut = lex.getDocString();
+ if (index_ptr)
+ index_ptr->setShortcut(shortcut);
+ }
+ if (tok == "\\color") {
+ lex.eatLine();
+ string color = lex.getString();
+ if (index_ptr)
+ index_ptr->setColor(color);
+ // Update also the Color table:
+ if (color == "none")
+ color = lcolor.getX11Name(Color_background);
+ // FIXME UNICODE
+ if (!shortcut.empty())
+ lcolor.setColor(to_utf8(shortcut), color);