]> git.lyx.org Git - lyx.git/blobdiff - lib/doc/EmbeddedObjects.lyx
EmbeddedObjects.lyx: load all math packages automatically
[lyx.git] / lib / doc / EmbeddedObjects.lyx
index 8708ca69b79d8ae64570f446d26234ef4fac23cc..19e978f572e4c4d3b0b51d2684092b05784f59f9 100644 (file)
@@ -197,16 +197,16 @@ graphicboxes
 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue, pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false"
 \papersize default
 \use_geometry false
-\use_package amsmath 2
-\use_package amssymb 2
-\use_package cancel 0
-\use_package esint 0
+\use_package amsmath 1
+\use_package amssymb 1
+\use_package cancel 1
+\use_package esint 1
 \use_package mathdots 1
-\use_package mathtools 0
+\use_package mathtools 1
 \use_package mhchem 1
-\use_package stackrel 0
-\use_package stmaryrd 0
-\use_package undertilde 0
+\use_package stackrel 1
+\use_package stmaryrd 1
+\use_package undertilde 1
 \cite_engine basic
 \cite_engine_type default
 \biblio_style plain
@@ -233,12 +233,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 5863344 "ef"
 \end_header
 
 \begin_body
@@ -21520,7 +21519,7 @@ array
 \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
@@ -39670,69 +39669,85 @@ literal "false"
 \end_layout
 
 \begin_layout Description
-Spreadsheet With this template you can insert spreadsheets
-\begin_inset space \thinspace{}
-\end_inset
-
-/
-\begin_inset space \thinspace{}
+Inkscape
+\begin_inset space ~
 \end_inset
 
-tables in the format of 
-\series bold
-
-\begin_inset CommandInset href
-LatexCommand href
-name "Gnumeric"
-target "http://en.wikipedia.org/wiki/Gnumeric"
+figure 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
 , 
-\begin_inset CommandInset href
-LatexCommand href
-name "OpenDocument"
-target "http://en.wikipedia.org/wiki/OpenDocument"
-literal "false"
+\series bold
 
+\backslash
+small
+\series default
+, etc.
+\begin_inset space \space{}
 \end_inset
 
-, 
-\begin_inset CommandInset href
-LatexCommand href
-name "Microsoft Office XML"
-target "http://en.wikipedia.org/wiki/Microsoft_Office_XML_formats"
+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
 
- and 
-\begin_inset CommandInset href
-LatexCommand href
-name "Office Open XML"
-target "http://en.wikipedia.org/wiki/Office_Open_XML"
-literal "false"
-
+ for more information and examples.
+\begin_inset Newline newline
 \end_inset
 
-.
- For this feature \SpecialChar LyX
- must have found the program 
-\family typewriter
-ssconvert
+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
- during its configuration.
- This program is part of Gnumeric, so that you must have Gnumeric installed,
- also if you don't have tables in the Gnumeric format.
- For examples and possible limitations have a look at \SpecialChar LyX
-'s example file 
-\emph on
-spreadsheet.lyx
-\emph 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 Description
@@ -39988,6 +40003,72 @@ reference "sec:Graphics-Dialog"
 
 \end_layout
 
+\begin_layout Description
+Spreadsheet With this template you can insert spreadsheets
+\begin_inset space \thinspace{}
+\end_inset
+
+/
+\begin_inset space \thinspace{}
+\end_inset
+
+tables in the format of 
+\series bold
+
+\begin_inset CommandInset href
+LatexCommand href
+name "Gnumeric"
+target "http://en.wikipedia.org/wiki/Gnumeric"
+literal "false"
+
+\end_inset
+
+
+\series default
+, 
+\begin_inset CommandInset href
+LatexCommand href
+name "OpenDocument"
+target "http://en.wikipedia.org/wiki/OpenDocument"
+literal "false"
+
+\end_inset
+
+, 
+\begin_inset CommandInset href
+LatexCommand href
+name "Microsoft Office XML"
+target "http://en.wikipedia.org/wiki/Microsoft_Office_XML_formats"
+literal "false"
+
+\end_inset
+
+ and 
+\begin_inset CommandInset href
+LatexCommand href
+name "Office Open XML"
+target "http://en.wikipedia.org/wiki/Office_Open_XML"
+literal "false"
+
+\end_inset
+
+.
+ For this feature \SpecialChar LyX
+ must have found the program 
+\family typewriter
+ssconvert
+\family default
+ during its configuration.
+ This program is part of Gnumeric, so that you must have Gnumeric installed,
+ also if you don't have tables in the Gnumeric format.
+ For examples and possible limitations have a look at \SpecialChar LyX
+'s example file 
+\emph on
+spreadsheet.lyx
+\emph default
+.
+\end_layout
+
 \begin_layout Description
 Vector
 \begin_inset space ~
