From 33668e3a30201503fc71fe77507fac6c2833d238 Mon Sep 17 00:00:00 2001 From: Thibaut Cuvelier Date: Sat, 16 Oct 2021 21:12:18 +0200 Subject: [PATCH] DocBook: export the preview images to the right format. "docbook" is not the same as "docbook5", maybe it would be better to have an enumeration instead of strings. --- .../export/docbook/Linguistics_forest.xml | 55 ++++++++++++++++++ .../export/docbook/lyxpreviewAJskuj1.png | Bin 0 -> 6013 bytes src/insets/InsetText.cpp | 2 +- 3 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 autotests/export/docbook/Linguistics_forest.xml create mode 100644 autotests/export/docbook/lyxpreviewAJskuj1.png diff --git a/autotests/export/docbook/Linguistics_forest.xml b/autotests/export/docbook/Linguistics_forest.xml new file mode 100644 index 0000000000..65c0f0bc98 --- /dev/null +++ b/autotests/export/docbook/Linguistics_forest.xml @@ -0,0 +1,55 @@ + + +
+ +Writing linguistic papers + +Jürgen Spitzmülle + + +
+Linguistic structure trees +Here is a simple example: + + + + + +[VP [DP[John]] [V' [V[sent]] [DP[Mary]] [DP[D[a]][NP[letter]]] ] ] + + +If you view the PDF output, you will see that the input +
+[VP [DP[John]] [V' [V[sent]] [DP[Mary]] [DP[D[a]][NP[letter]]]]] +
+expands to a real structure tree. To view the result within the work area, you can simply embed the Structure Tree inset into a Preview inset. If instant preview is correctly installed and activated, you should see the tree immediately (just click on the image in order to edit): + + + + + +[VP [DP[Mary]] [V' [V[sent]] [DP[John]] [DP[D[a]][NP[response]]] ] ] + + +Roofs can be easily generated by means of the roof option (note that the comma has special meaning, as it marks options): + + + + + +[VP [DP[John]] [V' [V[sent]] [DP[Mary]] [DP[another letter, roof]] ] ] + + +In order to align nodes of the tree more elegantly, use the “tier” option. All nodes which have the same tier allocated get aligned. Here is an example: + + + + + +[VP [DP[John,tier=word]] [V' [V[sent,tier=word]] [DP[Mary,tier=word]] [DP[D[a,tier=word]][NP[letter,tier=word]]] ] ] + + +The package supports many additional features, such as movement arrows and decorations, that cannot documented here. +
+
\ No newline at end of file diff --git a/autotests/export/docbook/lyxpreviewAJskuj1.png b/autotests/export/docbook/lyxpreviewAJskuj1.png new file mode 100644 index 0000000000000000000000000000000000000000..3de9d3affc86b981c66495b1c7ed6d0a906e338a GIT binary patch literal 6013 zcmZu#2Rs#Q+doFgJ_y;4P-Y?|vQBu+NXs4>$qd=^;2hgY63PtOkyRox%O)dxJVN%0 zBE8pn-tYUK_j!MxAC8}M&VBCtzOMheBCqMH(@?TeA`l3gKQzz=2n3Nm{GCKW2ERSi zE%M;uq^rgqcLah8NBALHh&%TO0>L8w2U^+Cdu(me@7ncSbL5+4XOK7l6y>o`-hRdN za7#a$lK4v0JBG|8kA9VeJ6lRfL)!)sk{t?zralt_->W6=@$kZGXtjIG>b zDLcXR?I)q@J`}`GpHxFhlQz3H=z?rD^+(i+Px>qVUYP3a-g=hi5+}Hre!0_LicJ}f z9=1*ATnWZ?$Vp^I;#m98=$2psR4Q3mwL#z1lo_INY3c0O?lf}5(#A%6M+XHOg;Y~l zw>;0P-CpwKd<(Qj?Q!Oq|Dt`}%@+cRi$JWK@fWR0I-vWn@@r zXlSmTWg0EFCXc{kzkGsEseZA!>AE`chOx$Z@`BUO?ruxnMnm+gSLa2{-mzw7W!)~f zI+2~7{VL$_;qLA(kD_8mi8h+rUaPaCqp{q&-PPq=wOWp{xAy@_{K&G$=Kj8&Fe6@v zVa&j?zP=vGzz`Z0McLBQVliBNhcWJr$1=mS=g+f-9LoLnozd#*uahEiL<*-XUcbgC zCzFRL1$T6GoIF%jQK4sN?|j0KO0#nxTy3$E5E2r)W^PW$&COlSgOtcD3D-EI;@}`O zF)`8RG-5CHvZUmykI$u2)4Ddon`AnfS+u@wY+!S8_*PfFGiZ=H#yhrd7cZkwE7bN6 zl_PP*OeCo|9FYzhj)Fpw?S39y*?U=B{O4yml$DY(rm0DpiG@W~C}}QV@z=Qr?(WFb zrz3}oZt=kta&mGy-a%FPNV^y9kB+j6nbZbnXQP;ym@N9UuO?{b%K9Iimse2GIXp#q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>Z9HNBnVB7hS4i5&ACy CBXq3* literal 0 HcmV?d00001 diff --git a/src/insets/InsetText.cpp b/src/insets/InsetText.cpp index 20bf3ead73..2fc63cef7f 100644 --- a/src/insets/InsetText.cpp +++ b/src/insets/InsetText.cpp @@ -670,7 +670,7 @@ void InsetText::docbookRenderAsImage(XMLStream & xs, OutputParams const & rp, XH support::FileName const & filename = img->filename(); // Copy the image into the right folder. - rp.exportdata->addExternalFile("docbook", filename, filename.onlyFileName()); + rp.exportdata->addExternalFile("docbook5", filename, filename.onlyFileName()); // TODO: deal with opts. What exactly is the WriterOuterTag here, for instance? // Start writing the DocBook code for the image.