- && floatPlacement_ != floatList.defaultPlacement(floatType_))
- os << "[" << floatPlacement_ << "]";
+ && floatPlacement_ != def_placement) {
+ placement = floatPlacement_;
+ } else if (!buf_placement.empty()
+ && buf_placement != def_placement) {
+ placement = buf_placement;
+ }
+
+ os << "\\begin{" << tmptype << "}";
+ // We only output placement if different from the def_placement.
+ if (!placement.empty()) {
+ os << "[" << placement << "]";
+ }
+