@@ -40043,259 +40124,6 @@ literal "false"
 .
 \end_layout
 
-\begin_layout Description
-Inkscape
-\begin_inset space ~
-\end_inset
-
-figure 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
-\begin_inset Float table
-placement !h
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\begin_inset Caption Standard
-
-\begin_layout Plain Layout
-\begin_inset CommandInset label
-LatexCommand label
-name "tab:Comparison-of-the"
-
-\end_inset
-
-Comparison of the date input methods.
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Plain Layout
-\align center
-\begin_inset Tabular
-<lyxtabular version="3" rows="4" columns="3">
-<features tabularvalignment="middle">
-<column alignment="center" valignment="top">
-<column alignment="center" valignment="top">
-<column alignment="center" valignment="top">
-<row>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Document format
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family sans
-Insert\SpecialChar menuseparator
-Date
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-command 
-\series bold
-
-\backslash
-today
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-\SpecialChar LyX
-
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-as date
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-as \SpecialChar TeX
- Code inset box
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-\SpecialChar LaTeX
-
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-as date
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-as command
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-DVI, PDF, PS
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-as date
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-as date
-\end_layout
-
-\end_inset
-</cell>
-</row>
-</lyxtabular>
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
 \begin_layout Standard
 When you use the option 
 \family sans
@@ -40851,11 +40679,7 @@ Program Listing
 \family default
 .
  The \SpecialChar LaTeX
--package
-\change_inserted 5863344 1497177967
-s
-\change_unchanged
+-packages 
 \series bold
 listings
 \series default
@@ -40870,9 +40694,7 @@ status collapsed
 
 \end_inset
 
-\change_inserted 5863344 1497177997
-or 
+ or 
 \series bold
 minted
 \series default
@@ -40881,42 +40703,184 @@ minted
 status collapsed
 
 \begin_layout Plain Layout
-
-\change_inserted 5863344 1497178009
 \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.
  
-\change_unchanged
-provide
-\change_deleted 5863344 1497178016
-s
-\change_unchanged
- a powerful and flexible way to insert program source code into your document.
+\series bold
+listings
+\series default
+ is used by default.
+\end_layout
 
-\change_inserted 5863344 1497178383
- You can use either one in a document, but listings is used by default.
- In order to use minted, you need to check the box 
-\begin_inset Quotes eld
-\end_inset
+\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
 
-Use minted
-\begin_inset Quotes erd
 \end_inset
 
- in Document\SpecialChar menuseparator
-Settings\SpecialChar menuseparator
-Listings.
- However, note that minted requires additional software (the pygments python
- module) and the 
+ and the option 
 \family typewriter
 -shell-escape
 \family default
- option for the latex backend, which allows arbitrary code execution.
-\change_unchanged
+ 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
 
@@ -41052,71 +41016,10 @@ Float
 \family default
  option in this case as also non-float listings can have captions and be
  referenced.
-\change_inserted 5863344 1497179331
-
-\end_layout
-
-\begin_layout Standard
-
-\change_inserted 5863344 1497179333
-\begin_inset listings
-lstparams "language=Python"
-inline false
-status open
-
-\begin_layout Plain Layout
-
-\change_inserted 5863344 1497179333
-
-\begin_inset Caption Standard
-
-\begin_layout Plain Layout
-
-\change_inserted 5863344 1497179333
-\begin_inset CommandInset label
-LatexCommand label
-name "lst:Example-Listing"
-
-\end_inset
-
-Example Listing float
-\end_layout
-
-\end_inset
-
-# Example listing float
-\end_layout
-
-\begin_layout Plain Layout
-
-\change_inserted 5863344 1497179333
-
-def func(param):
-\end_layout
-
-\begin_layout Plain Layout
-
-\change_inserted 5863344 1497179333
-
-    'this is a python function'
-\end_layout
-
-\begin_layout Plain Layout
-
-\change_inserted 5863344 1497179333
-
-    pass
-\end_layout
-
-\end_inset
-
-
-\change_unchanged
-
 \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
@@ -41151,105 +41054,144 @@ List of Listings
 \family default
 .
  The list entries are the listing caption and the listing number.
-\change_inserted 5863344 1497179524
-
 \end_layout
 
 \begin_layout Standard
