Commit Graph

42268 Commits

Author SHA1 Message Date
Thibaut Cuvelier
1991d0ed24 Converters: always set version to something.
Otherwise, it's common to compare "None >= (6,2,6)", which makes no sense. Set it to (0,0,0) so that any comparison fails (without an error message).
2020-09-19 20:43:41 +02:00
Thibaut Cuvelier
e4065cc1b1 Converters: slightly more pythonic code. 2020-09-19 20:43:41 +02:00
Thibaut Cuvelier
15dbc2b9ab Revert "XHTML: remove <section> support."
This reverts commit 52216b73
2020-09-19 20:43:41 +02:00
Thibaut Cuvelier
c8e2c17a58 XHTML: remove DOCTYPE, as the document is then understood as HTML4/XHTML1, and not XHTML5. 2020-09-19 20:43:41 +02:00
Thibaut Cuvelier
92ad86dacc XHTML: remove <section> support. 2020-09-19 20:43:41 +02:00
Thibaut Cuvelier
bfeb3b66b1 DocBook: slight code simplification. 2020-09-19 20:43:41 +02:00
Thibaut Cuvelier
6c51cabd35 DocBook: fix output in Layout::write. 2020-09-19 20:43:41 +02:00
Thibaut Cuvelier
50f011e062 DocBook: implement InsetBox titles. 2020-09-19 20:43:41 +02:00
Thibaut Cuvelier
3711a38b9c DocBook: fix a crash in bibliography paragraphs. 2020-09-19 20:43:41 +02:00
Thibaut Cuvelier
dd8660c07e layout2layout: use name instead of pseudonym. 2020-09-19 20:43:41 +02:00
Thibaut Cuvelier
1b818c448d DocBook: work for more subfigure cases.
EmbeddedObjects hid quite a few gems :).
2020-09-19 20:43:41 +02:00
Thibaut Cuvelier
8758000641 DocBook: ensure xml:id is not output too many times.
This is mostly important for subfigures, but debugging this issue showed that InsetCaption could be slightly simplified and InsetLabel should be made a tad more robust.
2020-09-19 20:43:41 +02:00
Thibaut Cuvelier
d0a5ba4859 DocBook: handle other cases of subfigures. 2020-09-19 20:43:41 +02:00
Thibaut Cuvelier
41a15f7b6d DocBook: in configure.py, DeclareDocBookClass doesn't need to be checked anymore. 2020-09-19 20:43:41 +02:00
Thibaut Cuvelier
f28c193569 DocBook: remove now useless function in configure.py. 2020-09-19 20:43:41 +02:00
Thibaut Cuvelier
9a48c8d22b DocBook: fix handling of new lines and fonts.
Only the font variable was restored to the right state, not fs.
2020-09-19 20:43:40 +02:00
Thibaut Cuvelier
5f0720e947 XHTML: fix generation of many useless </section>. 2020-09-19 20:43:40 +02:00
Thibaut Cuvelier
faec783822 XML: bad fix for a crash that only happened in XHTML.
As an error is output, I suppose that this behaviour is OK.
2020-09-19 20:43:40 +02:00
Scott Kostyshak
a632a9ae3c DocBook: remove useless functions. 2020-09-19 20:43:40 +02:00
Thibaut Cuvelier
1a76fb9658 DocBook: avoid using isspace in StartTag::writeTag.
This is the cause of crashes (on both Windows and Linux).
2020-09-19 20:43:40 +02:00
Thibaut Cuvelier
2cd7a94f8b DocBook: introduce Floating::docbookFloatType.
This ensures that all comparisons for DocBook are made on the same normalised version of the float type. This cased a strange bug where <table> was output within <informaltable> for Linguistics Tableaux.
2020-09-19 20:43:40 +02:00
Thibaut Cuvelier
8ed8d36595 Fix two warnings in BufferView. 2020-09-19 20:43:40 +02:00
Thibaut Cuvelier
40f4da3c9f DocBook: floats can no more override DocBookTag.
This lead to a quite subtle bug. The major problem is that float tags
depend on whether the LyX float has a title (formal) or nor (informal).
This information cannot be encoded in the layout format as easily as a
simple DocBookTag.
2020-09-19 20:43:40 +02:00
Thibaut Cuvelier
08a58242c1 DocBook: better output with the Linguistics module.
One issue left: <table> output within an <informaltable>, that does not make sense... I'm debugging it.
2020-09-19 20:43:40 +02:00
Thibaut Cuvelier
abed1f3e6e DocBook: fix crash with Linguistics example.
This was due to Floating::docbookTag not returning anything with the floattype_ tableau. Another issue that happened with that document is that the standard library's isspace crashed for some characters. I therefore implemented a more efficient version of the part that required it, and inlined the definition of isspace (even though that part becomes irrespective of locale, but was that feature ever used?).
2020-09-19 20:43:40 +02:00
Thibaut Cuvelier
594a4763b7 Fix a few warnings. 2020-09-19 20:43:40 +02:00
Thibaut Cuvelier
632bad62c9 DocBook: do a little something for shapepar. 2020-09-19 20:43:40 +02:00
Thibaut Cuvelier
ca1ca4326b DocBook: implement theorems.
This is a minimal implementation, as DocBook lacks a serious way of encoding all of this. Maybe a <formalpara> could do the trick, but I'd need to find a way to shoehorn a title through the styles (i.e. a first complete tag):

