]> git.lyx.org Git - lyx.git/blobdiff - lib/doc/Customization.lyx
Correct description of layout translation.
[lyx.git] / lib / doc / Customization.lyx
index efb7a73ce7545a2e8b2702498ae36b772fb21d9a..892261caa7b5e3bb88d0c41b1f6c2f6bdc61f294 100644 (file)
@@ -126,11 +126,12 @@ End
 \papercolumns 1
 \papersides 2
 \paperpagestyle headings
-\tracking_changes false
+\tracking_changes true
 \output_changes false
 \html_math_output 0
 \html_css_as_file 0
 \html_be_strict true
+\author -195340706 "Georg Baum" 
 \end_header
 
 \begin_body
@@ -977,6 +978,40 @@ languages
 \end_inset
 
  this file contains a list of all the languages currently supported by LyX.
+\change_inserted -195340706 1334775793
+
+\end_layout
+
+\begin_layout Labeling
+\labelwidthstring 00.00.0000
+
+\change_inserted -195340706 1334775793
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\change_inserted -195340706 1334775793
+layouttranslations
+\end_layout
+
+\end_inset
+
+ this file contains translations for internationalized paragraph styles
+ (see sec.
+\begin_inset space \thinspace{}
+\end_inset
+
+
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sub:I18n"
+
+\end_inset
+
+).
+\change_unchanged
+
 \end_layout
 
 \begin_layout Section
@@ -1461,6 +1496,43 @@ Edit externally
  in the appearing context menu.
 \end_layout
 
+\begin_layout Standard
+
+\change_inserted -195340706 1329851811
+The 
+\begin_inset Flex MenuItem
+status collapsed
+
+\begin_layout Plain Layout
+MIME
+\end_layout
+
+\end_inset
+
+ type of a format is optional, but if it is specified, it must be unique
+ across all formats.
+ It is used to detect files of this format from the file contents.
+ For some important file formats there is no MIME type officially registered
+ with the 
+\begin_inset CommandInset href
+LatexCommand href
+name "IANA"
+target "http://www.iana.org/assignments/media-types/"
+
+\end_inset
+
+.
+ Therefore LyX uses the extended list of MIME types as specified by 
+\begin_inset CommandInset href
+LatexCommand href
+name "freedesktop.org"
+target "http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec"
+
+\end_inset
+
+.
+\end_layout
+
 \begin_layout Standard
 The 
 \begin_inset Flex MenuItem
@@ -7805,6 +7877,57 @@ EndPreamble
 \end_inset
 
 
+\begin_inset Quotes erd
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Description
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+AddToHTMLStyles
+\end_layout
+
+\end_inset
+
+ Adds CSS styling information.
+ This will either be output in a 
+\begin_inset Quotes eld
+\end_inset
+
+
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+<style>
+\end_layout
+
+\end_inset
+
+
+\begin_inset Quotes erd
+\end_inset
+
+ block or, if the user has so chosen, to a separate CSS file.Must end with
+\begin_inset Quotes eld
+\end_inset
+
+
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+EndStyles
+\end_layout
+
+\end_inset
+
+
 \begin_inset Quotes erd
 \end_inset
 
@@ -8323,6 +8446,88 @@ EndPreamble
 \end_inset
 
 
+\begin_inset Quotes erd
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Description
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+HTMLStyles
+\end_layout
+
+\end_inset
+
+ Sets CSS styling information.
+ This will either be output in a 
+\begin_inset Quotes eld
+\end_inset
+
+
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+<style>
+\end_layout
+
+\end_inset
+
+
+\begin_inset Quotes erd
+\end_inset
+
+ block or, if the user has so chosen, to a separate CSS file.
+ Note that this will completely override any prior 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+HTMLStyles
+\end_layout
+
+\end_inset
+
+ or 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+AddToHTMLStyles
+\end_layout
+
+\end_inset
+
+ declarations.
+ (Use 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+AddToHTMLStyles
+\end_layout
+
+\end_inset
+
+ if you just want to add material.) Must end with 
+\begin_inset Quotes eld
+\end_inset
+
+
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+EndStyles
+\end_layout
+
+\end_inset
+
+
 \begin_inset Quotes erd
 \end_inset
 
