> Hi, Richard, > > Please review this patch. BTW, we may rename the createBibFiles to something like updateBibFiles, or seprate it to two functions.
Then, it comes to the question whether or not you like the meta_ idea..., something (imcomplete) like the attached. This should be able to fix the latex output problems. Bo
Index: src/insets/InsetBibtex.cpp =================================================================== --- src/insets/InsetBibtex.cpp (revision 24047) +++ src/insets/InsetBibtex.cpp (working copy) @@ -727,6 +727,7 @@ return false; EmbeddedFile file(texPath.absFilename(), buffer().filePath()); + file.setMetaInfo(db); bibfiles_.push_back(file); updateParam(); return true; @@ -791,6 +792,7 @@ } else { EmbeddedFile file(bib.absFilename(), buffer().filePath()); file.setEmbed(!embfile.empty()); + file.setMetaInfo(bibfile); try { file.enable(buffer().embedded(), &buffer(), true); } catch (ExceptionMessage const & message) { @@ -823,8 +825,7 @@ } else first = false; bibfiles += from_utf8(it->outputFilename(buffer().filePath())); - if (it->embedded()) - embed += from_utf8(it->inzipName()); + embed += it->metaInfo(); } setParam("bibfiles", bibfiles); setParam("embed", embed); Index: src/EmbeddedFiles.h =================================================================== --- src/EmbeddedFiles.h (revision 24047) +++ src/EmbeddedFiles.h (working copy) @@ -124,6 +124,11 @@ /// filename in the zip file, which is related to buffer temp directory. std::string inzipName() const { return inzip_name_; } + + /// set some meta information to this EmbeddedFile + void setMetaInfo(docstring const & meta) { meta_ = meta; } + /// get meta info + docstring metaInfo() const { return meta_; } /// embedded file, equals to temppath()/inzipName() std::string embeddedFile() const; @@ -190,6 +195,10 @@ /// be retrived from a buffer, but a buffer is not always available when /// an EmbeddedFile is used. std::string temp_path_; + /// + /// meta information that is used by various insets to store + /// auxillary information. + docstring meta_; };