mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-13 11:52:45 +00:00
Compare commits
2 Commits
8ac13125c6
...
5041d74052
Author | SHA1 | Date | |
---|---|---|---|
|
5041d74052 | ||
|
480ae7f22e |
@ -191,8 +191,11 @@ def gather_files(curfile, incfiles, lyx2lyx):
|
||||
file = match.group(3).strip(b'"')
|
||||
if file.startswith(b"bibtotoc,"):
|
||||
file = file[9:]
|
||||
ext = os.path.splitext(file)[-1]
|
||||
if ext != b'.bst':
|
||||
file = file + b'.bst'
|
||||
if not os.path.isabs(file):
|
||||
file = os.path.join(curdir, file + b'.bst')
|
||||
file = os.path.join(curdir, file)
|
||||
if os.path.exists(unicode(file, 'utf-8')):
|
||||
incfiles.append(abspath(file))
|
||||
i += 1
|
||||
@ -204,10 +207,12 @@ def gather_files(curfile, incfiles, lyx2lyx):
|
||||
bibfiles = match.group(3).strip(b'"').split(b',')
|
||||
j = 0
|
||||
while j < len(bibfiles):
|
||||
if os.path.isabs(bibfiles[j]):
|
||||
file = bibfiles[j] + b'.bib'
|
||||
else:
|
||||
file = os.path.join(curdir, bibfiles[j] + b'.bib')
|
||||
file = bibfiles[j]
|
||||
ext = os.path.splitext(file)[-1]
|
||||
if ext != b'.bib':
|
||||
file = file + b'.bib'
|
||||
if not os.path.isabs(file):
|
||||
file = os.path.join(curdir, file)
|
||||
if os.path.exists(unicode(file, 'utf-8')):
|
||||
incfiles.append(abspath(file))
|
||||
j += 1
|
||||
|
@ -5496,7 +5496,7 @@ void Buffer::Impl::updateStatistics(DocIterator & from, DocIterator & to, bool s
|
||||
char_count_ = 0;
|
||||
blank_count_ = 0;
|
||||
|
||||
for (DocIterator dit = from ; dit != to && !dit.atEnd(); ) {
|
||||
for (DocIterator dit = from; dit != to && !dit.atEnd(); ) {
|
||||
if (!dit.inTexted()) {
|
||||
dit.forwardPos();
|
||||
continue;
|
||||
|
@ -668,4 +668,15 @@ docstring InsetRef::getTOCString() const
|
||||
return (broken_ ? _("BROKEN: ") : docstring()) + toc_string_;
|
||||
}
|
||||
|
||||
pair<int, int> InsetRef::isWords() const
|
||||
{
|
||||
docstring const & ref = getParam("reference");
|
||||
string const & cmd = params().getCmdName();
|
||||
// best we can do here
|
||||
string const & lang = buffer().params().language->lang();
|
||||
docstring const refstring = displayString(ref, cmd, lang);
|
||||
return pair<int, int>(refstring.size(), wordCount(refstring));
|
||||
}
|
||||
|
||||
|
||||
} // namespace lyx
|
||||
|
@ -79,6 +79,8 @@ public:
|
||||
UpdateType utype, TocBackend & backend) const override;
|
||||
///
|
||||
bool forceLTR(OutputParams const &) const override;
|
||||
///
|
||||
std::pair<int, int> isWords() const override;
|
||||
//@}
|
||||
|
||||
/// \name Static public methods obligated for InsetCommand derived classes
|
||||
|
@ -33,6 +33,8 @@ What's new
|
||||
the outliner, even of they do not have a label yet. In the latter
|
||||
case, a label is autonatically inserted.
|
||||
|
||||
- Approximate word count for cross-references.
|
||||
|
||||
- Document PDF settings allow color links and frames around them.
|
||||
These two settings are mutually exclusive by default and we signal
|
||||
that within UI now. Workarounds can be found our and hyperref manual.
|
||||
@ -79,6 +81,9 @@ What's new
|
||||
|
||||
- Fix tabular styles on systems with blanks in system directory path.
|
||||
|
||||
- Fix inclusion of bibliography files in a LyX archive when the document
|
||||
was imported from a LaTeX source (bug 13129).
|
||||
|
||||
|
||||
* USER INTERFACE
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user