-
-\change_inserted 5863344 1497179494
-\begin_inset Note Greyedout
+\begin_inset listings
+lstparams "language=Python"
+inline false
 status open
 
 \begin_layout Plain Layout
 
-\change_inserted 5863344 1497179551
+\begin_inset Caption Standard
 
-\series bold
-Note: 
-\series default
-The listings package places captions before the listing by default, while
- the minted package places them after the listing by default if it is floating.
- If the listing is not floating and minted is used, the place of the caption
- is determined by the position it is inserted in the inset.
- If it is inserted in the first line of the inset, the caption will be typeset
- before the listing, otherwise it will be typeset after the listing.
- If you use minted and would like to have captions before the listing even
- when it is a float, you have to add the following lines to the preamble:
+\begin_layout Plain Layout
+\begin_inset CommandInset label
+LatexCommand label
+name "lst:Example-Listing"
+
+\end_inset
+
+Example Listing float
 \end_layout
 
-\begin_layout LyX-Code
+\end_inset
 
-\change_inserted 5863344 1497179494
+# Example listing float
+\end_layout
 
-\backslash
-usepackage{float}
+\begin_layout Plain Layout
+
+def func(param):
 \end_layout
 
-\begin_layout LyX-Code
+\begin_layout Plain Layout
 
-\change_inserted 5863344 1497179494
+    'this is a python function'
+\end_layout
 
-\backslash
-floatstyle{plaintop}
-\change_unchanged
+\begin_layout Plain Layout
 
+    pass
 \end_layout
 
 \end_inset
 
 
-\change_unchanged
-
 \end_layout
 
 \begin_layout Standard
-
-\change_deleted 5863344 1497179361
-\begin_inset listings
-lstparams "language=Python"
-inline false
+\begin_inset Note Greyedout
 status open
 
 \begin_layout Plain Layout
 
-\begin_inset Caption Standard
+\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
-\begin_inset CommandInset label
-LatexCommand label
-name "lis:Example-Listing-old"
 
+\series bold
+\begin_inset space ~
 \end_inset
 
-Example Listing float
+
 \end_layout
 
 \end_inset
 
-# Example listing float
-\end_layout
+{
+\backslash
+usepackage{float}}{}
+\begin_inset Newline newline
+\end_inset
 
-\begin_layout Plain Layout
 
-def func(param):
-\end_layout
+\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
 
-    'this is a python function'
+\backslash
+@ifundefined
+\series default
+ is used in the above command.
 \end_layout
 
-\begin_layout Plain Layout
+\end_inset
+
 
-    pass
 \end_layout
 
 \end_inset
 
 
-\change_unchanged
-
 \end_layout
 
 \begin_layout Standard
@@ -41345,17 +41287,12 @@ You can furthermore specify a range of lines; only these will then appear
 \family sans
 Extended character table
 \family default
-\change_inserted 5863344 1497179749
-is only meaningful for the listings package and 
-\change_unchanged
-should be used when you use national characters like the German umlauts
- in the listing.
-
-\change_inserted 5863344 1497179779
- It is not needed with minted.
-\change_unchanged
-
+ 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
 
@@ -41747,25 +41684,11 @@ For more information about the
 \series bold
 listings
 \series default
-\change_inserted 5863344 1497179948
-and 
+ and 
 \series bold
 minted
 \series default
-\change_unchanged
-package
-\change_inserted 5863344 1497179951
-s
-\change_unchanged
-, we refer to 
-\change_deleted 5863344 1497179970
-its
-\change_inserted 5863344 1497179971
-their
-\change_unchanged
- documentation 
+ packages, we refer to their documentation 
 \begin_inset CommandInset citation
 LatexCommand cite
 key "listings,minted"
@@ -47117,13 +47040,9 @@ status collapsed
 \end_inset
 
 
-\change_inserted 5863344 1497180016
-
 \end_layout
 
 \begin_layout Bibliography
-
-\change_inserted 5863344 1497180069
 \begin_inset CommandInset bibitem
 LatexCommand bibitem
 key "minted"
@@ -47150,8 +47069,6 @@ literal "false"
 status collapsed
 
 \begin_layout Plain Layout
-
-\change_inserted 5863344 1497180164
 \SpecialChar LaTeX
 -packages ! minted
 \end_layout
@@ -47159,8 +47076,6 @@ status collapsed
 \end_inset
 
 
-\change_unchanged
-
 \end_layout
 
 \begin_layout Bibliography