Commit Graph

5740 Commits

Author SHA1 Message Date
Thibaut Cuvelier
b2fdc04f96 InsetIPAMacro: implement the XHTML conversion, refactor plaintext and DocBook to share more code. 2022-12-26 20:54:36 +01:00
Thibaut Cuvelier
df025d15df InsetIPAMacro: refactor code between DocBook and XHTML. 2022-12-26 20:23:05 +01:00
Thibaut Cuvelier
21d1d917ba DocBook/HTML: use XML entities for spaces.
This part should have been committed with bc73a857 in the first place.
2022-12-26 19:11:41 +01:00
Juergen Spitzmueller
0c56f60535 Associate "run:" link types with "Other" 2022-12-26 13:19:52 +01:00
Juergen Spitzmueller
be25181d87 Disambiguate string 2022-12-26 11:24:29 +01:00
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
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
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
0bb25ee3cd \R and \L are not defined in babel with Xe/LuaTeX 2022-12-23 10:07:41 +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
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
Richard Kimberly Heck
c50f0b125d Add HTMLClass for InsetLayout as well. Layout format change. 2022-12-05 23:42:50 -05:00
Juergen Spitzmueller
4d337e78ab Fix crash when inserting label before label in change tracking mode 2022-12-05 11:15:58 +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
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
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
fc6643e4aa Fix bug #11853 2022-12-03 23:03:33 -05:00
Thibaut Cuvelier
f3862130cf Amend 48d9d01a: remove debug output 2022-11-20 16:19:31 +01:00
Thibaut Cuvelier
48d9d01a82 InsetIndex: when building the IndexNode tree, ignore IndexEntry when empty
The previous code always considered it had at least one term (an assumption that is wrong at least for doc/de/Math.lyx).
2022-11-20 14:49:14 +01:00
Thibaut Cuvelier
77f0fbdc9a InsetIndex: enable escaping for terms in the index
The previous code explicitly disabled it and this behaviour caused problems (like "A&A" being output as-is, which is wrong in HTML: it should be "A&A").
2022-11-20 00:19:53 +01:00
Thibaut Cuvelier
e9f21f2e83 InsetIndex: improve formatting of resulting XHTML
There was no line feed before the closing </li> for entries, which was inconsistent with the other block tags.
2022-11-20 00:14:43 +01:00
Pavel Sanda
d984730235 Drop C++17 if init-statements to support older compilers. 2022-11-16 21:23:01 +01:00
Scott Kostyshak
378c19bfc2 Guard some debug code
Amend f352a375 and 3bf1b97a.
2022-11-05 14:35:27 -04:00
Juergen Spitzmueller
3bbce7f24a Introduce index-tag-all lfun
This is a convenience function for indexing. It adds a copy of the
index inset under cursor after any word in the buffer that is equal
(case-insensitively) to the word preceding the index inset.

The function can be easily used to generate bad indexes (and I warn
about that in the UserGuide), but if used with care, it can also be
extremely convenient.
2022-11-05 18:39:33 +01:00
Jean-Marc Lasgouttes
fad170be1a New lfun to copy index insets from ToC
The new function inset-insert-copy can only be invoked from the ToC.
It is currently only implemented for Index inset.

It is a special lfun because Inset::dispatch is called directly from
the ToC widget with cursor pointing to the inset, whereas the patch
happens in the workarea at caret position. This function cannot be
called directly.

Add an entry for this function in the toc context menu.

Fixes bug #4582.
2022-11-04 21:52:46 +01:00
Jean-Marc Lasgouttes
d2f05b9e6f When Inset::dispatch is called from TOC, process screen flags
This is needed because we are not using the complete dispatch
machinery here.

Part of bug #4582.
2022-11-04 21:46:32 +01:00
Juergen Spitzmueller
68e268e117 Add some options to index context menu 2022-11-04 11:29:56 +01:00
Juergen Spitzmueller
55870df5c7 Do not \protect stuff in index when we postpone the index
\protect us not needed here and affects sorting
2022-11-04 08:32:34 +01:00
Juergen Spitzmueller
d41e0c9231 Fix page range without page format 2022-11-04 07:57:56 +01:00
Juergen Spitzmueller
975f304185 Indicate see[also] refs in label and outliner 2022-11-02 15:56:59 +01:00
Juergen Spitzmueller
5a53a5f608 Fix output of subentry with sortkey 2022-11-01 11:55:57 +01:00
Juergen Spitzmueller
fd5adacef2 Handle empty index subentries (#7820) 2022-11-01 10:20:50 +01:00
Thibaut Cuvelier
3bf1b97ae5 InsetIndex: hide printTree behind a LYX_INSET_INDEX_DEBUG flag
The change ensures that the function is not seen by the compiler when
the debug mode is not enabled. The flag is not set by default, because
it might have a significant performance impact for large indices.

The reason for the flag is that the default configuration under Linux
forbids the definition of unused functions.
2022-11-01 00:00:37 +01:00
Juergen Spitzmueller
ca89c6c18e Typo 2022-10-31 07:52:11 +01:00
Juergen Spitzmueller
077ccf905d Rename subindex to subentry
Makes more sense, and distinguishes it better from printsubindex
2022-10-31 06:51:38 +01:00
Juergen Spitzmueller
fba3dace9e Display subinsets in inset button and outliner 2022-10-31 06:04:13 +01:00
Juergen Spitzmueller
9dc9fa68ce Enter subindex on Enter in index 2022-10-31 05:25:04 +01:00
Juergen Spitzmueller
e39c755b85 Enable pagination property with inset sortkey 2022-10-29 12:48:45 +02:00
Juergen Spitzmueller
b3b22b0c70 Sync with master 2022-10-26 10:52:21 +02:00
Thibaut Cuvelier
5e87cfbf4c Fix a warning related to comparing different signedness 2022-09-01 10:57:04 +02:00
Thibaut Cuvelier
92ba758441 LyXHTML: implement index ranges 2022-09-01 02:22:50 +02:00
Thibaut Cuvelier
2b177172f1 LyXHTML: implement multiple indices 2022-09-01 02:04:16 +02:00
Thibaut Cuvelier
f4b0cf9b59 DocBook: amend 34ea4080
@ for sorting is implemented at 34ea4080, but the user was still shown a warning (now removed).
2022-09-01 01:17:58 +02:00
Thibaut Cuvelier
35a752e6db DocBook: add test case for multiple indices 2022-09-01 01:17:58 +02:00
Juergen Spitzmueller
047004cb0f Merge branch 'master' into features/indexmacros 2022-05-14 16:29:46 +02:00
Kornel Benko
4b41f54575 FindAdv: Use unicode for space where possible
Search for different space-types should be done with
regular expression '\s'
2022-05-12 13:20:24 +02:00
Kornel Benko
62ab563c25 FindAdv: Use private variable for_search
Using the new inline statements
	find_effective(), find_with_non_output(), find_with_deleted(),
	find_set_feature(), find_add_feature() and find_clean_features()
makes the code a slightly better readable.
2022-05-09 22:11:38 +02:00