DocBook: start implementing LilyPond.

All the changes that can be achieved without C++ code changes.
This commit is contained in:
Thibaut Cuvelier 2021-09-20 03:19:20 +02:00
parent 687ccdbb32
commit 14ed5b2050
3 changed files with 13 additions and 4 deletions

View File

@ -1,5 +1,5 @@
#LyX 2.4 created this file. For more info see https://www.lyx.org/ #LyX 2.4 created this file. For more info see https://www.lyx.org/
\lyxformat 600 \lyxformat 608
\begin_document \begin_document
\begin_header \begin_header
\save_transient_properties true \save_transient_properties true
@ -21,9 +21,9 @@ lilypond
\font_default_family default \font_default_family default
\use_non_tex_fonts false \use_non_tex_fonts false
\font_sc false \font_sc false
\font_roman_osf false
\font_sans_osf false \font_sans_osf false
\font_typewriter_osf false \font_typewriter_osf false
\font_roman_osf false
\font_sf_scale 100 100 \font_sf_scale 100 100
\font_tt_scale 100 100 \font_tt_scale 100 100
\use_microtype false \use_microtype false
@ -90,12 +90,16 @@ lilypond
\papercolumns 1 \papercolumns 1
\papersides 1 \papersides 1
\paperpagestyle default \paperpagestyle default
\tablestyle default
\tracking_changes false \tracking_changes false
\postpone_fragile_content false
\output_changes false \output_changes false
\change_bars false
\postpone_fragile_content false
\html_math_output 0 \html_math_output 0
\html_css_as_file 0 \html_css_as_file 0
\html_be_strict true \html_be_strict true
\docbook_table_output 0
\docbook_mathml_prefix 1
\end_header \end_header
\begin_body \begin_body

View File

@ -46,4 +46,9 @@ InsetLayout "Flex:LilyPond"
Color foreground Color foreground
EndFont EndFont
EndArgument EndArgument
DocBookNotInPara true
DocBookWrapperTag mediaobject
DocBookTag textobject
DocBookInnerTag programlisting
DocBookInnerAttr "language='lilypond' role='fragment verbatim staffsize=16 ragged-right relative=2'"
End End

View File

@ -343,7 +343,7 @@ void makeParagraph(
// We do not really want to wrap that whole thing in a <div>...</div>. // We do not really want to wrap that whole thing in a <div>...</div>.
bool special_case = false; bool special_case = false;
Inset const *specinset = par->size() == 1 ? par->getInset(0) : nullptr; Inset const *specinset = par->size() == 1 ? par->getInset(0) : nullptr;
if (specinset && !specinset->getLayout().htmlisblock()) { // TODO: Convert htmlisblock to a DocBook parameter? if (specinset && !specinset->getLayout().htmlisblock()) { // TODO: Convert htmlisblock to a DocBook parameter? docbooknotinpara should be enough in most cases.
Layout const &style = par->layout(); Layout const &style = par->layout();
FontInfo const first_font = style.labeltype == LABEL_MANUAL ? FontInfo const first_font = style.labeltype == LABEL_MANUAL ?
style.labelfont : style.font; style.labelfont : style.font;