Commit Graph

28572 Commits

Author SHA1 Message Date
Thibaut Cuvelier
2592a36dae Amend bc73a85778
Missing return in `specialCharKindToXMLEntity`. Previously, the
functions that were merged into `specialCharKindToXMLEntity` did not
return any kind of error in case an unknown special character is met
(enumerated value). This behaviour is preserved.
2022-12-26 00:18:47 +01:00
Thibaut Cuvelier
ff2a2b2a8a DocBook: add a comment about the need for DocBook 5.2. 2022-12-25 20:48:26 +01:00
Thibaut Cuvelier
c77872f314 Cleanup following the removal of HTML entities
The remaining part that was not handled in the previous commit. It focuses on lib/symbols.
2022-12-25 20:48:14 +01:00
Thibaut Cuvelier
bc73a85778 LyXHTML: switch the doctype to (X)HTML5 and only output XML entities.
This is a new take on c8e2c17a that was reverted at da67bde61a due to entities no more recognised by the browsers. Corresponding thread on the mailing list: https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg213179.html

This patch is a huge cleanup overall, by removing the distinction between HTML and XML entities (the latter arrived due to the DocBook support).

In InsetListingParams, I also changed the mechanism that relied on " to use an XML entity to be consistent with the rest of the code, mostly in case someone looks for HTML entities and wonders why they are still there.
2022-12-25 20:48:14 +01:00
Thibaut Cuvelier
d85969b8b8 LyXHTML: give the language in the root tag. 2022-12-25 20:48:14 +01:00
Richard Kimberly Heck
3d2bedb160 typo 2022-12-25 12:50:54 -05:00
Richard Kimberly Heck
1413b509ac Update tex2lyx tests. 2022-12-25 12:49:42 -05:00
Richard Kimberly Heck
144cf4bb9a Allow an 'other' type for hyperlinks. Format change.
Also, perform the URL fixing magic for DocBook and XHTML.

As it was, it was impossible to enter e.g. "tel:" type links. Now
choosing the "Other" type just outputs the URL as given.

