Commit Graph

26865 Commits

Author SHA1 Message Date
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
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
8f3d0fd88f DocBook: new-line behaviour in bibliographies. 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
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
Thibaut Cuvelier
f219fe1cd7 DocBook: streamline code to handle abstracts. 2020-09-19 20:43:38 +02:00
Thibaut Cuvelier
a8da31e5e0 DocBook: fix handling of index end-of-range. 2020-09-19 20:43:38 +02:00
Thibaut Cuvelier
78a361778f DocBook: fix float tags (was unduly overridden).
The output was not valid for floats without title.
2020-09-19 20:43:38 +02:00
Thibaut Cuvelier
39ad6e84f0 DocBook: improve equation formatting (new lines for block equations). 2020-09-19 20:43:38 +02:00
Thibaut Cuvelier
fc2c36289b DocBook: rewrite makeListEnvironment. 2020-09-19 20:43:38 +02:00
Thibaut Cuvelier
8656fbd520 DocBook: start splitting environment handling in two, to have proper things for lists. 2020-09-19 20:43:38 +02:00
Thibaut Cuvelier
1bd49f9c39 DocBook: make all make* functions have the same argument order. 2020-09-19 20:43:38 +02:00
Thibaut Cuvelier
fc0999a422 DocBook: partially remove use of bpit/epit in docbookParagraphs and docbookSimpleAllParagraphs.
This will help with the next refactoring to be much cleaner (only work with iterators, don't maintain twice the same information).
2020-09-19 20:43:38 +02:00
Thibaut Cuvelier
bfc67c59b4 XML: use the new mechanisms for CR detection with errors.
This helps tracking down line problems even in the presence of errors.
2020-09-19 20:43:38 +02:00
Thibaut Cuvelier
52b2d3f683 DocBook: make Paragraph::simpleDocBookOnePar return a list of paragraphs.
Before, it directly wrote to the XMLStream, but it made implementation of new lines tricky. Now, it returns the XML for each sub-paragraph (delimited by new lines) as a string, so that the caller can adopt a more precise behaviour (such as in lists).
2020-09-19 20:43:38 +02:00
Thibaut Cuvelier
faaf780bed DocBook: fix compilation issues. 2020-09-19 20:43:38 +02:00
Thibaut Cuvelier
3d348818e0 DocBook: Coverity potential problem for precooked bibliographies. 2020-09-19 20:43:38 +02:00
Thibaut Cuvelier
ac46456b28 DocBook: simplify precooked bibliography code. 2020-09-19 20:43:38 +02:00
Thibaut Cuvelier
6a4d3dbef7 DocBook: remove useless includes. 2020-09-19 20:43:38 +02:00
Thibaut Cuvelier
d8651cc60b More functions in anonymous namespace. 2020-09-19 20:43:37 +02:00
Thibaut Cuvelier
25f72d392c DocBook: fine tuning of new lines. 2020-09-19 20:43:37 +02:00
Thibaut Cuvelier
bdea21a87e DocBook: improve comments. 2020-09-19 20:43:37 +02:00
Thibaut Cuvelier
9393ca74ba DocBook: new logic to handle the new lines, only used in output_docbook for now. 2020-09-19 20:43:37 +02:00
Thibaut Cuvelier
27a44f8e48 XML: memorise if the last thing that is getting output is a line feed. 2020-09-19 20:43:37 +02:00
Thibaut Cuvelier
6998e76495 DocBook: define new arguments in layouts to configure new-line behaviour. 2020-09-19 20:43:37 +02:00
Thibaut Cuvelier
87dae26e4a Simplify code to generate only one paragraph at a time. 2020-09-19 20:43:37 +02:00
Thibaut Cuvelier
9184ae14f0 A few more constants to avoid copies 2020-09-19 20:43:37 +02:00
Thibaut Cuvelier
dab71087cf DocBook: add a layout tag to tell whether an item is the abstract or not. 2020-09-19 20:43:37 +02:00
Thibaut Cuvelier
7b0f9d9524 DocBook: simplify code to handle abstracts. 2020-09-19 20:43:37 +02:00
Thibaut Cuvelier
0f145c3ef0 DocBook: use DocBookWrapperMergeWithPrevious in the code. 2020-09-19 20:43:37 +02:00
Thibaut Cuvelier
c92e0bc5e7 DocBook: fix for ordering. 2020-09-19 20:43:37 +02:00
Thibaut Cuvelier
72c304a629 DocBook: make openParTag/closeTag use paragraphs instead of layouts.
Not useful per se, but will be next with checking whether the wrapper tags should be opened/closed.
2020-09-19 20:43:37 +02:00
Thibaut Cuvelier
c417253d0b DocBook: use DocBookItemTag within paragraphs.
This is at least helpful for AAS, even though it slightly resembles a repurposition of that parameter.
2020-09-19 20:43:37 +02:00
Thibaut Cuvelier
1a09086ec2 Merge findLastParagraph and findLastBibliographyParagraph to lower code duplication.
Maybe these functions should move to ParagraphList.h/cpp?
2020-09-19 20:43:37 +02:00