+Layout const & DocumentClass::htmlTOCLayout() const
+{
+ if (html_toc_section_.empty()) {
+ // we're going to look for the layout with the minimum toclevel
+ TextClass::LayoutList::const_iterator lit = begin();
+ TextClass::LayoutList::const_iterator const len = end();
+ int minlevel = 1000;
+ Layout const * lay = NULL;
+ for (; lit != len; ++lit) {
+ int const level = lit->toclevel;
+ // we don't want Part
+ if (level == Layout::NOT_IN_TOC || level < 0 || level >= minlevel)
+ continue;
+ lay = &*lit;
+ minlevel = level;
+ }
+ if (lay)
+ html_toc_section_ = lay->name();
+ else
+ // hmm. that is very odd, so we'll do our best
+ html_toc_section_ = defaultLayoutName();
+ }
+ return operator[](html_toc_section_);
+}
+
+
+string const & DocumentClass::getCiteFormat(string const & entry_type) const
+{
+ static string default_format = N_("{%author%[[%author%, ]][[{%editor%[[%editor%, ed., ]]}]]}\"%title%\"{%journal%[[, {!<i>!}%journal%{!</i>!}]][[{%publisher%[[, %publisher%]][[{%institution%[[, %institution%]]}]]}]]}{%year%[[ (%year%)]]}{%pages%[[, %pages%]]}.");
+
+ map<string, string>::const_iterator it = cite_formats_.find(entry_type);
+ if (it != cite_formats_.end())
+ return it->second;
+ return default_format;
+}
+
+
+string const & DocumentClass::getCiteMacro(string const & macro) const
+{
+ static string empty;
+ map<string, string>::const_iterator it = cite_macros_.find(macro);
+ if (it != cite_macros_.end())
+ return it->second;
+ return empty;
+}
+
+