[LyX/master] DocBook: avoid skipping paragraphs in .

2020-07-19 Thread Thibaut Cuvelier
commit e0a4dfa7d32dca9e78cb92f092800ea819f77e69
Author: Thibaut Cuvelier 
Date:   Mon Jul 20 03:41:44 2020 +0200

DocBook: avoid skipping paragraphs in .
---
 autotests/export/docbook/issue5165.lyx |  102 
 autotests/export/docbook/issue5165.xml |   12 
 src/output_docbook.cpp |9 +++
 3 files changed, 123 insertions(+), 0 deletions(-)

diff --git a/autotests/export/docbook/issue5165.lyx 
b/autotests/export/docbook/issue5165.lyx
new file mode 100644
index 000..2775a2b
--- /dev/null
+++ b/autotests/export/docbook/issue5165.lyx
@@ -0,0 +1,102 @@
+#LyX 2.4 created this file. For more info see https://www.lyx.org/
+\lyxformat 598
+\begin_document
+\begin_header
+\save_transient_properties true
+\origin unavailable
+\textclass article
+\use_default_options true
+\maintain_unincluded_children no
+\language american
+\language_package default
+\inputencoding utf8
+\fontencoding auto
+\font_roman "default" "default"
+\font_sans "default" "default"
+\font_typewriter "default" "default"
+\font_math "auto" "auto"
+\font_default_family default
+\use_non_tex_fonts false
+\font_sc false
+\font_roman_osf false
+\font_sans_osf false
+\font_typewriter_osf false
+\font_sf_scale 100 100
+\font_tt_scale 100 100
+\use_microtype false
+\use_dash_ligatures true
+\graphics default
+\default_output_format default
+\output_sync 0
+\bibtex_command default
+\index_command default
+\paperfontsize default
+\use_hyperref false
+\papersize default
+\use_geometry false
+\use_package amsmath 1
+\use_package amssymb 1
+\use_package cancel 1
+\use_package esint 1
+\use_package mathdots 1
+\use_package mathtools 1
+\use_package mhchem 1
+\use_package stackrel 1
+\use_package stmaryrd 1
+\use_package undertilde 1
+\cite_engine basic
+\cite_engine_type default
+\use_bibtopic false
+\use_indices false
+\paperorientation portrait
+\suppress_date false
+\justification true
+\use_refstyle 1
+\use_minted 0
+\use_lineno 0
+\index Index
+\shortcut idx
+\color #008000
+\end_index
+\secnumdepth 3
+\tocdepth 3
+\paragraph_separation indent
+\paragraph_indentation default
+\is_math_indent 0
+\math_numbering_side default
+\quotes_style english
+\dynamic_quotes 0
+\papercolumns 1
+\papersides 1
+\paperpagestyle default
+\tablestyle default
+\tracking_changes false
+\output_changes false
+\change_bars false
+\postpone_fragile_content true
+\html_math_output 0
+\html_css_as_file 0
+\html_be_strict false
+\docbook_table_output 0
+\end_header
+
+\begin_body
+
+\begin_layout Title
+Title
+\end_layout
+
+\begin_layout Author
+Author
+\end_layout
+
+\begin_layout Date
+Date
+\end_layout
+
+\begin_layout Standard
+Content
+\end_layout
+
+\end_body
+\end_document
diff --git a/autotests/export/docbook/issue5165.xml 
b/autotests/export/docbook/issue5165.xml
new file mode 100644
index 000..2e24ebc
--- /dev/null
+++ b/autotests/export/docbook/issue5165.xml
@@ -0,0 +1,12 @@
+
+
+http://docbook.org/ns/docbook; 
xmlns:xlink="http://www.w3.org/1999/xlink; 
xmlns:m="http://www.w3.org/1998/Math/MathML; 
xmlns:xi="http://www.w3.org/2001/XInclude; version="5.2">
+
+Title
+Author
+Date
+
+Content
+
+
\ No newline at end of file
diff --git a/src/output_docbook.cpp b/src/output_docbook.cpp
index 7a3ca04..a796e19 100644
--- a/src/output_docbook.cpp
+++ b/src/output_docbook.cpp
@@ -658,6 +658,11 @@ DocBookInfoTag getParagraphsWithInfo(ParagraphList const 
, pit_type c
 
// Based on layout information, store this paragraph in one 
set: should be in , must be.
Layout const  = par.layout();
+
+   std::cout << "Name: " << to_utf8(style.name()) << std::endl;
+   std::cout << "  DocBook tag: " << style.docbooktag() << 
std::endl;
+   std::cout << "  In info: " << style.docbookininfo() << 
std::endl;
+
if (style.docbookininfo() == "always") {
mustBeInInfo.emplace(cpit);
} else if (style.docbookininfo() == "maybe") {
@@ -719,10 +724,14 @@ pit_type generateDocBookParagraphWithoutSectioning(
(epit == (int) paragraphs.size()) ?
paragraphs.end() : paragraphs.iterator_at(epit);
 
+   std::cout << "generateDocBookParagraphWithoutSectioning" << std::endl;
while (bpit < epit) {
+   std::cout << "iteration; bpit: " << bpit << std::endl;
tie(par, send) = makeAny(text, buf, xs, runparams, par, send, 
pend);
bpit += distance(lastStartedPar, par);
+   lastStartedPar = par;
}
+   std::cout << "generateDocBookParagraphWithoutSectioning has looped; 
bpit: " << bpit << std::endl;
 
return bpit;
 }
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] Style

2020-07-19 Thread Richard Kimberly Heck
commit e09445b3cf5a1a6bef68633a0c9ac7b9d1f3863e
Author: Richard Kimberly Heck 
Date:   Sun Jul 19 21:11:59 2020 -0400

Style
---
 src/xml.cpp |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/xml.cpp b/src/xml.cpp
index 7cf738a..a03e254 100644
--- a/src/xml.cpp
+++ b/src/xml.cpp
@@ -557,7 +557,7 @@ docstring const xml::uniqueID(docstring const & label)
 }
 
 
