]> git.lyx.org Git - lyx.git/blobdiff - lib/doc/Customization.lyx
doc files: port recent changes to trunk
[lyx.git] / lib / doc / Customization.lyx
index 8d5d5a065e2abcb0eab003b445ca39d1fe48a143..b27589413474ff16263a67834e9853270bd84cf1 100644 (file)
@@ -1,5 +1,5 @@
-#LyX 2.0.0svn created this file. For more info see http://www.lyx.org/
-\lyxformat 410
+#LyX 2.0 created this file. For more info see http://www.lyx.org/
+\lyxformat 413
 \begin_document
 \begin_header
 \textclass scrbook
@@ -46,8 +46,8 @@ logicalmkup
 \end_modules
 \maintain_unincluded_children false
 \begin_local_layout
-Format 7
-InsetLayout CharStyle:MenuItem
+Format 35
+InsetLayout Flex:MenuItem
 LyxType               charstyle
 LabelString           menu
 LatexType             command
@@ -70,6 +70,7 @@ End
 #End
 \end_local_layout
 \language english
+\language_package default
 \inputencoding auto
 \fontencoding global
 \font_roman default
@@ -136,13 +137,14 @@ End
 \tracking_changes false
 \output_changes false
 \html_math_output 0
+\html_css_as_file 0
 \html_be_strict true
 \end_header
 
 \begin_body
 
 \begin_layout Title
-NCustomizing LyX: Features for the Advanced User
+Customizing LyX: Features for the Advanced User
 \end_layout
 
 \begin_layout Author
@@ -229,7 +231,7 @@ on, installing new LaTeX classes and LyX layouts, etc.
 
 \begin_layout Standard
 \begin_inset Branch OutDated
-status open
+status collapsed
 
 \begin_layout Standard
 Information from previous versions of this document that now seems to be
@@ -6206,6 +6208,98 @@ usly working on actual documents
  syntax errors and the like in your module file could cause strange behavior.
 \end_layout
 
+\begin_layout Subsubsection
+Local Layout
+\end_layout
+
+\begin_layout Standard
+Modules are to LyX as packages are to LaTeX.
+ Sometimes, however, you find yourself wanting a specific inset or character
+ style just for one document and writing a module that will also be available
+ to other documents makes little sense.
+ What you need is LyX's 
+\begin_inset Quotes eld
+\end_inset
+
+Local Layout
+\begin_inset Quotes erd
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Standard
+You will find it under 
+\family sans
+Document\SpecialChar \menuseparator
+Settings\SpecialChar \menuseparator
+Local Layout
+\family default
+.
+ The large text box allows you to enter anything that you might enter in
+ a layout file or module.
+ You can think of a document's local layout, in fact, as a module that belongs
+ just to it.
+ So, in particular, you must enter a 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+Format
+\end_layout
+
+\end_inset
+
+ tag.
+ Any format is acceptable, but one would normally use the format current
+ at the time.
+ (In LyX 2.0, the current layout format is 35.) You should be aware that local
+ layout is not supported by versions of LyX prior to 1.6, so you should not
+ use it if you want to be able to export your document to LyX 1.5 or earlier
+ (without, that is, losing the local layout information).
+ If you wish to be able to export to 1.6---local layout is supported in 1.6,
+ though there is no UI for it---then you should use format 11 and, of course,
+ use only layout constructs that were available in LyX 1.6.
+\end_layout
+
+\begin_layout Standard
+When you have entered something in the 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+Local Layout
+\end_layout
+
+\end_inset
+
+ pane, LyX will enable the 
+\begin_inset Quotes eld
+\end_inset
+
+Validate
+\begin_inset Quotes erd
+\end_inset
+
+ button at the bottom.
+ Clicking this button will cause LyX to determine whether what you have
+ entered is valid layout information for the chosen format.
+ LyX will report the result but, unfortunately, will not tell you what errors
+ there might have been.
+ These will be written to the terminal, however, if LyX is started from
+ a terminal.
+ You will not be permitted to save your local layout until you have entered
+ something valid.
+\end_layout
+
+\begin_layout Standard
+The warnings at the end of the previous section apply here, too.
+ Do not play with local layout while you are actually working, especially
+ if you have not saved your document.
+ That said, using local layout with a test document can be a very convenient
+ way to try out layout ideas, or even to start developing a module.
+\end_layout
+
 \begin_layout Subsection
 Layout for 
 \begin_inset Flex MenuItem
@@ -7402,7 +7496,8 @@ status collapsed
 
 \begin_layout Plain Layout
 Document\SpecialChar \menuseparator
-Settings
+Settings\SpecialChar \menuseparator
+Modules
 \end_layout
 
 \end_inset
@@ -7457,7 +7552,19 @@ to
 \end_layout
 
 \begin_layout Standard
