Commit Graph

1106 Commits

Author SHA1 Message Date
Thibaut Cuvelier
0c0613327c Get rid of xmlize, bringing no advantage over escapeString. 2020-08-01 03:20:28 +02:00
Richard Kimberly Heck
8ae0841826 Whitespace 2020-07-08 12:38:05 -04:00
Thibaut Cuvelier
3883b85f49 New DocBook support 2020-07-08 08:42:16 +02:00
Pavel Sanda
28968b1f0d Add required elements in the layouts to support DocBook.
Slightly modified patch from Thibaut Cuvelier.
2020-07-07 09:49:48 +02:00
Thibaut Cuvelier
a6b07608d8 Rename XHTMLStream to XMLStream, move it to another file, and prepare for DocBook adoption.
xml.cpp/h also merges functionalities from sgml.cpp/h.
2020-06-15 13:01:56 +02:00
Richard Kimberly Heck
97bbcf2b9b Remove include no longer needed 2020-05-13 14:54:16 -04:00
Richard Kimberly Heck
1e904625b2 Remove functors in PreviewLoader.cpp.
Also fix some warnings.
2020-05-13 13:33:27 -04:00
Richard Kimberly Heck
7d36b9e4fa Remove method that is now unneeded. 2020-04-25 22:27:09 -04:00
Richard Kimberly Heck
e4da314522 Try to fix bug #6505.
Keep track of nested includes and just refuse to re-enter a file
we're already in the process of handling.

There's a question whether we should do this in updateBuffer and
validate, or whether we should do it separately. For now, this seems
to work.
2020-04-25 22:22:58 -04:00
Richard Kimberly Heck
9319144703 Buffer methods for dealing with recursive includes. 2020-04-25 22:17:46 -04:00
Juergen Spitzmueller
f9999039ac Strip polyglossia options from pdf string
Fixes #11813
2020-04-05 15:23:22 +02:00
Richard Kimberly Heck
f044d3a359 Fix bug #11780.
The preamble snippets are for LaTeX and do not need to be output
with HTML.
2020-03-14 18:31:25 -04:00
Juergen Spitzmueller
f4af191403 Introduce maintain unincluded children "mostly"
This is a mode for includeonly handling that is effective and still outputs
at least mostly correct counters and references. This is intended for non-
final editing work.

File format change.
2020-03-13 15:46:35 +01:00
Juergen Spitzmueller
6c889209a7 Improve performance of includeonly with "maintain counters and references"
First, we do not need to run bibtex/biber on the maintenance run, as
the necessary references will be generated on the includeonly run.

Second, exclude the master from DepTable in maintenance run, as the
master is re-checked in any case in the includeonly run, and as it will
always be detected as changed due to the \includeonly statement, which
will trigger a complete build.

More improvements to follow.
2020-03-13 11:49:07 +01:00
Juergen Spitzmueller
d94b708a0f Tell updateBuffer whether an inset is deleted.
Fixes #11747
2020-03-06 13:23:01 +01:00
Richard Kimberly Heck
cf37ad8c80 Use ranges, fix warnings 2020-02-28 01:40:30 -05:00
Richard Kimberly Heck
81597aabdb Polish 2020-02-28 00:39:50 -05:00
Richard Kimberly Heck
0dc9fca86e Remove code that has not been used since 2010.
See 208acbc72.
2020-02-28 00:21:48 -05:00
Richard Kimberly Heck
a9d9fdc9bf Fix alignment warnings from clang. 2020-02-23 17:15:01 -05:00
Richard Kimberly Heck
34f9ea8275 Use C++11 construct. 2020-02-23 16:59:59 -05:00
Richard Kimberly Heck
0daceae649 Try again to fix memory leak reported by Scott.
This time, use a shared_ptr.
2020-02-23 16:56:43 -05:00
Richard Kimberly Heck
72c581ebdb Revert "Fix memory leak reported by Scott."
It leads to a double delete error.

This reverts commit 11397a2e82.
2020-02-23 16:29:58 -05:00
Richard Kimberly Heck
11397a2e82 Fix memory leak reported by Scott. 2020-02-23 15:54:13 -05:00
Richard Kimberly Heck
d11a27a611 Fix nullptr warnings 2020-02-23 15:52:15 -05:00
Richard Kimberly Heck
608b927daf Fix "no extern declaration" warning. 2020-02-23 15:52:15 -05:00
Jean-Marc Lasgouttes
1baa8cdc93 When iterator is in a table cell, set Changed indicator for the right inset. 2020-01-13 15:08:50 +01:00
Juergen Spitzmueller
c6ef96ea36 Prevent NULL pointer 2020-01-13 13:03:52 +01:00
Juergen Spitzmueller
a450797b2a Rest in peace, dvipost! 2020-01-13 08:59:26 +01:00
Jean-Marc Lasgouttes
e340f46476 Fixup bf7f4d71: Let changeRefsIfUnique handle undo
This allows for a much lower memory consumption than a plain
recordUnfoFullBuffer.

Related to bug 6494.
2020-01-12 22:18:36 +01:00
Jean-Marc Lasgouttes
4a4ded2297 Reimplement computation of change tracking status
This is a reimplementation of 6d4e6aad that is both simpler and more
complete.

This uses the updateBuffer mechanism to implement a fully working
version of Inset::isChanged(). Now the function returns true for an
inset that contains an inset that contains a change, for example.

