- // 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;
- hor_pos = "c";
- } else if (p.next_token().asInput() == "\\raggedleft") {
- wasBoxAlign = true;
- hor_pos = "r";
- }
- p.popPosition();
- }
-