Theorem: Bla bla

<formalpara>
<title>Theorem</title>
<para>Bla bla</para>
</formalpara>

This would also only be a solution for single-paragraph things, as formalpara only allows one paragraph. Or a sidebar, but it's semantically very remote.
2020-09-19 20:43:40 +02:00
Thibaut Cuvelier
e3da8b65f6 DocBook: several missing features for Additional.lyx.
Includes: semantic markup (sorry about noun: Additional.lyx uses it to mark menus; there is something better in DocBook, but it looks like the LaTeX equivalent is really for person names), boxes, info layouts.
2020-09-19 20:43:40 +02:00
Thibaut Cuvelier
19734ea454 DocBook: implement LyX-Code.
This is quite ugly.
2020-09-19 20:43:40 +02:00
Thibaut Cuvelier
bc9d3ec262 DocBook: <person> is not valid per se, rather use <personname>.
The cleanest solution would still be <person><personname>, but this ought to be enough. Otherwise, that would imply having two tags for some fonts...
2020-09-19 20:43:40 +02:00
Thibaut Cuvelier
b5312cf51f DocBook: subfigures example is fixed.
Probably thanks to the magic of the previous commits.
2020-09-19 20:43:39 +02:00
Thibaut Cuvelier
8f3d0fd88f DocBook: new-line behaviour in bibliographies. 2020-09-19 20:43:39 +02:00
Thibaut Cuvelier
ff2e4ec7e6 DocBook: support Full Width from Tufte Book. 2020-09-19 20:43:39 +02:00
Thibaut Cuvelier
6d246bba69 DocBook: fix margin notes.
They were nested twice in <sidebar>. Also fixes a new line issue.
2020-09-19 20:43:39 +02:00
Thibaut Cuvelier
91982ee105 DocBook: new lines around formulae. 2020-09-19 20:43:39 +02:00
Thibaut Cuvelier
e995414917 DocBook: avoid generating fonts for "special cases" like equations. 2020-09-19 20:43:39 +02:00
Thibaut Cuvelier
654559feb8 DocBook: fix line issues around programlisting. 2020-09-19 20:43:39 +02:00
Thibaut Cuvelier
9d3a717ef1 DocBook: fix font issues when a paragraph has an InsetNewline. 2020-09-19 20:43:39 +02:00
Thibaut Cuvelier
7a1b82a16a DocBook: fix issue with fonts. 2020-09-19 20:43:39 +02:00
Thibaut Cuvelier
c3aa843da8 DocBook: fixes in bibliography (missing new line at the end). 2020-09-19 20:43:39 +02:00
Thibaut Cuvelier
6688b076cc DocBook: fixes in lists.
Actually output something when list item is empty. XMLStream discarded the sequence StartTag/EndTag (nothing in between).

New-line behaviour around term in description lists.
2020-09-19 20:43:39 +02:00
Thibaut Cuvelier
5b01c80635 DocBook: fix titles in KOMA Script. 2020-09-19 20:43:39 +02:00
Thibaut Cuvelier
976bd91fc2 DocBook: bug fixing with wrapper merging. 2020-09-19 20:43:39 +02:00
Thibaut Cuvelier
7ec0307b13 DocBook: bug fixing in AASTeX layout.
That's mostly generating DocBook tags at an inappropriate place with some metadata, rather than outputting whatever you have at your disposal. Far from satisfying, but good enough for a generic tool (see details in the new TODO). Doesn't trigger assertions. Is valid XML.
2020-09-19 20:43:39 +02:00
Thibaut Cuvelier
fb8c07a2c7 DocBook: adapt AASTeX for tag types (new-line behaviour). 2020-09-19 20:43:39 +02:00
Thibaut Cuvelier
1f2c51d56b DocBook: adapt SimpleCV for tag types (new-line behaviour). 2020-09-19 20:43:39 +02:00
Thibaut Cuvelier
ec0f4885a7 DocBook: fix bibliographies (end of <bibliography> and sections). 2020-09-19 20:43:39 +02:00
Thibaut Cuvelier
642b18aad0 DocBook: generate <partintro> when required. 2020-09-19 20:43:38 +02:00
Thibaut Cuvelier
17b06f5336 DocBook: streamline code to handle sections. 2020-09-19 20:43:38 +02:00