Moverover Buffer::areChangesPresent() is merely a proxy for
Buffer::inset().isChanged().
2020-01-12 20:26:35 +01:00
Jean-Marc Lasgouttes
dba1e40b52 Revert "Automatically show the review toolbar if the document has tracked changes"
We will replace this with a better solution

For now, only keep
- Changes::isChanged()
- Buffer::areChangesPresent(), replaced by a dummy function

Next step will be to provide a working areChangesPresent() and to
compute Inset::isChanged in updateBuffer.

This reverts commit 6d4e6aad24.
2020-01-12 20:26:35 +01:00
Juergen Spitzmueller
dc4823e759 Add native changebars
Fixes #10750
2019-12-24 18:12:22 +01:00
Scott Kostyshak
79787c2274 Correct typo in method name getDescendants()
When used as an adjective, both variants "descendent" and
"descendant" are acceptable, but when used as a noun only
"descendant" should be used.

For a reference, see here:

https://en.wiktionary.org/wiki/descendent#Noun
2019-12-15 23:36:17 -05:00
Juergen Spitzmueller
a426b33067 Fix issues with tilde in inputpath
Fixes #11699
2019-11-20 11:57:32 +01:00
Juergen Spitzmueller
e75fa6f3ac Re-fix #11146 with recent LaTeX 2019-11-20 11:48:18 +01:00
Jean-Marc Lasgouttes
714113655a Follow some of the performance advice from cppcheck
Most of that is changing string to string const &.
2019-09-13 16:23:49 +02:00
Richard Kimberly Heck
fb79552ae0 Minor renaming for clarity. 2019-09-11 20:54:51 -04:00
Juergen Spitzmueller
ce447e1760 Deactivate active - in tables with \cline or \cmidrule
This introduces a new languages tag ActiveChar which also can be used
for similar cases.
2019-08-14 13:10:42 +02:00
Juergen Spitzmueller
85d5e9e747 Fix nullpointer issue 2019-07-21 13:14:20 +02:00
Jean-Marc Lasgouttes
049aed8e08 Respect OS-level keyboard language
This bug provides two features:

1/ when a new document is created the language is set to the current
  keyboard language.

2/ when keyboard is switched at OS level, the input language of
   current window is changed. The language is set preferably to one of
   those of the document. Ex. if the keyboard changes to en_GB but one
   is typing a document in US English and Hebrew, then US English will
   be selected rather that adding UK English to the list.

The implementation depends a lot on Qt. The platform status is :

* working on Windows 10

* not working with Linux (although 1/ works with Qt4); it seems that
  Qt5 supports switching through ibus, but I do not know what this
  means.

* not yet tested on macOS.

This addresses bugs #6450, #6247 and somehow #10514.
2019-07-17 23:23:13 +02:00
Günter Milde
130c744069 Drop support for XeTeX + TeX fonts + inputenc utf8.
LyX follows LaTeX in dropping support for this combination
(it only worked by tricking "inputenc.sty").
There is no known case where this combination is required or helpfull.

For power users with special needs, XeTeX + TeX fonts is still
available after setting the input encoding to "ascii" or "utf8-plain".

See also #10600.
2019-07-12 12:56:20 +02:00
Juergen Spitzmueller
c3c2815092 Implement support for font options
This revives a patch by Uwe and extends it. Additional options to font
packages/fontspec can now be entered in Document Settings.
This is principally also true for TeX fonts, if the new TeXFont tag
MoreOptions is set. For the time being, I have only done this for
MinionPro, as a model and prove of concept.

Note that adding more TeXFonts requires a file format change,
respectively, and changes to tex2lyx (in the same way as I've done for
MinionPro).

This addresses #8226
2019-07-11 20:28:34 +02:00
Juergen Spitzmueller
d876319e85 \detokenize paths containing ~ 2019-07-07 10:32:06 +02:00
Pavel Sanda
bf99ece736 Start reporting missing citations and broken references in LaTeX build.
Now we report these in the same way as LaTeX errors (but let the user to
see the result anyway). It remains to be shown much is this disturbing
to users. Generally, ignoring these is not a good idea, because they are
harder to manually spot in longer documents.

The details of reported error varies because log linebreaks at 90
induced by pdflatex make log harder to parse.
The committed code is more robust than previous, in which some missing
cits/refs with long keys would go unnoticed.

Tested on bibtex and natbib.

https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg208912.html
2019-06-07 16:47:04 +02:00
Juergen Spitzmueller
18ebcab403 Properly reset lineno_opts 2019-06-03 14:33:08 +02:00
Richard Kimberly Heck
91383e1fec Forgot this part 2019-05-30 20:39:43 -04:00
Richard Kimberly Heck
2e433654c7 Fix bug #11588.
Check for the local file before calling kpsewhich.
2019-05-30 20:32:35 -04:00
Richard Kimberly Heck
c4658f046f Fix crash reported by Kornel.
See https://marc.info/?l=lyx-devel&m=155879185229073&w=2.

The problem is that, after saving the document and reloading, the
TOC is corrupted, more or less, when we run through updateBuffer.
So we reset it first.
2019-05-27 22:35:02 -04:00
Richard Kimberly Heck
714241c313 Inform user of the new name of the emergency file. 2019-05-20 21:23:40 -04:00
Juergen Spitzmueller
79feeb0c03 Micro-typographic fix 2019-05-11 12:17:09 +02:00