-docstring xml::cleanID(docstring const )
+docstring xml::cleanID(docstring const & orig)
 {
// The standard xml:id only allows letters,
// digits, '-' and '.' in a name.
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] Stop adding points at the end of xml:id without reason

2020-07-19 Thread Thibaut Cuvelier
commit 6aaf118bc786f45ebb2ada87a1d75c163aab0e65
Author: Thibaut Cuvelier 
Date:   Mon Jul 20 02:15:35 2020 +0200

Stop adding points at the end of xml:id without reason
---
 src/xml.cpp |3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/src/xml.cpp b/src/xml.cpp
index 7733bf0..7cf738a 100644
--- a/src/xml.cpp
+++ b/src/xml.cpp
@@ -611,8 +611,7 @@ docstring xml::cleanID(docstring const )
if (mangle) {
int & mangleID = tMangleID.localData();
content += "-" + convert(mangleID++);
-   } else if (isDigitASCII(content[content.size() - 1]))
-   content += ".";
+   }
 
mangledNames[orig] = content;
 
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] Merge branch 'master' of git.lyx.org:lyx

2020-07-19 Thread Thibaut Cuvelier
commit 85283760024ba87339677f693bc9c6f0f6a476c9
Merge: c6b17b7 a2e7830
Author: Thibaut Cuvelier 
Date:   Mon Jul 20 03:03:16 2020 +0200

Merge branch 'master' of git.lyx.org:lyx

-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] DocBook: better handling of paragraphs containing notes in the abstract.

2020-07-19 Thread Thibaut Cuvelier
commit 51939801f5ef305fc38d15b4ac86d85f4dd5aab4
Author: Thibaut Cuvelier 
Date:   Mon Jul 20 02:47:40 2020 +0200

DocBook: better handling of paragraphs containing notes in the abstract.
---
 src/output_docbook.cpp |   13 +++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/src/output_docbook.cpp b/src/output_docbook.cpp
