Commit Graph

5396 Commits

Author SHA1 Message Date
Pavel Sanda
bd5f6097fc Does not compile on older gcc. 2020-08-04 14:55:22 +02:00
Juergen Spitzmueller
aba8c81290 Next attempt at correctly setting fonts in insets depending on inheritFont() 2020-08-02 10:12:19 +02:00
Thibaut Cuvelier
875f7d42e2 DocBook: avoid generating empty paragraphs instead of new pages.
As this required to first generate the paragraph before outputting it if necessary, tests like XMLStream::isTagOpen no more worked properly. This also refactors table handling to get rid of that case (and make code easier to read).
2020-08-02 04:03:39 +02:00
Pavel Sanda
eef0c8e8ed xHTML export: change filenames of exported images.
This patch aims at:
1. replacing absolute paths by their hashes (do not leak directory structures)
2. not using counters anymore so that changing figures order in the document
   does not lead to large number of obsolete images in export directory.

Other changes than in xHTML export of images are unintended.
2020-08-01 22:16:04 +02:00
Thibaut Cuvelier
fed71fa8c2 DocBook: bug fixing with several bibliographic references at once. 2020-08-01 03:51:14 +02:00
Thibaut Cuvelier
5324566013 DocBook: use the right key when generating bibiomixed. 2020-08-01 03:39:53 +02:00
Thibaut Cuvelier
0c0613327c Get rid of xmlize, bringing no advantage over escapeString. 2020-08-01 03:20:28 +02:00
Thibaut Cuvelier
85946aae2b DocBook: fix XML in comments (-- forbidden for some historical reason). 2020-08-01 00:02:36 +02:00
Thibaut Cuvelier
ad08373ae2 DocBook: actually include files that are not properly understood (with automatic escaping), in comments. 2020-07-31 20:17:38 +02:00
Thibaut Cuvelier
44ef3fadee DocBook: fix encoding issues with complex ERT. 2020-07-31 20:17:38 +02:00
Thibaut Cuvelier
6434b666bf DocBook: don't output abstract if it would have no content.
Restore a change from e709a662 (reverted by d75ff993) that was mixed into another commit.

Also, add a TODO for InsetIndex.
2020-07-31 00:55:00 +02:00
Juergen Spitzmueller
065c09537b Amend 261625f412 2020-07-29 12:23:10 +02:00
Pavel Sanda
618f3a0359 Kill warning about unused parameter. 2020-07-25 22:29:07 +02:00
Thibaut Cuvelier
5de60e3c77 DocBook: implementation of LATEX_BIB_ENVIRONMENT.
Fixes endless loops when such environments were used.

Add Kornel's test case that triggers an infinite loop when generating as DocBook 5
2020-07-25 17:37:13 +02:00
Thibaut Cuvelier
ca01edf59f DocBook: escape IDs for InsetRef. 2020-07-21 02:45:04 +02:00
Thibaut Cuvelier
d0748cd69c DocBook: properly escape PI in InsetMarginal. 2020-07-20 03:01:41 +02:00
Thibaut Cuvelier
be3e79c2a0 DocBook: clean citation keys everywhere in the same way. 2020-07-20 02:29:40 +02:00
Thibaut Cuvelier
d6ec3d686b amend 467d57bc: typo 2020-07-19 21:36:34 +02:00
Thibaut Cuvelier
467d57bca1 Fix use of std::regex_match 2020-07-19 19:34:02 +02:00
Thibaut Cuvelier
e302757476 Add support for CALS tables in DocBook. 2020-07-16 00:40:16 +02:00
Thibaut Cuvelier
3b740d0c8f DocBook: add support for LYX_ALIGN_BLOCK and LYX_ALIGN_DECIMAL in tables 2020-07-15 16:17:16 +02:00
Juergen Spitzmueller
60741c3d49 InsetFloat: pass back inset-modify that is addressed to other inset
Fixes #9994
2020-07-13 16:46:43 +02:00
Juergen Spitzmueller
f6d9e4170d InsetInfo: Pass back inset-modify that do not target this inset
Fixes #9214.
2020-07-13 16:15:42 +02:00
Jean-Marc Lasgouttes
32f06d01ec Revert "Improve handling of top and bottom margin"
It turns out this is not ready at all.

This reverts commit ff7cdf1b74.
2020-07-13 00:00:36 +02:00
Jean-Marc Lasgouttes
ff7cdf1b74 Improve handling of top and bottom margin
The 20px space on top and bottom of document have traditionally been
obtained by adding the to the ascent/descent of the first/last row.
This reads to annoyances like selections that are drawn in these
margins and issues with the nesting marker.

The change is to add the values to a separate member of the Row
object, and to add new Row::total(Ascent|Descent) methods that add the
effect of this padding.

Moreover, some methods are added to TextMetrics to simplify the
BufferView code.

