- else if (t.cs() == "colorbox") {
- string const backgroundcolor = p.getArg('{', '}');
- parse_box(p, os, 0, 0, outer, context, "", "", "", "", backgroundcolor);
+ else if (t.cs() == "fcolorbox" || t.cs() == "colorbox") {
+ string backgroundcolor;
+ preamble.registerAutomaticallyLoadedPackage("xcolor");
+ if (t.cs() == "fcolorbox") {
+ string const framecolor = p.getArg('{', '}');
+ backgroundcolor = p.getArg('{', '}');
+ parse_box(p, os, 0, 0, outer, context, "", "", "", framecolor, backgroundcolor);
+ } else {
+ backgroundcolor = p.getArg('{', '}');
+ parse_box(p, os, 0, 0, outer, context, "", "", "", "", backgroundcolor);
+ }
+ }
+
+ // FIXME: due to the compiler limit of "if" nestings
+ // the code for the alignment was put here
+ // put them in their own if if this is fixed
+ else if (t.cs() == "fboxrule" || t.cs() == "fboxsep"
+ || t.cs() == "shadowsize"
+ || t.cs() == "raggedleft" || t.cs() == "centering"
+ || t.cs() == "raggedright") {
+ if (t.cs() == "fboxrule")
+ fboxrule = "";
+ if (t.cs() == "fboxsep")
+ fboxsep = "";
+ if (t.cs() == "shadowsize")
+ shadow_size = "";
+ if (t.cs() != "raggedleft" && t.cs() != "centering"
+ && t.cs() != "raggedright") {
+ p.skip_spaces(true);
+ while (p.good() && p.next_token().cat() != catSpace
+ && p.next_token().cat() != catNewline
+ && p.next_token().cat() != catEscape) {
+ if (t.cs() == "fboxrule")
+ fboxrule = fboxrule + p.get_token().asInput();
+ if (t.cs() == "fboxsep")
+ fboxsep = fboxsep + p.get_token().asInput();
+ if (t.cs() == "shadowsize")
+ shadow_size = shadow_size + p.get_token().asInput();
+ }
+ } else {
+ output_ert_inset(os, t.asInput(), context);
+ }