- // if only \makebox{content} was used we can set its width to 1\width
- // because this identic and also identic to \mbox
- // this doesn't work for \framebox{content}, thus we have to use ERT for this
- if (latex_width.empty() && inner_type == "makebox" && background_color == "") {
- width_value = "1";
- width_unit = "in";
- width_special = "width";
- } else if (latex_width.empty() && outer_type == "framebox") {
- width_value.clear();
- width_unit.clear();
- width_special = "none";
- }
-
- // try to determine the box content alignment
- // first handle the simple case of "{\centering..."
- if (p.next_token().asInput() == "\\raggedright") {
- wasBoxAlign = true;
- hor_pos = "l";
- } else if (p.next_token().asInput() == "\\centering") {
- wasBoxAlign = true;
- hor_pos = "c";
- } else if (p.next_token().asInput() == "\\raggedleft") {
- wasBoxAlign = true;
- hor_pos = "r";
- } else {
- // now handle the cases "{%catNewline\centering..."
- // and "{catNewline\centering..."
- p.pushPosition();
- p.get_token().asInput();
- if (p.next_token().cat() == catComment || p.next_token().cat() == catNewline)
- p.get_token().asInput();
- if (p.next_token().asInput() == "\\raggedright") {
- wasBoxAlign = true;
- hor_pos = "l";
- } else if (p.next_token().asInput() == "\\centering") {
- wasBoxAlign = true;
- os << "\n sada";
- hor_pos = "c";
- } else if (p.next_token().asInput() == "\\raggedleft") {
- wasBoxAlign = true;
- hor_pos = "r";
- }
- p.popPosition();
- }