index d29362e..e1df2cc 100644
--- a/src/output_docbook.cpp
+++ b/src/output_docbook.cpp
@@ -669,7 +669,15 @@ DocBookInfoTag getParagraphsWithInfo(ParagraphList const 
, pit_type c
 
pit_type cpit = bpit;
while (cpit < epit) {
-   Layout const  = paragraphs[cpit].layout();
+   // Skip paragraphs only containing one note.
+   Paragraph const  = paragraphs[cpit];
+   if (par.size() == 1 && 
dynamic_cast(paragraphs[cpit].insetList().get(0))) {
+   cpit += 1;
+   continue;
+   }
+
+   // Based on layout information, store this paragraph in one 
set: should be in , must be.
+   Layout const  = par.layout();
if (style.docbookininfo() == "always") {
mustBeInInfo.emplace(cpit);
} else if (style.docbookininfo() == "maybe") {
@@ -680,7 +688,8 @@ DocBookInfoTag getParagraphsWithInfo(ParagraphList const 
, pit_type c
}
cpit += 1;
}
-   // Now, bpit points to the last paragraph that has things that could go 
in .
+   // Now, cpit points to the last paragraph that has things that could go 
in .
+   // bpit is still the beginning of the  part.
 
return make_tuple(shouldBeInInfo, mustBeInInfo, bpit, cpit);
 }
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] DocBook: allow Tufte books to be (more) properly generated.

2020-07-19 Thread Thibaut Cuvelier
commit c8d216d6e1afe0590aa33c94fdbfedbc05c680f2
Author: Thibaut Cuvelier 
Date:   Mon Jul 20 03:00:55 2020 +0200

DocBook: allow Tufte books to be (more) properly generated.

Includes a test case useful for some of the previous commits (notes in 
abstract, PI escaping, counter warnings).

Still missing: marginal and side notes. Shouldn't they be ported to 
InsetMarginal?
---
 autotests/export/docbook/Tufte_Book.lyx |  435 +++
 autotests/export/docbook/Tufte_Book.xml |   45 
 lib/layouts/tufte-book.layout   |   10 +
 3 files changed, 490 insertions(+), 0 deletions(-)

