Force LTR for numeric citations

Fixes: #3005
This commit is contained in:
Juergen Spitzmueller 2019-08-11 08:15:57 +02:00
parent 673e5fed51
commit cce9adc185
2 changed files with 14 additions and 0 deletions

View File

@ -445,6 +445,18 @@ docstring InsetCitation::basicLabel(bool for_xhtml) const
return '[' + label + ']';
}
bool InsetCitation::forceLTR(OutputParams const & rp) const
{
// We have to force LTR for numeric references
// [= plain BibTeX, numeric natbib and biblatex].
// Except for XeTeX/bidi . See #3005.
if (rp.useBidiPackage())
return false;
return (buffer().masterParams().citeEngine() == "basic"
|| buffer().masterParams().citeEngineType() == ENGINE_TYPE_NUMERICAL);
}
docstring InsetCitation::screenLabel() const
{
return cache.screen_label;

View File

@ -70,6 +70,8 @@ public:
UpdateType utype, TocBackend & backend) const;
///
std::string contextMenuName() const;
///
bool forceLTR(OutputParams const &) const;
//@}
/// \name Static public methods obligated for InsetCommand derived classes