mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 01:59:02 +00:00
DocBook: documents must have a title.
This commit is contained in:
parent
92b9c82dea
commit
82ea3d67ec
@ -920,6 +920,15 @@ void outputDocBookInfo(
|
|||||||
for (auto pit : info.mustBeInInfo)
|
for (auto pit : info.mustBeInInfo)
|
||||||
makeAny(text, buf, xs, runparams, paragraphs.iterator_at(pit));
|
makeAny(text, buf, xs, runparams, paragraphs.iterator_at(pit));
|
||||||
|
|
||||||
|
// If there is no title, generate one (required for the document to be valid).
|
||||||
|
// This code is called for the main document, for table cells, etc., so be precise in this condition.
|
||||||
|
if (text.isMainText() && info.mustBeInInfo.empty()) {
|
||||||
|
xs << xml::StartTag("title");
|
||||||
|
xs << "Untitled Document";
|
||||||
|
xs << xml::EndTag("title");
|
||||||
|
xs << xml::CR();
|
||||||
|
}
|
||||||
|
|
||||||
// Always output the abstract as the last item of the <info>, as it requires special treatment (especially if
|
// Always output the abstract as the last item of the <info>, as it requires special treatment (especially if
|
||||||
// it contains several paragraphs that are empty).
|
// it contains several paragraphs that are empty).
|
||||||
if (hasAbstract) {
|
if (hasAbstract) {
|
||||||
|
Loading…
Reference in New Issue
Block a user