diff --git a/autotests/export/docbook/Tufte_Book.lyx 
b/autotests/export/docbook/Tufte_Book.lyx
new file mode 100644
index 000..2124c84
--- /dev/null
+++ b/autotests/export/docbook/Tufte_Book.lyx
@@ -0,0 +1,435 @@
+#LyX 2.4 created this file. For more info see https://www.lyx.org/
+\lyxformat 598
+\begin_document
+\begin_header
+\save_transient_properties true
+\origin unavailable
+\textclass tufte-book
+\use_default_options true
+\maintain_unincluded_children no
+\language english
+\language_package default
+\inputencoding utf8
+\fontencoding auto
+\font_roman "default" "default"
+\font_sans "default" "default"
+\font_typewriter "default" "default"
+\font_math "auto" "auto"
+\font_default_family default
+\use_non_tex_fonts false
+\font_sc false
+\font_roman_osf false
+\font_sans_osf false
+\font_typewriter_osf false
+\font_sf_scale 100 100
+\font_tt_scale 100 100
+\use_microtype false
+\use_dash_ligatures false
+\graphics default
+\default_output_format pdf2
+\output_sync 0
+\bibtex_command bibtex
+\index_command default
+\float_placement class
+\float_alignment class
+\paperfontsize default
+\spacing single
+\use_hyperref true
+\pdf_bookmarks true
+\pdf_bookmarksnumbered false
+\pdf_bookmarksopen true
+\pdf_bookmarksopenlevel 1
+\pdf_breaklinks false
+\pdf_pdfborder true
+\pdf_colorlinks false
+\pdf_backref false
+\pdf_pdfusetitle true
+\papersize default
+\use_geometry true
+\use_package amsmath 1
+\use_package amssymb 1
+\use_package cancel 1
+\use_package esint 1
+\use_package mathdots 1
+\use_package mathtools 1
+\use_package mhchem 1
+\use_package stackrel 1
+\use_package stmaryrd 1
+\use_package undertilde 1
+\cite_engine natbib
+\cite_engine_type authoryear
+\biblio_style plain
+\use_bibtopic false
+\use_indices false
+\paperorientation portrait
+\suppress_date false
+\justification true
+\use_refstyle 0
+\use_minted 0
+\use_lineno 0
+\notefontcolor #ff
+\index Index
+\shortcut idx
+\color #008000
+\end_index
+\secnumdepth 2
+\tocdepth 2
+\paragraph_separation indent
+\paragraph_indentation default
+\is_math_indent 0
+\math_numbering_side default
+\quotes_style english
+\dynamic_quotes 0
+\papercolumns 1
+\papersides 1
+\paperpagestyle default
+\tablestyle default
+\tracking_changes false
+\output_changes false
+\change_bars false
+\postpone_fragile_content false
+\html_math_output 0
+\html_css_as_file 0
+\html_be_strict false
+\docbook_table_output 0
+\end_header
+
+\begin_body
+
+\begin_layout Standard
+\begin_inset Note Note
+status open
+
+\begin_layout Plain Layout
+
+\series bold
+Note
+\series default
+: To be able to view your file as PDF you must have the \SpecialChar LaTeX
+-package 
+\family sans
+fpl
+\family default
+ installed to your \SpecialChar LaTeX
+ system.
+ If you are using MiK\SpecialChar TeX
+, you will automatically be asked to install this package
+ when previewing your file, if you are using \SpecialChar TeX
+Live, use \SpecialChar TeX
+Live's package manager.
+\end_layout
+
+\begin_layout Plain Layout
+
+\series bold
+Note 2
+\series default
+: If you wish to compile to PDF with plain \SpecialChar LaTeX
+ (instead of pdf\SpecialChar TeX
+), there is currently
+ a bug in the Tufte class that causes errors.
+ You can add the class option 'nols' (put this in the 
+\begin_inset Quotes eld
+\end_inset
+
+Custom
+\begin_inset Quotes erd
+\end_inset
+
+ field of Document\SpecialChar menuseparator
+Settings \SpecialChar menuseparator
+Document Class) to get rid of the errors, but
+ this also removes letterspacing, an important part of the Tufte design.
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Title
+Tufte Examples
+\end_layout
+
+\begin_layout Author
+Fake Author
+\begin_inset Note Note
+status open
+
+\begin_layout Plain Layout
+author of this example file: Jason Waskiewicz
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset toc
+LatexCommand tableofcontents
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Chapter
+The Features of the Tufte-book Class
+\end_layout
+
+\begin_layout Standard
+In this document, it was endeavored to show some of the features of the
+ 
+\family sans
+Tufte-book
+\family default
+ class.
+ In the first chapter, their use is outlined.
+ In the second chapter, their use through a handout that was created in
+ a calculus class is demonstrated.
+\end_layout
+

[LyX/master] DocBook: don't update counters when generating, as they are not used in DocBook.

2020-07-19 Thread Thibaut Cuvelier
commit fb45f7b8c903b1e6318ba1578e18f7d5a921e69f
Author: Thibaut Cuvelier 
Date:   Mon Jul 20 02:51:59 2020 +0200

DocBook: don't update counters when generating, as they are not used in 
DocBook.

This also removes a warning in the console in some cases where counters are 
updated when they don't exist...
---
 src/output_docbook.cpp |   20 
 1 files changed, 0 insertions(+), 20 deletions(-)

diff --git a/src/output_docbook.cpp b/src/output_docbook.cpp
index e1df2cc..7a3ca04 100644
--- a/src/output_docbook.cpp
+++ b/src/output_docbook.cpp
@@ -14,7 +14,6 @@
 #include "Buffer.h"
 #include "buffer_funcs.h"
 #include "BufferParams.h"
-#include "Counters.h"
 #include "Font.h"
 #include "InsetList.h"
 #include "Layout.h"