Also, the addition of "http" or "file" was not being done for
DocBook and XHTML. Now it is.
2022-12-25 12:45:48 -05:00
Juergen Spitzmueller
1e28965589 Do not wrap forceTLR in \L with babel and unicode engines
It does not seem to be needed, the \L macro is undefined, and there
does not seem to be an alternative.
2022-12-24 09:20:02 +01:00
Juergen Spitzmueller
064955b151 Used pressed() signal in status bar widgets (fixes #12613) 2022-12-24 07:20:39 +01:00
Juergen Spitzmueller
f06ddb2342 Fix signals 2022-12-23 16:07:47 +01:00
Juergen Spitzmueller
0bb25ee3cd \R and \L are not defined in babel with Xe/LuaTeX 2022-12-23 10:07:41 +01:00
Juergen Spitzmueller
d90484de0a Fix UI of document color selection
The coloring of push buttons does not work with all themes, so use a
dedicated widget.

Also, accelerators have been used multiple times.
2022-12-23 09:17:01 +01:00
Juergen Spitzmueller
7015d7db07 Mark "edit externally" button of preamble and local layout
while external editing is underway
2022-12-23 08:19:26 +01:00
Juergen Spitzmueller
d888d0d130 Inform user if panel or tab has invalid content (#10827)
This adds a warning icon to either the tab header or the panel stack
entry item if a widget on the panel/stack has invalid content.

Particularly helpful to get aware of such content on other tabs/panes
than the one currently selected.
2022-12-22 15:01:58 +01:00
Thibaut Cuvelier
4f314567b6 XML: improve formatting of error message for unrecognised tag type.
Before, there was always a space after the tag, even when there were no attributes. Now, the space is output conditionally, so that the output makes more sense.

Before, one space too many for the tag name (title), casting doubt on whether the code had this space hard coded or not:

<!-- Output Error: Unrecognised tag type 'para' for 'title ' -->

After, no such space:

<!-- Output Error: Unrecognised tag type 'para' for 'title' -->
2022-12-22 04:10:25 +01:00
Thibaut Cuvelier
43d096f647 DocBook: fix a typo in comments and improve docs. 2022-12-22 03:40:50 +01:00
Jean-Marc Lasgouttes
22c6fe8e0c Remove boolean arguments of scrollToCursor wih an enum
This makes the function inent more obvious. No change intended.

Related to bug #12491.
2022-12-21 18:47:33 +01:00
Jean-Marc Lasgouttes
0fed10e4c3 Simplify and hopely fix scrollToCursor
Remove some special cases that I do not really understand and
streamline the cases.

Also make sure that there is only one code path for centering.

Fixes bug #12491.
2022-12-21 18:47:33 +01:00
Pavel Sanda
b9da7617d8 * lfun doc 2022-12-21 18:29:05 +01:00
Juergen Spitzmueller
226ce75054 Add test 2022-12-20 06:04:29 +01:00
Juergen Spitzmueller
889be483cf Simplify test
Math is useful for something, after all...
2022-12-20 05:50:23 +01:00
Juergen Spitzmueller
9966b4be4a Adapt inset info to new version check 2022-12-19 17:42:49 +01:00
Juergen Spitzmueller
2e6ea5f613 Extend flexible version check to packages 2022-12-19 17:42:27 +01:00
Juergen Spitzmueller
029adfa28c Improve LaTeX version checking
Instead of having to add and individually test the versions to check
for, we store the current version and test on that with a specific
function isAvailableAtLeastFrom(package, year, month, day)

Currently only used for the LaTeX version, but could also be extended
for package versions.
2022-12-19 15:15:41 +01:00
Juergen Spitzmueller
41146030b6 Simplify output code 2022-12-19 11:09:50 +01:00
Juergen Spitzmueller
0c6d0a86b9 Remove unnecessary conversion 2022-12-19 10:55:28 +01:00
Juergen Spitzmueller
c2a324e242 Amend 9716e79624
If the main language does not require the inputenc package, but a
secondary language does, inputenc needs to be loaded as well
(without options)

Also simplify the code a bit.
2022-12-19 08:00:06 +01:00
Juergen Spitzmueller
4a3871f5db Add toolbar option to reset font + language settings (#12199) 2022-12-18 16:36:30 +01:00
Juergen Spitzmueller
97c9404b71 language reset should reset to the buffer language
not reset_language, which links to default_language, which is always
English.
2022-12-18 16:35:07 +01:00
Juergen Spitzmueller
005dc32e54 Disable non-functional insets in math (#4039)
... finishing 15 year old work of mine :-(
2022-12-18 15:12:21 +01:00
Juergen Spitzmueller
17634087ea Correct date 2022-12-18 14:17:46 +01:00
Juergen Spitzmueller
3d63b78d07 Correct counting 2022-12-18 14:17:29 +01:00
Juergen Spitzmueller
9fc190d61c Improve functions for bibliography managers (#8193)
- new function to list bibtex databases
- citation-insert returns the list of undefined keys
  if the request comes from the LyX server

Original patch from Benjamin Piwowarski (2012!).
Modified and updated by Riki Heck and myself.
2022-12-18 13:25:24 +01:00
Juergen Spitzmueller
9716e79624 inputenc only expects one option
File switches with documents are done via \inputencoding.
Other than with fontenc, these do not need to be laoded via options
beforehand.

Also, out current code loaded the additional languages' encoding last,
which might result in wrong encoding settings.
2022-12-17 15:14:47 +01:00
Juergen Spitzmueller
23a2920dae Remove preceding spaces 2022-12-15 08:39:52 +01:00
Richard Kimberly Heck
fdabd46e8e Fix shortcut 2022-12-12 17:36:07 -05:00
Richard Kimberly Heck
88f0a98b52 Fix bug #12609 2022-12-12 17:33:56 -05:00
Richard Kimberly Heck
bbe2ee10a4 Pronoun 2022-12-12 17:18:35 -05:00
Jean-Marc Lasgouttes
02783aec66 Revert "Remove left/right spacing around top/left buttons"
Let's try to find a better solution (see ticket #12335)

This reverts commit d2f23c303c.
2022-12-11 20:48:44 +01:00
Enrico Forestieri
e18709b176 Further amend fb7b7e52
This restores the previous behavior of runCommand().
When the child process could not be properly terminated the
error "RunCommand: could not terminate child process" was being
issued. However, in fb7b7e52 there was a misinterpretation
between this condition and the exit status of the child and
these two different errors were mixed up. They are now
disentangled again.
2022-12-11 15:06:22 +01:00
Juergen Spitzmueller
163844a6d0 Allow defaultfamily change with non_TeX fonts (#12608) 2022-12-11 14:47:13 +01:00
Enrico Forestieri
d7910e1870 Amend fb7b7e52
pclose() returns -1 only in specific cases, otherwise it returns the
exit status of the child, to be retrieved by the macro WEXITSTATUS.
2022-12-11 12:15:37 +01:00
Juergen Spitzmueller
c7c3b39413 Minor checkedLineEdit fixes
* Do not disallow application if an invalid widget is disabled
* Fix coloring of text
2022-12-11 10:01:09 +01:00
Daniel Ramoeller
bfff93d879 Restrict toolbar menu to toolbar
Partial fix for bug #11949.
2022-12-10 20:30:58 +01:00
Jean-Marc Lasgouttes
46992201b7 Add != operator to FuncRequest and special value FuncRequest::prefix
Use this value (and `unknown' where relevant)
2022-12-10 20:30:58 +01:00
Scott Kostyshak
9f7bbeadda Change Doc Settings "Edit" PB to "Edit Externally"
"Edit" by itself is not clear if the user doesn't already know what
it does.

This affects both the local layout tab and the LaTeX preamble tab.

Brief ML discussion here:

  https://www.mail-archive.com/search?l=mid&q=20221202193312.myfnuhuz6xcil6qt%40gary
2022-12-10 10:02:48 -05:00
Juergen Spitzmueller
7f1cb306f9 Warn if buffer is switched with unapplied document changes (#9369) 2022-12-10 14:28:46 +01:00
Thibaut Cuvelier
0e2513a0e8 Amend d4095dc0
Apostrophes were being converted inside code-like areas, like LilyPond insets. This patch fixes tests that started to fail:

  Processing `./60/lily-95ee389a.ly'
  Parsing...
  ././60/lily-95ee389a.ly:7:12: error: undefined character or shorthand: &
  \relative c
             &#8217;&#8217; {  g a b c}
2022-12-09 20:17:58 +01:00
Thibaut Cuvelier
5b7fbb4190 XHTML: support NONE as item tag when no item tag should be output.
This patch mimics a similar feature for DocBook (albeit not as pervasive).
2022-12-09 02:48:52 +01:00
Thibaut Cuvelier
6c22e32cee MathML: update code for InsetMathCases to newest classes.
Based on a commit from lynx <lorenzobertini97@gmail.com>

Part of bug #12590.
2022-12-09 01:49:19 +01:00
Thibaut Cuvelier
5893ea866e MathML: output substacks as grids.
Based on a commit from lynx <lorenzobertini97@gmail.com>

Part of bug #12590.
2022-12-09 01:48:14 +01:00
Thibaut Cuvelier
d4095dc0e6 Export ' (straight) as ’ (curly) in DocBook
This is similar to what LaTeX does in its output.

See the (long) discussion in ticket #11244. Port of ad3e6c69b2 for DocBook.

This patch requires delaying entire strings instead of just characters, so that the DocBook code path can be as similar to the XHTML one as possible.
2022-12-09 01:25:34 +01:00
Stephan Witt
deae5ea23a Follow-up for change a66ee4109e - guard Qt 5.4 code with version check 2022-12-08 18:05:37 +01:00
Stephan Witt
a66ee4109e Add OS version info to About box. 2022-12-07 00:08:11 +01:00
Jean-Marc Lasgouttes
f3f478c2fb C++11 compilation fix 2022-12-06 17:12:45 +01:00
Richard Kimberly Heck
c50f0b125d Add HTMLClass for InsetLayout as well. Layout format change. 2022-12-05 23:42:50 -05:00
Juergen Spitzmueller
a759fb7ae9 Update tex2lyx tests again 2022-12-05 18:01:31 +01:00
Juergen Spitzmueller
4d337e78ab Fix crash when inserting label before label in change tracking mode 2022-12-05 11:15:58 +01:00
Juergen Spitzmueller
6c904004b6 More refs sorting fixes
This now uses a Vector of pairs, which is more robust with non-unique
labels (e.g. in change tracking).
2022-12-05 09:45:40 +01:00
Juergen Spitzmueller
c715db4ae8 Amend 14b108fc22 2022-12-05 08:20:25 +01:00
Juergen Spitzmueller
dedcee9117 tex2lyx support for starred refs 2022-12-05 07:52:41 +01:00
Richard Kimberly Heck
e0e84eba01 Update tex2lyx tests 2022-12-05 01:09:05 -05:00
Juergen Spitzmueller
7a0c8f366d Typo spotted by Pavel 2022-12-05 06:47:52 +01:00
Richard Kimberly Heck
d4f2460ac4 Fix bug #11410.
Main part of patch from Daniel, adapted by me.
I also added the lyx2lyx code.
2022-12-04 18:33:58 -05:00
Jean-Marc Lasgouttes
ff1ddf6251 Fixup 71623b88: change semantics of "delete" LFUNs again
Instead of specifying "force" to disable the deletion protection
mechanism, invert the default so that "confirm" is needed to activate
it. The idea is to keep the lfun reasonable for scripting and add a
special argument for interactive use.

Document in release notes.

Update LFUN.lyx documentation

Update bind files.

Add conversion step to prefs2prefs_lfun.py.
2022-12-04 21:13:51 +01:00
Richard Kimberly Heck
7b5a5e524b Fix CSS output for lists.
Somehow that got committed before it was done. I guess I'm out of
practice...
2022-12-04 14:56:01 -05:00
Richard Kimberly Heck
5ac560cfa1 Add i, ii, iii, iv suffixes to CSS class as well in the case of itemizations 2022-12-04 14:34:29 -05:00
Richard Kimberly Heck
69a6c41b94 Introduce HTMLClass tag, to make it easier to give these. 2022-12-04 13:36:34 -05:00
Richard Kimberly Heck
6f4f7442ef Fix bug #11769 2022-12-04 12:51:47 -05:00
Richard Kimberly Heck
dfa87371f7 Use ranges 2022-12-04 12:06:48 -05:00
Richard Kimberly Heck
b37ac5807f Do not output label tags if there is no label 2022-12-04 12:01:42 -05:00
Richard Kimberly Heck
b9c52f20c7 Whitespace 2022-12-04 11:59:54 -05:00
Juergen Spitzmueller
3ec87be050 Fixup refs sorting
This has been broken at df59649a18
2022-12-04 16:21:14 +01:00
Juergen Spitzmueller
abd69b06f4 Fixup refs grouping
This has been broken at df59649a18
2022-12-04 15:32:47 +01:00
Daniel Ramoeller
7bdf372ecc Properly reset on ESC key on LayoutBox/CategorizedCombo
Fix for bug #12497.
2022-12-04 13:45:49 +01:00
Juergen Spitzmueller
891ba7263e Workaround for #11676
Avoid the crash we get with this combination. Having identified the real
cause would of course have been better. But it seems no one has a clue.
2022-12-04 11:09:00 +01:00
Richard Kimberly Heck
3eb3608138 Fix bug #11418.
Add new HTMLInToc layout tag: When false, the thing will not be output
to the TOC. It's now set to false for starred sections.
2022-12-04 00:33:14 -05:00
Richard Kimberly Heck
eb949f1d05 Use ranges 2022-12-04 00:02:51 -05:00
Richard Kimberly Heck
9f258704ae Use a couple ranges 2022-12-03 23:33:44 -05:00
Richard Kimberly Heck
fc6643e4aa Fix bug #11853 2022-12-03 23:03:33 -05:00
Richard Kimberly Heck
233ce1ec12 Partially fix bug #10827. Patch from Daniel, slightly modified by me. 2022-12-03 22:44:05 -05:00
Juergen Spitzmueller
c4b1f7b31c Some string fixes in compare UI 2022-12-03 15:21:15 +01:00
Juergen Spitzmueller
592f21aafd Update tex2lyx tests
This was forgotten at the latest file format change
2022-12-03 08:42:33 +01:00
Scott Kostyshak
c7269ffa86 Comment 2022-12-02 19:34:36 -05:00
Scott Kostyshak
a41b866e60 Line width 2022-12-02 19:29:04 -05:00
Scott Kostyshak
6f9cfdea7e Comment
Jürgen confirms that the behavior in #8493 is present with Qt6.
2022-12-02 19:28:10 -05:00
Juergen Spitzmueller
14b108fc22 Check encodability of math user macro names (#11855) 2022-12-02 11:23:32 +01:00
Juergen Spitzmueller
ac58a5060e Revert e500dc19c1
More general fix is upcoming.
2022-12-02 11:21:15 +01:00
Juergen Spitzmueller
e500dc19c1 Do not crash with uncodable character in math preview snippert (part of #11855) 2022-12-01 16:01:38 +01:00
Jean-Marc Lasgouttes
9376f0203d Merge branch 'killqt4'
Remove all trace of Qt4 support. The different elements have been
considered carefully before removal.

The only changes that need to be done concern Windows and macOS
compilation instruction and will need to be taken care of by the
respective maintainers before prerelease.

The file TODO.killqt4 lists what remains to be done.
2022-11-28 15:19:41 +01:00
Pavel Sanda
d82247985a * RELEASE-NOTES 2022-11-28 11:09:37 +01:00
Yuriy Skalko
7b23c76b71 Add "semantic linefeeds" after punctuation marks.
We already had such breaks for dot.

File format change.
2022-11-28 11:58:53 +02:00
Jean-Marc Lasgouttes
ec767f02a0 Support macros from hepnames and hepparticles packages
This macros are important for particle physicists. Note that the
package hepparticles as distributed in recent texlive does not work
(see #11804) and need to be patched. This is however not something we
can do, and any physicist wanting to use this will have patched his
own version I guess.

I contacted Andy Buckley, the author of the package, who answered that
he is aware of the issue but does not have time right now to fix it.
The workaround is straightforward: on line 176 of hepparticles.sty,
replace "\updefault" by "n".

Two parts:
- add *lots* of definitions to lib/symbols
- add hepparticles and hepnames as simple features in LaTeXFeatures.

The definitions are courtesy of @renyhp, and extracted from the
aforemented packages:
https://www.ctan.org/pkg/hepparticles
https://www.ctan.org/pkg/hepnames

Fixes bug #11804.
2022-11-27 19:47:02 +01:00
Richard Kimberly Heck
2c7f229b06 Fix bug #11917. Patch from Daniel. 2022-11-27 13:24:13 -05:00
Richard Kimberly Heck
5db9e91f16 Fix bug #11781. Patch from Daniel. 2022-11-27 13:20:17 -05:00
Daniel Ramoeller
2d01fcd079 Activate another tab group (aka split view)
Bind the new functions tab-group-next/previous to F6/S-F6 in CUA bindings.

Fix for #12115.
2022-11-27 18:52:05 +01:00
Juergen Spitzmueller
315d347d3e Include he/cua.bind (#12052)
To allow for its use, we add support to include a bind file from the
top dir (i.e., non-localized) via \bind_file ../<file>
2022-11-27 16:30:21 +01:00
Scott Kostyshak
6d4ab79917 Effectively disable the "Stop command?" dialog
We now allow the user to cancel the background process at any point
(via the red "x" in the status bar or Document > Cancel Export), so
we do not need to poll the user with the dialog.

The patch works by setting timeout to "-1" which is treated as a
special value to disable the poll.

Fix (by obviation) #12531 and #9953, which were about the dialog.
2022-11-25 10:25:40 -05:00
Scott Kostyshak
68c7953422 Change os::timeout from minutes to milliseconds
We can now specify the special value of "-1" milliseconds which is
interpreted as disabling the timeout.

No change of functionality intended.
2022-11-25 09:51:30 -05:00