From 1f6104fe71d5f4ca448f7ff9ce5c7a3be28f6d68 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Uwe=20St=C3=B6hr?= Date: Sun, 21 May 2017 18:10:46 +0200 Subject: [PATCH] EmbeddedObjects.lyx: document new template for Inkscape Note that this template has several issues, see bug #10679 --- lib/doc/Changelog-EmbeddedObjects-LyX_23x.txt | 2 + lib/doc/EmbeddedObjects.lyx | 269 +++++------------- lib/doc/de/EmbeddedObjects.lyx | 118 +++++++- lib/doc/es/EmbeddedObjects.lyx | 136 +++++++-- lib/doc/fr/EmbeddedObjects.lyx | 132 ++++++++- lib/doc/ja/EmbeddedObjects.lyx | 108 ++++++- 6 files changed, 501 insertions(+), 264 deletions(-) diff --git a/lib/doc/Changelog-EmbeddedObjects-LyX_23x.txt b/lib/doc/Changelog-EmbeddedObjects-LyX_23x.txt index a6919d2932..a0b2c4959c 100644 --- a/lib/doc/Changelog-EmbeddedObjects-LyX_23x.txt +++ b/lib/doc/Changelog-EmbeddedObjects-LyX_23x.txt @@ -5,6 +5,8 @@ Modified: first step: - sec. 1.2: changed image captions and labels - sec. 3.4.1: new paragraphs +- sec. 7.1: new description item for Inkscape drawings +- bibliography: new entry for Inkscape For LyX 2.2.3: diff --git a/lib/doc/EmbeddedObjects.lyx b/lib/doc/EmbeddedObjects.lyx index 80317ec8a7..255c2ab5d3 100644 --- a/lib/doc/EmbeddedObjects.lyx +++ b/lib/doc/EmbeddedObjects.lyx @@ -232,13 +232,11 @@ graphicboxes \papercolumns 1 \papersides 2 \paperpagestyle default -\tracking_changes true +\tracking_changes false \output_changes false \html_math_output 0 \html_css_as_file 0 \html_be_strict false -\author 227574939 "Kyttj" -\author 2047637253 "Guillaume Munch" \end_header \begin_body @@ -40032,8 +40030,6 @@ Xfig \end_inset figure This template supports images created with the program -\series bold - \begin_inset CommandInset href LatexCommand href name "Xfig" @@ -40042,234 +40038,91 @@ literal "false" \end_inset - -\series default . -\change_inserted 227574939 1473131626 - \end_layout \begin_layout Description - -\change_inserted 227574939 1473131628 Inkscape \begin_inset space ~ \end_inset -figure This experimental template supports -\change_inserted 2047637253 1475533187 -SVG -\change_inserted 227574939 1473131628 -images -\change_inserted 2047637253 1475533525 +figure This experimental template supports vector graphics (SVG) images that contain text written in \SpecialChar LaTeX . - -\change_inserted 227574939 1473131628 - -\change_inserted 2047637253 1475533551 -It relies on the PDF/PS+\SpecialChar LaTeX - option of -\change_deleted 2047637253 1475533556 -created with -\change_inserted 227574939 1473131628 -the program -\begin_inset CommandInset href -LatexCommand href -name "Inkscape" -target "https://en.wikipedia.org/wiki/Inkscape" + It relies on the option +\family sans +Omit text in PDF and create LaTeX file +\family default + when saving a drawing as PDF with the program +\noun on +Inkscape +\noun default +, +\begin_inset CommandInset citation +LatexCommand cite +key "Inkscape" literal "false" \end_inset . - -\change_inserted 2047637253 1475534005 -As described by the CTAN demonstration package -\emph on -svg-inkscape -\emph default -, -\end_layout - -\begin_deeper -\begin_layout Quote - -\change_inserted 2047637253 1475534064 - -\emph on -using the -\begin_inset Quotes eld -\end_inset - -PDF+\SpecialChar LaTeX - output -\begin_inset Quotes erd + This allows to include SVG documents in which \SpecialChar LaTeX + will typeset the text. + The benefit of such SVGs is a uniform text style throughout the whole document. +\begin_inset Newline newline \end_inset - option of Inkscape, it is possible to include SVG in documents, in which - \SpecialChar LaTeX - typesets the text. - This results in uniform text style throughout the document, including text - in images; moreover, \SpecialChar LaTeX - commands may be used in the image’s text, providing - such things as mathematics and references. -\end_layout - -\begin_layout Standard - -\change_inserted 2047637253 1475534692 -With Inkscape, even the size of the font is taken from the surrounding \SpecialChar LaTeX - - document. - Of course, you can always embed \SpecialChar LaTeX - modifiers like -\family typewriter +One can use \SpecialChar TeX + code commands like +\series bold \backslash Large -\family default +\series default , -\family typewriter +\series bold \backslash small -\family default +\series default , etc. - into your figure text strings. - Refer to the -\emph on -svg-inkscape -\emph default - documentation package for more information and examples. -\end_layout - -\begin_layout Standard - -\change_inserted 2047637253 1475534902 -It should be noted that while the image takes into account the surrounding - font, its preview in \SpecialChar LyX - does not. - Wrapping the external inset in a preview inset gives better results in - this regard. -\end_layout - -\begin_layout Standard - -\change_deleted 2047637253 1475534821 -It -\change_inserted 2047637253 1475534913 -The template -\change_inserted 227574939 1473131628 - works very similarly to Xfig support, except that Inkscape is a more modern - image editor than Xfig, which uses Scalable Vector Graphics (SVG) as its - native format. - -\change_unchanged - -\change_inserted 227574939 1473131628 -LyX will process the image file in much the same way as it does an Xfig - image, extracting the text into a separate TeX file for the text strings, - and a PDF file for the rest. -\end_layout - -\begin_layout Description - -\change_inserted 227574939 1473131628 -Warning: Unfortunately the latest version of Inkscape, 0.91, contains a bug: - with multi-page PDFs, the TeX file will sometimes reference more pages - than the PDF file contains. - This is the version that ships with Ubuntu 16.04. - Its use with LyX can therefore not be recommended, until the bug is fixed -\begin_inset Foot -status open - -\begin_layout Plain Layout - -\change_inserted 227574939 1473131628 -A workaround for those who have already SVG figures in their document is, - to manually do the LaTeX+PDF output from Inkscape, edit the -\family typewriter -.pdf_tex -\family default - file to remove the erroneous references, and -\family typewriter - -\backslash -input -\family default - it directly into LyX, i.e., not use the external-template mechanism: -\end_layout - -\begin_layout Plain Layout - -\change_inserted 227574939 1473131628 -\begin_inset Graphics - filename clipart/workaround.png - scale 50 - +\begin_inset space \space{} \end_inset +in the text of the SVG. + The size of the font will be taken from the settings of the \SpecialChar LyX + document. + Refer to +\begin_inset CommandInset citation +LatexCommand cite +key "Inkscape" +literal "false" -\end_layout +\end_inset -\begin_layout Plain Layout + for more information and examples. +\begin_inset Newline newline +\end_inset -\change_inserted 227574939 1473131628 -Here, the child document input inset ( +Note that while the image text takes into account the surrounding font, + its preview in \SpecialChar LyX + does not. + Wrapping the external inset in a preview inset (menu \family sans Insert\SpecialChar menuseparator -File\SpecialChar menuseparator -Child Document -\family default -) was used, which allows you do directly edit the -\family typewriter -.pdf_tex +Preview \family default - file in a text editor. - The LaTeX output is based on this edited snippet as re-generation from - the SVG file has been commented out. -\end_layout - +) gives a better result. +\begin_inset Newline newline \end_inset -. -\change_deleted 2047637253 1475534230 - -\end_layout - -\begin_layout Standard - -\change_deleted 2047637253 1475534225 -The reason why we would use this complicated process at all, like in the - case of Xfig, is that it makes the text strings inside the figure of the - same font type and attributes as the surrounding text, which looks so much - more professional. - With Inkscape, even the -\emph on -size -\emph default - of the font is taken from the surrounding LaTeX document – in Xfig, you - have to set it by hand to be the same. - Of course you can always embed LaTeX modifiers like -\family typewriter - -\backslash -Large -\family default -, -\family typewriter - -\backslash -small -\family default -, etc. - into your figure text strings. -\change_inserted 227574939 1473131628 - +The template works very similarly to Xfig support. + \SpecialChar LyX + will extract the text in the image into a separate \SpecialChar TeX + file and creates a + PDF file for the rest. \end_layout -\end_deeper \begin_layout Standard \begin_inset Float table placement !h @@ -47291,26 +47144,32 @@ status collapsed \begin_layout Bibliography \begin_inset CommandInset bibitem LatexCommand bibitem -key "NewInLyX20" +key "Inkscape" literal "true" \end_inset +Documentation of the option +\begin_inset CommandInset href +LatexCommand href +name "Omit text in PDF" +target "http://tug.ctan.org/tex-archive/info/svg-inkscape/InkscapePDFLaTeX.pdf" +literal "false" + +\end_inset + + of the program +\noun on \begin_inset CommandInset href LatexCommand href -name "Wiki page" -target "http://wiki.lyx.org/LyX/NewInLyX20" +name "Inkscape" +target "https://inkscape.org" literal "false" \end_inset - about new features in -\family sans -\SpecialChar LyX - 2.0 -\family default -. + \end_layout \begin_layout Standard diff --git a/lib/doc/de/EmbeddedObjects.lyx b/lib/doc/de/EmbeddedObjects.lyx index ec70490ac4..c708b142bd 100644 --- a/lib/doc/de/EmbeddedObjects.lyx +++ b/lib/doc/de/EmbeddedObjects.lyx @@ -40165,8 +40165,6 @@ reference "abs:Grafik-Dialog" \begin_layout Description Xfig-Abbildung Diese Vorlage unterstützt Bilder, die mit dem Programm -\series bold - \begin_inset CommandInset href LatexCommand href name "Xfig" @@ -40175,9 +40173,90 @@ literal "false" \end_inset + erzeugt wurden. +\end_layout + +\begin_layout Description +Inkscape +\begin_inset space ~ +\end_inset + +Abbildung Diese experimentelle Vorlage unterstützt Vektorgrafiken (SVG), + deren Text mit \SpecialChar LaTeX + gesetzt wird. + Es basiert auf der Option +\family sans +Text in PDF weglassen und LaTeX Datei erstellen +\family default + wenn man eine Zeichnung als PDF mit dem programm +\noun on +Inkscape +\noun default + speichert, +\begin_inset CommandInset citation +LatexCommand cite +key "Inkscape" +literal "false" + +\end_inset + +. + Dier ermöglicht es SVG-Dateien einzugügen, in denen \SpecialChar LaTeX + den Text setzen wird. + Der Vorteil von solchen SVGs ist, dass man einen einheitlichen Textstil + im ganzen Dokument erhält. +\begin_inset Newline newline +\end_inset +Man kann \SpecialChar TeX +-Code-Befehle wie +\series bold + +\backslash +Large \series default - erzeugt wurden. +, +\series bold + +\backslash +small +\series default +, usw. +\begin_inset space \space{} +\end_inset + +im Text der SVGs verwenden. + Die Schriftgröße wird von den Einstellungen des \SpecialChar LyX +-Dokuments übernommen. + Siehe +\begin_inset CommandInset citation +LatexCommand cite +key "Inkscape" +literal "false" + +\end_inset + + für mehr Informationen und Beispiele. +\begin_inset Newline newline +\end_inset + +Es ist zu beachten, dass der Bildtext die umgebende Schrift übernimmt, dies + in der Vorschau in \SpecialChar LyX + aber nicht geschieht. + Packt man die externe Einfügung in eine Vorschau-Einfügung (Menü +\family sans +Einfügen\SpecialChar menuseparator +Vorschau +\family default +), erhält man ein besseres Ergebnis. +\begin_inset Newline newline +\end_inset + +Die Vorlage funktioniert sehr ähnlich zur Unterstützung für Xfig. + \SpecialChar LyX + extrahiert den Bildtext in eine separate \SpecialChar TeX +-Datei und erzeugt eine PDF-Datei + für den Rest. \end_layout \begin_layout Standard @@ -47163,6 +47242,15 @@ status collapsed \end_inset +\begin_inset CommandInset href +LatexCommand href +name "Inkscape" +target "https://inkscape.org/de/" +literal "false" + +\end_inset + + \end_layout \begin_layout Bibliography @@ -47312,26 +47400,32 @@ status collapsed \begin_layout Bibliography \begin_inset CommandInset bibitem LatexCommand bibitem -key "NeuInLyX20" +key "Inkscape" literal "true" \end_inset +Dokumentation der Option +\begin_inset CommandInset href +LatexCommand href +name "Text in PDF weglassen" +target "http://tug.ctan.org/tex-archive/info/svg-inkscape/InkscapePDFLaTeX.pdf" +literal "false" + +\end_inset + + des Programms +\noun on \begin_inset CommandInset href LatexCommand href -name "Wiki-Seite" -target "http://wiki.lyx.org/LyX/NewInLyX20" +name "Inkscape" +target "https://inkscape.org" literal "false" \end_inset - über neue Funktionen in -\family sans -\SpecialChar LyX - 2.0 -\family default -. + \end_layout \begin_layout Standard diff --git a/lib/doc/es/EmbeddedObjects.lyx b/lib/doc/es/EmbeddedObjects.lyx index 76464e50f0..5d94082e40 100644 --- a/lib/doc/es/EmbeddedObjects.lyx +++ b/lib/doc/es/EmbeddedObjects.lyx @@ -39761,8 +39761,6 @@ Figura \end_inset Xfig Esta plantilla soporta imágenes creadas con el programa -\series bold - \begin_inset CommandInset href LatexCommand href name "Xfig" @@ -39771,9 +39769,96 @@ literal "false" \end_inset +. +\end_layout + +\begin_layout Description +Figura +\begin_inset space ~ +\end_inset + +Inkscape +\lang english +This experimental template supports vector graphics (SVG) images that contain + text written in \SpecialChar LaTeX +. + It relies on the optio +\lang spanish +n +\family sans +Omitir texto en PDF y crear archivo LaTeX +\family default +\lang english +when saving a drawing as PDF with the program +\noun on +Inkscape +\noun default +, +\begin_inset CommandInset citation +LatexCommand cite +key "Inkscape" +literal "false" + +\end_inset -\series default . + This allows to include SVG documents in which \SpecialChar LaTeX + will typeset the text. + The benefit of such SVGs is a uniform text style throughout the whole document + and one can use \SpecialChar TeX + code commands in the text of the SVG. +\begin_inset Newline newline +\end_inset + +One can use \SpecialChar TeX + code commands like +\series bold + +\backslash +Large +\series default +, +\series bold + +\backslash +small +\series default +, etc. +\begin_inset space \space{} +\end_inset + +in the text of the SVG. + The size of the font will be taken from the settings of the \SpecialChar LyX + document. + Refer to +\begin_inset CommandInset citation +LatexCommand cite +key "Inkscape" +literal "false" + +\end_inset + + for more information and examples. +\begin_inset Newline newline +\end_inset + +Note that while the image text takes into account the surrounding font, + its preview in \SpecialChar LyX + does not. + Wrapping the external inset in a preview inset (menu +\family sans +Insert\SpecialChar menuseparator +Preview +\family default +) gives a better result. +\begin_inset Newline newline +\end_inset + +The template works very similarly to Xfig support. + \SpecialChar LyX + will extract the text in the image into a separate \SpecialChar TeX + file and creates a + PDF file for the rest. \end_layout \begin_layout Standard @@ -40041,13 +40126,6 @@ Personalización se explica cómo definir tus propias plantillas. \end_layout -\begin_layout Standard -\begin_inset Newpage newpage -\end_inset - - -\end_layout - \begin_layout Section Documento hijo \begin_inset CommandInset label @@ -40539,7 +40617,7 @@ name "cap:Listado-de-código" \begin_inset Index idx -status open +status collapsed \begin_layout Plain Layout Listado de código @@ -40549,7 +40627,7 @@ Listado de código \begin_inset Index idx -status open +status collapsed \begin_layout Plain Layout Código de programa @@ -40559,7 +40637,7 @@ Código de programa \begin_inset Index idx -status open +status collapsed \begin_layout Plain Layout Flotantes ! Listado de código @@ -46673,30 +46751,40 @@ status collapsed \begin_layout Bibliography \begin_inset CommandInset bibitem LatexCommand bibitem -key "NewInLyX20" +key "Inkscape" literal "true" \end_inset - +Documentación +\lang english +of the option +\lang spanish + \begin_inset CommandInset href LatexCommand href -name "Página wiki" -target "http://wiki.lyx.org/LyX/NewInLyX20" +name "Omitir texto en PDF" +target "http://tug.ctan.org/tex-archive/info/svg-inkscape/InkscapePDFLaTeX.pdf" literal "false" \end_inset - sobre características nuevas para la versión -\family sans -\SpecialChar LyX + +\lang english +of the program +\lang spanish + +\noun on + +\begin_inset CommandInset href +LatexCommand href +name "Inkscape" +target "https://inkscape.org/es/" +literal "false" -\begin_inset space ~ \end_inset -2.0 -\family default -. + \end_layout \begin_layout Standard diff --git a/lib/doc/fr/EmbeddedObjects.lyx b/lib/doc/fr/EmbeddedObjects.lyx index 6678815bc5..43b9226941 100644 --- a/lib/doc/fr/EmbeddedObjects.lyx +++ b/lib/doc/fr/EmbeddedObjects.lyx @@ -40866,8 +40866,6 @@ Figure \end_inset Xfig Ce modèle accepte les images créées avec le programme -\series bold - \begin_inset CommandInset href LatexCommand href name "Xfig" @@ -40876,9 +40874,96 @@ literal "false" \end_inset +. +\end_layout -\series default +\begin_layout Description +Figure +\begin_inset space ~ +\end_inset + +Inkscape +\lang english +This experimental template supports vector graphics (SVG) images that contain + text written in \SpecialChar LaTeX . + It relies on the option +\lang french + +\family sans +Exclure le texte du fichier PDF, et créer un fichier LaTeX +\family default +\lang english +when saving a drawing as PDF with the program +\noun on +Inkscape +\noun default +, +\begin_inset CommandInset citation +LatexCommand cite +key "Inkscape" +literal "false" + +\end_inset + +. + This allows to include SVG documents in which \SpecialChar LaTeX + will typeset the text. + The benefit of such SVGs is a uniform text style throughout the whole document + and one can use \SpecialChar TeX + code commands in the text of the SVG. +\begin_inset Newline newline +\end_inset + +One can use \SpecialChar TeX + code commands like +\series bold + +\backslash +Large +\series default +, +\series bold + +\backslash +small +\series default +, etc. +\begin_inset space \space{} +\end_inset + +in the text of the SVG. + The size of the font will be taken from the settings of the \SpecialChar LyX + document. + Refer to +\begin_inset CommandInset citation +LatexCommand cite +key "Inkscape" +literal "false" + +\end_inset + + for more information and examples. +\begin_inset Newline newline +\end_inset + +Note that while the image text takes into account the surrounding font, + its preview in \SpecialChar LyX + does not. + Wrapping the external inset in a preview inset (menu +\family sans +Insert\SpecialChar menuseparator +Preview +\family default +) gives a better result. +\begin_inset Newline newline +\end_inset + +The template works very similarly to Xfig support. + \SpecialChar LyX + will extract the text in the image into a separate \SpecialChar TeX + file and creates a + PDF file for the rest. \end_layout \begin_layout Standard @@ -47925,6 +48010,15 @@ Paquetages \SpecialChar LaTeX \end_inset +\begin_inset CommandInset href +LatexCommand href +name "Exclure le texte du fichier PDF" +target "http://tug.ctan.org/tex-archive/info/svg-inkscape/InkscapePDFLaTeX.pdf" +literal "false" + +\end_inset + + \end_layout \begin_layout Bibliography @@ -48074,26 +48168,40 @@ Paquetages \SpecialChar LaTeX \begin_layout Bibliography \begin_inset CommandInset bibitem LatexCommand bibitem -key "NewInLyX20" +key "Inkscape" literal "true" \end_inset +Documentation +\lang english +of the option +\lang french + +\begin_inset CommandInset href +LatexCommand href +name "Omit text in PDF" +target "http://tug.ctan.org/tex-archive/info/svg-inkscape/InkscapePDFLaTeX.pdf" +literal "false" + +\end_inset + + +\lang english +of the program +\lang french + +\noun on \begin_inset CommandInset href LatexCommand href -name "Page Wiki" -target "http://wiki.lyx.org/LyX/NewInLyX20" +name "Inkscape" +target "https://inkscape.org/fr/" literal "false" \end_inset - au sujet des nouveautés de -\family sans -\SpecialChar LyX - 2.0 -\family default -. + \end_layout \begin_layout Standard diff --git a/lib/doc/ja/EmbeddedObjects.lyx b/lib/doc/ja/EmbeddedObjects.lyx index 5e8ae1f77d..c9f24ba4f1 100644 --- a/lib/doc/ja/EmbeddedObjects.lyx +++ b/lib/doc/ja/EmbeddedObjects.lyx @@ -37593,8 +37593,6 @@ reference "sec:画像ダイアログ" \begin_layout Description XFig このひな型は, -\series bold - \begin_inset CommandInset href LatexCommand href name "Xfig" @@ -37603,9 +37601,87 @@ literal "false" \end_inset +プログラムで作成した画像をサポートします. +\end_layout +\begin_layout Description +Inkscape +\lang english +This experimental template supports vector graphics (SVG) images that contain + text written in \SpecialChar LaTeX +. + It relies on the option +\family sans +Omit text in PDF and create LaTeX file +\family default + when saving a drawing as PDF with the program +\noun on +Inkscape +\noun default +, +\begin_inset CommandInset citation +LatexCommand cite +key "Inkscape" +literal "false" + +\end_inset + +. + This allows to include SVG documents in which \SpecialChar LaTeX + will typeset the text. + The benefit of such SVGs is a uniform text style throughout the whole document +\begin_inset Newline newline +\end_inset + +One can use \SpecialChar TeX + code commands like +\series bold + +\backslash +Large \series default -プログラムで作成した画像をサポートします. +, +\series bold + +\backslash +small +\series default +, etc. +\begin_inset space \space{} +\end_inset + +in the text of the SVG. + The size of the font will be taken from the settings of the \SpecialChar LyX + document. + Refer to +\begin_inset CommandInset citation +LatexCommand cite +key "Inkscape" +literal "false" + +\end_inset + + for more information and examples. +\begin_inset Newline newline +\end_inset + +Note that while the image text takes into account the surrounding font, + its preview in \SpecialChar LyX + does not. + Wrapping the external inset in a preview inset (menu +\family sans +Insert\SpecialChar menuseparator +Preview +\family default +) gives a better result. +\begin_inset Newline newline +\end_inset + +The template works very similarly to Xfig support. + \SpecialChar LyX + will extract the text in the image into a separate \SpecialChar TeX + file and creates a + PDF file for the rest. \end_layout \begin_layout Standard @@ -44353,21 +44429,31 @@ status collapsed \labelwidthstring 参考文献 \begin_inset CommandInset bibitem LatexCommand bibitem -key "NewInLyX20" +key "Inkscape" literal "true" \end_inset -\family sans -\SpecialChar LyX - 2.0 -\family default -の新機能に関する +\lang english +Documentation of the option +\begin_inset CommandInset href +LatexCommand href +name "Omit text in PDF" +target "http://tug.ctan.org/tex-archive/info/svg-inkscape/InkscapePDFLaTeX.pdf" +literal "false" + +\end_inset + + of the program +\lang japanese + +\noun on + \begin_inset CommandInset href LatexCommand href -name "Wikiページ" -target "http://wiki.lyx.org/LyX/NewInLyX20" +name "Inkscape" +target "https://inkscape.org/ja/" literal "false" \end_inset -- 2.39.5