@@ -316,9 +315,6 @@ ParagraphList::const_iterator makeParagraphs(
ParagraphList::const_iterator par = pbegin;
for (; par != pend; ++par) {
Layout const  = par->layout();
-   if (!lay.counter.empty())
-   buf.masterBuffer()->params().
-   
documentClass().counters().step(lay.counter, OutputUpdate);
 
// We want to open the paragraph tag if:
//   (i) the current layout permits multiple paragraphs
@@ -434,19 +430,6 @@ ParagraphList::const_iterator makeEnvironment(
 
while (par != pend) {
Layout const & style = par->layout();
-   // the counter only gets stepped if we're in some kind of list,
-   // or if it's the first time through.
-   // note that enum, etc, are handled automatically.
-   // FIXME There may be a bug here about user defined enumeration
-   // types. If so, then we'll need to take the counter and add 
"i",
-   // "ii", etc, as with enum.
-   Counters & cnts = 
buf.masterBuffer()->params().documentClass().counters();
-   docstring const & cntr = style.counter;
-   if (!style.counter.empty()
-   && (par == pbegin || !isNormalEnv(style))
-   && cnts.hasCounter(cntr)
-   )
-   cnts.step(cntr, OutputUpdate);
ParagraphList::const_iterator send;
 
// Actual content of this paragraph.
@@ -575,9 +558,6 @@ void makeCommand(
ParagraphList::const_iterator const & pbegin)
 {
Layout const  = pbegin->layout();
-   if (!style.counter.empty())
-   buf.masterBuffer()->params().
-   documentClass().counters().step(style.counter, 
OutputUpdate);
 
// No need for labels, as they are handled by DocBook tags.
 
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] FORMAT for format 594

2020-07-19 Thread Thibaut Cuvelier
commit c6b17b7094c42ff6bf96e3452f69023c724d15b7
Author: Richard Kimberly Heck 
Date:   Sun Jul 19 21:01:55 2020 -0400

FORMAT for format 594
---
 development/FORMAT |5 +
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/development/FORMAT b/development/FORMAT
index b3968bf..ef5bde7 100644
--- a/development/FORMAT
+++ b/development/FORMAT
@@ -11,6 +11,11 @@ changes happened in particular if possible. A good example 
would be
* Format incremented to 598: DocBook can export to HTML and CALS 
tables, with the parameter
   \docbook_table_output (0: HTML, only choice previously; CALS: 1).
 
+
+2020-05-02: Richard Kimberly Heck 
+   * Format incremented to 594: New counter inset
+
+
 2020-03-13 Jürgen Spitzmüller 
* Format incremented to 593: Buffer param \maintain_unincluded_children 
is not longer a bool
   (true|false) but has three states: "no" (formerly "false"), "strict" 
(formerly "true") and
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] DocBook: properly escape PI in InsetMarginal.

2020-07-19 Thread Thibaut Cuvelier
commit d0748cd69ccaf025ec3ebe376811ed29c5580b2b
Author: Thibaut Cuvelier 
Date:   Mon Jul 20 02:58:48 2020 +0200

DocBook: properly escape PI in InsetMarginal.
---
 src/insets/InsetMarginal.cpp |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/insets/InsetMarginal.cpp b/src/insets/InsetMarginal.cpp
index 119c636..5d2fb90 100644
--- a/src/insets/InsetMarginal.cpp
+++ b/src/insets/InsetMarginal.cpp
@@ -48,7 +48,7 @@ void InsetMarginal::docbook(XMLStream & xs, OutputParams 
const & runparams) cons
// Unfortunately, only for XSL-FO output with the default style sheets, 
hence the role.
xs << xml::StartTag("sidebar", "role=\"margin\"");
xs << xml::CR();
-   xs << "";
+   xs << XMLStream::ESCAPE_NONE << "";
InsetText::docbook(xs, runparams);
xs << xml::EndTag("sidebar");
 }
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] FORMAT for format 594

2020-07-19 Thread Richard Kimberly Heck
commit a2e7830961ad89a90761f6c2b530135c8b5c3c4f
Author: Richard Kimberly Heck 
Date:   Sun Jul 19 21:01:55 2020 -0400

FORMAT for format 594
---
 development/FORMAT |5 +
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/development/FORMAT b/development/FORMAT
index b3968bf..ef5bde7 100644
--- a/development/FORMAT
+++ b/development/FORMAT
@@ -11,6 +11,11 @@ changes happened in particular if possible. A good example 
would be
* Format incremented to 598: DocBook can export to HTML and CALS 
tables, with the parameter
   \docbook_table_output (0: HTML, only choice previously; CALS: 1).
 
+
+2020-05-02: Richard Kimberly Heck 
+   * Format incremented to 594: New counter inset
+
+
 2020-03-13 Jürgen Spitzmüller 
* Format incremented to 593: Buffer param \maintain_unincluded_children 
is not longer a bool
   (true|false) but has three states: "no" (formerly "false"), "strict" 
(formerly "true") and
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] DocBook: clean citation keys everywhere in the same way.