Fixes bug #9545.
2020-07-12 20:32:04 +02:00
Juergen Spitzmueller
289cb58f52 Remove unneeded header 2020-07-11 16:41:34 +02:00
Juergen Spitzmueller
aaeb425230 Fix header inclusion order
This cures a crash with stdlib-debug on autotools
2020-07-11 12:30:14 +02:00
Juergen Spitzmueller
11a57ce6c6 Fix header inclusions 2020-07-09 17:19:01 +02:00
Richard Kimberly Heck
e6b2c7c4ce Change in ::docbook args 2020-07-09 03:27:32 -04:00
Richard Kimberly Heck
8ae0841826 Whitespace 2020-07-08 12:38:05 -04:00
Thibaut Cuvelier
fd6e14414f Remove GuiRef::nameAllowed, as the DocBook support no more uses it 2020-07-08 09:55:59 +02: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
Juergen Spitzmueller
0bddf448ef Prevent outputting \maketitle within an inset embedded in title.
Amends [e4ef8ddc0f8202/lyxgit]
2020-07-04 10:54:20 +02:00
Juergen Spitzmueller
e4ef8ddc0f Properly fix handling of title layouts within insets (#11787) 2020-07-03 16:20:38 +02:00
Juergen Spitzmueller
3718ff9a15 Fix c&p of tabular data between different LyX instances (#4448) 2020-06-29 18:52:10 +02:00
Juergen Spitzmueller
7f773cf24e Resize table if needed on multi-cell paste 2020-06-29 17:51:24 +02:00
Juergen Spitzmueller
5cb89a8f81 Implement proper pasting from multiple table cells to non-table (#4447) 2020-06-29 15:13:45 +02:00
Juergen Spitzmueller
261625f412 Force local switch for info insets that change language
Fixes compilation of current English UG
2020-06-27 09:40:12 +02:00
Juergen Spitzmueller
a68b0389bc Add support for medspace and thickspace (in text) (#11893)
File format change.
2020-06-26 11:12:35 +02:00
Jean-Marc Lasgouttes
5d4e6dfb68 Run codespell on src/insets
Command was
codespell -w -i 3  -S Makefile.in -L mathed,afe,tthe,ue,fro,uint,larg,alph,te,thes,alle,Claus,pres,pass-thru  src/insets/
2020-06-25 23:46:16 +02:00
Jean-Marc Lasgouttes
3fea3b0096 Allow row-breaking after some insets
Add new RowFlags value CanBreakAfter, which says that the row can be
broken after the inset if needed. There is no CanBreakBefore yet,
because I do not know of an inset that needs it.

This makes screen closer to the actual behavior of insets.

Currently, only unprotected spaces and some special characters are
concerned. There may be more that need this handling.

Fixes bug #11621.
2020-06-23 23:34:49 +02:00
Jean-Marc Lasgouttes
49e1466f93 Make all unbreakable spaces of the same Color_latex color
Of course, this means that negative spaces cannot be recognized anymore.
2020-06-23 23:33:37 +02:00
Jean-Marc Lasgouttes
8535efafde Fix comment 2020-06-23 23:32:05 +02:00
Jean-Marc Lasgouttes
ba738d0167 Use new rowFlags() values to remove some inset hardcoding.
The enum DisplayType is replaced with the flags RowFlags that can be
combined. Here is the correspondence between the old DisplayType and
the new Inset::RowFlags:

DisplayType   RowFLags             Meaning
 Inline        Inline               plain inline inset
  --           BreakBefore          row ends before this inset
  --           BreakAfter           the row ends after this inset
 AlignCenter   Display	            the inset is centered on its own row
 AlignLeft     Display | AlignLeft  the inset is left-aligned on its row
 AlignRight    Display | AlignRight the inset is right-aligned on its row
  --           RowAfter             an extra row is needed after this inset

Display is just a shortcut for BreakBefore | BreakAfter.

The flags for the newline inset will be BreakAfter | RowAfter,
while the separator inset will just use BreakAfter.

This groundwork does not introduce any new feature at this point. It
aims to remve the numerous isNewLine and isSeparator all over the
code, and to eventually optional break after some insets like spaces
(see #11621).

Most display() methods are renamed to rowFlags(). Some are removed
because they returned Inline.

Now display() is only a helper function for hull insets.
2020-06-22 23:11:40 +02:00
Juergen Spitzmueller
bde95c1876 Fix swapped logic (#11889) 2020-06-19 16:40:07 +02:00
Jean-Marc Lasgouttes
c42776868d Do not dereference getFormat() if it is null
Return early when format is unknown. I am not sure whether this is
supposed to happen and whether we should assert on this condition.

Spotted by coverity.
2020-06-18 11:39:45 +02:00
Jean-Marc Lasgouttes
5aadf0879f Pass BufferParams by address
Spotted by coverity.

Note that this probably fixes a bug in getTokenValue(), where an author
was added to the BufferParams copy.
2020-06-18 11:17:32 +02:00
Pavel Sanda
86387120bc Rename-XHTMLStream-to-XMLStream #2.
Refactor font-related stuff to come closer to the previous xHTML output.
Patch from Thibaut Cuvelier.
2020-06-15 23:37:27 +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