+ docstring const & match = docstring());
+ /** returns the expanded string representation of counter \c
+ * c. The \c lang code is used to translate the string.
+ */
+ docstring theCounter(docstring const & c,
+ std::string const & lang) const;
+ /** Replace in \c format all the LaTeX-like macros that depend
+ * on counters. The \c lang code is used to translate the
+ * string.
+ */
+ docstring counterLabel(docstring const & format,
+ std::string const & lang) const;
+ /// returns a formatted version of the counter, using the
+ /// format given by Counter::prettyFormat().
+ docstring prettyCounter(docstring const & cntr,
+ std::string const & lang) const;
+ /// Are we in appendix?
+ bool appendix() const { return appendix_; }
+ /// Set the state variable indicating whether we are in appendix.
+ void appendix(bool a) { appendix_ = a; }
+ /// Returns the current enclosing float.
+ std::string const & current_float() const { return current_float_; }
+ /// Sets the current enclosing float.
+ void current_float(std::string const & f) { current_float_ = f; }
+ /// Are we in a subfloat?
+ bool isSubfloat() const { return subfloat_; }
+ /// Set the state variable indicating whether we are in a subfloat.
+ void isSubfloat(bool s) { subfloat_ = s; }
+ /// Are we in a longtable?
+ bool isLongtable() const { return longtable_; }
+ /// Set the state variable indicating whether we are in a longtable.
+ void isLongtable(bool s) { longtable_ = s; }
+
+ /// \name refstepcounter
+ // @{
+ /// The currently active counter, so far as references go.
+ /// We're trying to track \refstepcounter in LaTeX, more or less.
+ /// Note that this may be empty.
+ docstring currentCounter() const;
+ /// Called during updateBuffer() as we go through various paragraphs,
+ /// to track the layouts as we go through.
+ void setActiveLayout(Layout const & lay);
+ /// Also for updateBuffer().
+ /// Call this when entering things like footnotes, where there is now
+ /// no "last layout" and we want to restore the "last layout" on exit.
+ void clearLastLayout() { layout_stack_.push_back(0); }
+ /// Call this when exiting things like footnotes.
+ void restoreLastLayout() { layout_stack_.pop_back(); }
+ ///
+ void saveLastCounter()
+ { counter_stack_.push_back(counter_stack_.back()); }
+ ///
+ void restoreLastCounter() { counter_stack_.pop_back(); }
+ // @}