mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Add BufferParams::bibtexCommand()
This function returns the real command (either per lyxrc or bufferparam)
This commit is contained in:
parent
5d58bfadbc
commit
8239e66c94
@ -3286,6 +3286,18 @@ vector<CitationStyle> BufferParams::citeStyles() const
|
||||
return styles;
|
||||
}
|
||||
|
||||
|
||||
string const & BufferParams::bibtexCommand() const
|
||||
{
|
||||
if (bibtex_command != "default")
|
||||
return bibtex_command;
|
||||
else if (encoding().package() == Encoding::japanese)
|
||||
return lyxrc.jbibtex_command;
|
||||
else
|
||||
return lyxrc.bibtex_command;
|
||||
}
|
||||
|
||||
|
||||
void BufferParams::invalidateConverterCache() const
|
||||
{
|
||||
pimpl_->isExportCacheValid = false;
|
||||
|
@ -462,6 +462,9 @@ public:
|
||||
/// the available citation styles
|
||||
std::vector<CitationStyle> citeStyles() const;
|
||||
|
||||
/// Return the actual bibtex command (lyxrc or buffer param)
|
||||
std::string const & bibtexCommand() const;
|
||||
|
||||
/// Set the default BibTeX style file for the document
|
||||
void setDefaultBiblioStyle(std::string const & s){ biblio_style = s; }
|
||||
/// Get the default BibTeX style file from the TextClass
|
||||
|
@ -718,12 +718,7 @@ void PreviewLoader::Impl::startLoading(bool wait)
|
||||
}
|
||||
|
||||
cs << latexparam;
|
||||
if (buffer_.params().bibtex_command != "default")
|
||||
cs << " --bibtex=" << quoteName(buffer_.params().bibtex_command);
|
||||
else if (buffer_.params().encoding().package() == Encoding::japanese)
|
||||
cs << " --bibtex=" << quoteName(lyxrc.jbibtex_command);
|
||||
else
|
||||
cs << " --bibtex=" << quoteName(lyxrc.bibtex_command);
|
||||
cs << " --bibtex=" << quoteName(buffer_.params().bibtexCommand());
|
||||
if (buffer_.params().bufferFormat() == "lilypond-book")
|
||||
cs << " --lilypond";
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user