2 * \file InsetBibtex.cpp
3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
6 * \author Alejandro Aguilar Sierra
7 * \author Richard Heck (BibTeX parser improvements)
8 * \author Jürgen Spitzmüller
10 * Full author contact details are available in file CREDITS.
15 #include "InsetBibtex.h"
17 #include "BiblioInfo.h"
19 #include "BufferParams.h"
20 #include "CiteEnginesList.h"
22 #include "DispatchResult.h"
26 #include "FuncRequest.h"
27 #include "FuncStatus.h"
28 #include "LaTeXFeatures.h"
29 #include "output_latex.h"
30 #include "output_xhtml.h"
31 #include "OutputParams.h"
32 #include "PDFOptions.h"
33 #include "texstream.h"
34 #include "TextClass.h"
36 #include "frontends/alert.h"
38 #include "support/convert.h"
39 #include "support/debug.h"
40 #include "support/docstream.h"
41 #include "support/docstring_list.h"
42 #include "support/ExceptionMessage.h"
43 #include "support/FileNameList.h"
44 #include "support/filetools.h"
45 #include "support/gettext.h"
46 #include "support/lstrings.h"
47 #include "support/os.h"
48 #include "support/PathChanger.h"
49 #include "support/textutils.h"
54 using namespace lyx::support;
58 namespace Alert = frontend::Alert;
59 namespace os = support::os;
62 InsetBibtex::InsetBibtex(Buffer * buf, InsetCommandParams const & p)
63 : InsetCommand(buf, p)
67 ParamInfo const & InsetBibtex::findInfo(string const & /* cmdName */)
69 static ParamInfo param_info_;
70 if (param_info_.empty()) {
71 param_info_.add("btprint", ParamInfo::LATEX_OPTIONAL);
72 param_info_.add("bibfiles", ParamInfo::LATEX_REQUIRED);
73 param_info_.add("options", ParamInfo::LYX_INTERNAL);
74 param_info_.add("encoding", ParamInfo::LYX_INTERNAL);
75 param_info_.add("biblatexopts", ParamInfo::LATEX_OPTIONAL);
81 void InsetBibtex::doDispatch(Cursor & cur, FuncRequest & cmd)
83 switch (cmd.action()) {
89 case LFUN_INSET_MODIFY: {
90 InsetCommandParams p(BIBTEX_CODE);
92 if (!InsetCommand::string2params(to_utf8(cmd.argument()), p)) {
96 } catch (ExceptionMessage const & message) {
97 if (message.type_ == WarningException) {
98 Alert::warning(message.title_, message.details_);
107 cur.forceBufferUpdate();
112 InsetCommand::doDispatch(cur, cmd);
118 bool InsetBibtex::getStatus(Cursor & cur, FuncRequest const & cmd,
119 FuncStatus & flag) const
121 switch (cmd.action()) {
122 case LFUN_INSET_EDIT:
123 flag.setEnabled(true);
127 return InsetCommand::getStatus(cur, cmd, flag);
132 void InsetBibtex::editDatabases() const
134 vector<docstring> bibfilelist = getVectorFromString(getParam("bibfiles"));
136 if (bibfilelist.empty())
139 int nr_databases = bibfilelist.size();
140 if (nr_databases > 1) {
141 docstring const engine = usingBiblatex() ? _("Biblatex") : _("BibTeX");
142 docstring message = bformat(_("The %1$s[[BibTeX/Biblatex]] inset includes %2$s databases.\n"
143 "If you proceed, all of them will be opened."),
144 engine, convert<docstring>(nr_databases));
145 int const ret = Alert::prompt(_("Open Databases?"),
146 message, 0, 1, _("&Cancel"), _("&Proceed"));
152 vector<docstring>::const_iterator it = bibfilelist.begin();
153 vector<docstring>::const_iterator en = bibfilelist.end();
154 for (; it != en; ++it) {
155 FileName const bibfile = buffer().getBibfilePath(*it);
156 theFormats().edit(buffer(), bibfile,
157 theFormats().getFormatFromFile(bibfile));
162 bool InsetBibtex::usingBiblatex() const
164 return buffer().masterParams().useBiblatex();
168 docstring InsetBibtex::screenLabel() const
170 return usingBiblatex() ? _("Biblatex Generated Bibliography")
171 : _("BibTeX Generated Bibliography");
175 docstring InsetBibtex::toolTip(BufferView const & /*bv*/, int /*x*/, int /*y*/) const
177 docstring tip = _("Databases:");
178 vector<docstring> bibfilelist = getVectorFromString(getParam("bibfiles"));
181 if (bibfilelist.empty())
182 tip += "<li>" + _("none") + "</li>";
184 for (docstring const & bibfile : bibfilelist)
185 tip += "<li>" + bibfile + "</li>";
190 docstring style = getParam("options"); // maybe empty! and with bibtotoc
191 docstring bibtotoc = from_ascii("bibtotoc");
192 if (prefixIs(style, bibtotoc)) {
194 if (contains(style, char_type(',')))
195 style = split(style, bibtotoc, char_type(','));
198 docstring const btprint = getParam("btprint");
199 if (!usingBiblatex()) {
200 tip += _("Style File:");
201 tip += "<ul><li>" + (style.empty() ? _("none") : style) + "</li></ul>";
203 tip += _("Lists:") + " ";
204 if (btprint == "btPrintAll")
205 tip += _("all references");
206 else if (btprint == "btPrintNotCited")
207 tip += _("all uncited references");
209 tip += _("all cited references");
212 tip += _("included in TOC");
214 if (!buffer().parent()
215 && buffer().params().multibib == "child") {
217 tip += _("Note: This bibliography is not output, since bibliographies in the master file "
218 "are not allowed with the setting 'Multiple bibliographies per child document'");
221 tip += _("Lists:") + " ";
222 if (btprint == "bibbysection")
223 tip += _("all reference units");
224 else if (btprint == "btPrintAll")
225 tip += _("all references");
227 tip += _("all cited references");
230 tip += _("included in TOC");
232 if (!getParam("biblatexopts").empty()) {
234 tip += _("Options: ") + getParam("biblatexopts");
242 void InsetBibtex::latex(otexstream & os, OutputParams const & runparams) const
244 // The sequence of the commands:
245 // With normal BibTeX:
246 // 1. \bibliographystyle{style}
247 // 2. \addcontentsline{...} - if option bibtotoc set
248 // 3. \bibliography{database}
250 // 1. \bibliographystyle{style}
251 // 2. \begin{btSect}{database}
252 // 3. \btPrint{Cited|NotCited|All}
255 // \printbibliography[biblatexopts]
257 // \bibbysection[biblatexopts] - if btprint is "bibbysection"
259 // chapterbib does not allow bibliographies in the master
260 if (!usingBiblatex() && !runparams.is_child
261 && buffer().params().multibib == "child")
264 string style = to_utf8(getParam("options")); // maybe empty! and with bibtotoc
266 if (prefixIs(style, "bibtotoc")) {
267 bibtotoc = "bibtotoc";
268 if (contains(style, ','))
269 style = split(style, bibtotoc, ',');
272 if (usingBiblatex()) {
274 string opts = to_utf8(getParam("biblatexopts"));
276 if (!bibtotoc.empty())
277 opts = opts.empty() ? "heading=bibintoc" : "heading=bibintoc," + opts;
278 // The bibliography command
279 docstring btprint = getParam("btprint");
280 if (btprint == "btPrintAll")
281 os << "\\nocite{*}\n";
282 if (btprint == "bibbysection" && !buffer().masterParams().multibib.empty())
283 os << "\\bibbysection";
285 os << "\\printbibliography";
287 os << "[" << opts << "]";
289 } else {// using BibTeX
291 vector<docstring> const db_out =
292 buffer().prepareBibFilePaths(runparams, getBibFiles(), false);
294 if (style == "default")
295 style = buffer().masterParams().defaultBiblioStyle();
296 if (!style.empty() && !buffer().masterParams().useBibtopic()) {
297 string base = buffer().masterBuffer()->prepareFileNameForLaTeX(style, ".bst", runparams.nice);
298 FileName const try_in_file =
299 makeAbsPath(base + ".bst", buffer().filePath());
300 bool const not_from_texmf = try_in_file.isReadableFile();
301 // If this style does not come from texmf and we are not
302 // exporting to .tex copy it to the tmp directory.
303 // This prevents problems with spaces and 8bit characters
305 if (!runparams.inComment && !runparams.dryrun && !runparams.nice &&
307 // use new style name
308 DocFileName const in_file = DocFileName(try_in_file);
309 base = removeExtension(in_file.mangledFileName());
310 FileName const out_file = makeAbsPath(base + ".bst",
311 buffer().masterBuffer()->temppath());
312 bool const success = in_file.copyTo(out_file);
314 LYXERR0("Failed to copy '" << in_file
315 << "' to '" << out_file << "'");
319 os << "\\bibliographystyle{"
320 << from_utf8(latex_path(buffer().prepareFileNameForLaTeX(base, ".bst", runparams.nice)))
323 // Warn about spaces in bst path. Warn only once.
324 static bool warned_about_bst_spaces = false;
325 if (!warned_about_bst_spaces && runparams.nice && contains(style, ' ')) {
326 warned_about_bst_spaces = true;
327 Alert::warning(_("Export Warning!"),
328 _("There are spaces in the path to your BibTeX style file.\n"
329 "BibTeX will be unable to find it."));
332 bool encoding_switched = false;
333 Encoding const * const save_enc = runparams.encoding;
334 docstring const encoding = getParam("encoding");
335 if (!encoding.empty() && encoding != from_ascii("default")) {
336 Encoding const * const enc = encodings.fromLyXName(to_ascii(encoding));
337 if (enc != runparams.encoding) {
339 switchEncoding(os.os(), buffer().params(), runparams, *enc, true);
340 runparams.encoding = enc;
341 encoding_switched = true;
344 // Handle the bibtopic case
345 if (!db_out.empty() && buffer().masterParams().useBibtopic()) {
346 os << "\\begin{btSect}";
348 os << "[" << style << "]";
349 os << "{" << getStringFromVector(db_out) << "}\n";
350 docstring btprint = getParam("btprint");
353 btprint = from_ascii("btPrintCited");
354 os << "\\" << btprint << "\n"
355 << "\\end{btSect}\n";
358 if (!bibtotoc.empty() && !buffer().masterParams().useBibtopic()) {
359 // set label for hyperref, see http://www.lyx.org/trac/ticket/6470
360 if (buffer().masterParams().pdfoptions().use_hyperref)
361 os << "\\phantomsection";
362 if (buffer().masterParams().documentClass().hasLaTeXLayout("chapter"))
363 os << "\\addcontentsline{toc}{chapter}{\\bibname}";
364 else if (buffer().masterParams().documentClass().hasLaTeXLayout("section"))
365 os << "\\addcontentsline{toc}{section}{\\refname}";
367 // The bibliography command
368 if (!db_out.empty() && !buffer().masterParams().useBibtopic()) {
369 docstring btprint = getParam("btprint");
370 if (btprint == "btPrintAll") {
371 os << "\\nocite{*}\n";
373 os << "\\bibliography{" << getStringFromVector(db_out) << "}\n";
375 if (encoding_switched){
377 switchEncoding(os.os(), buffer().params(),
378 runparams, *save_enc, true, true);
379 os << "\\egroup" << breakln;
380 runparams.encoding = save_enc;
386 docstring_list InsetBibtex::getBibFiles() const
388 return getVectorFromString(getParam("bibfiles"));
393 // methods for parsing bibtex files
395 typedef map<docstring, docstring> VarMap;
397 /// remove whitespace characters, optionally a single comma,
398 /// and further whitespace characters from the stream.
399 /// @return true if a comma was found, false otherwise
401 bool removeWSAndComma(ifdocstream & ifs) {
410 } while (ifs && isSpace(ch));
423 } while (ifs && isSpace(ch));
438 /// remove whitespace characters, read characer sequence
439 /// not containing whitespace characters or characters in
440 /// delimChars, and remove further whitespace characters.
442 /// @return true if a string of length > 0 could be read.
444 bool readTypeOrKey(docstring & val, ifdocstream & ifs,
445 docstring const & delimChars, docstring const & illegalChars,
458 } while (ifs && isSpace(ch));
464 while (ifs && !isSpace(ch) &&
465 delimChars.find(ch) == docstring::npos &&
466 illegalChars.find(ch) == docstring::npos)
468 if (chCase == makeLowerCase)
469 val += lowercase(ch);
475 if (illegalChars.find(ch) != docstring::npos) {
481 while (ifs && isSpace(ch)) {
489 return val.length() > 0;
492 /// read subsequent bibtex values that are delimited with a #-character.
493 /// Concatenate all parts and replace names with the associated string in
494 /// the variable strings.
495 /// @return true if reading was successfull (all single parts were delimited
497 bool readValue(docstring & val, ifdocstream & ifs, const VarMap & strings) {
510 } while (ifs && isSpace(ch));
515 // check for field type
516 if (isDigitASCII(ch)) {
518 // read integer value
522 } while (ifs && isDigitASCII(ch));
527 } else if (ch == '"' || ch == '{') {
529 char_type delim = ch == '"' ? '"': '}';
534 } while (ifs && isSpace(ch));
539 // We now have the first non-whitespace character
540 // We'll collapse adjacent whitespace.
541 bool lastWasWhiteSpace = false;
543 // inside this delimited text braces must match.
544 // Thus we can have a closing delimiter only
545 // when nestLevel == 0
548 while (ifs && (nestLevel > 0 || ch != delim)) {
550 lastWasWhiteSpace = true;
554 // We output the space only after we stop getting
555 // whitespace so as not to output any whitespace
556 // at the end of the value.
557 if (lastWasWhiteSpace) {
558 lastWasWhiteSpace = false;
564 // update nesting level
583 // FIXME Why is this here?
591 // reading a string name
594 while (ifs && !isSpace(ch) && ch != '#' && ch != ',' && ch != '}' && ch != ')') {
595 strName += lowercase(ch);
602 // replace the string with its assigned value or
603 // discard it if it's not assigned
604 if (strName.length()) {
605 VarMap::const_iterator pos = strings.find(strName);
606 if (pos != strings.end()) {
613 while (ifs && isSpace(ch)) {
620 // continue reading next value on concatenate with '#'
630 void InsetBibtex::collectBibKeys(InsetIterator const & /*di*/, FileNameList & checkedFiles) const
632 parseBibTeXFiles(checkedFiles);
636 void InsetBibtex::parseBibTeXFiles(FileNameList & checkedFiles) const
638 // This bibtex parser is a first step to parse bibtex files
641 // - it reads the whole bibtex entry and does a syntax check
642 // (matching delimiters, missing commas,...
643 // - it recovers from errors starting with the next @-character
644 // - it reads @string definitions and replaces them in the
646 // - it accepts more characters in keys or value names than
649 // Officially bibtex does only support ASCII, but in practice
650 // you can use any encoding as long as some elements like keys
651 // and names are pure ASCII. We support specifying an encoding,
652 // and we convert the file from that (default is buffer encoding).
653 // We don't restrict keys to ASCII in LyX, since our own
654 // InsetBibitem can generate non-ASCII keys, and nonstandard
655 // 8bit clean bibtex forks exist.
659 docstring_list const files = getBibFiles();
660 for (auto const & bf : files) {
661 FileName const bibfile = buffer().getBibfilePath(bf);
662 if (bibfile.empty()) {
663 LYXERR0("Unable to find path for " << bf << "!");
666 if (find(checkedFiles.begin(), checkedFiles.end(), bibfile) != checkedFiles.end())
667 // already checked this one. Skip.
670 // record that we check this.
671 checkedFiles.push_back(bibfile);
672 string encoding = buffer().masterParams().encoding().iconvName();
673 string const ienc = to_ascii(params()["encoding"]);
674 if (!ienc.empty() && ienc != "default" && encodings.fromLyXName(ienc))
675 encoding = encodings.fromLyXName(ienc)->iconvName();
676 ifdocstream ifs(bibfile.toFilesystemEncoding().c_str(),
677 ios_base::in, encoding);
692 if (!readTypeOrKey(entryType, ifs, from_ascii("{("), docstring(), makeLowerCase)) {
693 lyxerr << "BibTeX Parser: Error reading entry type." << std::endl;
698 lyxerr << "BibTeX Parser: Unexpected end of file." << std::endl;
702 if (entryType == from_ascii("comment")) {
703 ifs.ignore(numeric_limits<int>::max(), '\n');
709 lyxerr << "BibTeX Parser: Unexpected end of file." << std::endl;
713 if ((ch != '(') && (ch != '{')) {
714 lyxerr << "BibTeX Parser: Invalid entry delimiter." << std::endl;
720 if (entryType == from_ascii("string")) {
722 // read string and add it to the strings map
723 // (or replace it's old value)
727 if (!readTypeOrKey(name, ifs, from_ascii("="), from_ascii("#{}(),"), makeLowerCase)) {
728 lyxerr << "BibTeX Parser: Error reading string name." << std::endl;
733 lyxerr << "BibTeX Parser: Unexpected end of file." << std::endl;
737 // next char must be an equal sign
739 if (!ifs || ch != '=') {
740 lyxerr << "BibTeX Parser: No `=' after string name: " <<
741 name << "." << std::endl;
745 if (!readValue(value, ifs, strings)) {
746 lyxerr << "BibTeX Parser: Unable to read value for string: " <<
747 name << "." << std::endl;
751 strings[name] = value;
753 } else if (entryType == from_ascii("preamble")) {
755 // preamble definitions are discarded.
756 // can they be of any use in lyx?
759 if (!readValue(value, ifs, strings)) {
760 lyxerr << "BibTeX Parser: Unable to read preamble value." << std::endl;
766 // Citation entry. Try to read the key.
769 if (!readTypeOrKey(key, ifs, from_ascii(","), from_ascii("}"), keepCase)) {
770 lyxerr << "BibTeX Parser: Unable to read key for entry type:" <<
771 entryType << "." << std::endl;
776 lyxerr << "BibTeX Parser: Unexpected end of file." << std::endl;
780 /////////////////////////////////////////////
781 // now we have a key, so we will add an entry
782 // (even if it's empty, as bibtex does)
784 // we now read the field = value pairs.
785 // all items must be separated by a comma. If
786 // it is missing the scanning of this entry is
787 // stopped and the next is searched.
791 BibTeXInfo keyvalmap(key, entryType);
793 bool readNext = removeWSAndComma(ifs);
795 while (ifs && readNext) {
798 if (!readTypeOrKey(name, ifs, from_ascii("="),
799 from_ascii("{}(),"), makeLowerCase) || !ifs)
802 // next char must be an equal sign
803 // FIXME Whitespace??
806 lyxerr << "BibTeX Parser: Unexpected end of file." << std::endl;
810 lyxerr << "BibTeX Parser: Missing `=' after field name: " <<
811 name << ", for key: " << key << "." << std::endl;
817 if (!readValue(value, ifs, strings)) {
818 lyxerr << "BibTeX Parser: Unable to read value for field: " <<
819 name << ", for key: " << key << "." << std::endl;
823 keyvalmap[name] = value;
824 data += "\n\n" + value;
825 keylist.addFieldName(name);
826 readNext = removeWSAndComma(ifs);
830 keylist.addEntryType(entryType);
831 keyvalmap.setAllData(data);
832 keylist[key] = keyvalmap;
833 } //< else (citation entry)
835 } //< for loop over files
837 buffer().addBiblioInfo(keylist);
841 bool InsetBibtex::addDatabase(docstring const & db)
843 docstring bibfiles = getParam("bibfiles");
844 if (tokenPos(bibfiles, ',', db) != -1)
846 if (!bibfiles.empty())
848 setParam("bibfiles", bibfiles + db);
853 bool InsetBibtex::delDatabase(docstring const & db)
855 docstring bibfiles = getParam("bibfiles");
856 if (contains(bibfiles, db)) {
857 int const n = tokenPos(bibfiles, ',', db);
860 // this is not the first database
861 docstring tmp = ',' + bd;
862 setParam("bibfiles", subst(bibfiles, tmp, docstring()));
864 // this is the first (or only) database
865 setParam("bibfiles", split(bibfiles, bd, ','));
873 void InsetBibtex::validate(LaTeXFeatures & features) const
875 BufferParams const & mparams = features.buffer().masterParams();
876 if (mparams.useBibtopic())
877 features.require("bibtopic");
878 else if (!mparams.useBiblatex() && mparams.multibib == "child")
879 features.require("chapterbib");
881 // It'd be better to be able to get this from an InsetLayout, but at present
882 // InsetLayouts do not seem really to work for things that aren't InsetTexts.
883 if (features.runparams().flavor == OutputParams::HTML)
884 features.addCSSSnippet("div.bibtexentry { margin-left: 2em; text-indent: -2em; }\n"
885 "span.bibtexlabel:before{ content: \"[\"; }\n"
886 "span.bibtexlabel:after{ content: \"] \"; }");
890 void InsetBibtex::updateBuffer(ParIterator const &, UpdateType)
892 buffer().registerBibfiles(getBibFiles());
893 // record encoding of bib files for biblatex
894 string const enc = (params()["encoding"] == from_ascii("default")) ?
895 string() : to_ascii(params()["encoding"]);
896 if (buffer().params().bibEncoding() != enc) {
897 buffer().params().setBibEncoding(enc);
898 buffer().invalidateBibinfoCache();
903 int InsetBibtex::plaintext(odocstringstream & os,
904 OutputParams const & op, size_t max_length) const
906 docstring const reflabel = buffer().B_("References");
908 // We could output more information here, e.g., what databases are included
909 // and information about options. But I don't necessarily see any reason to
910 // do this right now.
911 if (op.for_tooltip || op.for_toc || op.for_search) {
912 os << '[' << reflabel << ']' << '\n';
913 return PLAINTEXT_NEWLINE;
916 BiblioInfo bibinfo = buffer().masterBibInfo();
917 bibinfo.makeCitationLabels(buffer());
918 vector<docstring> const & cites = bibinfo.citedEntries();
920 size_t start_size = os.str().size();
922 refoutput += reflabel + "\n\n";
924 // Tell BiblioInfo our purpose
926 ci.context = CiteItem::Export;
928 // Now we loop over the entries
929 vector<docstring>::const_iterator vit = cites.begin();
930 vector<docstring>::const_iterator const ven = cites.end();
931 for (; vit != ven; ++vit) {
932 if (start_size + refoutput.size() >= max_length)
934 BiblioInfo::const_iterator const biit = bibinfo.find(*vit);
935 if (biit == bibinfo.end())
937 BibTeXInfo const & entry = biit->second;
938 refoutput += "[" + entry.label() + "] ";
939 // FIXME Right now, we are calling BibInfo::getInfo on the key,
940 // which will give us all the cross-referenced info. But for every
941 // entry, so there's a lot of repitition. This should be fixed.
942 refoutput += bibinfo.getInfo(entry.key(), buffer(), ci) + "\n\n";
945 return refoutput.size();
950 // docstring InsetBibtex::entriesAsXHTML(vector<docstring> const & entries)
951 // And then here just: entriesAsXHTML(buffer().masterBibInfo().citedEntries())
952 docstring InsetBibtex::xhtml(XHTMLStream & xs, OutputParams const &) const
954 BiblioInfo const & bibinfo = buffer().masterBibInfo();
955 bool const all_entries = getParam("btprint") == "btPrintAll";
956 vector<docstring> const & cites =
957 all_entries ? bibinfo.getKeys() : bibinfo.citedEntries();
959 docstring const reflabel = buffer().B_("References");
961 // tell BiblioInfo our purpose
963 ci.context = CiteItem::Export;
965 ci.max_key_size = UINT_MAX;
967 xs << html::StartTag("h2", "class='bibtex'")
969 << html::EndTag("h2")
970 << html::StartTag("div", "class='bibtex'");
972 // Now we loop over the entries
973 vector<docstring>::const_iterator vit = cites.begin();
974 vector<docstring>::const_iterator const ven = cites.end();
975 for (; vit != ven; ++vit) {
976 BiblioInfo::const_iterator const biit = bibinfo.find(*vit);
977 if (biit == bibinfo.end())
980 BibTeXInfo const & entry = biit->second;
981 string const attr = "class='bibtexentry' id='LyXCite-"
982 + to_utf8(html::cleanAttr(entry.key())) + "'";
983 xs << html::StartTag("div", attr);
985 // don't print labels if we're outputting all entries
987 xs << html::StartTag("span", "class='bibtexlabel'")
989 << html::EndTag("span");
992 // FIXME Right now, we are calling BibInfo::getInfo on the key,
993 // which will give us all the cross-referenced info. But for every
994 // entry, so there's a lot of repitition. This should be fixed.
995 xs << html::StartTag("span", "class='bibtexinfo'")
996 << XHTMLStream::ESCAPE_AND
997 << bibinfo.getInfo(entry.key(), buffer(), ci)
998 << html::EndTag("span")
999 << html::EndTag("div")
1002 xs << html::EndTag("div");
1007 void InsetBibtex::write(ostream & os) const
1009 params().Write(os, &buffer());
1013 string InsetBibtex::contextMenuName() const
1015 return "context-bibtex";