]> git.lyx.org Git - lyx.git/blobdiff - lib/doc/Development.lyx
Additional.lyx: replace quotes character by LyX quotes
[lyx.git] / lib / doc / Development.lyx
index e0a03dfe36571d4ebc8baff08bee645602ddc748..845f22aaa6f89feb78a2205c37350c17b35a95b5 100644 (file)
@@ -1,5 +1,5 @@
-#LyX 2.2 created this file. For more info see http://www.lyx.org/
-\lyxformat 504
+#LyX 2.3 created this file. For more info see http://www.lyx.org/
+\lyxformat 544
 \begin_document
 \begin_header
 \save_transient_properties true
@@ -25,9 +25,11 @@ logicalmkup
 \font_osf false
 \font_sf_scale 100 100
 \font_tt_scale 100 100
+\use_microtype false
+\use_dash_ligatures true
 \graphics default
 \default_output_format pdf2
-\output_sync 0
+\output_sync 1
 \bibtex_command default
 \index_command default
 \paperfontsize 12
@@ -77,7 +79,10 @@ logicalmkup
 \tocdepth 4
 \paragraph_separation indent
 \paragraph_indentation default
-\quotes_language english
+\is_math_indent 0
+\math_numbering_side default
+\quotes_style english
+\dynamic_quotes 0
 \papercolumns 1
 \papersides 2
 \paperpagestyle headings
@@ -86,6 +91,7 @@ logicalmkup
 \html_math_output 0
 \html_css_as_file 0
 \html_be_strict true
+\use_minted 0
 \end_header
 
 \begin_body
@@ -161,12 +167,13 @@ development
  This document is not translated, since the development language of \SpecialChar LyX
  is
  English.
- If you want to use \SpecialChar LyX
- you don't need to read this manual.
+ If you just want to use \SpecialChar LyX
+, then you don't need to read this manual.
  However, if you want to learn more about how \SpecialChar LyX
  is developed, or even want
  to participate in \SpecialChar LyX
- development, you may find some interesting information.
+ development, you may find some interesting information
+ here.
 \end_layout
 
 \begin_layout Section
@@ -200,6 +207,16 @@ name "sec:When-is-an"
 When you are working on a new feature you may ask yourself whether it needs
  an update of the .lyx file format number.
  Whether an update is needed or not is not always obvious.
+ Rule of thumb: 
+\end_layout
+
+\begin_layout Quote
+Whenever there is the danger that a previous version of LyX cannot open
+ a file using the new feature, a file format update is needed.
+\end_layout
+
+\begin_layout Standard
+The file format change allows lyx2lyx rules to implement backwards compatibility.
  Below you can find a list of reasons for file format updates with explanations:
 \end_layout
 
@@ -214,28 +231,6 @@ document
 
 setting Whenever you introduce a new setting that is stored in the document
  header, a file format update is needed.
- This is also true if you add a new valid value to an existing setting,
- e.
-\begin_inset space \thinspace{}
-\end_inset
-
-g.
-\begin_inset space \space{}
-\end_inset
-
-a new language that is stored in 
-\begin_inset Flex Code
-status collapsed
-
-\begin_layout Plain Layout
-
-\backslash
-language
-\end_layout
-
-\end_inset
-
-.
 \end_layout
 
 \begin_layout Description
@@ -256,22 +251,36 @@ New
 \begin_inset space ~
 \end_inset
 
-inset Of course a new inset requires a file format update.
-\end_layout
+valid
+\begin_inset space ~
+\end_inset
 
-\begin_layout Description
-New
+value
 \begin_inset space ~
 \end_inset
 
-style in any layout file or module shipped with \SpecialChar LyX
-, or new shipped layout
- file or module.
- These requirements are currently under discussion and might change in the
- future.
+for
+\begin_inset space ~
+\end_inset
+
+an
+\begin_inset space ~
+\end_inset
+
+existing
+\begin_inset space ~
+\end_inset
+
+setting, e.
+\begin_inset space \thinspace{}
+\end_inset
+
+g.
 \end_layout
 
+\begin_deeper
 \begin_layout Description
+\paragraph_spacing single
 Automatically
 \begin_inset space ~
 \end_inset
@@ -284,12 +293,11 @@ math
 \begin_inset space ~
 \end_inset
 
-package Any new math package that is automatically loaded needs a file format
- update.
- The reason for this is that there is no true ERT inset for math formulas:
- Each command is parsed, and if a user happens to define a local command
- with the same name as a command that triggers an automatic load of a package,
- he needs to be able to switch off the automatic loading of that package.
+package The reason for this is that there is no true ERT inset for math
+ formulas: Each command is parsed, and if a user happens to define a local
+ command with the same name as a command that triggers an automatic load
+ of a package, they need to be able to switch off the automatic loading
+ of that package.
  This switch is stored by the 
 \begin_inset Flex Code
 status collapsed
@@ -303,23 +311,113 @@ use_package
  header setting.
 \end_layout
 
+\begin_layout Description
+New
+\begin_inset space ~
+\end_inset
+
+language that is stored in 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\backslash
+language
+\end_layout
+
+\end_inset
+
+.
+\begin_inset Note Note
+status collapsed
+
+\begin_layout Plain Layout
+This requirement is under discussion.
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_deeper
+\begin_layout Description
+New
+\begin_inset space ~
+\end_inset
+
+inset Of course a new inset requires a file format update.
+\end_layout
+
+\begin_layout Description
+New
+\begin_inset space ~
+\end_inset
+
+style If a new style or inset layout is added to any layout file or module
+ shipped with \SpecialChar LyX
+, then a new file format is needed in the master (development)
+ branch.
+ It is possible to backport new styles to the stable version without a file
+ format change.
+ See 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "subsec:Backporting-new-styles"
+
+\end_inset
+
+ for more information.
+\end_layout
+
+\begin_layout Description
+Removed
+\begin_inset space ~
+\end_inset
+
+style If a style or inset layout is removed in any layout file or module
+ shipped with \SpecialChar LyX
+, a new file format is required.
+\end_layout
+
+\begin_layout Standard
+However, 
+\series bold
+new
+\series default
+ layouts and modules do 
+\series bold
+not
+\series default
+ require a file format update (changed 03/16, see 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "subsec:New-layouts"
+
+\end_inset
+
+).
+\end_layout
+
 \begin_layout Standard
 If you are still unsure, please ask on the development list.
 \end_layout
 
 \begin_layout Subsection
-How to update the file format number of .lyx files
 \begin_inset CommandInset label
 LatexCommand label
 name "subsec:update_lyx_files"
 
 \end_inset
 
-
+How to update the file format number of .lyx files
 \end_layout
 
 \begin_layout Standard
-Once you came to the conclusion that a file format update is needed you
+Once you come to the conclusion that a file format update is needed, you
  should use the following procedure to perform the update:
 \end_layout
 
@@ -332,6 +430,12 @@ Implement and test the new feature, including the reading and writing of
 \end_layout
 
 \begin_layout Enumerate
+\begin_inset CommandInset label
+LatexCommand label
+name "enu:Describe_format"
+
+\end_inset
+
 Describe the new format in 
 \begin_inset Flex Code
 status collapsed
@@ -361,30 +465,12 @@ src/version.h
 \end_layout
 
 \begin_layout Enumerate
-Update the range of file formats in the array 
-\begin_inset Flex Code
-status collapsed
-
-\begin_layout Plain Layout
-format_relation
-\end_layout
-
-\end_inset
-
- in 
-\begin_inset Flex Code
-status collapsed
-
-\begin_layout Plain Layout
-lib/lyx2lyx/LyX.py
-\end_layout
+\begin_inset CommandInset label
+LatexCommand label
+name "enu:Add-an-entry"
 
 \end_inset
 
-.
-\end_layout
-
-\begin_layout Enumerate
 Add an entry to both format lists (for conversion and reversion) in
 \begin_inset Newline newline
 \end_inset
@@ -394,7 +480,7 @@ Add an entry to both format lists (for conversion and reversion) in
 status collapsed
 
 \begin_layout Plain Layout
-lib/lyx2lyx/lyx_2_2.py
+lib/lyx2lyx/lyx_2_3.py
 \end_layout
 
 \end_inset
@@ -404,22 +490,23 @@ lib/lyx2lyx/lyx_2_2.py
 \begin_inset space \thinspace{}
 \end_inset
 
-g.
-\begin_inset space \space{}
+g., a new header setting always needs a conversion that adds the new setting,
+ but a new document language does not need one).
+ Add a reversion routine if needed.
+\begin_inset Newline newline
 \end_inset
 
-a new header setting always needs a conversion that adds the new setting,
- a new document language does not need one).
- Add a reversion routine if needed.
- While the conversion routine is required to produce a document that is
- equivalent to the old version, the requirements of the reversion are not
- that strict.
+While the conversion routine is required to produce a document that is equivalen
+t to the old version, the requirements of the reversion are not that strict.
  If possible, try to produce a proper reversion, using ERT if needed, but
  for some features this might be too complicated.
  In this case, the minimum requirement of the reversion routine is that
  it produces a valid document which can be read by an older \SpecialChar LyX
 .
  If absolutely needed, even data loss is allowed for the reversion.
+ (In that case, you might want to add a LyX comment that indicates what
+ you have had to do, so the user is at least warned).
 \end_layout
 
 \begin_layout Enumerate
@@ -432,10 +519,6 @@ Since tex2lyx has several implicit file format dependencies caused by sharing
  format numbers differ.
  In many cases the tex2lyx update requires only the first and last item
  of the list below:
-\begin_inset Separator parbreak
-\end_inset
-
-
 \end_layout
 
 \begin_deeper
@@ -474,7 +557,7 @@ reference "sec:Updating-test-references"
 
 \end_deeper
 \begin_layout Enumerate
-If you did not implement full tex2lyx support of the new feature, add a
+If you did not implement full tex2lyx support for the new feature, add a
  line to 
 \begin_inset Flex Code
 status collapsed
@@ -491,15 +574,16 @@ src/tex2lyx/TODO.txt
  syntax of the produced .lyx file.
  It is no problem if some features supported by \SpecialChar LyX
  are still output as ERT
- by tex2lyx, since the problems in the past that resulted in the update
- recommendation were related to mixed version syntax, not ERT.
+ by tex2lyx.
+ The problems in the past that resulted in the update recommendation were
+ related to mixed version syntax, not ERT.
 \end_layout
 
 \begin_layout Enumerate
 It would be nice if you could create a .lyx test file which contains instances
  of all changed or added features.
  This could then be used to test lyx2lyx and tex2lyx.
- Unfortunately it has not yet been decided how to collect such examples,
+ Unfortunately, it has not yet been decided how to collect such examples,
  so please ask on the development list if you want to create one.
 \end_layout
 
@@ -510,12 +594,13 @@ name "enu:updatefiles"
 
 \end_inset
 
-Update LyX's .lyx documentation files to the new format.
+Test your lyx2lyx code by updating LyX's .lyx documentation files to the
+ new format.
  The developer who makes the change knows best what changes to expect when
  inspecting the resulting diff.
  Because of this, you might be able to catch a bug in the lyx2lyx code that
  updates the format just by taking a quick scan through the large diff that
