mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 05:16:21 +00:00
DocBook: implement svmult.
More generally, ensures that paragraphs in abstracts do not have something else configured. A major problem in making the layout more useful is that article titles are not supposed to be in TOC.
This commit is contained in:
parent
3808787c80
commit
ebfdac4fa3
149
autotests/export/docbook/Hollywood.lyx
Normal file
149
autotests/export/docbook/Hollywood.lyx
Normal file
@ -0,0 +1,149 @@
|
||||
#LyX 2.4 created this file. For more info see https://www.lyx.org/
|
||||
\lyxformat 599
|
||||
\begin_document
|
||||
\begin_header
|
||||
\save_transient_properties true
|
||||
\origin unavailable
|
||||
\textclass hollywood
|
||||
\use_default_options false
|
||||
\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 default
|
||||
\output_sync 0
|
||||
\bibtex_command default
|
||||
\index_command default
|
||||
\paperfontsize 12
|
||||
\spacing single
|
||||
\use_hyperref false
|
||||
\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 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
|
||||
\leftmargin 1.5in
|
||||
\topmargin 48bp
|
||||
\rightmargin 0.75in
|
||||
\bottommargin 30bp
|
||||
\headheight 12bp
|
||||
\headsep 24bp
|
||||
\footskip 6bp
|
||||
\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 fancy
|
||||
\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 Title
|
||||
<your title>
|
||||
\end_layout
|
||||
|
||||
\begin_layout Author
|
||||
<your name>
|
||||
\end_layout
|
||||
|
||||
\begin_layout Right Address
|
||||
<your address>
|
||||
\begin_inset Newline newline
|
||||
\end_inset
|
||||
|
||||
<continued>
|
||||
\begin_inset Newline newline
|
||||
\end_inset
|
||||
|
||||
<last line>
|
||||
\end_layout
|
||||
|
||||
\begin_layout Scene
|
||||
Scene Title
|
||||
\end_layout
|
||||
|
||||
\begin_layout Narrative
|
||||
Delete this text.
|
||||
\end_layout
|
||||
|
||||
\begin_layout General
|
||||
Don't date your script
|
||||
\end_layout
|
||||
|
||||
\begin_layout General
|
||||
Use a three hole punch.
|
||||
\end_layout
|
||||
|
||||
\begin_layout General
|
||||
Bind it in plain vanilla with no text on the binding.
|
||||
\end_layout
|
||||
|
||||
\begin_layout General
|
||||
Use two 1.5in brass brads and hammer them down.
|
||||
\end_layout
|
||||
|
||||
\begin_layout General
|
||||
Remember---nothing goes in a script that you cannot see or hear!! 1 page
|
||||
per minute.
|
||||
120 pages max.
|
||||
\end_layout
|
||||
|
||||
\begin_layout Narrative
|
||||
See examples/script_form.lyx for details.
|
||||
\end_layout
|
||||
|
||||
\end_body
|
||||
\end_document
|
22
autotests/export/docbook/Hollywood.xml
Normal file
22
autotests/export/docbook/Hollywood.xml
Normal file
@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- This DocBook file was created by LyX 2.4.0dev
|
||||
See http://www.lyx.org/ for more information -->
|
||||
<article xml:lang="en_US" xmlns="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">
|
||||
<info>
|
||||
<title><code><your title></code></title>
|
||||
<author>
|
||||
<personname><code><your name></code></personname>
|
||||
</author>
|
||||
<address>
|
||||
<code><your address></code><code><continued></code><code><last line></code>
|
||||
</address>
|
||||
</info>
|
||||
<bridgehead renderas='sect1'><code>Scene Title</code></bridgehead>
|
||||
<para role='narrative'><code>Delete this text.</code></para>
|
||||
<para role='general'><code>Don't date your script</code></para>
|
||||
<para role='general'><code>Use a three hole punch.</code></para>
|
||||
<para role='general'><code>Bind it in plain vanilla with no text on the binding.</code></para>
|
||||
<para role='general'><code>Use two 1.5in brass brads and hammer them down.</code></para>
|
||||
<para role='general'><code>Remember---nothing goes in a script that you cannot see or hear!! 1 page per minute. 120 pages max.</code></para>
|
||||
<para role='narrative'><code>See examples/script_form.lyx for details.</code></para>
|
||||
</article>
|
3411
autotests/export/docbook/svmult.lyx
Normal file
3411
autotests/export/docbook/svmult.lyx
Normal file
File diff suppressed because it is too large
Load Diff
@ -439,6 +439,8 @@ export/export/docbook/bibliography_precooked_aastex_docbook5
|
||||
# - Springer. (The svmono_light should still pass.)
|
||||
export/templates/Books/Springer_Monographs_%28svmono%29/.*_docbook5
|
||||
export/export/docbook/svmono_docbook5
|
||||
export/templates/Books/Springer_Contributed_Books_%28svmult%29/.*_docbook5
|
||||
export/export/docbook/svmult_docbook5
|
||||
# - scrbook with too many customisations.
|
||||
export/templates/Theses/PhD_Thesis/.*_docbook5
|
||||
# - Hollywood, too much formatting in elements DocBook does not allow to be formatted (like address).
|
||||
|
@ -198,7 +198,6 @@ Style ChapAuthor
|
||||
DocBookTag personname
|
||||
DocBookTagType paragraph
|
||||
DocBookWrapperTag author
|
||||
DocBookWrapperTagType inline
|
||||
DocBookInInfo always
|
||||
End
|
||||
|
||||
@ -395,6 +394,11 @@ Style Institute
|
||||
EndFont
|
||||
Requires url
|
||||
Align Left
|
||||
# TODO: should rather be merged with the list of authors, but this would require a lot of specific code...
|
||||
DocBookTag personname
|
||||
DocBookTagType paragraph
|
||||
DocBookWrapperTag author
|
||||
DocBookInInfo always
|
||||
End
|
||||
|
||||
Style Date
|
||||
@ -559,6 +563,7 @@ Style Dedication
|
||||
DocBookWrapperTag dedication
|
||||
DocBookWrapperTagType block
|
||||
DocBookWrapperMergeWithPrevious true
|
||||
DocBookInInfo never
|
||||
End
|
||||
|
||||
Style Foreword
|
||||
@ -633,6 +638,8 @@ Style Acknowledgement
|
||||
Shape Up
|
||||
Size Small
|
||||
EndFont
|
||||
DocBookTag para
|
||||
DocBookWrapperTag acknowledgements
|
||||
End
|
||||
|
||||
Style Acknowledgements
|
||||
|
@ -12,6 +12,9 @@ Format 85
|
||||
|
||||
Input svcommon.inc
|
||||
|
||||
# Even though this layout can also be used for articles...
|
||||
DocBookRoot book
|
||||
|
||||
ClassOptions
|
||||
FontSize ""
|
||||
End
|
||||
@ -42,6 +45,8 @@ Style Title*
|
||||
LabelFont
|
||||
Color Blue
|
||||
EndFont
|
||||
# DocBook: should be a separator for articles, but it's not supposed to be in TOC.
|
||||
# If it was, it would be easy to use DocBookSection.
|
||||
End
|
||||
|
||||
Style Title
|
||||
@ -67,6 +72,10 @@ Style Contributors
|
||||
CopyStyle Foreword
|
||||
LabelString "List of Contributors"
|
||||
LatexName contributors
|
||||
DocBookTag title
|
||||
DocBookTagType paragraph
|
||||
DocBookSection true
|
||||
DocBookSectionTag preface
|
||||
End
|
||||
|
||||
Style Contributor_List
|
||||
@ -74,6 +83,7 @@ Style Contributor_List
|
||||
LatexName thecontriblist
|
||||
TopSep 0.7
|
||||
BottomSep 0.4
|
||||
DocBookTag para
|
||||
End
|
||||
|
||||
Style Author
|
||||
|
@ -282,8 +282,6 @@ void compTag(XMLStream & xs, const std::string & tag, const std::string & attr,
|
||||
|
||||
void openParTag(XMLStream & xs, const Paragraph * par, const Paragraph * prevpar)
|
||||
{
|
||||
Layout const & lay = par->layout();
|
||||
|
||||
if (par == prevpar)
|
||||
prevpar = nullptr;
|
||||
|
||||
@ -293,6 +291,7 @@ void openParTag(XMLStream & xs, const Paragraph * par, const Paragraph * prevpar
|
||||
// first paragraph of an author, then merging with the previous tag does not make sense. Say the
|
||||
// next paragraph is the affiliation, then it should be output in the same <author> tag (different
|
||||
// layout, same wrapper tag).
|
||||
Layout const & lay = par->layout();
|
||||
bool openWrapper = lay.docbookwrappertag() != "NONE";
|
||||
if (prevpar != nullptr) {
|
||||
Layout const & prevlay = prevpar->layout();
|
||||
@ -842,7 +841,11 @@ DocBookInfoTag getParagraphsWithInfo(ParagraphList const ¶graphs,
|
||||
mustBeInInfo.emplace(cpit);
|
||||
else if (style.docbookininfo() == "maybe")
|
||||
shouldBeInInfo.emplace(cpit);
|
||||
else if (documentHasSections && !hasAbstractLayout && detectUnlayoutedAbstract)
|
||||
else if (documentHasSections && !hasAbstractLayout && detectUnlayoutedAbstract &&
|
||||
(style.docbooktag() == "NONE" || style.docbooktag() == "para") &&
|
||||
style.docbookwrappertag() == "NONE")
|
||||
// In this case, it is very likely that style.docbookininfo() == "never"! Be extra careful
|
||||
// about anything that gets caught here.
|
||||
abstractNoLayout.emplace(cpit);
|
||||
else // This should definitely not be in <info>.
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user