-The module declaration should then be followed by lines like the following:
+The module declaration should then be followed by lines like the following
+\begin_inset Foot
+status collapsed
+
+\begin_layout Plain Layout
+Preferably in English if the module should be published with LyX.
+ This description will appear in the list of messages to be translated and
+ will be thus translated with the next interface update.
+\end_layout
+
+\end_inset
+
+:
 \end_layout
 
 \begin_layout LyX-Code
@@ -7499,7 +7606,8 @@ status collapsed
 
 \begin_layout Plain Layout
 Document\SpecialChar \menuseparator
-Settings
+Settings\SpecialChar \menuseparator
+Modules
 \end_layout
 
 \end_inset
@@ -7578,7 +7686,7 @@ somemodule.module
 \end_layout
 
 \begin_layout Subsection
-File format
+Format number
 \end_layout
 
 \begin_layout Standard
@@ -9455,7 +9563,7 @@ A paragraph style description looks like this:
 status collapsed
 
 \begin_layout Plain Layout
-Note that this will either define a new layout or modify an existing one.
+Note that this will either define a new style or modify an existing one.
 \end_layout
 
 \end_inset
@@ -9620,8 +9728,8 @@ Note that a `float' here is a real number, such as: 1.5.
 \end_inset
 
  The vertical space with which the last of a chain of paragraphs with this
layout is separated from the following paragraph.
- If the next paragraph has another layout, the separations are not simply
style is separated from the following paragraph.
+ If the next paragraph has another style, the separations are not simply
  added, but the maximum is taken.
 \end_layout
 
@@ -9646,7 +9754,7 @@ status collapsed
 \end_inset
 
  The category for this style.
- This is used to group related styles in the Layout combobox on the toolbar.
+ This is used to group related styles in the style combobox on the toolbar.
  Any string can be used, but you may want to use existing categories with
  your own styles.
  
@@ -9895,118 +10003,6 @@ EndLabelType
 
 .
  
-\end_layout
-
-\begin_layout Description
-\begin_inset Flex Code
-status collapsed
-
-\begin_layout Plain Layout
-Fill_Bottom
-\end_layout
-
-\end_inset
-
- [
-\begin_inset Flex Code
-status collapsed
-
-\begin_layout Plain Layout
-
-\emph on
-0
-\emph default
-,1
-\end_layout
-
-\end_inset
-
-] Similar to 
-\begin_inset Flex Code
-status collapsed
-
-\begin_layout Plain Layout
-Fill_Top
-\end_layout
-
-\end_inset
-
-.
-\end_layout
-
-\begin_layout Description
-\begin_inset Flex Code
-status collapsed
-
-\begin_layout Plain Layout
-Fill_Top
-\end_layout
-
-\end_inset
-
- [
-\begin_inset Flex Code
-status collapsed
-
-\begin_layout Plain Layout
-
-\emph on
-0
-\emph default
-,1
-\end_layout
-
-\end_inset
-
-] With this parameter the 
-\begin_inset Flex MenuItem
-status collapsed
-
-\begin_layout Plain Layout
-Fill
-\end_layout
-
-\end_inset
-
- value of the 
-\begin_inset Quotes eld
-\end_inset
-
-Vertical space above
-\begin_inset Quotes erd
-\end_inset
-
- list of the 
-\begin_inset Flex MenuItem
-status collapsed
-
-\begin_layout Plain Layout
-Edit\SpecialChar \menuseparator
-Paragraph
-\begin_inset space ~
-\end_inset
-
-Settings
-\end_layout
-
-\end_inset
-
- dialog can be set when initializing a paragraph with this style.
-\begin_inset Foot
-status collapsed
-
-\begin_layout Plain Layout
-
-\emph on
-Note from Jean-Marc:
-\emph default
- I'm not sure that this setting has much use, and it should probably be
- removed in later versions.
-\end_layout
-
-\end_inset
-
 \end_layout
 
 \begin_layout Description
@@ -10173,11 +10169,11 @@ status collapsed
 
 \end_inset
 
- If 1, marks the layout as to be included in the document preamble rather
+ If 1, marks the style as to be included in the document preamble rather
  than in the document body.
  This is useful for document classes that want such information as the title
  and author to appear in the preamble.
- Note that this works only for layouts for which the 
+ Note that this works only for styles for which the 
 \begin_inset Flex Code
 status collapsed
 
@@ -10230,7 +10226,7 @@ status collapsed
 
 \end_inset
 
- If 1, marks the layout as being part of a title block (see also the 
+ If 1, marks the style as being part of a title block (see also the 
 \begin_inset Flex Code
 status collapsed
 
@@ -10273,8 +10269,8 @@ float=0
 
 \end_inset
 
-] This provides extra space between paragraphs that have the same layout.
- If you put other layouts into an environment, each is separated with the
+] This provides extra space between paragraphs that have the same style.
+ If you put other styles into an environment, each is separated with the
  environment's 
 \begin_inset Flex Code
 status collapsed
@@ -10359,7 +10355,7 @@ status collapsed
  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 layout can be used
+ 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.
 \end_layout
 
@@ -10451,7 +10447,7 @@ Counter
 \end_inset
 
 .
- In that case, the counter will be stepped each time the layout appears.
+ In that case, the counter will be stepped each time the style appears.
  
 \begin_inset Newline newline
 \end_inset
@@ -10895,7 +10891,7 @@ Static
 
 .
  The label will be printed above the paragraph, but only at the top of an
- environment or the top of a chain of paragraphs with this layout.
+ environment or the top of a chain of paragraphs with this style.
  This might be used with the 
 \begin_inset Flex MenuItem
 status collapsed
@@ -10906,7 +10902,7 @@ Abstract
 
 \end_inset
 
layout, for example.
style, for example.
 \end_layout
 
 \begin_layout Itemize
@@ -11189,7 +11185,7 @@ List_Environment, Bib_Environment
 
 \end_inset
 
-] How the layout should be translated into LaTeX.
+] How the style should be translated into LaTeX.
 \begin_inset Foot
 status collapsed
 
@@ -11378,14 +11374,18 @@ status collapsed
 \begin_layout Plain Layout
 
 \bar under
-L
+Edit
 \bar default
-ayout\SpecialChar \menuseparator
+\SpecialChar \menuseparator
 
 \bar under
 P
 \bar default
 aragraph
+\begin_inset space ~
+\end_inset
+
+settings
 \end_layout
 
 \end_inset
@@ -11443,7 +11443,7 @@ string=""
 
 \end_inset
 
-] If you put layouts into environments, the leftmargins are not simply added,
+] If you put styles into environments, the leftmargins are not simply added,
  but added with a factor 
 \begin_inset Formula $\frac{4}{depth+4}$
 \end_inset
@@ -11565,7 +11565,7 @@ Static
 \begin_inset Newline newline
 \end_inset
 
-The kind of margin that the layout has on the left side.
+The kind of margin that the style has on the left side.
  
 \begin_inset Flex Code
 status collapsed
@@ -11708,7 +11708,7 @@ status collapsed
 
 \end_inset
 
-] Whether fragile commands in this layout should be 
+] Whether fragile commands in this style should be 
 \begin_inset Flex Code
 status collapsed
 
@@ -11811,28 +11811,29 @@ status collapsed
 
 \end_inset
 
-] Whether the following Paragraph is allowed to indent its very first row.
+] If set to true, and if 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-1
+DefaultStyle
 \end_layout
 
 \end_inset
 
- means that it is not allowed to do so; 
+ (usually 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-0
+Standard
 \end_layout
 
 \end_inset
 
- means it could do so if it wants to.
+) paragraphs are being indented, then the indentation of such a paragraph
+ following one of this type will be suppressed.
+ (So this will not affect the display of non-default paragraphs.)
 \end_layout
 
 \begin_layout Description
@@ -11845,8 +11846,8 @@ ObsoletedBy
 
 \end_inset
 
- Name of a layout that has replaced this layout.
- This is used to rename a layout, while keeping backward compatibility.
+ Name of a style that has replaced this style.
+ This is used to rename a style, while keeping backward compatibility.
 \end_layout
 
 \begin_layout Description
@@ -11869,7 +11870,7 @@ int=0
 
 \end_inset
 
-] The number of optional arguments that can be used with this layout.
+] The number of optional arguments that can be used with this style.
  This is useful for things like section headings, and only makes sense with
  LaTeX.
  Note that, on output, the optional arguments will all precede any required
@@ -11984,9 +11985,9 @@ Parindent
 
 \end_inset
 
- will be fixed for a certain layout.
- The exception is Standard layout, since the indentation of a Standard layout
paragraph can be prohibited with 
+ will be fixed for a certain style.
+ The exception is the default style, since the indentation for these paragraphs
+ can be prohibited with 
 \begin_inset Flex Code
 status collapsed
 
@@ -11997,7 +11998,17 @@ NextNoIndent
 \end_inset
 
 .
- Also, Standard layout paragraphs inside environments use the 
+ Also, 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+Standard
+\end_layout
+
+\end_inset
+
+ style paragraphs inside environments use the 
 \begin_inset Flex Code
 status collapsed
 
@@ -12008,7 +12019,17 @@ Parindent
 \end_inset
 
  of the environment, not their native one.
- For example, Standard paragraphs inside an enumeration are not indented.
+ For example, 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+Standard
+\end_layout
+
+\end_inset
+
+ paragraphs inside an enumeration are not indented.
 \end_layout
 
 \begin_layout Description
@@ -12031,7 +12052,7 @@ float=0
 
 \end_inset
 
-] The vertical space between two paragraphs of this layout.
+] The vertical space between two paragraphs of this style.
 \end_layout
 
 \begin_layout Description
@@ -12096,7 +12117,7 @@ Paragraph
 \begin_inset Quotes erd
 \end_inset
 
layout is ignored and all paragraphs are separated by this parskip argument.
style is ignored and all paragraphs are separated by this parskip argument.
  The vertical space is calculated with 
 \begin_inset Flex Code
 status collapsed
@@ -12255,7 +12276,7 @@ int=0
 \end_inset
 
 ] The number of required arguments that the LaTeX command or environment
- corresponding to this layout expects.
+ corresponding to this style expects.
  In the case of a command, these are required arguments 
 \emph on
 other than
@@ -12304,7 +12325,7 @@ name "des:Requires"
 
 \end_inset
 
-Whether the layout requires the feature 
+Whether the style requires the feature 
 \begin_inset Flex Code
 status collapsed
 
@@ -12397,7 +12418,7 @@ single
 \emph on
 value
 \emph default
-] This defines what the default spacing should be in the layout.
+] This defines what the default spacing should be in the style.
  The arguments 
 \begin_inset Flex Code
 status collapsed
@@ -12574,8 +12595,8 @@ float=0
 \end_inset
 
 ] The vertical space with which the very first of a chain of paragraphs
- with this layout is separated from the previous paragraph.
- If the previous paragraph has another layout, the separations are not simply
+ with this style is separated from the previous paragraph.
+ If the previous paragraph has another style, the separations are not simply
  added, but the maximum is taken.
 \end_layout
 
@@ -14065,11 +14086,7 @@ status collapsed
 
 \end_inset
 
- may be be any valid identifier not used by a pre-existing inset.
- The identifier may include spaces, but in that case the whole thing must
- be wrapped in quotes.
- It may also include a namespace identifier, preceding a colon, such as
+ must be of the form 
 \begin_inset Quotes eld
 \end_inset
 
@@ -14078,7 +14095,7 @@ status collapsed
 status collapsed
 
 \begin_layout Plain Layout
-Flex:Code
+Flex:<name>
 \end_layout
 
 \end_inset
@@ -14087,7 +14104,19 @@ Flex:Code
 \begin_inset Quotes erd
 \end_inset
 
-.
+, where 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+name
+\end_layout
+
+\end_inset
+
+ may be be any valid identifier not used by a pre-existing Flex inset.
+ The identifier may include spaces, but in that case the whole thing must
+ be wrapped in quotes.
  Note that the definition of a flex inset 
 \emph on
 must 
@@ -14527,8 +14556,18 @@ status collapsed
 
 \end_inset
 
-] Indicates whether the PlainLayout should be used or, instead, the user
- can change the paragraph style used in the inset.
+] Indicates whether the 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+PlainLayout
+\end_layout
+
+\end_inset
+
+ should be used or, instead, the user can change the paragraph style used
+ in the inset.
  Default is false.
 \end_layout
 
@@ -14682,7 +14721,27 @@ LabelString
 \end_inset
 
  What will be displayed on the button or elsewhere as the inset label.
- Some inset types (TeX code and Branch) modify this label on the fly.
+ Some inset types (
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+TeX code
+\end_layout
+
+\end_inset
+
+ and 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+Branch
+\end_layout
+
+\end_inset
+
+) modify this label on the fly.
 \end_layout
 
 \begin_layout Description
@@ -14968,7 +15027,7 @@ status collapsed
 
 \end_inset
 
-] Whether fragile commands in this layout should be 
+] Whether fragile commands in this inset should be 
 \begin_inset Flex Code
 status collapsed
 
@@ -16338,7 +16397,7 @@ misc %author%,
 \begin_inset Quotes erd
 \end_inset
 
-
+.
 \end_layout
 
 \begin_layout Standard
@@ -19160,7 +19219,11 @@ InputFormat
 \end_inset
 
  The file format of the original file.
- This must be the name of a format that is known to LyX (see section 
+ This must be the name of a format that is known to LyX (see section
+\begin_inset space ~
+\end_inset
+
+
 \begin_inset CommandInset ref
 LatexCommand ref
 reference "sec:Formats"
@@ -19301,7 +19364,7 @@ Format
 
 \end_inset
 
- section for all formats.
+ section for all templates.
  Use a dummy text when no representation is available.
  Then you can at least see a reference to the external material in the exported
  document.
@@ -19669,7 +19732,9 @@ ools\SpecialChar \menuseparator
 \bar under
 P
 \bar default
-references:Conversion
+references\SpecialChar \menuseparator
+File Handling\SpecialChar \menuseparator
+File Format
 \end_layout
 
 \end_inset