Commit Graph

5754 Commits

Author SHA1 Message Date
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
Kornel Benko
441b0eab23 FindAdv: Amend 64af721a
The space handling is a nightmare.
2022-05-08 22:43:56 +02:00
Kornel Benko
4bb427a244 FindAdv: Amend 627cd6de: Use '~' instead of "\\ " for search if possible
Also fix a thinko in interpreting the found values.
The match_len describes the length of the second regex field,
while matchend is the length of the search field 0.
2022-05-08 14:30:45 +02:00
Thibaut Cuvelier
f352a375d9 InsetIndex: revamp IndexEntry to handle both legacy and modern index insets; simplify and adapt the XHTML code.
DocBook comes in another commit, as the modifications are not required to keep the code compilable.

A semicolon is no more used between an index term and the places it appears, because some languages need a space before it and others not: this wasn't handled at all. With a dash, this problem disappears.
2022-05-05 04:16:51 +02:00
Thibaut Cuvelier
54a519a089 InsetIndex: simplify the implementation of the has* methods. 2022-04-30 03:23:59 +02:00
Thibaut Cuvelier
5c80671740 InsetIndex: add a method hasSubentries. 2022-04-30 03:23:59 +02:00
Thibaut Cuvelier
029d8d5839 InsetIndex: when parsing entries for XHTML, don't impose spaces around ! for subentries. 2022-04-30 03:23:59 +02:00
Thibaut Cuvelier
b5418f0d29 InsetIndex: add a few comments. 2022-04-30 03:23:59 +02:00
Thibaut Cuvelier
758792f6d6 InsetIndex: add a comment. 2022-04-30 03:23:59 +02:00
Thibaut Cuvelier
4a62c08e61 InsetIndex: refactor IndexEntry to be a full-fledged class, hiding its implementation details better than before. 2022-04-30 03:23:59 +02:00
Thibaut Cuvelier
5a53872259 DocBook: use the new system for index. 2022-04-25 02:36:35 +02:00
Juergen Spitzmueller
7d7b21ec3e Introduce InsetIndexMacros
This adds native macros for subindexes (!level), |see and |seealso
as well as native support for ranges |( |) and pagination format
-- e.g., |textbf -- via the index dialog

Resolves #12478, #7232 and #5014

The feature is complete (incl. tex2lyx) except for

* file format change and lyx2lyx
* docbook/xhtml
* documentation
2022-04-19 11:46:08 +02:00
Pavel Sanda
02ffd6dd70 Allow syncing open/close status of branch inset with it's activation status.
This was kicked out by 742b39f4 (the code in inset toggle survived).
https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg217311.html
2022-04-17 00:16:19 +02:00
Kornel Benko
c2229d388b Find: Renamend for_searchAdv to for_serach in src/OutputParams.h
Since this variable is used by quick find too, the naming was misleading
2022-04-12 18:02:12 +02:00
Kornel Benko
aa66663364 FindAdv: Amend 58f70b9d
Consider plain-quotes, inner-quotes
1 independent if in regex or text
2 independent of quote style
3 independent of using dynamic marks
2022-04-06 19:00:20 +02:00
Kornel Benko
58f70b9da1 FindAdv: Handle search for quotes
Double quotes will be found if using the string '"' in pattern.
Single quotes needs "'" in pattern.
2022-04-05 17:04:51 +02:00
Kornel Benko
681334ce20 FindAdv: Amend 6e7fd68c: Handle InsetNoteParams::Comment too 2022-04-04 10:46:55 +02:00
Kornel Benko
6e7fd68c79 FindAdv: Allow to search in LyX-Note also if ignoring format 2022-04-03 19:03:47 +02:00
Juergen Spitzmueller
0ab862f942 Amend d96135a9dc 2022-04-02 12:05:18 +02:00
Juergen Spitzmueller
d96135a9dc Amend bcad19e504
Allow searching in notes and comments if non-output-content is true
2022-04-02 11:19:55 +02:00
Thibaut Cuvelier
50374e38e1 XHTML/CALS tables: create helper functions to share more code. 2022-04-02 03:34:33 +02:00
Thibaut Cuvelier
88f767e492 CALS tables: base implementation of row separators on the new code from XHTML. 2022-04-02 03:34:33 +02:00
Thibaut Cuvelier
8b9c162f51 CALS tables: fix implementation of multirow/col. 2022-04-02 03:34:33 +02:00
Thibaut Cuvelier
544adb065b XHTML tables: fix borders and implement booktabs.
https://www.lyx.org/trac/ticket/10154

