#LyX 2.3 created this file. For more info see http://www.lyx.org/
-\lyxformat 543
+\lyxformat 544
\begin_document
\begin_header
\save_transient_properties true
\suppress_date false
\justification true
\use_refstyle 0
+\use_minted 0
\notefontcolor #0000ff
\index Index
\shortcut idx
\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
\series default
will be loaded automatically by \SpecialChar LyX
when you use self defined table formats.
- To avoid that it being loaded twice the command
+ To avoid that it is loaded twice the command
\series bold
\backslash
\begin_layout Plain Layout
\align center
\begin_inset Graphics
- filename clipart/mobius.eps
- lyxscale 50
+ filename clipart/2D-intensity-plot.pdf
width 100col%
scaleBeforeRotation
\begin_layout Plain Layout
\align center
\begin_inset Graphics
- filename clipart/platypus.eps
- lyxscale 50
+ filename clipart/Star-structure.pdf
width 100col%
scaleBeforeRotation
\begin_layout Plain Layout
\align center
\begin_inset Graphics
- filename clipart/mobius.eps
- lyxscale 50
- scale 50
+ filename clipart/2D-intensity-plot.pdf
scaleBeforeRotation
\end_inset
\begin_layout Plain Layout
\begin_inset Graphics
- filename clipart/escher-lsd.eps
- scale 75
+ filename clipart/3D-structure-distort.pdf
+ scale 50
scaleBeforeRotation
\end_inset
\begin_layout Plain Layout
\begin_inset Graphics
- filename clipart/escher-lsd.eps
- scale 75
+ filename clipart/3D-structure-distort.pdf
+ scale 50
scaleBeforeRotation
\end_inset
\end_inset
figure This template supports images created with the program
-\series bold
-
\begin_inset CommandInset href
LatexCommand href
name "Xfig"
\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
\family default
.
The \SpecialChar LaTeX
--package
+-packages
\series bold
listings
\series default
\end_inset
- provides a powerful and flexible way to insert program source code into
+ or
+\series bold
+minted
+\series default
+
+\begin_inset Index idx
+status collapsed
+
+\begin_layout Plain Layout
+\SpecialChar LaTeX
+-packages ! minted
+\end_layout
+
+\end_inset
+
+ provide a powerful and flexible way to insert program source code into
your document.
+ One can only use one of these packages in a document.
+
+\series bold
+listings
+\series default
+ is used by default.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Note Note
+status open
+
+\begin_layout Plain Layout
+
+\series bold
+Note:
+\series default
+ \SpecialChar LyX
+ does NOT want to encourage users to add the
+\family typewriter
+-shell-escape
+\family default
+ option to converter definitions.
+ It works, but it is a huge security risk.
+ There is an active discussion about how to handle this.
+ Once that's been resolved, this can be updated appropriately.
+\end_layout
+
+\begin_layout Plain Layout
+=====
+\end_layout
+
+\begin_layout Plain Layout
+In order to use
+\series bold
+minted
+\series default
+, you need to select it as the syntax highlighting package in the document
+ settings under
+\family sans
+Listings
+\family default
+.
+
+\series bold
+minted
+\series default
+ requires also additionally the module
+\family sans
+pygments
+\family default
+ of the software
+\noun on
+Python
+\noun default
+
+\begin_inset Foot
+status collapsed
+
+\begin_layout Plain Layout
+Under \SpecialChar LyX
+ for Windows
+\family sans
+pygments
+\family default
+ is already installed.
+\end_layout
+
+\end_inset
+
+ and the option
+\family typewriter
+-shell-escape
+\family default
+ for the \SpecialChar LaTeX
+ processor.
+ If you want for example view or export your document as the format
+\family sans
+PDF
+\begin_inset space ~
+\end_inset
+
+(pdflatex)
+\family default
+, go to the \SpecialChar LyX
+ preferences and there to the section
+\family sans
+File
+\begin_inset space ~
+\end_inset
+
+Handling\SpecialChar menuseparator
+Converters
+\family default
+.
+ There go to the entry
+\family sans
+LaTeX
+\begin_inset space ~
+\end_inset
+
+(pdflatex) -> PDF
+\begin_inset space ~
+\end_inset
+
+(pdflatex)
+\family default
+ and look at the field
+\family sans
+Converter
+\family default
+.
+ There you see by default the content
+\begin_inset Newline newline
+\end_inset
+
+
+\series bold
+pdflatex $$i
+\series default
+
+\begin_inset Newline newline
+\end_inset
+
+Now change it to
+\begin_inset Newline newline
+\end_inset
+
+
+\series bold
+pdflatex $$i -shell-escape
+\begin_inset Newline newline
+\end_inset
+
+
+\series default
+and press the
+\family sans
+Modify
+\family default
+ button and subsequently
+\family sans
+Apply
+\family default
+ or
+\family sans
+Save
+\family default
+.
+ The same can be done for the output formats
+\family sans
+PDF
+\begin_inset space ~
+\end_inset
+
+(LuaTeX)
+\family default
+ and
+\family sans
+PDF
+\begin_inset space ~
+\end_inset
+
+(XeTeX)
+\family default
+.
+\end_layout
+
+\end_inset
+
+
\end_layout
\begin_layout Standard
\end_layout
\begin_layout Standard
-You can add captions to listings with the menu
+You can add captions to listings that are not inline with the menu
\family sans
Insert\SpecialChar menuseparator
Caption
\end_inset
+\end_layout
+
+\begin_layout Standard
+\begin_inset Note Greyedout
+status open
+
+\begin_layout Plain Layout
+
+\series bold
+Note:
+\series default
+The
+\series bold
+listings
+\series default
+ package places captions before the listing by default.
+\begin_inset Newline newline
+\end_inset
+
+The
+\series bold
+minted
+\series default
+ package places them after the listing by default if it is floating.
+ If tit is not floating caption will be typeset before the listing if it
+ is inserted to its first line, otherwise it will be typeset after the listing.
+ If you want to force the placement in avery case before the listing, you
+ have to add the following lines as last thing to the preamble:
+\begin_inset Newline newline
+\end_inset
+
+
+\series bold
+
+\backslash
+@ifundefined{newfloat}
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Phantom HPhantom
+status open
+
+\begin_layout Plain Layout
+
+\series bold
+\begin_inset space ~
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+{
+\backslash
+usepackage{float}}{}
+\begin_inset Newline newline
+\end_inset
+
+
+\backslash
+floatstyle{plaintop}
+\series default
+
+\begin_inset Note Note
+status collapsed
+
+\begin_layout Plain Layout
+The package
+\series bold
+float
+\series default
+ will be loaded automatically by \SpecialChar LyX
+ when you use special document-wide float
+ placement settings.
+ To avoid that it is loaded twice the command
+\series bold
+
+\backslash
+@ifundefined
+\series default
+ is used in the above command.
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
\end_layout
\begin_layout Standard
\family sans
Extended character table
\family default
- should be used when you use national characters like the German umlauts
- in the listing.
+ is only meaningful for the
+\series bold
+listings
+\series default
+ package and should be used when you use national characters like the German
+ umlauts in the listing.
\begin_inset Newline newline
\end_inset
\series bold
listings
\series default
- package, we refer to its documentation
+ and
+\series bold
+minted
+\series default
+ packages, we refer to their documentation
\begin_inset CommandInset citation
LatexCommand cite
-key "listings"
+key "listings,minted"
literal "true"
\end_inset
\end_inset
+\end_layout
+
+\begin_layout Bibliography
+\begin_inset CommandInset bibitem
+LatexCommand bibitem
+key "minted"
+literal "false"
+
+\end_inset
+
+Documentation of the \SpecialChar LaTeX
+-package
+\series bold
+
+\begin_inset CommandInset href
+LatexCommand href
+name "minted"
+target "ftp://tug.ctan.org/pub/tex-archive/macros/latex/contrib/minted/minted.pdf"
+literal "false"
+
+\end_inset
+
+
+\series default
+
+\begin_inset Index idx
+status collapsed
+
+\begin_layout Plain Layout
+\SpecialChar LaTeX
+-packages ! minted
+\end_layout
+
+\end_inset
+
+
\end_layout
\begin_layout Bibliography
\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