+ /// Citation formatting information
+ std::map<CiteEngineType, std::map<std::string, std::string> > cite_formats_;
+ /// Citation macros
+ std::map<CiteEngineType, std::map<std::string, std::string> > cite_macros_;
+ /// The default BibTeX bibliography style file
+ std::map<std::string, std::string> cite_default_biblio_style_;
+ /// Citation command aliases
+ std::map<std::string, std::string> cite_command_aliases_;
+ /// The maximum number of citations before "et al."
+ size_t maxcitenames_;
+ /// Whether full author lists are supported
+ bool cite_full_author_list_;
+ /// The possible citation styles
+ std::map<CiteEngineType, std::vector<CitationStyle> > cite_styles_;
+ ///
+ std::map<std::string, docstring> outliner_names_;
+private:
+ ///////////////////////////////////////////////////////////////////
+ // helper routines for reading layout files
+ ///////////////////////////////////////////////////////////////////
+ ///
+ bool deleteLayout(docstring const &);
+ ///
+ bool deleteInsetLayout(docstring const &);
+ ///
+ bool convertLayoutFormat(support::FileName const &, ReadType);
+ /// Reads the layout file without running layout2layout.
+ ReturnValues readWithoutConv(support::FileName const & filename, ReadType rt);
+ /// \return true for success.
+ bool readStyle(Lexer &, Layout &) const;
+ ///
+ void readOutputType(Lexer &);
+ ///
+ void readTitleType(Lexer &);
+ ///
+ void readMaxCounter(Lexer &);
+ ///
+ void readClassOptions(Lexer &);
+ ///
+ void readCharStyle(Lexer &, std::string const &);
+ ///
+ bool readFloat(Lexer &);
+ ///
+ bool readCiteEngine(Lexer &);
+ ///
+ int readCiteEngineType(Lexer &) const;
+ ///
+ bool readCiteFormat(Lexer &);
+ ///
+ bool readOutlinerName(Lexer &);
+};
+
+
+/// A DocumentClass represents the layout information associated with a
+/// Buffer. It is based upon a LayoutFile, but may be modified by loading
+/// various Modules.
+///
+/// In that regard, DocumentClass objects are "dynamic". But this is really
+/// an illusion, since DocumentClass objects are not (currently) changed
+/// when, say, a new Module is loaded. Rather, the old DocumentClass is
+/// discarded---actually, it will be kept around if something on the cut
+/// stack needs it---and a new one is created from scratch.
+class DocumentClass : public TextClass {
+public:
+ ///
+ virtual ~DocumentClass() {}
+
+ ///////////////////////////////////////////////////////////////////
+ // Layout Info
+ ///////////////////////////////////////////////////////////////////
+ /// \return true if there is a Layout with latexname lay
+ bool hasLaTeXLayout(std::string const & lay) const;
+ /// A DocumentClass nevers count as loaded, since it is dynamic
+ virtual bool loaded() const { return false; }
+ /// \return the layout object of an inset given by name. If the name
+ /// is not found as such, the part after the ':' is stripped off, and
+ /// searched again. In this way, an error fallback can be provided:
+ /// An erroneous 'CharStyle:badname' (e.g., after a documentclass switch)
+ /// will invoke the layout object defined by name = 'CharStyle'.
+ /// If that doesn't work either, an empty object returns (shouldn't
+ /// happen). -- Idea JMarc, comment MV
+ InsetLayout const & insetLayout(docstring const & name) const;
+ /// a plain inset layout for use as a default
+ static InsetLayout const & plainInsetLayout();
+ /// add a new layout \c name if it does not exist in layoutlist_
+ /// \return whether we had to add one.
+ bool addLayoutIfNeeded(docstring const & name) const;
+ /// Forced layouts in layout file syntax
+ std::string forcedLayouts() const;
+
+ ///////////////////////////////////////////////////////////////////
+ // accessors
+ ///////////////////////////////////////////////////////////////////
+ /// the list of floats defined in the document class
+ FloatList const & floats() const { return floatlist_; }
+ ///
+ Counters & counters() const { return counters_; }
+ ///
+ std::string const & opt_enginetype() const { return opt_enginetype_; }
+ ///
+ std::string const & citeFramework() const { return citeframework_; }
+ ///
+ std::string const & opt_fontsize() const { return opt_fontsize_; }
+ ///
+ std::string const & opt_pagestyle() const { return opt_pagestyle_; }
+ ///
+ std::string const & options() const { return options_; }
+ ///
+ std::string const & class_header() const { return class_header_; }
+ ///
+ std::string const & pagestyle() const { return pagestyle_; }
+ ///
+ docstring const & preamble() const { return preamble_; }
+ ///
+ docstring const & htmlpreamble() const { return htmlpreamble_; }
+ ///
+ docstring const & htmlstyles() const { return htmlstyles_; }
+ /// Looks for the layout of "highest level", other than Part (or other
+ /// layouts with a negative toc number), for use in constructing TOCs and
+ /// similar information.
+ Layout const & getTOCLayout() const;
+ /// the paragraph style to use for TOCs, Bibliography, etc
+ /// we will attempt to calculate this if it was not given
+ Layout const & htmlTOCLayout() const;
+ /// is this feature already provided by the class?
+ bool provides(std::string const & p) const;
+ /// features required by the class?
+ std::set<std::string> const & requires() const { return requires_; }
+ /// package options to write to LaTeX file
+ std::map<std::string, std::string> const & packageOptions() const
+ { return package_options_; }
+ ///
+ unsigned int columns() const { return columns_; }
+ ///
+ PageSides sides() const { return sides_; }