Contributed by raccoon.
2022-04-02 03:34:33 +02:00
Thibaut Cuvelier
838157392a XHTML/DocBook tables: slight refactoring. 2022-04-02 03:34:33 +02:00
Thibaut Cuvelier
72f630cb8f DocBook: remove unused variable. 2022-04-02 03:34:32 +02:00
Thibaut Cuvelier
5488bebb30 XHTML/DocBook: merge code paths to generate a row in a table. 2022-04-02 03:34:32 +02:00
Thibaut Cuvelier
fa5db30d41 Remove debug output. 2022-04-02 03:34:32 +02:00
Kornel Benko
bcad19e504 FindAdv: Handle latex-output for comment-environment
Disable if in search-adv modus and not searching in not-printed contents,
enable otherwise
2022-04-01 20:14:47 +02:00
Thibaut Cuvelier
0ba1b68f69 DocBook: merge code duplicates for HTML and CALS tables. 2022-04-01 04:21:31 +02:00
Thibaut Cuvelier
ec01616247 XHTML/DocBook: merge code duplicates for horizontal alignment. 2022-04-01 04:01:40 +02:00
Thibaut Cuvelier
c7896cf922 XHTML/DocBook: merge code duplicates for vertical alignment. 2022-04-01 03:51:24 +02:00
Daniel Ramoeller
f21899661a Add toggle feature for all, outer and inner borders
Fix for bug #12503.

Also some bug fixes for the set inner lines algorithm. See discussion of #12503.
2022-03-13 10:34:16 -04:00
Jean-Marc Lasgouttes
dc502c8279 Fixup 12dfdbf0: intercept validate(), not latex()
The fake contents of the inset should be created before validate(), so
that the correct packages are loaded.
2022-03-10 17:10:17 +01:00
Jean-Marc Lasgouttes
a6db1383f5 Get rid of spelling and language marks in info inset
These are just annoying. Note that the language mark cannot currently
be specified in a layout file, but it is not clear that there is a
need for that. Therefore I used the simple and hackish way.
2022-03-10 13:35:45 +01:00
Jean-Marc Lasgouttes
12dfdbf0a3 Fix crash in InsetInfo when bindings change
This is actually a generic InsetInfo issue:

1/ the contents of the inset is computed in updateBuffer, so that it
   is available for drawing but also for latex output (think batch
   export). When it is called, it deletes the existing inner paragraph
   and replaces it by a new one

2/ metrics build a new Row object that represents to paragraph

3/ draw() relies on this information

Now, imagine that updateBuffer() is called after metrics(). This can
happen for many reasons, and does happen here (display a shortcut info
and change the shortcut file from cua to emacs).

This problem has been here forever, but is only visible now that the
(experimental) bookmark display code needs to read the underlying
paragraph id.

The solution is to compute the inset contents at metrics time. This
is done by moving the relevant code to a new standalone build() method
that is called in metrics() but also in latex().
2022-03-10 12:45:07 +01:00
Kornel Benko
498a5cd487 FindAdv: Added possibility to search also in deactvated branches
To include content of deactivated branches to the searched region
one has to use the lyx-funcion
	search-ignore non-output-content true