@@ -9777,13 +9982,6 @@ CopyStyle
 \end_inset
 
  
-\begin_inset CommandInset label
-LatexCommand label
-name "des:CopyStyle"
-
-\end_inset
-
-
 \begin_inset Flex Code
 status collapsed
 
@@ -10314,14 +10512,7 @@ KeepEmpty
 
 \end_inset
 
-\begin_inset CommandInset label
-LatexCommand label
-name "des:KeepEmpty"
-
-\end_inset
-
-[
+ [
 \begin_inset Flex Code
 status collapsed
 
@@ -11146,14 +11337,7 @@ LatexType
 
 \end_inset
 
-\begin_inset CommandInset label
-LatexCommand label
-name "des:LatexType"
-
-\end_inset
-
-[
+ [
 \begin_inset Flex Code
 status collapsed
 
@@ -11364,16 +11548,8 @@ LabelWidthString
 status collapsed
 
 \begin_layout Plain Layout
-
-\bar under
-Edit
-\bar default
-\SpecialChar \menuseparator
-
-\bar under
-P
-\bar default
-aragraph
+Edit\SpecialChar \menuseparator
+Paragraph
 \begin_inset space ~
 \end_inset
 
@@ -11901,13 +12077,6 @@ status collapsed
 ParbreakIsNewline
 \end_layout
 
-\end_inset
-
-
-\begin_inset CommandInset label
-LatexCommand label
-name "des:ParbreakIsNewline"
-
 \end_inset
 
  [
@@ -12148,14 +12317,7 @@ PassThru
 
 \end_inset
 
-\begin_inset CommandInset label
-LatexCommand label
-name "des:PassThru"
-
-\end_inset
-
-[
+ [
 \begin_inset Flex Code
 status collapsed
 
@@ -12191,14 +12353,7 @@ Preamble
 
 \end_inset
 
-\begin_inset CommandInset label
-LatexCommand label
-name "des:Preamble"
-
-\end_inset
-
-Information to be included in the LaTeX preamble when this style is used.
+ Information to be included in the LaTeX preamble when this style is used.
  Used to define macros, load packages, etc., required by this particular
  style.
  Must end with 
@@ -12310,14 +12465,7 @@ string
 
 \end_inset
 
-] 
-\begin_inset CommandInset label
-LatexCommand label
-name "des:Requires"
-
-\end_inset
-
-Whether the style requires the feature 
+] Whether the style requires the feature 
 \begin_inset Flex Code
 status collapsed
 
@@ -12914,8 +13062,25 @@ babel
 
 \begin_layout Standard
 One important point to note here is that the translations are provided by
- LyX itself, through the same mechanism it uses for internationalization
- of the user interface.
+ LyX itself, through the 
+\change_inserted -195340706 1334775793
+file 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\change_inserted -195340706 1334775793
+layouttranslations
+\end_layout
+
+\end_inset
+
+
+\change_deleted -195340706 1334775793
+same mechanism it uses for internationalization of the user interface
+\change_unchanged
+.
  This means, in effect, that 
 \begin_inset Flex Code
 status collapsed
@@ -12938,9 +13103,34 @@ BabelPreamble
 
  are really only of use in layout files that are provided with LyX, since
  text entered in user-created layout files will not be seen by LyX's internation
-alization routines.
+alization routines
+\change_inserted -195340706 1334775793
+ unless the 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\change_inserted -195340706 1334775793
+layouttranslations
+\end_layout
+
+\end_inset
+
+ file is modified accordingly
+\change_unchanged
+.
  That said, however, any layout created with the intention that it will
  be included with LyX should use these tags where appropriate.
+
+\change_inserted -195340706 1334775793
+ Please note that the paragraph style translations provided by LyX will
+ never change with a minor update (e.g.
+ from version 2.1.x to 2.1.y).
+ It is however quite likely that a major update (e.g.
+ from 2.0.x to 2.1.y) will introduce new translations or corrections.
+\change_unchanged
+
 \end_layout
 
 \begin_layout Subsection
@@ -14141,11 +14331,38 @@ InsetLayout
 \end_layout
 
 \begin_layout Description
+
+\change_inserted -195340706 1333913893
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-BgColor
+BabelPreamble
+\end_layout
+
+\end_inset
+
+ Preamble for changing languages.
+ See section
+\begin_inset space ~
+\end_inset
+
+
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sub:I18n"
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Description
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+BgColor
 \end_layout
 
 \end_inset
@@ -14211,14 +14428,18 @@ CopyStyle
 
 \end_inset
 
- As with paragraph styles (see page 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "des:CopyStyle"
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+[string]
+\end_layout
 
 \end_inset
 
-).
+ Copies all the features of an existing style into the current one.
 \end_layout
 
 \begin_layout Description
@@ -14573,14 +14794,46 @@ FreeSpacing
 
 \end_inset
 
- As with paragraph styles (see page 
-\begin_inset CommandInset ref
-LatexCommand pageref
-reference "des:FreeSpacing"
+ [
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\emph on
+0
+\end_layout
 
 \end_inset
 
-).
+, 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+1
+\end_layout
+
+\end_inset
+
+] Usually LyX doesn't allow you to insert more than one space between words,
+ since a space is considered as the separation between two words, not a
+ character or symbol of its own.
+ This is a very fine thing but sometimes annoying, for example, when typing
+ program code or plain LaTeX code.
+ For this reason, 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+FreeSpacing
+\end_layout
+
+\end_inset
+
+ can be enabled.
+ Note that LyX will create protected blanks for the additional blanks when
+ in another mode than LaTeX-mode.
  Default is false.
 \end_layout
 
@@ -14655,14 +14908,34 @@ KeepEmpty
 
 \end_inset
 
- As with paragraph styles (see page 
-\begin_inset CommandInset ref
-LatexCommand pageref
-reference "des:KeepEmpty"
+ [
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\emph on
+0
+\end_layout
 
 \end_inset
 
-).
+, 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+1
+\end_layout
+
+\end_inset
+
+] Usually LyX does not allow you to leave a paragraph empty, since it would
+ lead to empty LaTeX output.
+ There are some cases where this could be desirable however: in a letter
+ template, the required fields can be provided as empty fields, so that
+ people do not forget them; in some special classes, a style can be used
+ as some kind of break, which does not contain actual text.
  Default is false.
 \end_layout
 
@@ -14736,6 +15009,33 @@ Branch
 ) modify this label on the fly.
 \end_layout
 
+\begin_layout Description
+
+\change_inserted -195340706 1333913893
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+LangPreamble
+\end_layout
+
+\end_inset
+
+ Language dependent preamble.
+ See section
+\begin_inset space ~
+\end_inset
+
+
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sub:I18n"
+
+\end_inset
+
+.
+\end_layout
+
 \begin_layout Description
 \begin_inset Flex Code
 status collapsed
@@ -14794,16 +15094,268 @@ LatexType
 
 \end_inset
 
- As with paragraph styles (see page 
-\begin_inset CommandInset ref
-LatexCommand pageref
-reference "des:LatexType"
+ [
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\emph on
+Paragraph
+\emph default
+, Command, Environment, Item_Environment,
+\end_layout
 
 \end_inset
 
-).
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+List_Environment, Bib_Environment
+\end_layout
+
+\end_inset
+
+] How the style should be translated into LaTeX.
+\begin_inset Foot
+status collapsed
+
+\begin_layout Plain Layout
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+LatexType
+\end_layout
+
+\end_inset
+
+ is perhaps a bit misleading, since these rules apply to SGML classes, too.
+ Visit the SGML class files for specific examples.
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_deeper
+\begin_layout Itemize
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+Paragraph
+\end_layout
+
+\end_inset
+
+ means nothing special.
+\end_layout
+
+\begin_layout Itemize
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+Command
+\end_layout
+
+\end_inset
+
+ means 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\backslash
+
+\emph on
+LatexName
+\emph default
+{\SpecialChar \ldots{}
+}
+\end_layout
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Itemize
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+Environment
+\end_layout
+
+\end_inset
+
+ means 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\backslash
+begin{
+\emph on
+LatexName
+\emph default
+}\SpecialChar \ldots{}
+
+\backslash
+end{
+\emph on
+LatexName
+\emph default
+}
+\end_layout
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Itemize
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+Item_Environment
+\end_layout
+
+\end_inset
+
+ is the same as 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+Environment
+\end_layout
+
+\end_inset
+
+, except that an 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\backslash
+item
+\end_layout
+
+\end_inset
+
+ is generated for each paragraph of this environment.
+\end_layout
+
+\begin_layout Itemize
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+List_Environment
+\end_layout
+
+\end_inset
+
+ is the same as 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+Item_Environment
+\end_layout
+
+\end_inset
+
+, except that 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+LabelWidthString
+\end_layout
+
+\end_inset
+
+ is passed as an argument to the environment.
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+LabelWidthString
+\end_layout
+
+\end_inset
+
+ can be defined in the 
+\begin_inset Flex MenuItem
+status collapsed
+
+\begin_layout Plain Layout
+
+\bar under
+Edit
+\bar default
+\SpecialChar \menuseparator
+
+\bar under
+P
+\bar default
+aragraph
+\begin_inset space ~
+\end_inset
+
+settings
+\end_layout
+
+\end_inset
+
+ dialog.
+\end_layout
+
+\begin_layout Standard
+Putting the last few things together, the LaTeX output will be either: 
+\end_layout
+
+\begin_layout LyX-Code
+
+\backslash
+latexname[latexparam]{\SpecialChar \ldots{}
+}
+\end_layout
+
+\begin_layout Standard
+or: 
 \end_layout
 
+\begin_layout LyX-Code
+
+\backslash
+begin{latexname}[latexparam] \SpecialChar \ldots{}
+\backslash
+end{latexname}.
+\end_layout
+
+\begin_layout Standard
+depending upon the LaTeX type.
+\end_layout
+
+\end_deeper
 \begin_layout Description
 \begin_inset Flex Code
 status collapsed
@@ -15071,14 +15623,18 @@ status collapsed
 
 \end_inset
 
-] As with paragraph styles (see page 
-\begin_inset CommandInset ref
-LatexCommand pageref
-reference "des:ParbreakIsNewline"
+] Indicates that paragraphs will not be separated by an empty line in LaTeX
+ output, but only by a line break; together with 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+PassThru 1
+\end_layout
 
 \end_inset
 
-).
+, this allows to emulate a plain text editor (like the ERT inset).
  Default is false.
 \end_layout
 
@@ -15104,7 +15660,7 @@ status collapsed
 
 \end_inset
 
-,
+, 
 \begin_inset Flex Code
 status collapsed
 
@@ -15114,15 +15670,8 @@ status collapsed
 
 \end_inset
 
-] As with paragraph styles (see page 
-\begin_inset CommandInset ref
-LatexCommand pageref
-reference "des:PassThru"
-
-\end_inset
-
-).
- Default is false.
+] Whether the contents of this paragraph should be output in raw form, meaning
+ without special translations that LaTeX would require.
 \end_layout
 
 \begin_layout Description
@@ -15135,14 +15684,28 @@ Preamble
 
 \end_inset
 
- As with paragraph styles (see page 
-\begin_inset CommandInset ref
-LatexCommand pageref
-reference "des:Preamble"
+ Information to be included in the LaTeX preamble when this style is used.
+ Used to define macros, load packages, etc., required by this particular
+ style.
+ Must end with 
+\begin_inset Quotes eld
+\end_inset
+
+
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+EndPreamble
+\end_layout
 
 \end_inset
 
-).
+
+\begin_inset Quotes erd
+\end_inset
+
+.
 \end_layout
 
 \begin_layout Description
@@ -15189,14 +15752,36 @@ string
 
 \end_inset
 
-] As with paragraph styles (see page 
+] Whether the style requires the feature 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+string
+\end_layout
+
+\end_inset
+
+.
+ See the description of 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+Provides
+\end_layout
+
+\end_inset
+
+ above (page 
 \begin_inset CommandInset ref
 LatexCommand pageref
-reference "des:Requires"
+reference "des:FreeSpacing"
 
 \end_inset
 
-).
+) for information on `features'.
 \end_layout
 
 \begin_layout Description