2020-07-19 Thread Thibaut Cuvelier
commit be3e79c2a00991ed4056020266fa8185da0c68ba
Author: Thibaut Cuvelier 
Date:   Mon Jul 20 02:28:28 2020 +0200

DocBook: clean citation keys everywhere in the same way.
---
 src/insets/InsetCitation.cpp |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/insets/InsetCitation.cpp b/src/insets/InsetCitation.cpp
index 5d35f9d..a525316 100644
--- a/src/insets/InsetCitation.cpp
+++ b/src/insets/InsetCitation.cpp
@@ -552,7 +552,7 @@ void InsetCitation::docbook(XMLStream & xs, OutputParams 
const &) const
return;
 
// Split the different citations (on ","), so that one tag can be 
output for each of them.
-   string citations = to_utf8(getParam("key")); // Citation strings are 
not supposed to be too fancy.
+   string citations = to_utf8(xml::cleanID(getParam("key")));
if (citations.find(',') == string::npos) {
xs << xml::CompTag("biblioref", "endterm=\"" + citations + 
"\"");
} else {
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] Partial revert of e3027574: don't add \docbook_table_output at lyx2lyx step, let LyX do it when saving the document

2020-07-19 Thread Thibaut Cuvelier
commit 1706438cbabd3336b86cbcf1f431c4c0245aa311
Author: Thibaut Cuvelier 
Date:   Mon Jul 20 01:56:33 2020 +0200

Partial revert of e3027574: don't add \docbook_table_output at lyx2lyx 
step, let LyX do it when saving the document
---
 lib/lyx2lyx/lyx_2_4.py |9 +
 1 files changed, 1 insertions(+), 8 deletions(-)