2022-03-10 10:51:02 +01:00
Thibaut Cuvelier
997f0621c5 Rename LATEX debug level to OUTFILE and use it for DocBook, HTML, and XML messages. 2022-03-01 16:05:42 +01:00
Juergen Spitzmueller
b04a930a27 Amend 8a0715d0bd
Also do not use the bb trick when exporting "nice".
2022-02-27 10:02:52 +01:00
Juergen Spitzmueller
8a0715d0bd Do not output eps bounding box for unknown/missing graphics (#8899)
Except for dvi/ps output chain for which this trick was meant.
Also, issue an error message in this case. This is analogous to
the other output flavors now.
2022-02-26 16:23:27 +01:00
Thibaut Cuvelier
cfb6f205fa DocBook, InsetFloat: avoid a potential nullptr dereference when detecting the type of table for filler content. 2022-02-20 21:31:13 +01:00
Jean-Marc Lasgouttes
e263fe8e03 Fix unintialized variables spotted by coverity
The InsetWrap case happens in decodeInsetParaps (InsetCommand.cpp),
where the default constructor is invoked. In this case, lines was not
initialized.
2022-02-20 17:03:33 +01:00
Thibaut Cuvelier
0dc7f34e00 unicodesymbols: parse supplementary lines to encode alternative ways to encode symbols in raw LaTeX. 2022-02-20 01:33:03 +01:00
Daniel Ramöller
df59649a18 Properly show labels from broken references in Cross-references dialog
Fix for bug #12456.

The labels are transmitted from Buffer to GuiRef by reference of refs_
in the getLabelList function. Previously, only one string was
transmitted. But I needed both the formatted string, e.g. "x enu:test"
or "Missing: enu:test", as well as the plain label, e.g. "enu:test".
The former is for the list of labels to choose from in GuiRef and the
latter for the label as shown in the line edit that contains the plain
label in order to create a new reference from it. Transmitting both is
what the pair achieves.
2022-02-19 18:14:47 +01:00
Juergen Spitzmueller
755146287c Typo 2022-02-17 08:21:36 +01:00
Juergen Spitzmueller
266a5e04d4 InsetIndex: Some comments and indentation fixes 2022-02-17 08:19:33 +01:00
Juergen Spitzmueller
6fa457ddde Fix #10649 2022-02-15 10:24:39 +01:00
Thibaut Cuvelier
a460097823 DocBook: use the existing unicodesymbols global table to map LaTeX ERTs to Unicode characters. 2022-02-14 03:03:22 +01:00
Thibaut Cuvelier
a1d297b2cc DocBook: add a TODO for a newly discovered bug. 2022-02-07 04:49:32 +01:00
Thibaut Cuvelier
35588958ea DocBook: in ERTs, allow the use of \string. 2022-02-07 04:47:40 +01:00
Thibaut Cuvelier
f6edfaa151 DocBook: refactor ERT recognition as a map, add many coded letters. 2022-02-07 03:25:51 +01:00
Thibaut Cuvelier
cd82b125d1 DocBook: in ERTs, recognise \oe. 2022-02-07 01:02:19 +01:00
Thibaut Cuvelier
812ce48e78 DocBook: in ERTs, recognise calls to the logos (as in InsetSpecialChar). 2022-02-07 00:27:58 +01:00
Thibaut Cuvelier
34ea4080ec DocBook: support @ in index when used for sorting. 2022-02-06 06:23:53 +01:00
José Matos
b73ab0256d Fix compilation with gcc-12 2022-01-27 15:37:45 +00:00
Juergen Spitzmueller
942538c02d Fix bug 12459
When checking for branch color, take into account that some branches
are defined in the master document only, some only in the child.
2022-01-22 09:30:25 +01:00
Thibaut Cuvelier
51e92a5a97 DocBook: more explicit comment. 2021-12-26 02:26:50 +01:00
Thibaut Cuvelier
4c27a7307e Amend c734504d to fix a very bad nullptr dereferencing... 2021-12-26 02:24:06 +01:00
Thibaut Cuvelier
81274c8da7 Remove code that has been commented out for a long time. 2021-12-26 02:14:49 +01:00
Thibaut Cuvelier
c734504d3b DocBook: in InsetFloat, detect the presence of a caption by generating it.
This catches the case where the caption only contains a comment, as in export/export/latex/lyxbugs-resolved/cprotect/9313-comment-in-figure-float-caption. No duplicate work is performed to ensure the same level of performance as before.
2021-12-24 01:08:24 +01:00
Juergen Spitzmueller
c2f2ba57f1 Do not repeatedly call main_font_encoding()
This method impacts on performance and we store the value anyway in
the output params.
2021-12-20 12:09:12 +01:00
Jean-Marc Lasgouttes
5966d4fb8d Improve row flushing
Add new row flags Flush and FlushBefore to let insets indicate whether
they cause flushing of current row (eg. newline) or of previous row
(e.g. display insets).
2021-12-07 17:04:47 +01:00
Jean-Marc Lasgouttes
963a0aa466 Implement Row::Element::row_flags
Move the enum definition RowFlags in its own include file, to avoid
loading Inset.h. Document it more thoroughly.

Rename RowAfter to AlwaysBreakAfter.

Add CanBreakInside (rows that can be themselves broken). This allow to
differentiate elements before bodyPos() and allows to remove a
parameter to shortenIfNeeded().

Make the Inset::rowFlags() method return int instead of RowFlags, as
should be done for all the bitwise flags. Remove the hand-made bitwise
operators.

Set R::E::row_flags when creating elements.
* INSET elements use the inset's rowFLags();
* virtual element forbid breaking before them, and inherit the *After
  flags from the previous element of the row;
* STRING elements usr CanBreakInside, except before bodyPos.

More stuff may be added later.
2021-12-07 17:04:47 +01:00
Juergen Spitzmueller
f0126b9fdf \\noindent in a paragraph that starts with \\vspace is possible
But the \\vspace must precede \\noindent (the latter leaves vmode)
2021-10-31 11:56:53 +01:00
Jean-Marc Lasgouttes
2c50f0cd77 An assert to hopefully please coverity 2021-10-29 12:39:50 +02:00
Yuriy Skalko
54028c3eea Mark inverted branch insets 2021-10-27 00:56:06 +03:00
Jean-Marc Lasgouttes
2f236b01e0 Make sure that language is "latex" in InsetArgument when pass-thru.
The code that determine whether an InsetArgument is passThru is
complex and lives in updateBuffer.

This patch factors out the code in a new init method and calls it also
in doInsetInsert when inserting a InsetArgument.

Fixes bug #12143.
2021-10-21 19:14:06 +02:00
Thibaut Cuvelier
279e0a6839 DocBook: use the new refactorings in InsetText.
InsetText::docbookRenderAsImage directly used Qt to compute hashes, use the same code as support/FileName (now living in support/filetools).
2021-10-19 09:15:44 +02:00
Thibaut Cuvelier
21366155e4 DocBook: use a hash to determine the file names for generated images.
This way, the file names no more change without a reason.
2021-10-16 22:41:38 +02:00
Thibaut Cuvelier
33668e3a30 DocBook: export the preview images to the right format.
"docbook" is not the same as "docbook5", maybe it would be better to have an enumeration instead of strings.
2021-10-16 22:41:38 +02:00
Thibaut Cuvelier
e0830592f0 DocBook: wrong type of XML tag.
imagedata should have been a compound tag, because it should have no content, only its attributes are relevant (instead of a start-end pair of tags).
2021-10-16 22:41:38 +02:00
Thibaut Cuvelier
7652747e26 DocBook: generate images for layouts that request it. 2021-10-13 19:26:49 +02:00
Thibaut Cuvelier
3502f5c999 Factor out the generation of the code to create a preview.
This will be soon reused in InsetText to generate images for DocBook.
2021-10-13 19:26:49 +02:00
Thibaut Cuvelier
b5533a24f4 Typos and comment improvements. 2021-10-13 19:26:49 +02:00
Thibaut Cuvelier
46b8101800 Factor out the list of macro definitions for InsetPreview.
This will be soon reused in InsetText to generate images for DocBook.
2021-10-13 19:26:49 +02:00
Thibaut Cuvelier
82bca97379 DocBook: overall structure for rendered insets. 2021-10-13 19:26:49 +02:00
Thibaut Cuvelier
e93e50bf56 DocBook: add the DocBookRenderAsImage tag. 2021-10-13 19:26:48 +02:00
Scott Kostyshak
3ad94ec6d9 Minor refactor of previous commit
A bit easier to read and avoids unnecessary status.clear().
2021-10-07 20:40:12 -04:00
Daniel Ramoeller
b387ed52b1 Disable LFUN for last column/row deletion
Fix for #12380.
2021-10-07 20:40:12 -04:00
Juergen Spitzmueller
9a4a6ca079 Fix \cline calculation when last column has decimal alignment 2021-10-01 12:42:06 +02:00
Yuriy Skalko
d3c335a5d5 Remove useless casts reported by GCC with -Wuseless-cast option 2021-09-30 10:37:24 +03:00
Yuriy Skalko
325c405541 Remove redundant semicolons reported by GCC with -Wextra-semi option 2021-09-28 11:28:43 +03:00
Thibaut Cuvelier
ffa1b1dcc7 DocBook: add inner tags for layouts.
This makes it possible to implement LilyPond as prescribed in https://lilypond.org/doc/v2.22/Documentation/usage/docbook.
2021-09-21 01:21:25 +02:00
Jean-Marc Lasgouttes
f3396ae011 Whitespace 2021-07-13 11:15:13 +02:00
Jean-Marc Lasgouttes
1c200e0d99 Revert "Add a move constructor to Inset"
It does not compile :-p

This reverts commit 874928f4a4.
2021-07-12 12:38:16 +02:00
Jean-Marc Lasgouttes
874928f4a4 Add a move constructor to Inset
Does not change much, but Coverity complains about it. Let's see if
this allows Inset's child classes to grow their own move constructor.

Also some whitespace.
2021-07-12 11:59:40 +02:00
Eugene Chornyi
e9d5fc0190 prevent Qt6 from defining UNICODE (Qt6.1.1 and upwards) 2021-06-19 10:48:49 +02:00