- is the result
+ is the result.
 \begin_inset Note Note
 status collapsed
 
@@ -527,7 +612,6 @@ Another advantage is that if later we suspect a bug in lyx2lyx we can easily
 
 \end_inset
 
-.
  To do this, first make sure that there are no changes to the git repository
  that you will not want to commit (this is needed because it will be convenient
  to commit with the command 
@@ -552,50 +636,85 @@ python development/tools/updatedocs.py
 \end_inset
 
 .
- Then, revert the change to 
+ Look at the resulting changes using the command 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-LFUNs.lyx
+git diff
 \end_layout
 
 \end_inset
 
- because that file is meant to be generated separately: 
+.
+ If anything looks surprising, please investigate.
+ Keep in mind that the case of 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-git checkout lib/doc/LFUNs.lyx
+LFUNs.lyx
 \end_layout
 
 \end_inset
 
-
-\begin_inset Note Note
+ is special, because it is first generated with 
+\begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-TODO: this step should be done within updatedocs.py
+gen_lfuns.py
 \end_layout
 
 \end_inset
 
-.
- Look at the resulting changes using the command 
-\begin_inset Flex Code
-status collapsed
+ before being converted to the latest format.
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Note Greyedout
+status open
 
 \begin_layout Plain Layout
-git diff
-\end_layout
+
+\series bold
+Note:
+\series default
+ Only commit file format changes in the doc files if these files are using
+ the new feature of the new file format.
+ The reason is rule
+\begin_inset space ~
+\end_inset
+
+
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "enu:The-fileformat-of"
+
+\end_inset
+
+ of the documentation policies described in sec.
+\begin_inset space ~
+\end_inset
+
+
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:Documentation-policies"
 
 \end_inset
 
 .
- If anything looks surprising, please investigate.
- Finally, commit using 
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Enumerate
+Finally, commit using 
 \begin_inset Flex Code
 status collapsed
 
@@ -613,7 +732,7 @@ Updating the file format number of layout files
 \end_layout
 
 \begin_layout Standard
-See step 
+The procedure for updating the layout files is similar to that in step 
 \begin_inset CommandInset ref
 LatexCommand ref
 reference "enu:updatefiles"
@@ -627,22 +746,23 @@ reference "subsec:update_lyx_files"
 
 \end_inset
 
- but instead of the 
+.
+ One need only run 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-updatedocs.py
+python development/tools/updatelayouts.py
 \end_layout
 
 \end_inset
 
- command, use this command: 
+ instead of 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-python development/tools/updatelayouts.py
+updatedocs.py
 \end_layout
 
 \end_inset
@@ -651,7 +771,7 @@ python development/tools/updatelayouts.py
 \end_layout
 
 \begin_layout Standard
-Note that we do not update the local layout of our 
+Note that we do not automatically update any local layout used in the 
 \begin_inset Flex Code
 status collapsed
 
@@ -661,9 +781,12 @@ status collapsed
 
 \end_inset
 
- files because users would then not be able to export to older formats.
+ files shipped with \SpecialChar LyX
+ because users would then not be able to export to older
+ formats.
  For example, if a 2.2.0 user exported a template to 2.1.x format and tried
- to open the file in LyX 2.1.x, there would be an error because the file would
+ to open the file in \SpecialChar LyX
+ 2.1.x, there would be an error because the file would
  contain a local layout whose format is too new.
  The root reason for this is that we do not support converting layouts to
  older layout formats, as we do for the 
@@ -684,732 +807,1863 @@ Updating the file format number of bind/ui files
 \end_layout
 
 \begin_layout Standard
-See step 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "enu:updatefiles"
-
-\end_inset
+A change to the functionality of existing LFUNs can require a conversion
+ of 
+\begin_inset Flex Code
+status collapsed
 
- in section 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "subsec:update_lyx_files"
+\begin_layout Plain Layout
+.bind
+\end_layout
 
 \end_inset
 
- but instead of the 
+ and 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-updatedocs.py
+.ui
 \end_layout
 
 \end_inset
 
- command, use this command: 
+ files, and therefore an increment of the LFUN format, as well as a conversion
+ of Info insets in 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-bash development/tools/updatelfuns.sh
+.lyx
 \end_layout
 
 \end_inset
 
-.
-\end_layout
-
-\begin_layout Subsection
-Backporting new styles to the stable version
-\end_layout
+ files for manuals.
+ The latter cannot be done automatically and also requires an update of
+ the \SpecialChar LyX
+ file format.
+ (Think e.g.
+\begin_inset space \space{}
+\end_inset
 
-\begin_layout Standard
-Starting with the stable \SpecialChar LyX
- 2.1 branch, there is a mechanism in place to backport
- new styles to the stable version without the need to update the file format.
- The basic idea is that the new style definition is automatically copied
- to the document preamble, so that it can even be used by older minor revisions
- that did not yet include the style.
- To backport a new style to the stable version, the following steps are
- needed:
-\end_layout
+of someone who might have made a set of \SpecialChar LyX
+ teaching manuals for use in their
+ own group.)
+\begin_inset Foot
+status open
 
-\begin_layout Enumerate
-Add the line 
-\begin_inset Flex Code
-status collapsed
+\begin_layout Plain Layout
+\begin_inset Flex URL
+status open
 
 \begin_layout Plain Layout
-ForceLocal -1
+
+http://www.lyx.org/trac/ticket/9794
 \end_layout
 
 \end_inset
 
- to the style definition in the development version.
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+To update the LFUN format:
 \end_layout
 
 \begin_layout Enumerate
-Copy the style definition to the stable version, but use 
+Increment the LFUN file format number in 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-ForceLocal 1
+src/LyXAction.h
 \end_layout
 
 \end_inset
 
- instead.
- If needed adjust the format to the one used by the stable version (see
- the customization manual for details of the layout file format).
+.
 \end_layout
 
 \begin_layout Enumerate
-For each update of the style in a later stable version, increase the argument
- of 
+Implement the LFUN conversion in 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-ForceLocal
+lib/scripts/prefs2prefs_lfuns.py
 \end_layout
 
 \end_inset
 
- by one (in the stable version, the development version should not be touched).
+.
 \end_layout
 
-\begin_layout Standard
-For details about the 
+\begin_layout Enumerate
+See step 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "enu:updatefiles"
+
+\end_inset
+
+ in section 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "subsec:update_lyx_files"
+
+\end_inset
+
+ but instead of the 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-ForceLocal
+updatedocs.py
 \end_layout
 
 \end_inset
 
- flag see the customization manual.
- No 
+ command, use this command: 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-lyx2lyx
+bash development/tools/updatelfuns.sh
 \end_layout
 
 \end_inset
 
- support is needed for backported styles: Since the style of the development
- version has an infinite version number, it will always be used.
- Furthermore, since its version number is less than one, the style will
- not be written anymore to the document header for files saved by the new
- version.
+.
+\begin_inset Note Note
+status open
+
+\begin_layout Plain Layout
+This file should really be converted to python.
 \end_layout
 
-\begin_layout Standard
-\begin_inset Newpage newpage
 \end_inset
 
 
 \end_layout
 
-\begin_layout Section
-Tests
-\end_layout
+\begin_layout Enumerate
+Update Info insets in 
+\begin_inset Flex Code
+status collapsed
 
-\begin_layout Standard
-Automated tests are an important tool to detect bugs and regressions in
- software development.
- Some projects like gcc even require each bug fix to be accompanied by a
- test case for the automatic test suite, that would detect this bug.
- Testing interactive features automatically is of course very hard, but
- core functionality like document import and export can be tested quite
- easily, and some tests of this kind exist.
+\begin_layout Plain Layout
+.lyx
 \end_layout
 
-\begin_layout Subsection
-unit tests
-\end_layout
+\end_inset
 
-\begin_layout Standard
-There are attempts to set up a suite of unit tests for LyX.
-\end_layout
+ files.
+ To do so, increment the \SpecialChar LyX
+ format and proceed as in 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "subsec:update_lyx_files"
 
-\begin_layout Standard
-TODO: describe what is done and what is still to do.
-\end_layout
+\end_inset
 
-\begin_layout Subsection
-tex2lyx tests
-\end_layout
+, steps 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "enu:Describe_format"
 
-\begin_layout Standard
-The tex2lyx tests are located in the 
-\begin_inset Flex Code
-status collapsed
+\end_inset
 
-\begin_layout Plain Layout
-src/tex2lyx/test
-\end_layout
+–
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "enu:updatefiles"
 
 \end_inset
 
- subfolder of the \SpecialChar LyX
- source code distribution.
- The actual testing is performed by the simple python script 
-\begin_inset Flex Code
-status collapsed
-
-\begin_layout Plain Layout
-src/tex2lyx/test/runtests.py
-\end_layout
+.
+ In the lyx2lyx implementation (step 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "enu:Add-an-entry"
 
 \end_inset
 
-.
- Each test consists of two files: 
+), implement a conversion similar to the one in 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-<test name>.tex
+prefs2prefs_lfuns.py
 \end_layout
 
 \end_inset
 
- contains the \SpecialChar LaTeX
- code that should be tested.
+ above, as well as a corresponding reversion; for this one can use 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-<test name>.lyx.lyx
+convert_info_insets
 \end_layout
 
 \end_inset
 
- contains the expected output of tex2lyx.
- When a test is run, the actual produced output is compared with the stored
- reference output.
- The test passes if both are identical.
- The test machinery is also able to generate a file 
+ from 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-<test name>.lyx.tex
+lib/lyx2lyx/lyx2lyx_tools.py
 \end_layout
 
 \end_inset
 
- by exporting the produced .lyx file with \SpecialChar LyX
- again.
- This may be useful for roundtrip comparisons.
+.
 \end_layout
 
-\begin_layout Subsubsection
-Running the tests
+\begin_layout Subsection
+Backporting new styles to the stable version
+\begin_inset CommandInset label
+LatexCommand label
+name "subsec:Backporting-new-styles"
+
+\end_inset
+
+
 \end_layout
 
 \begin_layout Standard
-The tex2lyx tests can be run in several ways.
- When in the 
+Starting with the stable \SpecialChar LyX
+ 2.1 branch, there is a mechanism in place to backport
+ new styles to the stable version without the need to update the file format.
+ The basic idea is that the new style definition is automatically copied
+ to the document preamble so that it can even be used by older minor versions
+ that did not yet include the style.
+ To backport a new style to the stable version, the following steps are
+ needed:
+\end_layout
+
+\begin_layout Enumerate
+Add the line 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-src/tex2lyx
+ForceLocal -1
 \end_layout
 
 \end_inset
 
- subfolder of the build directory, the commands 
+ to the style definition in the development version.
+\end_layout
+
+\begin_layout Enumerate
+Copy the style definition to the stable version, but use 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-ctest
+ForceLocal 1
 \end_layout
 
 \end_inset
 
- (cmake, all platforms), 
+ instead.
+ If needed adjust the format to the one used by the stable version (see
+ the customization manual for details of the layout file format).
+\end_layout
+
+\begin_layout Enumerate
+For each update of the style in a later stable version, increase the argument
+ of 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-make test
+ForceLocal
 \end_layout
 
 \end_inset
 
- (cmake, when using a make based build system and not MSVC) or 
+ by one.
+ (In the stable version, the development version should not be touched.)
+\end_layout
+
+\begin_layout Standard
+For details about the 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-make alltests
+ForceLocal
 \end_layout
 
 \end_inset
 
(autotools) will run the tex2lyx tests.
- Alternatively, in the root of the build directory, the command 
flag see the customization manual.
+ No 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-ctest -R tex2lyx
+lyx2lyx
 \end_layout
 
 \end_inset
 
- runs all tests whose names match the regex 
+ support is needed for backported styles: Since the style of the development
+ version has an infinite version number, it will always be used.
+ Furthermore, since its version number is less than one, the style will
+ not be written anymore to the document header for files saved by the new
+ version.
+\end_layout
+
+\begin_layout Section
+New layouts and modules
+\end_layout
+
+\begin_layout Subsection
+\begin_inset CommandInset label
+LatexCommand label
+name "subsec:New-layouts"
+
+\end_inset
+
+New layouts
+\end_layout
+
+\begin_layout Standard
+Adding a new layout file to the \SpecialChar LyX
+ library makes it an 
 \begin_inset Quotes eld
 \end_inset
 
-tex2lyx
+officially supported
 \begin_inset Quotes erd
+\end_inset
+
+ layout.
+ You should therefore think carefully about whether you really want to do
+ this and discuss it on lyx-devel, since you will need to be prepared to
+ update and fix the layout if necessary.
+ If the layout is experimental or for a rarely used document class, then
+ it may be better to add it to the relevant portion of the \SpecialChar LyX
+ wiki, as a user
+ contribution.
+ See 
+\begin_inset CommandInset href
+LatexCommand href
+target "https://wiki.lyx.org/Layouts/Layouts"
+literal "false"
+
 \end_inset
 
 .
- Another way to run the tex2lyx tests in the root build directory is to
- instead use the command 
-\begin_inset Flex Code
-status collapsed
+\end_layout
+
+\begin_layout Standard
+In older versions of this document, it was stated that new layout files
+ require a file format change.
+ After some discussion, it was decided that this is not needed.
+\begin_inset Foot
+status open
 
 \begin_layout Plain Layout
-ctest -L '(cmplyx|roundtrip)'
-\end_layout
+See 
+\begin_inset CommandInset href
+LatexCommand href
+name "the thread “Proposal for a guide on updating layouts”"
+target "http://permalink.gmane.org/gmane.editors.lyx.devel/161202"
+literal "false"
 
 \end_inset
 
-, which runs all tests categorized with the label 
-\begin_inset Quotes eld
-\end_inset
+.
+\end_layout
 
-roundtrip
-\begin_inset Quotes erd
 \end_inset
 
- or 
+\end_layout
+
+\begin_layout Quote
+For reference, here are the arguments on each side
+\end_layout
+
+\begin_deeper
+\begin_layout Description
+Pro 
 \begin_inset Quotes eld
 \end_inset
 
-cmplyx
+New layout files are a file format change
 \begin_inset Quotes erd
 \end_inset
 
-.
- If a test fails, the differences between the expected and actual results
- are output in unified diff format.
-\end_layout
 
-\begin_layout Subsubsection
-Updating test references
-\begin_inset CommandInset label
-LatexCommand label
-name "sec:Updating-test-references"
+\end_layout
 
+\begin_layout Itemize
+All documents produced by 2.2.
+\begin_inset Formula $x$
 \end_inset
 
+ can always be edited and exported even if 
+\begin_inset Formula $x$
+\end_inset
 
+ is different.
+ This is important for people using different machines, or exchanging work
+ with colleagues.
 \end_layout
 
-\begin_layout Standard
-In some cases a changed tex2lyx output is not a test failure, but wanted,
- e.
-\begin_inset space \thinspace{}
+\begin_layout Description
+Con 
+\begin_inset Quotes eld
 \end_inset
 
-g.
-\begin_inset space \space{}
+New layout files are not a file format change
+\begin_inset Quotes erd
 \end_inset
 
-if a tex2lyx bug was fixed, or a new feature was added.
- In these cases the stored references need to be updated.
- To do so if using autotools, call 
+
+\end_layout
+
+\begin_layout Itemize
+No new LaTeX classes can be supported in a stable version, and stable versions
+ have a typical lifetime of 2–3 years.
+\end_layout
+
+\begin_layout Itemize
+We have the same situation already with custom layout files: If a document
+ using a custom layout file is moved between machines or people, then the
+ layout file needs to be exchanged as well.
+ If that is not done, then we have a fallback implemented so that such documents
+ can still be edited, but not exported, and the user gets a warning.
+\end_layout
+
+\begin_layout Itemize
+The lyx2lyx script cannot do anything useful in such a case.
+\end_layout
+
+\end_deeper
+\begin_layout Standard
+If you have decided that you are going to add a new layout file to \SpecialChar LyX
+ itself,
+ then, you should do the following:
+\end_layout
+
+\begin_layout Enumerate
+Put your new layout file in 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-make updatetests
+lib/layouts/
 \end_layout
 
 \end_inset
 
- in the 
+ and add it to Git (
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-src/tex2lyx
+git add lib/layouts/newlayout.layout
 \end_layout
 
 \end_inset
 
- subdirectory of the build directory.
- If instead using CMake, call 
+) so that it will be committed.
+\end_layout
+
+\begin_layout Enumerate
+Add an entry in 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-make updatetex2lyxtests
+lib/Makefile.am
 \end_layout
 
 \end_inset
 
- in the build directory or in the 
+, so that the new layout actually gets installed.
+\end_layout
+
+\begin_layout Enumerate
+Add an entry in 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-src/tex2lyx/test
+lib/doc/LaTeXConfig.lyx
 \end_layout
 
 \end_inset
 
- subdirectory of the build directory.
-\begin_inset Foot
+ containing in particular a line like 
+\end_layout
+
+\begin_deeper
+\begin_layout Quote
+Found: [InsetInfo] 
+\end_layout
+
+\begin_layout Standard
+where [InsetInfo] is obtained by entering in the minibuffer (Alt+X) 
+\begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-Note that this is a case where a make target in the build directory can
- affect the source directory, which might not be advisable.
+info-insert textclass <name>
 \end_layout
 
 \end_inset
 
- On Windows do the following:
-\end_layout
+.
+ This inset will automatically display a boxed 
+\begin_inset Quotes eld
+\end_inset
 
-\begin_layout Itemize
-Assure that the path to the python.exe is in your system PATH variable.
+yes
+\begin_inset Quotes erd
+\end_inset
+
+ or 
+\begin_inset Quotes eld
+\end_inset
+
+no
+\begin_inset Quotes erd
+\end_inset
+
+ depending on the availability of the package.
 \end_layout
 
-\begin_layout Itemize
-Double-click on the file 
+\end_deeper
+\begin_layout Enumerate
+A template or example is strongly encouraged (but not necessarily required).
+ It is also possible to provide both.
+ Add them to 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-updatetex2lyxtests.vcxproj
+lib/templates/
 \end_layout
 
 \end_inset
 
- in the build directory or in the 
+ or 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-src/tex2lyx/test
+lib/examples/
 \end_layout
 
 \end_inset
 
- subdirectory of your build directory.
+, respectively.
 \end_layout
 
-\begin_layout Itemize
-In the appearing MSVC program right-click on the project 
-\family sans
-updatetex2lyxtests
-\family default
- in the project explorer and chose 
-\family sans
-Create
-\family default
+\begin_layout Enumerate
+Reconfigure \SpecialChar LyX
 .
 \end_layout
 
-\begin_layout Standard
-For convenience, these commands also produce re-exported roundtrip .lyx.tex
- files.
- Please examine the changed output carefully before committing the changed
- files to the repository: Since the test machinery does not do a roundtrip
- test .tex 
-\begin_inset Formula $\Rightarrow$
-\end_inset
+\begin_layout Enumerate
+Ensure the autotests for the new layout pass (see 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "par:when-to-run-an-export-test"
 
- .lyx 
-\begin_inset Formula $\Rightarrow$
 \end_inset
 
- .tex, and does not compare the produced dvi or pdf output, it assumes that
- the stored .lyx reference produces correct output if processed by \SpecialChar LyX
-.
- There is only one chance to detect wrong output: before committing a new
- reference.
- Once it is committed, it is quite difficult to verify whether it is correct.
-\end_layout
-
-\begin_layout Standard
-Please 
-\emph on
-do not
-\emph default
- update the test references by opening them with \SpecialChar LyX
- or directly running lyx2lyx
- on them.
- This would not work, since lyx2lyx and \SpecialChar LyX
- produce slightly different files
- regarding insignificant whitespace and line breaks.
+).
 \end_layout
 
-\begin_layout Subsubsection
-Adding a new test
+\begin_layout Subsection
+New modules
 \end_layout
 
 \begin_layout Standard
-In many cases tests for new features may be added to one of the existing
- test files, but sometimes this is not possible or not wanted.
- Then a new test file needs to be added:
+Adding a new module is very similar to adding a new layout.
+ Therefore, the previous section applies to new modules as well, with two
+ exceptions: 
 \end_layout
 
 \begin_layout Enumerate
-Create the new file 
+You only need to add an entry to 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-src/tex2lyx/test/<test name>.tex
+lib/doc/LaTeXConfig.lyx
 \end_layout
 
 \end_inset
 
- and run tex2lyx in roundtrip mode to produce the file 
+ if the module requires a LaTeX package.
+ In that case, the command for entering the InsetInfo is: 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-src/tex2lyx/test/<test name>.lyx.lyx
+\paragraph_spacing single
+info-insert package <name>
 \end_layout
 
 \end_inset
 
-.
- This file will be the new reference.
+
 \end_layout
 
 \begin_layout Enumerate
-Once you confirmed that the tex2lyx output is correct, add the new files
- to the corresponding lists in 
-\begin_inset Flex Code
-status collapsed
+Modules do not need a template, only an example, which is strongly encouraged
+ but not necessarily required.
+\end_layout
+
+\begin_layout Subsection
+Layouts for document classes with incompatible versions
+\end_layout
+
+\begin_layout Standard
+\begin_inset Note Greyedout
+status open
+
+\begin_layout Description
+Note: This section is currently only a proposal under discussion.
+ Please correct/amend as suited.
+ Remove this note once a consensus is found.
+\end_layout
 
 \begin_layout Plain Layout
-src/tex2lyx/test/runtests.py
+See the thread 
+\begin_inset Quotes eld
+\end_inset
+
+Proposal for a guide on updating layouts
+\begin_inset Quotes erd
+\end_inset
+
+ for details and background
+\end_layout
+
+\begin_layout Plain Layout
+http://permalink.gmane.org/gmane.editors.lyx.devel/161126 
 \end_layout
 
 \end_inset
 
-, 
-\begin_inset Flex Code
+
+\end_layout
+
+\begin_layout Standard
+Every now and then, there are changes to LaTeX document classes that break
+ backwards compatibility.
+\begin_inset Foot
 status collapsed
 
 \begin_layout Plain Layout
-src/tex2lyx/Makefile.am
+Uwe has suggested we implement automatic detection of changes in class files.
+ This could be done by running a script every month that checks if a document
+ class was changed at CTAN and at the homepages of the scientific journals.
+ If it reports a change, we can check if our template and layout file are
+ still usable with the changed document class.
+ (This is different from the autotests insofar, as this would also catch
+ changes that do not result in compilation errors.)
 \end_layout
 
 \end_inset
 
- and 
+ Reasons can be a new name for the 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-src/tex2lyx/test/CMakeLists.txt
+*.cls
 \end_layout
 
 \end_inset
 
-.
+ file, removed \SpecialChar LaTeX
+ commands, or both.
+ How should this best be handled in \SpecialChar LyX
+? 
 \end_layout
 
-\begin_layout Enumerate
-Commit the changes to the repository, or send a patch to the development
- list and ask for committing if you do not have commit rights.
+\begin_layout Standard
+The idea is to support the new version with a new \SpecialChar LyX
+ layout so that:
 \end_layout
 
-\begin_layout Subsection
-ctest automatic tests (cmake only)
+\begin_layout Itemize
+Existing documents can still be opened in \SpecialChar LyX
+ and will continue to work on
+ systems where the old version is still installed.
 \end_layout
 
-\begin_layout Standard
-Some tests are located in the 
+\begin_layout Itemize
+With differently named 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-development/autotests
+*.cls
 \end_layout
 
 \end_inset
 
- subfolder of the \SpecialChar LyX
- source code distribution.
-\begin_inset Flex Code
+ files, \SpecialChar LyX
+ can check for the availability of the particular version and reflect
+ this in the GUI.
+ Different document class versions with the same file name are currently
+ (2.2.x) not detected by the configuration script.
+ This is planned for 2.3.
+\begin_inset Foot
 status collapsed
 
 \begin_layout Plain Layout
-cmake
+https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg192467.html
+\end_layout
+
+\begin_layout Plain Layout
+However, what we really need is version detection for the configuration,
+ so that the user can be warned if the required class file has the wrong
+ version.
+ (If the class file keeps the name over the version change, only one of
+ the two layout files generates compilable documents.)
+\end_layout
+
+\begin_layout Plain Layout
+This point was also made here: http://permalink.gmane.org/gmane.editors.lyx.devel/143
+798 
 \end_layout
 
 \end_inset
 
- is required to run the automatic \SpecialChar LyX
- tests, running them is not implemented
- for autotools.
+
+\end_layout
+
+\begin_layout Itemize
+The new layout can be added both to the master and the stable branches,
+ in accord with the policy discussed in 
+\begin_inset CommandInset ref
+LatexCommand formatted
+reference "subsec:New-layouts"
+
+\end_inset
+
+.
+ No lyx2lyx conversion is then required when a new major version is released.
+\end_layout
+
+\begin_layout Standard
+The user can move an existing document to the new version simply by selecting
+ a new document class.
+ This step is well supported by \SpecialChar LyX
+, with established methods for handling
+ unsupported styles and other changes.
+ This way, no lyx2lyx code is required.
 \end_layout
 
 \begin_layout Standard
-The \SpecialChar LyX
- tests can be run by the commands 
+The steps to support a new version of an existing document class are thus:
+\end_layout
+
+\begin_layout Itemize
+Create a new layout file including the upstream version in the name (avoid
+ special characters like spaces and dots), e.g.
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-ctest
+acmsiggraph-v0-92.layout
 \end_layout
 
 \end_inset
 
- (all platforms) or 
+.
+\end_layout
+
+\begin_layout Itemize
+Include the name of the 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-make test
+*.cls
 \end_layout
 
 \end_inset
 
(when using a make based build system and not MSVC) in the 
file as an optional argument in the 
 \begin_inset Flex Code
 status collapsed
 
 \begin_layout Plain Layout
-autotests
+
+\backslash
+DeclareLaTeXClass
 \end_layout
 
 \end_inset
 
- subfolder of the build directory.
-\end_layout
+ line and include the version number in the GUI name:
+\begin_inset Newline newline
+\end_inset
 
-\begin_layout Subsubsection
-Export tests 
-\end_layout
 
-\begin_layout Standard
-The export tests are integration tests.
- They take longer to run and are more likely to break than the tex2lyx tests.
- Nevertheless, they have caught many regressions and without a better alternativ
-e it is important to keep them up-to-date and understand how they work.
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\backslash
+DeclareLaTeXClass[acmsiggraph]{ACM SIGGGRAPH (v.
+\begin_inset space ~
+\end_inset
+
+0.92)}
 \end_layout
 
-\begin_layout Standard
-The export tests 
-\begin_inset Quotes eld
 \end_inset
 
-reuse
-\begin_inset Quotes erd
+
+\end_layout
+
+\begin_layout Itemize
+Update the GUI name in the old layout file (whose name should not be changed),
+ e.g.:
+\begin_inset Newline newline
 \end_inset
 
- documentation, template, and example files trying to export them to all
- supported output formats.
- In addition, there are a number of dedicated sample documents under 
+
 \begin_inset Flex Code
 status collapsed
 
-\begin_layout Plain Layout
-autotests/export/
+\begin_layout Plain Layout
+
+\backslash
+DeclareLaTeXClass{ACM SIGGRAPH (<= v.
+\begin_inset space ~
+\end_inset
+
+0.91, obsolete)}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Itemize
+To avoid duplicate definitions, the new layout can 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+Input
+\end_layout
+
+\end_inset
+
+ the old layout file and add\SpecialChar breakableslash
+remove\SpecialChar breakableslash
+obsolete\SpecialChar breakableslash
+modify settings and styles (similar
+ to the inclusion of 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+*.inc
+\end_layout
+
+\end_inset
+
+ files).
+\end_layout
+
+\begin_deeper
+\begin_layout Standard
+It may be tempting to let the new layout be the 
+\begin_inset Quotes eld
+\end_inset
+
+master version
+\begin_inset Quotes erd
+\end_inset
+
+ and have the old layout import it.
+ However, this should not be done because any changes to the new layout
+ would need undo steps in the importing old layout.
+\end_layout
+
+\end_deeper
+\begin_layout Itemize
+If the new LaTeX document class obsoletes the old one, update the example
+ and template files to use the new layout.
+ Add a note about the changes (preferably with a pointer to the documentation
+ of the changes).
+\end_layout
+
+\begin_deeper
+\begin_layout Standard
+This way, new documents based on the template or example will use the up-to-date
+ document class version.
+\end_layout
+
+\end_deeper
+\begin_layout Standard
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Section
+Tests
+\end_layout
+
+\begin_layout Standard
+Automated tests are an important tool to detect bugs and regressions in
+ software development.
+ Some projects like gcc even require each bug fix to be accompanied by a
+ test case for the automatic test suite, that would detect this bug.
+ Testing interactive features automatically is of course very hard, but
+ core functionality like document import and export can be tested quite
+ easily, and some tests of this kind exist.
+\end_layout
+
+\begin_layout Subsection
+unit tests
+\end_layout
+
+\begin_layout Standard
+There are attempts to set up a suite of unit tests for LyX.
+\end_layout
+
+\begin_layout Standard
+TODO: describe what is done and what is still to do.
+\end_layout
+
+\begin_layout Subsection
+tex2lyx tests
+\end_layout
+
+\begin_layout Standard
+The tex2lyx tests are located in the 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+src/tex2lyx/test
+\end_layout
+
+\end_inset
+
+ subfolder of the \SpecialChar LyX
+ source code distribution.
+ The actual testing is performed by the simple python script 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+src/tex2lyx/test/runtests.py
+\end_layout
+
+\end_inset
+
+.
+ Each test consists of two files: 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+<test name>.tex
+\end_layout
+
+\end_inset
+
+ contains the \SpecialChar LaTeX
+ code that should be tested.
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+<test name>.lyx.lyx
+\end_layout
+
+\end_inset
+
+ contains the expected output of tex2lyx.
+ When a test is run, the actual produced output is compared with the stored
+ reference output.
+ The test passes if both are identical.
+ The test machinery is also able to generate a file 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+<test name>.lyx.tex
+\end_layout
+
+\end_inset
+
+ by exporting the produced .lyx file with \SpecialChar LyX
+ again.
+ This may be useful for roundtrip comparisons.
+\end_layout
+
+\begin_layout Subsubsection
+Running the tests
+\end_layout
+
+\begin_layout Standard
+The tex2lyx tests can be run in several ways.
+ When in the 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+src/tex2lyx
+\end_layout
+
+\end_inset
+
+ subfolder of the build directory, the commands 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+ctest
+\end_layout
+
+\end_inset
+
+ (cmake, all platforms), 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+make test
+\end_layout
+
+\end_inset
+
+ (cmake, when using a make based build system and not MSVC) or 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+make alltests
+\end_layout
+
+\end_inset
+
+ (autotools) will run the tex2lyx tests.
+ Alternatively, in the root of the build directory, the command 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+ctest -R tex2lyx
+\end_layout
+
+\end_inset
+
+ runs all tests whose names match the regex 
+\begin_inset Quotes eld
+\end_inset
+
+tex2lyx
+\begin_inset Quotes erd
+\end_inset
+
+.
+ Another way to run the tex2lyx tests in the root build directory is to
+ instead use the command 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+ctest -L '(cmplyx|roundtrip)'
+\end_layout
+
+\end_inset
+
+, which runs all tests categorized with the label 
+\begin_inset Quotes eld
+\end_inset
+
+roundtrip
+\begin_inset Quotes erd
+\end_inset
+
+ or 
+\begin_inset Quotes eld
+\end_inset
+
+cmplyx
+\begin_inset Quotes erd
+\end_inset
+
+.
+ If a test fails, the differences between the expected and actual results
+ are output in unified diff format.
+\end_layout
+
+\begin_layout Subsubsection
+Updating test references
+\begin_inset CommandInset label
+LatexCommand label
+name "sec:Updating-test-references"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+In some cases a changed tex2lyx output is not a test failure, but wanted,
+ e.
+\begin_inset space \thinspace{}
+\end_inset
+
+g.
+\begin_inset space \space{}
+\end_inset
+
+if a tex2lyx bug was fixed, or a new feature was added.
+ In these cases the stored references need to be updated.
+ To do so if using autotools, call 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+make updatetests
+\end_layout
+
+\end_inset
+
+ in the 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+src/tex2lyx
+\end_layout
+
+\end_inset
+
+ subdirectory of the build directory.
+ If instead using CMake, call 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+make updatetex2lyxtests
+\end_layout
+
+\end_inset
+
+ in the build directory or in the 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+src/tex2lyx/test
+\end_layout
+
+\end_inset
+
+ subdirectory of the build directory.
+\begin_inset Foot
+status collapsed
+
+\begin_layout Plain Layout
+Note that this is a case where a make target in the build directory can
+ affect the source directory, which might not be advisable.
+\end_layout
+
+\end_inset
+
+ On Windows do the following:
+\end_layout
+
+\begin_layout Itemize
+Assure that the path to the python.exe is in your system PATH variable.
+\end_layout
+
+\begin_layout Itemize
+Double-click on the file 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+updatetex2lyxtests.vcxproj
+\end_layout
+
+\end_inset
+
+ in the build directory or in the 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+src/tex2lyx/test
+\end_layout
+
+\end_inset
+
+ subdirectory of your build directory.
+\end_layout
+
+\begin_layout Itemize
+In the appearing MSVC program assure that you build the 
+\emph on
+Release
+\emph default
+ version, then right-click on the project 
+\family sans
+updatetex2lyxtests
+\family default
+ in the project explorer and choose then 
+\family sans
+Project
+\begin_inset space ~
+\end_inset
+
+Only\SpecialChar menuseparator
+Rebuild
+\begin_inset space ~
+\end_inset
+
+only
+\family default
+.
+\end_layout
+
+\begin_layout Standard
+For convenience, these commands also produce re-exported roundtrip .lyx.tex
+ files.
+ Please examine the changed output carefully before committing the changed
+ files to the repository: Since the test machinery does not do a roundtrip
+ test .tex 
+\begin_inset Formula $\Rightarrow$
+\end_inset
+
+ .lyx 
+\begin_inset Formula $\Rightarrow$
+\end_inset
+
+ .tex, and does not compare the produced dvi or pdf output, it assumes that
+ the stored .lyx reference produces correct output if processed by \SpecialChar LyX
+.
+ There is only one chance to detect wrong output: before committing a new
+ reference.
+ Once it is committed, it is quite difficult to verify whether it is correct.
+\end_layout
+
+\begin_layout Standard
+Please 
+\emph on
+do not
+\emph default
+ update the test references by opening them with \SpecialChar LyX
+ or directly running lyx2lyx
+ on them.
+ This would not work, since lyx2lyx and \SpecialChar LyX
+ produce slightly different files
+ regarding insignificant whitespace and line breaks.
+\end_layout
+
+\begin_layout Subsubsection
+Adding a new test
+\end_layout
+
+\begin_layout Standard
+In many cases tests for new features may be added to one of the existing
+ test files, but sometimes this is not possible or not wanted.
+ Then a new test file needs to be added:
+\end_layout
+
+\begin_layout Enumerate
+Create the new file 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+src/tex2lyx/test/<test name>.tex
+\end_layout
+
+\end_inset
+
+ and run tex2lyx in roundtrip mode to produce the file 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+src/tex2lyx/test/<test name>.lyx.lyx
+\end_layout
+
+\end_inset
+
+.
+ This file will be the new reference.
+\end_layout
+
+\begin_layout Enumerate
+Once you confirmed that the tex2lyx output is correct, add the new files
+ to the corresponding lists in 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+src/tex2lyx/test/runtests.py
+\end_layout
+
+\end_inset
+
+, 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+src/tex2lyx/Makefile.am
+\end_layout
+
+\end_inset
+
+ and 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+src/tex2lyx/test/CMakeLists.txt
+\end_layout
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Enumerate
+Commit the changes to the repository, or send a patch to the development
+ list and ask for committing if you do not have commit rights.
+\end_layout
+
+\begin_layout Subsection
+ctest automatic tests
+\end_layout
+
+\begin_layout Standard
+Some tests are located in the 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+development/autotests/
+\end_layout
+
+\end_inset
+
+ subfolder of the \SpecialChar LyX
+ source code distribution.
+\begin_inset Foot
+status open
+
+\begin_layout Plain Layout
+The README document in this folder only describes the 
+\begin_inset Quotes eld
+\end_inset
+
+keytests
+\begin_inset Quotes erd
+\end_inset
+
+ subset of autotests!
+\end_layout
+
+\end_inset
+
+\end_layout
+
+\begin_layout Standard
+These tests can be run by the commands 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+ctest
+\end_layout
+
+\end_inset
+
+ in the
+\emph on
+ build directory
+\emph default
+ (all platforms) or (when using a make based build system and not MSVC)
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+make test
+\end_layout
+
+\end_inset
+
+ in the 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+autotests/
+\end_layout
+
+\end_inset
+
+ subfolder of the
+\emph on
+ build directory
+\emph default
+.
+ The test logs are written to the 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+Testing/Temporary/
+\end_layout
+
+\end_inset
+
+ subfolder of the
+\emph on
+\emph default
+build directory.
+\end_layout
+
+\begin_layout Subsubsection
+Export tests 
+\end_layout
+
+\begin_layout Standard
+The export tests are integration tests.
+ They take longer to run and are more likely to break than the tex2lyx tests.
+ Nevertheless, they have caught many regressions and without a better alternativ
+e it is important to keep them up-to-date and understand how they work.
+\end_layout
+
+\begin_layout Standard
+The export tests 
+\begin_inset Quotes eld
+\end_inset
+
+reuse
+\begin_inset Quotes erd
+\end_inset
+
+ documentation, template, and example documents.
+ In addition, there are a number of dedicated sample documents in the 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+autotests/export/
+\end_layout
+
+\end_inset
+
+ subfolder of the \SpecialChar LyX
+ source code distribution.
+ All samples are (after copying and eventual processing by scripts) exported
+ to various output formats via the 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+—export-to
+\end_layout
+
+\end_inset
+
+ command line option.
+ The tests checks for errors reported by LyX.
+ (However, error-free export is no guarantee for an error-free output document.)
+\end_layout
+
+\begin_layout Paragraph
+\begin_inset CommandInset label
+LatexCommand label
+name "par:when-to-run-an-export-test"
+
+\end_inset
+
+Expectations of LyX developers
+\end_layout
+
+\begin_layout Standard
+Because the export tests are integration tests and take a long time to run,
+ LyX developers are rarely expected to run all of the tests.
+ Here are some good practices to follow by developers:
+\end_layout
+
+\begin_layout Itemize
+When making a non-trivial change to a .layout file, run the export and layout
+ tests corresponding with that .layout file.
+\end_layout
+
+\begin_layout Itemize
+When making non-trivial changes to a .lyx file, run the export tests correspondin
+g to that .lyx file.
+\begin_inset Foot
+status collapsed
+
+\begin_layout Plain Layout
+This rule is due to revision.
+\end_layout
+
+\begin_layout Plain Layout
+There is an objection from the documentation maintainer that working on
+ the documentation must not be complicated by having to consider non-standard
+ exports.
+\end_layout
+
+\begin_layout Itemize
+successful compiling/testing an edited documentation file with pdflatex
+ suffices to ensure it can be commited, not tests with other exports are
+ required.
+\end_layout
+
+\begin_layout Plain Layout
+If sudden failures with other exports due to “half-tested” documentation
+ updates are a problem for the test maintainer, the test suite should use
+ copies that are 
+\end_layout
+
+\begin_layout Itemize
+copied to a cache dir (autotests/samples/doc/, say) but not changed,
+\end_layout
+
+\begin_layout Itemize
+updated regularely (but on a time chosen by the test suite maintainer) from
+ the originals in lib/doc/
+\end_layout
+
+\begin_layout Plain Layout
+This way, 
+\end_layout
+
+\begin_layout Itemize
+no test will fail due to ongoing work on documentation,
+\end_layout
+
+\begin_layout Itemize
+the documentation is still tested in full (with some delay),
+\end_layout
+
+\begin_layout Itemize
+failures with non-default export can be examined and handled accordingly
+ in one run with the cache update,
+\end_layout
+
+\begin_layout Itemize
+“interesting failures” (like the nested-language+polyglossia problem in
+ es/Customization can be separated and moved into dedicated test samples.
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Itemize
+When making non-trivial changes to LyX's \SpecialChar LaTeX
+ export code (e.g.
+ touching the encoding code or package handling code that you expect will
+ change the exported \SpecialChar LaTeX
+ in some way):
+\end_layout
+
+\begin_deeper
+\begin_layout Standard
+\paragraph_spacing single
+Consider running all of the export tests before and after your change.
+ If there are differences, please reconcile these (i.e.
+ fix the bug or fix the tests) 
+\emph on
+before
+\emph default
+ committing.
+ Ask for help if you're not sure what to.
+\end_layout
+
+\begin_layout Standard
+If you do not want to run the tests,
+\end_layout
+
+\begin_layout Itemize
+post the patch on the list and others will run the tests and eventually
+ ask for fixes, or
+\end_layout
+
+\begin_layout Itemize
+commit, but be prepared to fix eventually arising problems or to revert
+ the commit if there is no easy fix.
+\end_layout
+
+\end_deeper
+\begin_layout Itemize
+Understand how to interpret test failures.
+ If your commit is found to have broken a test, you should be able to interpret
+ the test results when made aware of them.
+ See Section 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "subsec:Interpreting-export-tests"
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Paragraph
+\begin_inset CommandInset label
+LatexCommand label
+name "par:export-test-output-formats"
+
+\end_inset
+
+Output formats
+\end_layout
+
+\begin_layout Standard
+The following output formats are currently tested for each sample document
+ (see 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "par:Export-test-filtering"
+
+\end_inset
+
+ for exceptions):
+\end_layout
+
+\begin_layout Labeling
+\labelwidthstring 00.00.0000
+LyX:
+\end_layout
+
+\begin_deeper
+\begin_layout Labeling
+\labelwidthstring 00.00.0000
+lyx16 LyX 1.6 file format (lyx2lyx)
+\end_layout
+
+\begin_layout Labeling
+\labelwidthstring 00.00.0000
+lyx21 LyX 2.1 file format (lyx2lyx)
+\end_layout
+
+\begin_layout Labeling
+\labelwidthstring 00.00.0000
+xhtml LyXHTML (native LyX HTML export)
+\end_layout
+
+\end_deeper
+\begin_layout Labeling
+\labelwidthstring 00.00.0000
+LyX
+\begin_inset space ~
+\end_inset
+
++
+\begin_inset space ~
+\end_inset
+
+LaTeX:
+\end_layout
+
+\begin_deeper
+\begin_layout Labeling
+\labelwidthstring pdf5msystemFM
+dvi DVI (8-bit latex)
+\end_layout
+
+\begin_layout Labeling
+\labelwidthstring pdf5msystemFM
+dvi3_texF DVI (LuaTeX with 8-bit TeX fonts)
+\end_layout
+
+\begin_layout Labeling
+\labelwidthstring pdf5msystemFM
+dvi3_systemF DVI (LuaTeX with Unicode fonts)
+\end_layout
+
+\begin_layout Labeling
+\labelwidthstring pdf5msystemFM
+pdf2 PDF (pdflatex)
+\end_layout
+
+\begin_layout Labeling
+\labelwidthstring pdf5msystemFM
+pdf4_texF PDF (XeTeX with 8-bit TeX fonts)
+\end_layout
+
+\begin_layout Labeling
+\labelwidthstring pdf5msystemFM
+pdf4_systemF PDF (XeTeX with Unicode fonts)
+\end_layout
+
+\begin_layout Labeling
+\labelwidthstring pdf5msystemFM
+pdf5_texF PDF (LuaTeX with 8-bit TeX fonts)
+\end_layout
+
+\begin_layout Labeling
+\labelwidthstring pdf5msystemFM
+pdf5_systemF PDF (LuaTeX with Unicode fonts)
+\end_layout
+
+\end_deeper
+\begin_layout Labeling
+\labelwidthstring 00.00.0000
+LyX
+\begin_inset space ~
+\end_inset
+
++
+\begin_inset space ~
+\end_inset
+
+LaTeX
+\begin_inset space ~
+\end_inset
+
++
+\begin_inset space ~
+\end_inset
+
+postprocessing:
+\end_layout
+
+\begin_deeper
+\begin_layout Labeling
+\labelwidthstring pdf5msystemFM
+pdf DVI -> PS (dvips) -> PDF (ps2pdf)
+\end_layout
+
+\begin_layout Labeling
+\labelwidthstring pdf5msystemFM
+pdf3 DVI -> PDF (dvipdfm)
 \end_layout
 
+\end_deeper
+\begin_layout Labeling
+\labelwidthstring 00.00.0000
+not
+\begin_inset space ~
 \end_inset
 
-.
+tested: (or only if set as default output format in the document source)
 \end_layout
 
-\begin_layout Paragraph
-Expectations of LyX developers
+\begin_deeper
+\begin_layout Labeling
+\labelwidthstring pdf5msystemFM
+latex LaTeX (plain)
 \end_layout
 
-\begin_layout Standard
-Because the export tests are integration tests and take a long time to run,
- LyX developers are rarely expected to run all of the tests.
- Here are some good practices to follow by developers:
+\begin_layout Labeling
+\labelwidthstring pdf5msystemFM
+luatex LaTeX (LuaTeX)
 \end_layout
 
-\begin_layout Itemize
-When making a non-trivial change to a .layout file, run the export and layout
- tests corresponding with that .layout file.
+\begin_layout Labeling
+\labelwidthstring pdf5msystemFM
+dviluatex LaTeX (dviluatex)
 \end_layout
 
-\begin_layout Itemize
-When making non-trivial changes to a .lyx file, run the export tests correspondin
-g to that .lyx file.
+\begin_layout Labeling
+\labelwidthstring pdf5msystemFM
+pdflatex LaTeX (pdflatex)
 \end_layout
 
-\begin_layout Itemize
-When making non-trivial changes to LyX's \SpecialChar LaTeX
- export code (e.g.
- touching the encoding code or package handling code that you expect will
- change the exported \SpecialChar LaTeX
- in some way):
+\begin_layout Labeling
+\labelwidthstring pdf5msystemFM
+platex LaTeX (pLaTeX)
 \end_layout
 
-\begin_deeper
-\begin_layout Standard
-\paragraph_spacing single
-Consider running all of the export tests before and after your change.
- If there are differences, please reconcile these (i.e.
- fix the bug or fix the tests) 
-\emph on
-before
-\emph default
- committing.
- Ask for help if you're not sure what to.
+\begin_layout Labeling
+\labelwidthstring pdf5msystemFM
+xetex LaTeX (XeTeX) 
 \end_layout
 
-\begin_layout Standard
-If you do not want to run the tests,
+\begin_layout Labeling
+\labelwidthstring pdf5msystemFM
+eps3 EPS (encapsulated Postscript) (cropped)
 \end_layout
 
-\begin_layout Itemize
-post the patch on the list and others will run the tests and eventually
- ask for fixes, or
+\begin_layout Labeling
+\labelwidthstring pdf5msystemFM
+ps DVI -> Postscript (dvips)
 \end_layout
 
-\begin_layout Itemize
-commit, but be prepared to fix eventually arising problems or to revert
- the commit if there is no easy fix.
+\begin_layout Labeling
+\labelwidthstring pdf5msystemFM
+odf
 \end_layout
 
-\end_deeper
-\begin_layout Itemize
-Understand how to interpret test failures.
- If your commit is found to have broken a test, you should be able to interpret
- the test results when made aware of them.
- See Section 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "subsec:Interpreting-export-tests"
+\begin_layout Labeling
+\labelwidthstring pdf5msystemFM
+text (nor text2, ..., text4)
+\end_layout
 
-\end_inset
+\begin_layout Labeling
+\labelwidthstring pdf5msystemFM
+textparagraph
+\end_layout
 
-.
+\begin_layout Labeling
+\labelwidthstring pdf5msystemFM
+word
+\end_layout
+
+\begin_layout Labeling
+\labelwidthstring pdf5msystemFM
+word2
+\end_layout
+
+\begin_layout Labeling
+\labelwidthstring pdf5msystemFM
+wordhtml
 \end_layout
 
+\end_deeper
 \begin_layout Paragraph
 \begin_inset CommandInset label
 LatexCommand label
@@ -1482,12 +2736,23 @@ ctest
 
 \end_inset
 
+.
+ A full, up-to-date TeXLive installation is recommended to run the tests.
+ Otherwise, some tests will fail.
+ Tests with additional requirements are labeled 
+\begin_inset Quotes eld
+\end_inset
+
+unreliable:nonstandard
+\begin_inset Quotes erd
+\end_inset
+
 .
  
 \end_layout
 
 \begin_layout Standard
-To run only some of the tests, use command line options:
+To run only some of the tests, use command line options (see examples below):
 \end_layout
 
 \begin_layout Labeling
@@ -1520,22 +2785,6 @@ status collapsed
  
 \end_layout
 
-\begin_deeper
-\begin_layout Standard
-For example, to run only the export tests, you can use 
-\begin_inset Flex Code
-status collapsed
-
-\begin_layout Plain Layout
-ctest -L export
-\end_layout
-
-\end_inset
-
-.
-\end_layout
-
-\end_deeper
 \begin_layout Labeling
 \labelwidthstring -R
 \begin_inset Flex Code
@@ -1654,7 +2903,6 @@ We are still working on getting the tests to run in parallel.
  pass when run sequentially.
  A reasonable approach is to first run the tests in parallel and then run
  the failed tests sequentially.
 \end_layout
 
 \begin_layout Standard
@@ -1689,6 +2937,35 @@ rerun-failed
 
 \end_layout
 
+\begin_layout Standard
+When specifying a subset of the tests (e.g.
+ using 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+\SpecialChar nobreakdash
+R <pattern>
+\end_layout
+
+\end_inset
+
+), the same subset must be specified when using the 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+\SpecialChar nobreakdash
+\SpecialChar nobreakdash
+rerun-failed
+\end_layout
+
+\end_inset
+
+ option because it is the test numbers that are used to index which tests
+ failed on the previous run.
+\end_layout
+
 \begin_layout Standard
 \noindent
 Note that some tests cannot be run in parallel.
@@ -1769,6 +3046,68 @@ man ctest
 ) the full list of command line options.
 \end_layout
 
+\begin_layout Paragraph
+Examples
+\end_layout
+
+\begin_layout Itemize
+run only the export tests: 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+ctest -L export
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Itemize
+run inverted tests: 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+ctest -L "inverted|suspended"
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Itemize
+list all export tests which match any of the labelling patterns: 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+ctest -N -R "
+\backslash
+..*_export/" 
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Itemize
+exclude rarely used output formats and post-processing tests 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+ctest -L export -E "_(texF|dvi3|pdf3?)"
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
 \begin_layout Paragraph
 \begin_inset CommandInset label
 LatexCommand label
@@ -1784,8 +3123,7 @@ A test can fail for several reasons, not all of them bad.
 \end_layout
 
 \begin_layout Enumerate
-The .lyx file could have been added recently and some formats are not expected
- to work well.
+A new or edited sample document may be incompatible with some output formats.
 \end_layout
 
 \begin_layout Enumerate
@@ -1898,7 +3236,17 @@ status collapsed
 status collapsed
 
 \begin_layout Plain Layout
-development/autotests/suspiciousTests
+development/autotests/invertedTests
+\end_layout
+
+\end_inset
+
+, 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+development/autotests/unreliableTests
 \end_layout
 
 \end_inset
@@ -1914,10 +3262,7 @@ development/autotests/ignoredTests
 \end_inset
 
 .
- It is possible that an export goes from succeeding to failing just because
- the document was changed and the document was never expected to work with
- a certain export format in the first case.
- Once this is confirmed to be the situation, the test can be inverted.
 \end_layout
 
 \begin_layout Standard
@@ -2031,15 +3376,15 @@ inverted
 \emph on
 uninvert
 \emph default
- the test by removing the labeling pattern from 
+ the test by removing the pattern from the 
 \begin_inset Quotes eld
 \end_inset
 
-suspiciousTests
+invertedTests
 \begin_inset Quotes erd
 \end_inset
 
-) (see 
+ file) (see 
 \begin_inset CommandInset ref
 LatexCommand ref
 reference "par:Inverted-tests"
@@ -2051,11 +3396,15 @@ reference "par:Inverted-tests"
 
 \begin_layout Itemize
 If the export did not fail previously but led to wrong output (PDF, say),
- it is in fact an improvement when the test now fails, label it as 
+\begin_inset Foot
+status collapsed
+
+\begin_layout Plain Layout
+Non-failing test with wrong output should be labeled as 
 \begin_inset Quotes eld
 \end_inset
 
-unreliable:wrong:output
+unreliable:wrong_output
 \begin_inset Quotes erd
 \end_inset
 
@@ -2069,6 +3418,45 @@ reference "par:Unreliable-tests"
 ).
 \end_layout
 