diff --git a/lib/lyx2lyx/lyx_2_4.py b/lib/lyx2lyx/lyx_2_4.py
index 8bd501e..2595498 100644
--- a/lib/lyx2lyx/lyx_2_4.py
+++ b/lib/lyx2lyx/lyx_2_4.py
@@ -3922,13 +3922,6 @@ def revert_libertinus_sftt_fonts(document):
 add_to_preamble(document, 
["\\renewcommand*{\\LibertinusMono@scale}{" + str(tt_scale / 100.0) + "}"])
 
 
-def convert_docbook_table_output(document):
-if find_token(document.header, '\\docbook_table_output') != -1:
-document.warning("Malformed LyX file: \\docbook_table_output found 
before format 598!")
-else:
-document.header.append('\\docbook_table_output 0')
-
-
 def revert_docbook_table_output(document):
 i = find_token(document.header, '\\docbook_table_output')
 if i != -1:
@@ -3994,7 +3987,7 @@ convert = [
[595, []],
[596, [convert_parskip]],
[597, [convert_libertinus_rm_fonts]],
-   [598, [convert_docbook_table_output]]
+   [598, []]
   ]
 
 revert =  [[597, [revert_docbook_table_output]],
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] amend 467d57bc: typo

2020-07-19 Thread Thibaut Cuvelier
commit d6ec3d686b316b968ac306fd9aeffa10fbcdc423
Author: Thibaut Cuvelier 
Date:   Sun Jul 19 21:36:34 2020 +0200

amend 467d57bc: typo
---
 src/insets/InsetBibtex.cpp |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/src/insets/InsetBibtex.cpp b/src/insets/InsetBibtex.cpp
index 2f41c0e..95c93a1 100644
--- a/src/insets/InsetBibtex.cpp
+++ b/src/insets/InsetBibtex.cpp
@@ -1191,7 +1191,6 @@ void InsetBibtex::docbook(XMLStream & xs, OutputParams 
const &) const
while (tagIt != tagEnd) {
string tag = tagIt->str(); // regex_match cannot work 
with temporary strings.
++tagIt;
-   regex_match(tag, match, tagRegex);
 
if (regex_match(tag, match, tagRegex)) {
if (toDocBookTag[match[1]] == "SPECIFIC") {
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] DocBook fonts: fix issue 1732

2020-07-19 Thread Thibaut Cuvelier
commit 6b701f945e928497abfaf88c39fdff30254bf56c
Author: Thibaut Cuvelier 
Date:   Sun Jul 19 21:00:25 2020 +0200

DocBook fonts: fix issue 1732
---
 .../docbook/issue1732_charstyles-docbook.lyx   |  106 
 .../docbook/issue1732_charstyles-docbook.xml   |7 ++
 src/output_docbook.cpp |4 +-
 3 files changed, 115 insertions(+), 2 deletions(-)

diff --git a/autotests/export/docbook/issue1732_charstyles-docbook.lyx 
b/autotests/export/docbook/issue1732_charstyles-docbook.lyx
new file mode 100644
index 000..8a5ece1
--- /dev/null
+++ b/autotests/export/docbook/issue1732_charstyles-docbook.lyx
@@ -0,0 +1,106 @@
+#LyX 2.4 created this file. For more info see https://www.lyx.org/
+\lyxformat 598
+\begin_document
+\begin_header
+\save_transient_properties true
+\origin unavailable
+\textclass article
+\use_default_options false
+\maintain_unincluded_children no
+\language english
+\language_package default
+\inputencoding auto-legacy
+\fontencoding auto
+\font_roman "default" "default"
+\font_sans "default" "default"
+\font_typewriter "default" "default"
+\font_math "auto" "auto"
+\font_default_family default
+\use_non_tex_fonts false
+\font_sc false
+\font_roman_osf false
+\font_sans_osf false
+\font_typewriter_osf false
+\font_sf_scale 100 100
+\font_tt_scale 100 100
+\use_microtype false
+\use_dash_ligatures true
+\graphics default
+\default_output_format default
+\output_sync 0
+\bibtex_command default
+\index_command default
+\float_placement class
+\float_alignment class
+\paperfontsize default
+\spacing single
+\use_hyperref false
+\papersize default
+\use_geometry false
+\use_package amsmath 0
+\use_package amssymb 0
+\use_package cancel 0
+\use_package esint 0
+\use_package mathdots 1
+\use_package mathtools 0
+\use_package mhchem 1
+\use_package stackrel 0
+\use_package stmaryrd 0
+\use_package undertilde 0
+\cite_engine basic
+\cite_engine_type default
+\biblio_style plain
+\use_bibtopic false
+\use_indices false
+\paperorientation portrait
+\suppress_date false
+\justification true
+\use_refstyle 0
+\use_minted 0
+\use_lineno 0
+\index Index
+\shortcut idx
+\color #008000
+\end_index
+\secnumdepth 3
+\tocdepth 3
+\paragraph_separation indent
+\paragraph_indentation default
+\is_math_indent 0
+\math_numbering_side default
+\quotes_style english
+\dynamic_quotes 0
+\papercolumns 1
+\papersides 1
+\paperpagestyle default
+\tablestyle default
+\tracking_changes false
+\output_changes false
+\change_bars false
+\postpone_fragile_content false
+\html_math_output 0
+\html_css_as_file 0
+\html_be_strict false
+\docbook_table_output 0
+\end_header
+
+\begin_body
+
+\begin_layout Standard
+
+\series bold
+Fett 
+\series default
+\emph on
+hervorgehoben
+\emph default
+ 
+\family typewriter
+monospace
+\family default
+\bar under
+ unterstrichen.
+\end_layout
+
+\end_body
+\end_document
diff --git a/autotests/export/docbook/issue1732_charstyles-docbook.xml 
b/autotests/export/docbook/issue1732_charstyles-docbook.xml
new file mode 100644
index 000..0ed9b87
--- /dev/null
+++ b/autotests/export/docbook/issue1732_charstyles-docbook.xml
@@ -0,0 +1,7 @@
+
+
+http://docbook.org/ns/docbook; 
xmlns:xlink="http://www.w3.org/1999/xlink; 
xmlns:m="http://www.w3.org/1998/Math/MathML; 
xmlns:xi="http://www.w3.org/2001/XInclude; version="5.2">
+Fett hervorgehoben 
monospace 
unterstrichen.
+
+
\ No newline at end of file
diff --git a/src/output_docbook.cpp b/src/output_docbook.cpp
index a8ac4ea..d29362e 100644
--- a/src/output_docbook.cpp
+++ b/src/output_docbook.cpp
@@ -104,11 +104,11 @@ string fontToRole(xml::FontTypes type)
return ""; // Outputs a 
case xml::FontTypes::FT_TYPE:
return ""; // Outputs a 
+   case xml::FontTypes::FT_UBAR:
+   return "underline";
 
// All other roles are non-standard for DocBook.
 
-   case xml::FontTypes::FT_UBAR:
-   return "ubar";
case xml::FontTypes::FT_WAVE:
return "wave";
case xml::FontTypes::FT_DBAR:
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] Fix use of std::regex_match

2020-07-19 Thread Thibaut Cuvelier
commit 467d57bca1d07856bb48e245d9a148ca1c72922e
Author: Thibaut Cuvelier 
Date:   Thu Jul 9 02:38:07 2020 +0200

Fix use of std::regex_match
---
 src/insets/InsetBibtex.cpp |   23 +++
 1 files changed, 11 insertions(+), 12 deletions(-)

diff --git a/src/insets/InsetBibtex.cpp b/src/insets/InsetBibtex.cpp
index 3e59d65..2f41c0e 100644
--- a/src/insets/InsetBibtex.cpp
+++ b/src/insets/InsetBibtex.cpp
@@ -1191,20 +1191,19 @@ void InsetBibtex::docbook(XMLStream & xs, OutputParams 
const &) const
while (tagIt != tagEnd) {
string tag = tagIt->str(); // regex_match cannot work 
with temporary strings.
++tagIt;
-   std::regex_match(tag, match, tagRegex);
+   regex_match(tag, match, tagRegex);
 
-   if (toDocBookTag.find(match[1]) == toDocBookTag.end()) {
+   if (regex_match(tag, match, tagRegex)) {
+   if (toDocBookTag[match[1]] == "SPECIFIC") {
+   delayedTags[match[1]] = match[2];
+   } else {
+   xs << 
xml::StartTag(toDocBookTag[match[1]]);
+   xs << from_utf8(match[2].str());
+   xs << 
xml::EndTag(toDocBookTag[match[1]]);
+   }
+   } else {
LYXERR0("The BibTeX field " << match[1].str() 
<< " is unknown.");
xs << XMLStream::ESCAPE_NONE << from_utf8("\n");
-   continue;
-   }
-
-   if (toDocBookTag[match[1]] == "SPECIFIC") {
-   delayedTags[match[1]] = match[2];
-   } else {
-   xs << xml::StartTag(toDocBookTag[match[1]]);
-   xs << from_utf8(match[2].str());
-   xs << xml::EndTag(toDocBookTag[match[1]]);
}
}
 
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs