EmbeddedObjects.lyx:

- describe how to use math in program listings
- squash some LaTeX warnings

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35684 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Uwe Stöhr 2010-10-18 00:54:20 +00:00
parent 5455586a93
commit 365bc7c3f6
5 changed files with 685 additions and 257 deletions

View File

@ -1,5 +1,5 @@
#LyX 2.0.0svn created this file. For more info see http://www.lyx.org/ #LyX 2.0.0svn created this file. For more info see http://www.lyx.org/
\lyxformat 401 \lyxformat 404
\begin_document \begin_document
\begin_header \begin_header
\textclass scrbook \textclass scrbook
@ -29,7 +29,7 @@
\mainmatter } \mainmatter }
% provides caption formatting % provides caption formatting
\usepackage[labelfont={bf,sf}, tableposition=top]{caption}[2004/07/16] \usepackage[labelfont={bf,sf}]{caption}[2004/07/16]
% provides commands to set caption % provides commands to set caption
% beside tables/images % beside tables/images
@ -157,7 +157,7 @@
L\kern-.1667em\lower.25em\hbox{Y}\kern-.125emX\@} L\kern-.1667em\lower.25em\hbox{Y}\kern-.125emX\@}
{LyX}} {LyX}}
\end_preamble \end_preamble
\options fleqn,liststotoc,bibtotoc,idxtotoc,BCOR7.5mm,titlepage,tablecaptionabove \options fleqn,bibliography=totoc,index=totoc,BCOR7.5mm,titlepage,captions=tableheading
\use_default_options false \use_default_options false
\maintain_unincluded_children false \maintain_unincluded_children false
\language english \language english
@ -206,6 +206,7 @@
\use_indices false \use_indices false
\paperorientation portrait \paperorientation portrait
\suppress_date false \suppress_date false
\use_refstyle 0
\notefontcolor #0000ff \notefontcolor #0000ff
\index Index \index Index
\shortcut idx \shortcut idx
@ -22689,7 +22690,7 @@ LaTeX-packages ! KOMA-Script
document class is used. document class is used.
In this case the document class option In this case the document class option
\series bold \series bold
tablecaptionabove captions=tableheading
\series default \series default
must be used. must be used.
\end_layout \end_layout
@ -23192,7 +23193,7 @@ caption
\series default \series default
package set the document class option package set the document class option
\series bold \series bold
tablecaptionabove captions=tableheading
\series default \series default
. .
\end_layout \end_layout
@ -33245,6 +33246,121 @@ lstparams "breaklines=true,caption={Lines 10 - 15 of this LyX file},extendedchar
\end_inset \end_inset
\end_layout
\begin_layout Standard
Inserting a formula into a listing can be done the following way:
\end_layout
\begin_layout Enumerate
Open the listings dialog and add
\begin_inset Newline newline
\end_inset
\family sans
mathescape=true
\family default
\begin_inset Newline newline
\end_inset
to the field of the
\family sans
Advanced
\family default
tab.
\end_layout
\begin_layout Enumerate
Create a formula outside the listing
\end_layout
\begin_layout Enumerate
Copy the content of the formula (not the formula inset) to the clipboard
(shortcut
\begin_inset Info
type "shortcut"
arg "copy"
\end_inset
)
\end_layout
\begin_layout Enumerate
In the listing write
\begin_inset Quotes eld
\end_inset
\family sans
$$
\family default
\begin_inset Quotes erd
\end_inset
and copy from the clipboard between the dollar-signs (shortcut
\begin_inset Info
type "shortcut"
arg "paste"
\end_inset
)
\end_layout
\begin_layout Standard
\begin_inset listings
lstparams "language=Python,mathescape=true"
inline false
status open
\begin_layout Plain Layout
\begin_inset Caption
\begin_layout Plain Layout
Example Listing float containing a formula
\end_layout
\end_inset
# Example listing float
\end_layout
\begin_layout Plain Layout
def func(param):
\end_layout
\begin_layout Plain Layout
# $
\backslash
prod_{n=1}^{
\backslash
infty}
\backslash
,
\backslash
frac{1}{x^{2}}$
\end_layout
\begin_layout Plain Layout
pass
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset VSpace bigskip
\end_inset
\end_layout \end_layout
\begin_layout Standard \begin_layout Standard
@ -34392,14 +34508,14 @@ Explanation of Equation
\begin_inset space ~ \begin_inset space ~
\end_inset \end_inset
(
\begin_inset CommandInset ref \begin_inset CommandInset ref
LatexCommand eqref LatexCommand ref
reference "eq:Wgn" reference "eq:Wgn"
\end_inset \end_inset
)
\begin_inset CommandInset label \begin_inset CommandInset label
LatexCommand label LatexCommand label
name "cha:Explanation-of-Equation" name "cha:Explanation-of-Equation"
@ -35022,7 +35138,7 @@ LaTeX-packages ! prettyref
\labelwidthstring Bibliography \labelwidthstring Bibliography
\begin_inset CommandInset bibitem \begin_inset CommandInset bibitem
LatexCommand bibitem LatexCommand bibitem
key "NewInLyX16" key "NewInLyX20"
\end_inset \end_inset
@ -35030,13 +35146,13 @@ key "NewInLyX16"
\begin_inset CommandInset href \begin_inset CommandInset href
LatexCommand href LatexCommand href
name "Wiki page" name "Wiki page"
target "http://wiki.lyx.org/LyX/NewInLyX16" target "http://wiki.lyx.org/LyX/NewInLyX20"
\end_inset \end_inset
about new features in about new features in
\family sans \family sans
LyX 1.6.0 LyX 2.0
\family default \family default
. .
\end_layout \end_layout
@ -35049,30 +35165,6 @@ type "idx"
\end_inset \end_inset
\end_layout
\begin_layout Standard
\begin_inset FloatList figure
\end_inset
\end_layout
\begin_layout Standard
\begin_inset FloatList table
\end_inset
\end_layout
\begin_layout Standard
\begin_inset FloatList algorithm
\end_inset
\end_layout \end_layout
\end_body \end_body

View File

@ -1,5 +1,5 @@
#LyX 2.0.0svn created this file. For more info see http://www.lyx.org/ #LyX 2.0.0svn created this file. For more info see http://www.lyx.org/
\lyxformat 402 \lyxformat 404
\begin_document \begin_document
\begin_header \begin_header
\textclass scrbook \textclass scrbook
@ -28,7 +28,7 @@
\mainmatter } \mainmatter }
% Formatierung von Legenden % Formatierung von Legenden
\usepackage[labelfont={bf,sf}, tableposition=top]{caption}[2004/07/16] \usepackage[labelfont={bf,sf}]{caption}[2004/07/16]
% Befehle, um Legenden neben Tabellen und Abbildungen zu setzen % Befehle, um Legenden neben Tabellen und Abbildungen zu setzen
\usepackage{sidecap} \usepackage{sidecap}
@ -158,7 +158,7 @@
% Damit der Index den Namen "Stichwortverzeichnis" erhält % Damit der Index den Namen "Stichwortverzeichnis" erhält
\addto\captionsngerman{\renewcommand{\indexname}{Stichwortverzeichnis}} \addto\captionsngerman{\renewcommand{\indexname}{Stichwortverzeichnis}}
\end_preamble \end_preamble
\options fleqn,liststotoc,bibtotoc,idxtotoc,BCOR7.5mm,titlepage,tablecaptionabove \options fleqn,bibliography=totoc,index=totoc,BCOR7.5mm,titlepage,captions=tableheading
\use_default_options false \use_default_options false
\maintain_unincluded_children false \maintain_unincluded_children false
\language ngerman \language ngerman
@ -207,6 +207,7 @@
\use_indices false \use_indices false
\paperorientation portrait \paperorientation portrait
\suppress_date false \suppress_date false
\use_refstyle 0
\notefontcolor #0000ff \notefontcolor #0000ff
\index Stichwortverzeichnis \index Stichwortverzeichnis
\shortcut idx \shortcut idx
@ -388,7 +389,7 @@ Um eine Abbildung in Ihr Dokument einzufügen, klicken Sie auf das Symbol
filename ../../images/dialog-show-new-inset_graphics.png filename ../../images/dialog-show-new-inset_graphics.png
scale 70 scale 70
scaleBeforeRotation scaleBeforeRotation
BoundingBox 0bp 6bp 22bp 22bp
\end_inset \end_inset
@ -791,7 +792,7 @@ Wenn Sie auf das Werkzeugleisten-Symbol
filename ../../images/float-insert_figure.png filename ../../images/float-insert_figure.png
scale 70 scale 70
scaleBeforeRotation scaleBeforeRotation
BoundingBox 0bp 6bp 22bp 22bp
\end_inset \end_inset
@ -977,7 +978,7 @@ Marke
filename ../../images/label-insert.png filename ../../images/label-insert.png
scale 70 scale 70
scaleBeforeRotation scaleBeforeRotation
BoundingBox 0bp 6bp 20bp 20bp
\end_inset \end_inset
@ -992,7 +993,7 @@ Querverweis
filename ../../images/dialog-show-new-inset_ref.png filename ../../images/dialog-show-new-inset_ref.png
scale 70 scale 70
scaleBeforeRotation scaleBeforeRotation
BoundingBox 0bp 6bp 22bp 22bp
\end_inset \end_inset
@ -1615,7 +1616,7 @@ Eine Tabelle können Sie mit dem Werkzeugleistenknopf
filename ../../images/tabular-insert.png filename ../../images/tabular-insert.png
scale 70 scale 70
scaleBeforeRotation scaleBeforeRotation
BoundingBox 0bp 6bp 22bp 22bp
\end_inset \end_inset
@ -2737,7 +2738,7 @@ Tabelle
filename ../../images/float-insert_table.png filename ../../images/float-insert_table.png
scale 70 scale 70
scaleBeforeRotation scaleBeforeRotation
BoundingBox 0bp 6bp 22bp 22bp
\end_inset \end_inset
@ -2765,7 +2766,7 @@ Nr:
filename ../../images/tabular-insert.png filename ../../images/tabular-insert.png
scale 70 scale 70
scaleBeforeRotation scaleBeforeRotation
BoundingBox 0bp 6bp 22bp 22bp
\end_inset \end_inset
@ -2896,7 +2897,7 @@ Marke
filename ../../images/label-insert.png filename ../../images/label-insert.png
scale 70 scale 70
scaleBeforeRotation scaleBeforeRotation
BoundingBox 0bp 6bp 20bp 20bp
\end_inset \end_inset
@ -2911,7 +2912,7 @@ Querverweis
filename ../../images/dialog-show-new-inset_ref.png filename ../../images/dialog-show-new-inset_ref.png
scale 70 scale 70
scaleBeforeRotation scaleBeforeRotation
BoundingBox 0bp 6bp 22bp 22bp
\end_inset \end_inset
@ -11122,7 +11123,7 @@ cm ist, würde er in einer Zeile gedruckt werden.
Um zwei Zeilen zu bekommen, wurde ein rechtsbündiger Zeilenumbruch (Tastenkürze Um zwei Zeilen zu bekommen, wurde ein rechtsbündiger Zeilenumbruch (Tastenkürze
l l
\family sans \family sans
Strg-Shift-Enter Strg+Shift+Enter
\family default \family default
) eingefügt. ) eingefügt.
Wenn der Text länger ist, wird er automatisch umgebrochen. Wenn der Text länger ist, wird er automatisch umgebrochen.
@ -11453,7 +11454,7 @@ Um mehrere Zellen einer Zeile zu einer zu verbinden, markieren Sie diese
filename ../../images/tabular-feature_multicolumn.png filename ../../images/tabular-feature_multicolumn.png
scale 70 scale 70
scaleBeforeRotation scaleBeforeRotation
BoundingBox 0bp 6bp 22bp 22bp
\end_inset \end_inset
@ -14965,7 +14966,6 @@ Farbe ! für Text
filename ../../images/dialog-show_character.png filename ../../images/dialog-show_character.png
scale 70 scale 70
scaleBeforeRotation scaleBeforeRotation
BoundingBox 0bp 0bp 20bp 20bp
\end_inset \end_inset
@ -19864,7 +19864,7 @@ Gleitobjekt
filename ../../images/float-insert_figure.png filename ../../images/float-insert_figure.png
scale 70 scale 70
scaleBeforeRotation scaleBeforeRotation
BoundingBox 0bp 6bp 22bp 22bp
\end_inset \end_inset
@ -19873,7 +19873,7 @@ Gleitobjekt
filename ../../images/float-insert_table.png filename ../../images/float-insert_table.png
scale 70 scale 70
scaleBeforeRotation scaleBeforeRotation
BoundingBox 0bp 6bp 22bp 22bp
\end_inset \end_inset
@ -19905,7 +19905,6 @@ reference "abs:Titel-Platzierung"
filename clipart/GleitobjektQt4.png filename clipart/GleitobjektQt4.png
scale 70 scale 70
scaleBeforeRotation scaleBeforeRotation
BoundingBox 0bp 6bp 128bp 22bp
\end_inset \end_inset
@ -19924,7 +19923,7 @@ Vorhandene Abbildungen oder Tabellen können Sie in ein Gleitobjekt packen,
filename ../../images/float-insert_figure.png filename ../../images/float-insert_figure.png
scale 70 scale 70
scaleBeforeRotation scaleBeforeRotation
BoundingBox 0bp 6bp 22bp 22bp
\end_inset \end_inset
@ -19933,7 +19932,7 @@ Vorhandene Abbildungen oder Tabellen können Sie in ein Gleitobjekt packen,
filename ../../images/float-insert_table.png filename ../../images/float-insert_table.png
scale 70 scale 70
scaleBeforeRotation scaleBeforeRotation
BoundingBox 0bp 6bp 22bp 22bp
\end_inset \end_inset
@ -20667,7 +20666,6 @@ Marke
lyxscale 80 lyxscale 80
scale 50 scale 50
scaleBeforeRotation scaleBeforeRotation
BoundingBox 0bp 6bp 76bp 23bp
\end_inset \end_inset
@ -20700,7 +20698,6 @@ Querverweis
lyxscale 80 lyxscale 80
scale 50 scale 50
scaleBeforeRotation scaleBeforeRotation
BoundingBox 0bp 6bp 76bp 23bp
\end_inset \end_inset
@ -23069,7 +23066,7 @@ LaTeX-Pakete ! KOMA-Script
-Dokumentklasse verwendet wird. -Dokumentklasse verwendet wird.
Hier muss die Option Hier muss die Option
\series bold \series bold
tablecaptionabove captions=tableheading
\series default \series default
benutzt werden. benutzt werden.
\end_layout \end_layout
@ -23566,7 +23563,7 @@ caption
\series default \series default
-Paket die Option -Paket die Option
\series bold \series bold
tablecaptionabove captions=tableheading
\series default \series default
benutzen. benutzen.
\end_layout \end_layout
@ -24684,7 +24681,7 @@ Notizen werden mit einem Klick auf
filename ../../images/note-insert.png filename ../../images/note-insert.png
scale 85 scale 85
scaleBeforeRotation scaleBeforeRotation
BoundingBox 0bp 6bp 22bp 22bp
\end_inset \end_inset
@ -24909,7 +24906,7 @@ Wenn Sie auf den Werkzeugleistenknopf
filename ../../images/note-insert.png filename ../../images/note-insert.png
scale 85 scale 85
scaleBeforeRotation scaleBeforeRotation
BoundingBox 0bp 6bp 22bp 22bp
\end_inset \end_inset
@ -33544,6 +33541,118 @@ lstparams "breaklines=true,caption={Zeilen 10 - 15 dieser LyX-Datei},extendedcha
\end_inset \end_inset
\end_layout
\begin_layout Standard
Eine Formel in ein Listing einzufügen ist folgendermaßen möglich:
\end_layout
\begin_layout Enumerate
Öffnen Sie die Listings-Einstellungen und fügen
\begin_inset Newline newline
\end_inset
\family sans
mathescape=true
\family default
\begin_inset Newline newline
\end_inset
in das Feld des Tabs
\family sans
Erweitert
\family default
ein
\end_layout
\begin_layout Enumerate
Erstellen Sie eine Formel außerhalb des Listings
\end_layout
\begin_layout Enumerate
Kopieren Sie den Inhalt der Formel (nicht die Formel-Einfügung) in die Zwischena
blage (Tastenkürzel
\family sans
Ctrl+C
\family default
)
\end_layout
\begin_layout Enumerate
Schreiben sie
\begin_inset Quotes gld
\end_inset
\family sans
$$
\family default
\begin_inset Quotes grd
\end_inset
in das Listing und kopieren sie aus der Zwischenablage zwischen die Dollar-Zeic
hen (Tastenkürzel
\family sans
Ctrl+V
\family default
)
\end_layout
\begin_layout Standard
\begin_inset listings
lstparams "language=Python,mathescape=true"
inline false
status open
\begin_layout Plain Layout
\begin_inset Caption
\begin_layout Plain Layout
Programm-Listing mit einer Formel
\end_layout
\end_inset
# Beispiel-Programm-Listing
\end_layout
\begin_layout Plain Layout
def func(param):
\end_layout
\begin_layout Plain Layout
# $
\backslash
prod_{n=1}^{
\backslash
infty}
\backslash
,
\backslash
frac{1}{x^{2}}$
\end_layout
\begin_layout Plain Layout
pass
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset VSpace bigskip
\end_inset
\end_layout \end_layout
\begin_layout Standard \begin_layout Standard
@ -34275,7 +34384,6 @@ Ansicht
filename ../../images/buffer-view_dvi.png filename ../../images/buffer-view_dvi.png
scale 70 scale 70
scaleBeforeRotation scaleBeforeRotation
BoundingBox 0bp 0bp 20bp 20bp
\end_inset \end_inset
@ -34675,7 +34783,6 @@ Ansicht
filename ../../images/buffer-view_pdf2.png filename ../../images/buffer-view_pdf2.png
scale 70 scale 70
scaleBeforeRotation scaleBeforeRotation
BoundingBox 0bp 0bp 20bp 20bp
\end_inset \end_inset
@ -34699,14 +34806,14 @@ Erklärung der Gleichung
\begin_inset space ~ \begin_inset space ~
\end_inset \end_inset
(
\begin_inset CommandInset ref \begin_inset CommandInset ref
LatexCommand eqref LatexCommand ref
reference "eq:Wgn" reference "eq:Wgn"
\end_inset \end_inset
)
\begin_inset CommandInset label \begin_inset CommandInset label
LatexCommand label LatexCommand label
name "kap:Exläuterung-einer-Gleichung" name "kap:Exläuterung-einer-Gleichung"
@ -35349,7 +35456,7 @@ LaTeX-Pakete ! prettyref
\labelwidthstring Literaturverzeichnis \labelwidthstring Literaturverzeichnis
\begin_inset CommandInset bibitem \begin_inset CommandInset bibitem
LatexCommand bibitem LatexCommand bibitem
key "NewInLyX16" key "NewInLyX20"
\end_inset \end_inset
@ -35357,13 +35464,13 @@ key "NewInLyX16"
\begin_inset CommandInset href \begin_inset CommandInset href
LatexCommand href LatexCommand href
name "Wiki-Seite" name "Wiki-Seite"
target "http://wiki.lyx.org/LyX/NewInLyX16" target "http://wiki.lyx.org/LyX/NewInLyX20"
\end_inset \end_inset
über neue Funktionen in über neue Funktionen in
\family sans \family sans
LyX 1.6.0 LyX 2.0
\family default \family default
. .
\end_layout \end_layout
@ -35376,59 +35483,6 @@ type "idx"
\end_inset \end_inset
\end_layout
\begin_layout Standard
\begin_inset FloatList figure
\end_inset
\end_layout
\begin_layout Standard
\begin_inset FloatList table
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status open
\begin_layout Plain Layout
\backslash
listof{algorithm}{Algorithmenverzeichnis}
\end_layout
\end_inset
\begin_inset Note Note
status collapsed
\begin_layout Plain Layout
siehe Abschnitt
\begin_inset space ~
\end_inset
\begin_inset CommandInset ref
LatexCommand ref
reference "uab:Gleitobjekt-Algorithmen"
\end_inset
für eine Beschreibung
\end_layout
\end_inset
\end_layout \end_layout
\end_body \end_body

View File

@ -1,5 +1,5 @@
#LyX 2.0.0svn created this file. For more info see http://www.lyx.org/ #LyX 2.0.0svn created this file. For more info see http://www.lyx.org/
\lyxformat 401 \lyxformat 404
\begin_document \begin_document
\begin_header \begin_header
\textclass scrbook \textclass scrbook
@ -29,7 +29,7 @@
\mainmatter } \mainmatter }
% provides caption formatting % provides caption formatting
\usepackage[labelfont={bf,sf}, tableposition=top]{caption}[2004/07/16] \usepackage[labelfont={bf,sf}]{caption}[2004/07/16]
% provides commands to set caption % provides commands to set caption
% beside tables/images % beside tables/images
@ -164,7 +164,7 @@
% para traducir la etiqueta listing % para traducir la etiqueta listing
\renewcommand{\lstlistingname}{Listado} \renewcommand{\lstlistingname}{Listado}
\end_preamble \end_preamble
\options fleqn,liststotoc,bibtotoc,idxtotoc,BCOR7.5mm,titlepage,tablecaptionabove \options fleqn,bibliography=totoc,index=totoc,BCOR7.5mm,titlepage,captions=tableheading
\use_default_options false \use_default_options false
\maintain_unincluded_children false \maintain_unincluded_children false
\language spanish \language spanish
@ -213,6 +213,7 @@
\use_indices false \use_indices false
\paperorientation portrait \paperorientation portrait
\suppress_date false \suppress_date false
\use_refstyle 0
\notefontcolor #0000ff \notefontcolor #0000ff
\index Índice \index Índice
\shortcut idx \shortcut idx
@ -22522,7 +22523,7 @@ KOMA-Script
. .
En este caso debe utilizarse la opción de clase de documento En este caso debe utilizarse la opción de clase de documento
\series bold \series bold
tablecaptionabove captions=tableheading
\series default \series default
. .
@ -23016,7 +23017,7 @@ caption
\series default \series default
puedes poner la opción puedes poner la opción
\series bold \series bold
tablecaptionabove captions=tableheading
\series default \series default
de la clase de documento. de la clase de documento.
\end_layout \end_layout
@ -32811,6 +32812,136 @@ lstparams "breaklines=true,caption={Líneas 10 - 15 de este archivo LyX},firstl
\end_inset \end_inset
\end_layout
\begin_layout Standard
\begin_inset VSpace bigskip
\end_inset
\end_layout
\begin_layout Standard
\lang english
Inserting a formula into a listing can be done the following way:
\end_layout
\begin_layout Enumerate
\lang english
Open the listings dialog and add
\begin_inset Newline newline
\end_inset
\family sans
mathescape=true
\family default
\begin_inset Newline newline
\end_inset
to the field of the
\family sans
Advanced
\family default
tab.
\end_layout
\begin_layout Enumerate
\lang english
Create a formula outside the listing
\end_layout
\begin_layout Enumerate
\lang english
Copy the content of the formula (not the formula inset) to the clipboard
(shortcut
\begin_inset Info
type "shortcut"
arg "copy"
\end_inset
)
\end_layout
\begin_layout Enumerate
\lang english
In the listing write
\begin_inset Quotes eld
\end_inset
\family sans
$$
\family default
\begin_inset Quotes erd
\end_inset
and copy from the clipboard between the dollar-signs (shortcut
\begin_inset Info
type "shortcut"
arg "paste"
\end_inset
)
\end_layout
\begin_layout Standard
\begin_inset listings
lstparams "language=Python,mathescape=true"
inline false
status open
\begin_layout Plain Layout
\begin_inset Caption
\begin_layout Plain Layout
Ejemplo de listado de programa flotante
\lang english
containing a formula
\end_layout
\end_inset
# Ejemplo de listado flotante
\end_layout
\begin_layout Plain Layout
def func(param):
\end_layout
\begin_layout Plain Layout
# $
\backslash
prod_{n=1}^{
\backslash
infty}
\backslash
,
\backslash
frac{1}{x^{2}}$
\end_layout
\begin_layout Plain Layout
pass
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset VSpace bigskip \begin_inset VSpace bigskip
\end_inset \end_inset
@ -33871,14 +34002,14 @@ Explicación de la ecuación
\begin_inset space ~ \begin_inset space ~
\end_inset \end_inset
(
\begin_inset CommandInset ref \begin_inset CommandInset ref
LatexCommand eqref LatexCommand ref
reference "eq:Wgn" reference "eq:Wgn"
\end_inset \end_inset
)
\begin_inset CommandInset label \begin_inset CommandInset label
LatexCommand label LatexCommand label
name "cap:Explicación-de-la-Ecuación" name "cap:Explicación-de-la-Ecuación"
@ -34505,7 +34636,7 @@ LaTeX-paquetes ! prettyref
\labelwidthstring Bibliografía \labelwidthstring Bibliografía
\begin_inset CommandInset bibitem \begin_inset CommandInset bibitem
LatexCommand bibitem LatexCommand bibitem
key "NewInLyX16" key "NewInLyX20"
\end_inset \end_inset
@ -34513,7 +34644,7 @@ key "NewInLyX16"
\begin_inset CommandInset href \begin_inset CommandInset href
LatexCommand href LatexCommand href
name "Página wiki" name "Página wiki"
target "http://wiki.lyx.org/LyX/NewInLyX16" target "http://wiki.lyx.org/LyX/NewInLyX20"
\end_inset \end_inset
@ -34523,7 +34654,7 @@ LyX
\begin_inset space ~ \begin_inset space ~
\end_inset \end_inset
1.6.0 2.0
\family default \family default
. .
\end_layout \end_layout
@ -34536,30 +34667,6 @@ type "idx"
\end_inset \end_inset
\end_layout
\begin_layout Standard
\begin_inset FloatList figure
\end_inset
\end_layout
\begin_layout Standard
\begin_inset FloatList table
\end_inset
\end_layout
\begin_layout Standard
\begin_inset FloatList algorithm
\end_inset
\end_layout \end_layout
\end_body \end_body

View File

@ -1,5 +1,5 @@
#LyX 2.0.0svn created this file. For more info see http://www.lyx.org/ #LyX 2.0.0svn created this file. For more info see http://www.lyx.org/
\lyxformat 401 \lyxformat 404
\begin_document \begin_document
\begin_header \begin_header
\textclass scrbook \textclass scrbook
@ -29,7 +29,7 @@
\mainmatter } \mainmatter }
% provides caption formatting % provides caption formatting
\usepackage[labelfont={bf,sf}, tableposition=top]{caption}[2004/07/16] \usepackage[labelfont={bf,sf}]{caption}[2004/07/16]
% provides commands to set caption % provides commands to set caption
% beside tables/images % beside tables/images
@ -158,9 +158,9 @@
{LyX}} {LyX}}
% use normal list environments also in French documents % use normal list environments also in French documents
\StandardLayout \frenchbsetup{StandardLayout}
\end_preamble \end_preamble
\options fleqn,liststotoc,bibtotoc,idxtotoc,BCOR7.5mm,titlepage,tablecaptionabove \options fleqn,bibliography=totoc,index=totoc,BCOR7.5mm,titlepage,captions=tableheading
\use_default_options false \use_default_options false
\maintain_unincluded_children false \maintain_unincluded_children false
\language french \language french
@ -209,6 +209,7 @@
\use_indices false \use_indices false
\paperorientation portrait \paperorientation portrait
\suppress_date false \suppress_date false
\use_refstyle 0
\notefontcolor #0000ff \notefontcolor #0000ff
\index Index \index Index
\shortcut idx \shortcut idx
@ -23272,7 +23273,7 @@ Paquetages LaTeX ! KOMA-Script
. .
Dans ce cas on doit utiliser l'option Dans ce cas on doit utiliser l'option
\series bold \series bold
tablecaptionabove captions=tableheading
\series default \series default
de la classe de document. de la classe de document.
\end_layout \end_layout
@ -23775,7 +23776,7 @@ caption
\series default \series default
l'option l'option
\series bold \series bold
tablecaptionabove captions=tableheading
\series default \series default
de la classe de document. de la classe de document.
\end_layout \end_layout
@ -34121,6 +34122,133 @@ lstparams "breaklines=true,caption={Lignes 10 - 15 de ce fichier LyX},extendedch
\end_inset \end_inset
\end_layout
\begin_layout Standard
\lang english
Inserting a formula into a listing can be done the following way:
\end_layout
\begin_layout Enumerate
\lang english
Open the listings dialog and add
\begin_inset Newline newline
\end_inset
\family sans
mathescape=true
\family default
\begin_inset Newline newline
\end_inset
to the field of the
\family sans
Advanced
\family default
tab.
\end_layout
\begin_layout Enumerate
\lang english
Create a formula outside the listing
\end_layout
\begin_layout Enumerate
\lang english
Copy the content of the formula (not the formula inset) to the clipboard
(shortcut
\begin_inset Info
type "shortcut"
arg "copy"
\end_inset
)
\end_layout
\begin_layout Enumerate
\lang english
In the listing write
\begin_inset Quotes eld
\end_inset
\family sans
$$
\family default
\begin_inset Quotes erd
\end_inset
and copy from the clipboard between the dollar-signs (shortcut
\begin_inset Info
type "shortcut"
arg "paste"
\end_inset
)
\end_layout
\begin_layout Standard
\begin_inset listings
lstparams "language=Python,mathescape=true"
inline false
status open
\begin_layout Plain Layout
\begin_inset Caption
\begin_layout Plain Layout
Exemple de listing flottant
\lang english
containing a formula
\end_layout
\end_inset
# Exemple de listing flottant
\end_layout
\begin_layout Plain Layout
def func(param):
\end_layout
\begin_layout Plain Layout
# $
\backslash
prod_{n=1}^{
\backslash
infty}
\backslash
,
\backslash
frac{1}{x^{2}}$
\end_layout
\begin_layout Plain Layout
pass
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset VSpace bigskip
\end_inset
\end_layout \end_layout
\begin_layout Standard \begin_layout Standard
@ -35270,14 +35398,14 @@ Explication de l' Équation
\begin_inset space ~ \begin_inset space ~
\end_inset \end_inset
(
\begin_inset CommandInset ref \begin_inset CommandInset ref
LatexCommand eqref LatexCommand ref
reference "eq:Wgn" reference "eq:Wgn"
\end_inset \end_inset
)
\begin_inset CommandInset label \begin_inset CommandInset label
LatexCommand label LatexCommand label
name "cha:Explication-de-l'Equation" name "cha:Explication-de-l'Equation"
@ -35906,7 +36034,7 @@ Paquetages LaTeX ! prettyref
\labelwidthstring Bibliographie \labelwidthstring Bibliographie
\begin_inset CommandInset bibitem \begin_inset CommandInset bibitem
LatexCommand bibitem LatexCommand bibitem
key "NewInLyX16" key "NewInLyX20"
\end_inset \end_inset
@ -35914,13 +36042,13 @@ key "NewInLyX16"
\begin_inset CommandInset href \begin_inset CommandInset href
LatexCommand href LatexCommand href
name "Page Wiki" name "Page Wiki"
target "http://wiki.lyx.org/LyX/NewInLyX16" target "http://wiki.lyx.org/LyX/NewInLyX20"
\end_inset \end_inset
au sujet des nouveautés de au sujet des nouveautés de
\family sans \family sans
LyX 1.6.0 LyX 2.0
\family default \family default
. .
\end_layout \end_layout
@ -35933,59 +36061,6 @@ type "idx"
\end_inset \end_inset
\end_layout
\begin_layout Standard
\begin_inset FloatList figure
\end_inset
\end_layout
\begin_layout Standard
\begin_inset FloatList table
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status open
\begin_layout Plain Layout
\backslash
listof{algorithm}{Liste des Algorithmes}
\end_layout
\end_inset
\begin_inset Note Note
status collapsed
\begin_layout Plain Layout
voir la section
\begin_inset space ~
\end_inset
\begin_inset CommandInset ref
LatexCommand ref
reference "sub:Flottant-d'Algorithme"
\end_inset
pour une description
\end_layout
\end_inset
\end_layout \end_layout
\end_body \end_body

View File

@ -1,5 +1,5 @@
#LyX 2.0.0svn created this file. For more info see http://www.lyx.org/ #LyX 2.0.0svn created this file. For more info see http://www.lyx.org/
\lyxformat 401 \lyxformat 404
\begin_document \begin_document
\begin_header \begin_header
\textclass jbook \textclass jbook
@ -35,7 +35,7 @@
\mainmatter } \mainmatter }
% provides caption formatting % provides caption formatting
\usepackage[labelfont={bf,sf}, tableposition=top]{caption}[2004/07/16] \usepackage[labelfont={bf,sf}]{caption}[2004/07/16]
% provides commands to set caption % provides commands to set caption
% beside tables/images % beside tables/images
@ -170,7 +170,7 @@
\DeclareCaptionOption{large}[]{\def\captionfont{\large}} \DeclareCaptionOption{large}[]{\def\captionfont{\large}}
\DeclareCaptionOption{Large}[]{\def\captionfont{\Large}} \DeclareCaptionOption{Large}[]{\def\captionfont{\Large}}
\end_preamble \end_preamble
\options fleqn,liststotoc,bibtotoc,idxtotoc,BCOR7.5mm,titlepage,tablecaptionabove \options fleqn,bibliography=totoc,index=totoc,BCOR7.5mm,titlepage,captions=tableheading
\use_default_options false \use_default_options false
\maintain_unincluded_children false \maintain_unincluded_children false
\language japanese \language japanese
@ -219,6 +219,7 @@
\use_indices false \use_indices false
\paperorientation portrait \paperorientation portrait
\suppress_date false \suppress_date false
\use_refstyle 0
\notefontcolor #0000ff \notefontcolor #0000ff
\index 索引 \index 索引
\shortcut idx \shortcut idx
@ -20932,7 +20933,7 @@ LaTeXぱっけーじ@LaTeXパッケージ ! KOMA-script
が使われているときには、無効になります。この場合には、文書クラスオプション が使われているときには、無効になります。この場合には、文書クラスオプション
\series bold \series bold
tablecaptionabove captions=tableheading
\series default \series default
を指定しなくてはなりません。 を指定しなくてはなりません。
\end_layout \end_layout
@ -21384,7 +21385,7 @@ caption
\series default \series default
パッケージにオプションを与える代わりに、文書クラスオプション パッケージにオプションを与える代わりに、文書クラスオプション
\series bold \series bold
tablecaptionabove captions=tableheading
\series default \series default
を設定することもできます。 を設定することもできます。
\end_layout \end_layout
@ -30411,6 +30412,129 @@ lstparams "breaklines=true,caption={Lines 10 - 15 of this LyX file},extendedchar
\end_inset \end_inset
\end_layout
\begin_layout Standard
\lang english
Inserting a formula into a listing can be done the following way:
\end_layout
\begin_layout Enumerate
\lang english
Open the listings dialog and add
\begin_inset Newline newline
\end_inset
\family sans
mathescape=true
\family default
\begin_inset Newline newline
\end_inset
to the field of the
\family sans
Advanced
\family default
tab.
\end_layout
\begin_layout Enumerate
\lang english
Create a formula outside the listing
\end_layout
\begin_layout Enumerate
\lang english
Copy the content of the formula (not the formula inset) to the clipboard
(shortcut
\begin_inset Info
type "shortcut"
arg "copy"
\end_inset
)
\end_layout
\begin_layout Enumerate
\lang english
In the listing write
\begin_inset Quotes eld
\end_inset
\family sans
$$
\family default
\begin_inset Quotes erd
\end_inset
and copy from the clipboard between the dollar-signs (shortcut
\begin_inset Info
type "shortcut"
arg "paste"
\end_inset
)
\end_layout
\begin_layout Standard
\begin_inset listings
lstparams "language=Python,mathescape=true"
inline false
status open
\begin_layout Plain Layout
\begin_inset Caption
\begin_layout Plain Layout
\lang english
Example Listing float containing a formula
\end_layout
\end_inset
# Example listing float
\end_layout
\begin_layout Plain Layout
def func(param):
\end_layout
\begin_layout Plain Layout
# $
\backslash
prod_{n=1}^{
\backslash
infty}
\backslash
,
\backslash
frac{1}{x^{2}}$
\end_layout
\begin_layout Plain Layout
pass
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset VSpace bigskip
\end_inset
\end_layout \end_layout
\begin_layout Standard \begin_layout Standard
@ -31398,14 +31522,14 @@ PDF
\end_layout \end_layout
\begin_layout Chapter \begin_layout Chapter
(
\begin_inset CommandInset ref \begin_inset CommandInset ref
LatexCommand eqref LatexCommand ref
reference "eq:Wgn" reference "eq:Wgn"
\end_inset \end_inset
式の説明 )式の説明
\begin_inset CommandInset label \begin_inset CommandInset label
LatexCommand label LatexCommand label
name "cha:式の説明" name "cha:式の説明"
@ -31975,19 +32099,19 @@ LaTeXぱっけーじ@LaTeXパッケージ ! sidecap
\labelwidthstring 参考文献 \labelwidthstring 参考文献
\begin_inset CommandInset bibitem \begin_inset CommandInset bibitem
LatexCommand bibitem LatexCommand bibitem
key "NewInLyX16" key "NewInLyX20"
\end_inset \end_inset
\family sans \family sans
LyX 1.6.0 LyX 2.0
\family default \family default
の新機能に関する の新機能に関する
\begin_inset CommandInset href \begin_inset CommandInset href
LatexCommand href LatexCommand href
name "Wikiページ" name "Wikiページ"
target "http://wiki.lyx.org/LyX/NewInLyX16" target "http://wiki.lyx.org/LyX/NewInLyX20"
\end_inset \end_inset
@ -32002,30 +32126,6 @@ type "idx"
\end_inset \end_inset
\end_layout
\begin_layout Standard
\begin_inset FloatList figure
\end_inset
\end_layout
\begin_layout Standard
\begin_inset FloatList table
\end_inset
\end_layout
\begin_layout Standard
\begin_inset FloatList algorithm
\end_inset
\end_layout \end_layout
\end_body \end_body