+\end_inset
+
+ it is in fact an improvement when the test now fails.
+\emph on
+Invert
+\emph default
+ the failing test case (see 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "par:Inverted-tests"
+
+\end_inset
+
+).
+\end_layout
+
+\begin_layout Itemize
+In case of tests failing due to missing requirements (tests labeled 
+\begin_inset Quotes eld
+\end_inset
+
+unreliable:nonstandard
+\begin_inset Quotes erd
+\end_inset
+
+ or testing on a system with only a subset of TeXLive installed), ignore
+ the failure, ask for someone else to run the test, or install the missing
+ resources and try again.
+\end_layout
+
+\begin_layout Itemize
+Check the log file Testing/Temporary/LastTest.log.
+ In case of latex-errors rerun the failing test with environment variable
+ 'LYX_DEBUG_LATEX' set to '1'.
+ This will include latex messages in LastTest.log, so it should be easier
+ to interpret the fail-reason.
+\end_layout
+
 \begin_layout Paragraph
 \begin_inset CommandInset label
 LatexCommand label
@@ -2085,7 +3473,7 @@ Test cases whose name matches a pattern in the file
 status collapsed
 
 \begin_layout Plain Layout
-development/autotests/suspiciousTests
+development/autotests/invertedTests
 \end_layout
 
 \end_inset
@@ -2140,7 +3528,7 @@ The following sublabels are currently present in
 status collapsed
 
 \begin_layout Plain Layout
-suspiciousTests
+invertedTests
 \end_layout
 
 \end_inset
@@ -2206,12 +3594,20 @@ otherwise, add a pattern here.
 
 \end_deeper
 \begin_layout Description
-attic Documents in the attic.
- (Kept for reference and format conversion test.)
+attic Documents in the attic (kept for reference and format conversion test).
+ Usually 
+\begin_inset Quotes eld
+\end_inset
+
+Wontfix
+\begin_inset Quotes erd
+\end_inset
+
+.
 \end_layout
 
 \begin_layout Subparagraph
-suspended 
+suspended tests
 \end_layout
 
 \begin_layout Standard
@@ -2386,43 +3782,45 @@ status collapsed
 
 \end_layout
 
-\begin_layout Description
-nonstandard Documents with additional requirements, e.g.
- a class or package file not in TeXLive.
-\begin_inset Note Note
-status open
+\begin_layout Standard
+The following sublabels are currently present in 
+\begin_inset Flex Code
+status collapsed
 
 \begin_layout Plain Layout
-TODO: rename to "extra"?
+unreliableTests
 \end_layout
 
 \end_inset
 
-
-\end_layout
-
-\begin_deeper
-\begin_layout Standard
-These tests are labeled as 
-\family typewriter
-'nonstandard'.
+:
 \end_layout
 
-\end_deeper
 \begin_layout Description
-erratic Tests depending on local configuration, OS, TeX distribution, package
versions, or the phase of the moon.
+nonstandard Documents with additional requirements, e.g.
a class or package file not in TeXLive.
  
 \begin_inset Note Note
 status open
 
-\begin_layout Plain Layout
-TODO: use 
-\emph on
-erratic
-\emph default
- only for the phase-of-moon dependency?
+\begin_layout Plain Layout
+TODO: rename to 
+\begin_inset Quotes eld
+\end_inset
+
+extra
+\begin_inset Quotes erd
+\end_inset
+
+ or 
+\begin_inset Quotes eld
+\end_inset
+
+exotic
+\begin_inset Quotes erd
+\end_inset
+
+?
 \end_layout
 
 \end_inset
@@ -2430,20 +3828,25 @@ erratic
 
 \end_layout
 
-\begin_deeper
-\begin_layout Standard
-These tests are labeled as 
-\family typewriter
-'erratic'.
+\begin_layout Description
+erratic Tests depending on local configuration or the phase of the moon.
+\end_layout
+
+\begin_layout Description
+varying_versions Tests depending on e.g.
+ OS or version of a non-TeX-Live dependency.
+ Note that a full, up-to-date TeX Live installation is required so this
+ sublabel is about versions of other dependencies.
 \end_layout
 
-\end_deeper
 \begin_layout Description
 wrong
 \begin_inset space ~
 \end_inset
 
-output Export does not fail but the resulting document has errors.
+output Export does not fail but the resulting document has (undetected)
+ errors.
 \end_layout
 
 \begin_deeper
@@ -2454,11 +3857,7 @@ status open
 
 \begin_layout Plain Layout
 \paragraph_spacing single
-These tests are actually not 
-\emph on
-unreliable
-\emph default
- but 
+These tests are in a strict sense not unreliable but 
 \emph on
 invalid
 \emph default
@@ -2472,6 +3871,12 @@ invalid
 
 \end_deeper
 \begin_layout Paragraph
+\begin_inset CommandInset label
+LatexCommand label
+name "par:Export-test-filtering"
+
+\end_inset
+
 Export test filtering
 \end_layout
 
@@ -2509,8 +3914,8 @@ Output Stop if tests not selected here
 
 \end_deeper
 \begin_layout Description
-unreliableTests: Tests selected either pass or fail, but that is dependent
on the system where the test is run.
+unreliableTests: Tests selected pass or fail dependent on the system where
+ the test is run.
  Selected tests gain the label 'unreliable'.
 \end_layout
 
@@ -2522,12 +3927,12 @@ Input Each test which passed 'ignoredTests'
 
 \begin_layout Labeling
 \labelwidthstring 00.00.0000
-Output Stop if test selected, gain label 'unreliable'.
+Output Gain label 'unreliable', proceed with checking for 'inverted'.
 \end_layout
 
 \end_deeper
 \begin_layout Description
-suspiciousTests 
+invertedTests 
 \begin_inset space \space{}
 \end_inset
 
@@ -2537,17 +3942,18 @@ suspiciousTests
 \begin_deeper
 \begin_layout Labeling
 \labelwidthstring 00.00.0000
-Input Each test which passed 'unreliableTests'
+Input Each test which passed 'ignoredTests'
 \end_layout
 
 \begin_layout Labeling
 \labelwidthstring 00.00.0000
-Output Stop if not selected.
+Output Stop if not selected, gain test-property 'WILL_FAIL' (i.e.
+ tests are reported as failing if the export works without error.) If no
+ subselection applies, gain labels 'export' and 'inverted'.
 \end_layout
 
 \begin_layout Standard
-The following file is meant as subselections of 'suspiciousTests'.
- If neither subselection applies, test gains labels 'export' and 'inverted'
+The following filter perfoms a subselection of 'invertedTests':
 \end_layout
 
 \begin_layout Description
@@ -2559,7 +3965,7 @@ suspendedTests Tests selected here gain the label 'suspended' but _not_
 \begin_deeper
 \begin_layout Labeling
 \labelwidthstring 00.00.0000
-Input Each test selected by 'suspiciousTests' 
+Input Each test selected by 'invertedTests' 
 \end_layout
 
 \begin_layout Labeling
@@ -2575,17 +3981,18 @@ The following table may clarify label assignement
 \end_layout
 
 \begin_layout Standard
+\begin_inset space \hspace{}
+\length -3cm
+\end_inset
+
+
 \begin_inset Tabular
-<lyxtabular version="3" rows="7" columns="12">
+<lyxtabular version="3" rows="6" columns="8">
 <features tabularvalignment="middle">
-<column alignment="left" valignment="top" width="0pt">
-<column alignment="left" valignment="top" width="0pt">
-<column alignment="left" valignment="top" width="0pt">
-<column alignment="left" valignment="top" width="0pt">
-<column alignment="center" valignment="top">
-<column alignment="center" valignment="top">
-<column alignment="center" valignment="top">
-<column alignment="center" valignment="top">
+<column alignment="left" valignment="top" width="2cm">
+<column alignment="left" valignment="top" width="2.5cm">
+<column alignment="left" valignment="top" width="2cm">
+<column alignment="center" valignment="top" width="2.5cm">
 <column alignment="center" valignment="top">
 <column alignment="center" valignment="top">
 <column alignment="center" valignment="top">
@@ -2595,7 +4002,7 @@ The following table may clarify label assignement
 \begin_inset Text
 
 \begin_layout Plain Layout
-Test found in file:
+Test matching pattern in file:
 \end_layout
 
 \end_inset
@@ -2627,16 +4034,16 @@ Test found in file:
 
 \end_inset
 </cell>
-<cell multicolumn="1" alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+<cell multicolumn="1" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
-Marked in ctest, Assigned label
+Assigned label
 \end_layout
 
 \end_inset
 </cell>
-<cell multicolumn="2" alignment="center" valignment="top" usebox="none">
+<cell multicolumn="2" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
@@ -2645,7 +4052,7 @@ Marked in ctest, Assigned label
 
 \end_inset
 </cell>
-<cell multicolumn="2" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<cell multicolumn="2" alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
@@ -2654,43 +4061,85 @@ Marked in ctest, Assigned label
 
 \end_inset
 </cell>
-<cell multicolumn="2" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
+test property
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
 
+\begin_layout Plain Layout
+ignored\SpecialChar softhyphen
+Tests
 \end_layout
 
 \end_inset
 </cell>
-<cell multicolumn="2" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
+unreliable\SpecialChar softhyphen
+Tests
+\end_layout
 
+\end_inset
+</cell>
+<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+inverted\SpecialChar softhyphen
+Tests
 \end_layout
 
 \end_inset
 </cell>
-<cell multicolumn="2" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
+suspended\SpecialChar softhyphen
+Tests
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
 
+\begin_layout Plain Layout
+export
 \end_layout
 
 \end_inset
 </cell>
-<cell multicolumn="2" alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
+inverted
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" usebox="none">
+\begin_inset Text
 
+\begin_layout Plain Layout
+suspended
 \end_layout
 
 \end_inset
 </cell>
-<cell multicolumn="2" alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
@@ -2705,7 +4154,7 @@ Marked in ctest, Assigned label
 \begin_inset Text
 
 \begin_layout Plain Layout
-Ignored
+Yes
 \end_layout
 
 \end_inset
@@ -2714,7 +4163,7 @@ Ignored
 \begin_inset Text
 
 \begin_layout Plain Layout
-Unreliable
+-
 \end_layout
 
 \end_inset
@@ -2723,48 +4172,48 @@ Unreliable
 \begin_inset Text
 
 \begin_layout Plain Layout
-Suspicious
+-
 \end_layout
 
 \end_inset
 </cell>
-<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
-Suspended
+-
 \end_layout
 
 \end_inset
 </cell>
-<cell multicolumn="1" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
-export
+-
 \end_layout
 
 \end_inset
 </cell>
-<cell multicolumn="2" alignment="center" valignment="top" topline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
-
+-
 \end_layout
 
 \end_inset
 </cell>
-<cell multicolumn="1" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
-unreliable
+-
 \end_layout
 
 \end_inset
 </cell>
-<cell multicolumn="2" alignment="center" valignment="top" topline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
@@ -2773,54 +4222,62 @@ unreliable
 
 \end_inset
 </cell>
-<cell multicolumn="1" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+</row>
+<row>
+<cell multirow="3" alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
-inverted
+No
 \end_layout
 
 \end_inset
 </cell>
-<cell multicolumn="2" alignment="center" valignment="top" topline="true" usebox="none">
+<cell multirow="3" alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
+If Yes,
+\begin_inset Newline newline
+\end_inset
 
+add label
+\begin_inset Newline newline
+\end_inset
+
+'unreliable'
 \end_layout
 
 \end_inset
 </cell>
-<cell multicolumn="1" alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+<cell multirow="3" alignment="left" valignment="middle" topline="true" bottomline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
-suspended
+Yes
 \end_layout
 
 \end_inset
 </cell>
-<cell multicolumn="2" alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
-
+Yes
 \end_layout
 
 \end_inset
 </cell>
-</row>
-<row>
-<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
-Yes
+-
 \end_layout
 
 \end_inset
 </cell>
-<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
@@ -2829,56 +4286,58 @@ Yes
 
 \end_inset
 </cell>
-<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
--
++
 \end_layout
 
 \end_inset
 </cell>
-<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
--
+WILL_FAIL
 \end_layout
 
 \end_inset
 </cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+</row>
+<row>
+<cell multirow="4" alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
--
+
 \end_layout
 
 \end_inset
 </cell>
-<cell alignment="center" valignment="top" topline="true" usebox="none">
+<cell multirow="4" alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
--
+
 \end_layout
 
 \end_inset
 </cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<cell multirow="4" alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
--
+
 \end_layout
 
 \end_inset
 </cell>
-<cell alignment="center" valignment="top" topline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
-
+No
 \end_layout
 
 \end_inset
@@ -2887,7 +4346,7 @@ Yes
 \begin_inset Text
 
 \begin_layout Plain Layout
--
++
 \end_layout
 
 \end_inset
@@ -2896,12 +4355,12 @@ Yes
 \begin_inset Text
 
 \begin_layout Plain Layout
--
++
 \end_layout
 
 \end_inset
 </cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
@@ -2914,27 +4373,27 @@ Yes
 \begin_inset Text
 
 \begin_layout Plain Layout
--
+WILL_FAIL
 \end_layout
 
 \end_inset
 </cell>
 </row>
 <row>
-<cell multirow="3" alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+<cell multirow="4" alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
-No
+
 \end_layout
 
 \end_inset
 </cell>
-<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+<cell multirow="4" alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
-Yes
+
 \end_layout
 
 \end_inset
@@ -2943,12 +4402,12 @@ Yes
 \begin_inset Text
 
 \begin_layout Plain Layout
--
+No
 \end_layout
 
 \end_inset
 </cell>
-<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
@@ -2957,16 +4416,16 @@ Yes
 
 \end_inset
 </cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
--
++
 \end_layout
 
 \end_inset
 </cell>
-<cell alignment="center" valignment="top" topline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
@@ -2975,7 +4434,7 @@ Yes
 
 \end_inset
 </cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" rightline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
@@ -2984,54 +4443,88 @@ Yes
 
 \end_inset
 </cell>
-<cell alignment="center" valignment="top" topline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" rightline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
-+
+
 \end_layout
 
 \end_inset
 </cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Note Note
+status open
+
+\begin_layout Plain Layout
+Without the 
+\begin_inset Quotes eld
+\end_inset
+
+suspendedTests
+\begin_inset Quotes erd
+\end_inset
+
+ filter, this would be far less complicated:
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Tabular
+<lyxtabular version="3" rows="6" columns="7">
+<features tabularvalignment="middle">
+<column alignment="left" valignment="top" width="0pt">
+<column alignment="left" valignment="top" width="0pt">
+<column alignment="left" valignment="top" width="0pt">
+<column alignment="center" valignment="top">
+<column alignment="center" valignment="top">
+<column alignment="center" valignment="top">
+<column alignment="center" valignment="top">
+<row>
+<cell multicolumn="1" alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
--
+Test matching pattern in file:
 \end_layout
 
 \end_inset
 </cell>
-<cell alignment="center" valignment="top" topline="true" usebox="none">
+<cell multicolumn="2" alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
--
+
 \end_layout
 
 \end_inset
 </cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<cell multicolumn="2" alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
--
+
 \end_layout
 
 \end_inset
 </cell>
-<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
+<cell multicolumn="1" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
--
+Label
 \end_layout
 
 \end_inset
 </cell>
-</row>
-<row>
-<cell multirow="4" alignment="left" valignment="middle" topline="true" leftline="true" usebox="none">
+<cell multicolumn="2" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
@@ -3040,20 +4533,40 @@ Yes
 
 \end_inset
 </cell>
-<cell multirow="3" alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+<cell multicolumn="2" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\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
+test property
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
-No
+ignoredTests
 \end_layout
 
 \end_inset
 </cell>
-<cell multirow="3" alignment="left" valignment="middle" topline="true" bottomline="true" leftline="true" usebox="none">
+<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
-Yes
+unreliableTests
 \end_layout
 
 \end_inset
@@ -3062,7 +4575,7 @@ Yes
 \begin_inset Text
 
 \begin_layout Plain Layout
-Yes
+invertedTests
 \end_layout
 
 \end_inset
@@ -3071,7 +4584,7 @@ Yes
 \begin_inset Text
 
 \begin_layout Plain Layout
--
+export
 \end_layout
 
 \end_inset
@@ -3080,39 +4593,41 @@ Yes
 \begin_inset Text
 
 \begin_layout Plain Layout
--
+unreliable
 \end_layout
 
 \end_inset
 </cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
--
+inverted
 \end_layout
 
 \end_inset
 </cell>
-<cell alignment="center" valignment="top" topline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
--
+
 \end_layout
 
 \end_inset
 </cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+</row>
+<row>
+<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
-+
+Yes
 \end_layout
 
 \end_inset
 </cell>
-<cell alignment="center" valignment="top" topline="true" usebox="none">
+<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
@@ -3121,7 +4636,7 @@ Yes
 
 \end_inset
 </cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
@@ -3130,18 +4645,16 @@ Yes
 
 \end_inset
 </cell>
-<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
-+
+-
 \end_layout
 
 \end_inset
 </cell>
-</row>
-<row>
-<cell multirow="4" alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
@@ -3150,16 +4663,16 @@ Yes
 
 \end_inset
 </cell>
-<cell multirow="4" alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
-
+-
 \end_layout
 
 \end_inset
 </cell>
-<cell multirow="4" alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
@@ -3168,7 +4681,9 @@ Yes
 
 \end_inset
 </cell>
-<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+</row>
+<row>
+<cell multirow="3" alignment="left" valignment="middle" topline="true" bottomline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
@@ -3177,20 +4692,20 @@ No
 
 \end_inset
 </cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
--
+Yes
 \end_layout
 
 \end_inset
 </cell>
-<cell alignment="center" valignment="top" topline="true" usebox="none">
+<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
-+
+-
 \end_layout
 
 \end_inset
 \begin_inset Text
 
 \begin_layout Plain Layout
--
++
 \end_layout
 
 \end_inset
 </cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
-+
+-
 \end_layout
 
 \end_inset
 </cell>
-<cell alignment="center" valignment="top" topline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
-+
+
 \end_layout
 
 \end_inset
 </cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+</row>
+<row>
+<cell multirow="4" alignment="left" valignment="middle" topline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
--
+
 \end_layout
 
 \end_inset
 </cell>
-<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
+<cell multirow="3" alignment="left" valignment="middle" topline="true" bottomline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
--
+No
 \end_layout
 
 \end_inset
 </cell>
-</row>
-<row>
-<cell multirow="4" alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
-
+Yes
 \end_layout
 
 \end_inset
 </cell>
-<cell multirow="4" alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
-
++
 \end_layout
 
 \end_inset
 </cell>
-<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
-No
+-
 \end_layout
 
 \end_inset
 </cell>
-<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
--
++
 \end_layout
 
 \end_inset
 </cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
--
+WILL_FAIL
 \end_layout
 
 \end_inset
 </cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" usebox="none">
+</row>
+<row>
+<cell multirow="4" alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
-+
+
 \end_layout
 
 \end_inset
 </cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+<cell multirow="4" alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
--
+
 \end_layout
 
 \end_inset
 </cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" usebox="none">
+<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
--
+No
 \end_layout
 
 \end_inset
@@ -3327,7 +4844,7 @@ No
 \begin_inset Text
 
 \begin_layout Plain Layout
--
++
 \end_layout
 
 \end_inset
@@ -3341,7 +4858,7 @@ No
 
 \end_inset
 </cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" rightline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
@@ -3354,7 +4871,7 @@ No
 \begin_inset Text
 
 \begin_layout Plain Layout
--
+
 \end_layout
 
 \end_inset
@@ -3365,6 +4882,11 @@ No
 \end_inset
 
 
+\end_layout
+
+\end_inset
+
+
 \end_layout
 
 \begin_layout Subsubsection
@@ -3405,6 +4927,37 @@ development/autotests/filterCheckWarnings
 Under cmake, the tests are labeled as 'load'.
 \end_layout
 
+\begin_layout Subsubsection
+Keytests
+\end_layout
+
+\begin_layout Standard
+Automated tests based on the "MonKey Testing" keytest program are enabled
+ if the necessary dependencies are found and if the CMake flag 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+-DLYX_ENABLE_KEYTESTS=ON
+\end_layout
+
+\end_inset
+
+ is used.
+ They are documented in the README document in 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+development/autotests
+\end_layout
+
+\end_inset
+
+ subfolder of the \SpecialChar LyX
+ source code distribution.
+\end_layout
+
 \begin_layout Subsubsection
 lyx21 tests
 \end_layout
@@ -3554,9 +5107,98 @@ No.
 \end_layout
 
 \begin_layout Section
+\begin_inset CommandInset label
+LatexCommand label
+name "sec:Documentation-policies"
+
+\end_inset
+
 Documentation policies
 \end_layout
 
+\begin_layout Subsection
+Rules
+\end_layout
+
+\begin_layout Standard
+There are 6
+\begin_inset space ~
+\end_inset
+
+rules in editing the docs:
+\end_layout
+
+\begin_layout Enumerate
+\begin_inset CommandInset label
+LatexCommand label
+name "enu:If-you-are"
+
+\end_inset
+
+If you are not the maintainer of a doc file or a chapter/section, you MUST
+ use change tracking so that the maintainer could review your changes
+\end_layout
+
+\begin_layout Enumerate
+Respect the formatting of the document.
+ The different files use different formatting styles.
+ That is OK and has historic reasons nobody fully knows ;-).
+ But it is important to be consistent within one file.
+\end_layout
+
+\begin_layout Enumerate
+All changes you make to a file in one language MUST also go the file in
+ the other actively maintained languages.
+ Normally the maintainer does this for you, if you are the maintainer, you
+ must do this by copying or changing the changed or added text to the other
+ files so that the translators sees the blue underlined text and know what
+ they have to translate and what was changed.
+\end_layout
+
+\begin_layout Enumerate
+You MUST assure that the document is compilable as 
+\begin_inset Quotes eld
+\end_inset
+
+PDF (pdflatex)
+\begin_inset Quotes erd
+\end_inset
+
+ or the document's default output format after your changes.
+\end_layout
+
+\begin_layout Enumerate
+All fixes (typos, compilation fixes, updates info etc.) go at first into
+ the current GIT branch because the user should benefit from all fixes with
+ every minor release.
+ Feel free to commit directly to branch as long as you follow rule
+\begin_inset space ~
+\end_inset
+
+
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "enu:If-you-are"
+
+\end_inset
+
+.
+ You can immediately commit to master as well.
+\end_layout
+
+\begin_layout Enumerate
+\begin_inset CommandInset label
+LatexCommand label
+name "enu:The-fileformat-of"
+
+\end_inset
+
+The fileformat of a file must not be changed unless you document a new feature
+ in LyX that requires a new fileformat.
+ The reason for this rule is to keep it easy for the doc maintainers to
+ port/backport changes to from master/branch.
+\end_layout
+
 \begin_layout Standard
 The main documentation consists of these files:
 \end_layout
@@ -3651,46 +5293,5 @@ Customization.lyx this manual covers information how to customize \SpecialChar L
  distributions (meaning be as objective as possible).
 \end_layout
 
-\begin_layout Standard
-There are only 4
-\begin_inset space ~
-\end_inset
-
-rules in editing the docs:
-\end_layout
-
-\begin_layout Enumerate
-If you are not the maintainer of a doc file or a chapter/section, you MUST
- use change tracking so that the maintainer could review your changes
-\end_layout
-
-\begin_layout Enumerate
-Respect the formatting of the document.
- The different files use different formatting styles.
- That is OK and has historic reasons nobody fully know ;-).
- But it is important to be consistent within one file.
-\end_layout
-
-\begin_layout Enumerate
-All changes you make to a file in one language MUST also go the file in
- the other actively maintained languages.
- Normally the maintainer does this for you, if you are the maintainer, you
- must do this by copying or changing the changed or added text to the other
- files so that the translators sees the blue underlined text and know what
- they have to translate and what was changed.
-\end_layout
-
-\begin_layout Enumerate
-You MUST assure that the document is compilable as 
-\begin_inset Quotes eld
-\end_inset
-
-PDF (pdflatex)
-\begin_inset Quotes erd
-\end_inset
-
- after your changes.
-\end_layout
-
 \end_body
 \end_document