return os.str();
}
+string fboxrule = "";
+string fboxsep = "";
+string shadow_size = "";
char const * const known_ref_commands[] = { "ref", "pageref", "vref",
"vpageref", "prettyref", "nameref", "eqref", 0 };
string latex_width;
string width_special = "none";
string thickness = "0.4pt";
- string separation = "3pt";
- string shadowsize = "4pt";
+ if (fboxrule != "")
+ thickness = fboxrule;
+ else
+ thickness = "0.4pt";
+ string separation;
+ if (fboxsep != "")
+ separation = fboxsep;
+ else
+ separation = "3pt";
+ string shadowsize;
+ if (shadow_size != "")
+ shadowsize = shadow_size;
+ else
+ shadowsize = "4pt";
string framecolor = "black";
string backgroundcolor = "none";
if (frame_color != "")
// in this case we have to eat the the closing brace of the color box
p.get_token().asInput(); // the '}'
}
+ if (p.next_token().asInput() == "}"
+ && (fboxrule != "" || fboxsep != "" || shadow_size != "")) {
+ // in this case we assume that the closing brace is from the box settings
+ // therefore reset these values for the next box
+ if (fboxrule != "")
+ fboxrule = "";
+ if (fboxsep != "")
+ fboxsep = "";
+ if (shadow_size != "")
+ shadow_size = "";
+ }
}
parse_box(p, os, 0, 0, outer, context, "", "", "", "", backgroundcolor);
}
+ else if (t.cs() == "fboxrule" || t.cs() == "fboxsep"
+ || t.cs() == "shadowsize") {
+ p.skip_spaces(true);
+ if (t.cs() == "fboxrule")
+ fboxrule = "";
+ if (t.cs() == "fboxsep")
+ fboxsep = "";
+ if (t.cs() == "shadowsize")
+ shadow_size = "";
+ 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();
+ }
+ }
+
//\framebox() is part of the picture environment and different from \framebox{}
//\framebox{} will be parsed by parse_outer_box
else if (t.cs() == "framebox") {