1 #LyX 2.2 created this file. For more info see http://www.lyx.org/
7 \options fleqn,bibliography=totoc,index=totoc,BCOR7.5mm,titlepage,captions=tableheading
8 \use_default_options false
16 \maintain_unincluded_children false
19 InsetLayout CharStyle:MenuItem
28 \newcommand*{\menuitem}[1]{{\sffamily #1}}
33 \language_package default
40 \font_default_family default
41 \use_non_tex_fonts false
47 \default_output_format default
49 \bibtex_command default
50 \index_command default
54 \pdf_title "LyX's Development manual"
55 \pdf_author "LyX Team"
56 \pdf_subject "LyX's development documentation"
57 \pdf_keywords "LyX, Documentation, Development"
59 \pdf_bookmarksnumbered true
60 \pdf_bookmarksopen true
61 \pdf_bookmarksopenlevel 1
66 \pdf_pdfusetitle false
67 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue, pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false"
70 \use_package amsmath 1
71 \use_package amssymb 1
74 \use_package mathdots 1
75 \use_package mathtools 0
77 \use_package stackrel 0
78 \use_package stmaryrd 0
79 \use_package undertilde 0
81 \cite_engine_type default
85 \paperorientation portrait
89 \notefontcolor #0000ff
96 \paragraph_separation indent
97 \paragraph_indentation default
98 \quotes_language english
101 \paperpagestyle headings
102 \tracking_changes false
103 \output_changes false
112 Developing \SpecialChar LyX
116 \begin_layout Subtitle
121 by the \SpecialChar LyX
126 \begin_layout Plain Layout
128 If you have comments or error corrections, please send them to the \SpecialChar LyX
131 \begin_inset Flex Code
134 \begin_layout Plain Layout
136 <lyx-docs@lists.lyx.org>
149 \begin_layout Standard
150 \begin_inset CommandInset toc
151 LatexCommand tableofcontents
158 \begin_layout Chapter
162 \begin_layout Standard
163 This manual documents some aspects of \SpecialChar LyX
165 It is currently rather incomplete, but will hopefully be extended in the
167 Meanwhile, additional information can be found in the
168 \begin_inset Flex Code
171 \begin_layout Plain Layout
177 subfolder of the \SpecialChar LyX
178 source code distribution.
179 This document is not translated, since the development language of \SpecialChar LyX
182 If you want to use \SpecialChar LyX
183 you don't need to read this manual.
184 However, if you want to learn more about how \SpecialChar LyX
185 is developed, or even want
186 to participate in \SpecialChar LyX
187 development, you may find some interesting information.
190 \begin_layout Chapter
194 \begin_layout Standard
196 uses several custom file formats for configuration files and documents.
197 This chapter contains some background concerning these file formats.
198 Several file formats are also described in detail in the regular user documenta
202 \begin_layout Section
206 \begin_layout Section
207 When is an update of the .lyx file format number needed?
208 \begin_inset CommandInset label
210 name "sec:When-is-an"
217 \begin_layout Standard
218 When you are working on a new feature you may ask yourself whether it needs
219 an update of the .lyx file format number.
220 Whether an update is needed or not is not always obvious.
221 Below you can find a list of reasons for file format updates with explanations:
224 \begin_layout Description
233 setting Whenever you introduce a new setting that is stored in the document
234 header, a file format update is needed.
235 This is also true if you add a new valid value to an existing setting,
237 \begin_inset space \thinspace{}
241 \begin_inset space \space{}
244 a new language that is stored in
245 \begin_inset Flex Code
248 \begin_layout Plain Layout
259 \begin_layout Description
268 setting If a certain setting becomes obsolete and gets removed, a file format
272 \begin_layout Description
277 inset Of course a new inset requires a file format update.
280 \begin_layout Description
285 style in any layout file or module shipped with \SpecialChar LyX
286 , or new shipped layout
288 These requirements are currently under discussion and might change in the
292 \begin_layout Description
305 package Any new math package that is automatically loaded needs a file format
307 The reason for this is that there is no true ERT inset for math formulas:
308 Each command is parsed, and if a user happens to defne a local command
309 with the same name as a command that triggers an automatic load of a package,
310 he needs to be able to switch off the automatic loading of that package.
311 This switch is stored by the
312 \begin_inset Flex Code
315 \begin_layout Plain Layout
324 \begin_layout Standard
325 If you are still unsure, please ask on the development list.
328 \begin_layout Section
329 How to update the file format number of .lyx files
332 \begin_layout Standard
333 Once you came to the conclusion that a file format update is needed you
334 should use the following procedure to perform the update:
337 \begin_layout Enumerate
338 Implement and test the new feature, including the reading and writing of
340 Note that any file produced at this stage does not use a valid format,
341 so do not use this version of \SpecialChar LyX
342 for working on any important documents.
345 \begin_layout Enumerate
346 Describe the new format in
347 \begin_inset Flex Code
350 \begin_layout Plain Layout
359 \begin_layout Enumerate
360 Update the \SpecialChar LyX
361 file format number in
362 \begin_inset Flex Code
365 \begin_layout Plain Layout
374 \begin_layout Enumerate
375 Add an entry to both format lists (for conversion and reversion) in
376 \begin_inset Newline newline
380 \begin_inset Flex Code
383 \begin_layout Plain Layout
384 lib/lyx2lyx/lyx_2_2.py
390 Add a conversion routine if needed (e.
391 \begin_inset space \thinspace{}
395 \begin_inset space \space{}
398 a new header setting always needs a conversion that adds the new setting,
399 a new document language does not need one).
400 Add a reversion routine if needed.
401 While the conversion routine is required to produce a document that is
402 equivalent to the old version, the requirements of the reversion are not
404 If possible, try to produce a proper reversion, using ERT if needed, but
405 for some features this might be too complicated.
406 In this case, the minimum requirement of the reversion routine is that
407 it produces a valid document which can be read by an older \SpecialChar LyX
409 If absolutely needed, even data loss is allowed for the reversion.
412 \begin_layout Enumerate
413 Since tex2lyx has several implicit file format dependencies caused by sharing
414 code with \SpecialChar LyX
415 , updating the file format of .lyx files produced by tex2lyx at
416 the same time as updating the main .lyx file format is strongly recommended.
417 Therefore, a compiler warning will be issued if the \SpecialChar LyX
418 and tex2lyx .lyx file
419 format numbers differ.
420 In many cases the tex2lyx update requires only the first and last item
422 \begin_inset Separator parbreak
429 \begin_layout Enumerate
430 Update the tex2lyx file format number in
431 \begin_inset Flex Code
434 \begin_layout Plain Layout
443 \begin_layout Enumerate
444 If the lyx2lyx conversion from the old to the new format is empty, or if
445 tex2lyx does not yet output the changed feature, you do not need any further
447 Otherwise, search for the changed feature in tex2lyx, and adjust the output
448 according to the lyx2lyx changes.
451 \begin_layout Enumerate
452 Update the tex2lyx test references as described in
453 \begin_inset CommandInset ref
454 LatexCommand formatted
455 reference "sec:Updating-test-references"
463 \begin_layout Enumerate
464 If you did not implement full tex2lyx support of the new feature, add a
466 \begin_inset Flex Code
469 \begin_layout Plain Layout
475 describing the missing bits.
476 Note that it is perfectly fine if you do not add full tex2lyx support for
477 a new feature: The updating recommendation above is only issued for the
478 syntax of the produced .lyx file.
479 It is no problem if some features supported by \SpecialChar LyX
480 are still output as ERT
481 by tex2lyx, since the problems in the past that resulted in the update
482 recommendation were related to mixed version syntax, not ERT.
485 \begin_layout Enumerate
486 It would be nice if you could create a .lyx test file which contains instances
487 of all changed or added features.
488 This could then be used to test lyx2lyx and tex2lyx.
489 Unfortunately it has not yet been decided how to collect such examples,
490 so please ask on the development list if you want to create one.
493 \begin_layout Section
494 Backporting new styles to the stable version
497 \begin_layout Standard
498 Starting with the stable \SpecialChar LyX
499 2.1 branch, there is a mechanism in place to backport
500 new styles to the stable version without the need to update the file format.
501 The basic idea is that the new style definition is automatically copied
502 to the document preamble, so that it can even be used by older minor revisions
503 that did not yet include the style.
504 To backport a new style to the stable version, the following steps are
508 \begin_layout Enumerate
510 \begin_inset Flex Code
513 \begin_layout Plain Layout
519 to the style definition in the development version.
522 \begin_layout Enumerate
523 Copy the style definition to the stable version, but use
524 \begin_inset Flex Code
527 \begin_layout Plain Layout
534 If needed adjust the format to the one used by the stable version (see
535 the customization manual for details of the layout file format).
538 \begin_layout Enumerate
539 For each update of the style in a later stable version, increase the argument
541 \begin_inset Flex Code
544 \begin_layout Plain Layout
550 by one (in the stable version, the development version should not be touched).
553 \begin_layout Standard
554 For details about the
555 \begin_inset Flex Code
558 \begin_layout Plain Layout
564 flag see the customization manual.
566 \begin_inset Flex Code
569 \begin_layout Plain Layout
575 support is needed for backported styles: Since the style of the development
576 version has an infinite version number, it will always be used.
577 Furthermore, since its version number is less than one, the style will
578 not be written anymore to the document header for files saved by the new
582 \begin_layout Chapter
586 \begin_layout Standard
587 Automated tests are an important tool to detect bugs and regressions in
588 software development.
589 Some projects like gcc even require each bug fix to be accompanied by a
590 test case for the automatic test suite, that would detect this bug.
591 Testing interactive features automatically is of course very hard, but
592 core functionality like document import and export can be tested quite
593 easily, and some tests of this kind exist.
596 \begin_layout Section
601 \begin_layout Standard
602 Some tests are located in the
603 \begin_inset Flex Code
606 \begin_layout Plain Layout
607 development/autotests
612 subfolder of the \SpecialChar LyX
613 source code distribution.
616 \begin_layout Subsection
620 \begin_layout Standard
621 cmake is required to run the \SpecialChar LyX
622 tests, running them is not implemented for
625 tests can be run by the commands
626 \begin_inset Flex Code
629 \begin_layout Plain Layout
636 \begin_inset Flex Code
639 \begin_layout Plain Layout
645 (when using a make based build system and not MSVC) in the
646 \begin_inset Flex Code
649 \begin_layout Plain Layout
655 subfolder of the build directory.
658 \begin_layout Section
662 \begin_layout Standard
663 The tex2lyx tests are located in the
664 \begin_inset Flex Code
667 \begin_layout Plain Layout
673 subfolder of the \SpecialChar LyX
674 source code distribution.
675 The actual testing is performed by the simple python script
676 \begin_inset Flex Code
679 \begin_layout Plain Layout
680 src/tex2lyx/test/runtests.py
686 Each test consists of two files:
687 \begin_inset Flex Code
690 \begin_layout Plain Layout
696 contains the \SpecialChar LaTeX
697 code that should be tested.
699 \begin_inset Flex Code
702 \begin_layout Plain Layout
708 contains the expected output of tex2lyx.
709 When a test is run, the actual produced output is compared with the stored
711 The test passes if both are identical.
712 The test machinery is also able to generate a file
713 \begin_inset Flex Code
716 \begin_layout Plain Layout
722 by exporting the produced .lyx file with \SpecialChar LyX
724 This may be useful for roundtrip comparisons.
727 \begin_layout Subsection
731 \begin_layout Standard
732 The tex2lyx tests can be run in several ways.
734 \begin_inset Flex Code
737 \begin_layout Plain Layout
743 subfolder of the build directory, the commands
744 \begin_inset Flex Code
747 \begin_layout Plain Layout
753 (cmake, all platforms),
754 \begin_inset Flex Code
757 \begin_layout Plain Layout
763 (cmake, when using a make based build system and not MSVC) or
764 \begin_inset Flex Code
767 \begin_layout Plain Layout
773 (autotools) will run the tex2lyx tests.
774 Alternatively, in the root of the build directory, the command
775 \begin_inset Flex Code
778 \begin_layout Plain Layout
784 runs all tests whose names match the regex
785 \begin_inset Quotes eld
789 \begin_inset Quotes erd
793 Another way to run the tex2lyx tests in the root build directory is to
794 instead use the command
795 \begin_inset Flex Code
798 \begin_layout Plain Layout
799 ctest -L '(cmplyx|roundtrip)'
804 , which runs all tests categorized with the label
805 \begin_inset Quotes eld
809 \begin_inset Quotes erd
813 \begin_inset Quotes eld
817 \begin_inset Quotes erd
821 If a test fails, the differences between the expected and actual results
822 are output in unified diff format.
825 \begin_layout Subsection
826 Updating test references
827 \begin_inset CommandInset label
829 name "sec:Updating-test-references"
836 \begin_layout Standard
837 In some cases a changed tex2lyx output is not a test failure, but wanted,
839 \begin_inset space \thinspace{}
843 \begin_inset space \space{}
846 if a tex2lyx bug was fixed, or a new feature was added.
847 In these cases the stored references need to be updated.
848 To do so if using autotools, call
849 \begin_inset Flex Code
852 \begin_layout Plain Layout
859 \begin_inset Flex Code
862 \begin_layout Plain Layout
868 subdirectory of the build directory.
869 If instead using CMake, call
870 \begin_inset Flex Code
873 \begin_layout Plain Layout
874 make updatetex2lyxtests
879 in the build directory or in the
880 \begin_inset Flex Code
883 \begin_layout Plain Layout
889 subdirectory of the build directory.
893 \begin_layout Plain Layout
894 Note that this is a case where a make target in the build directory can
895 affect the source directory, which might not be advisable.
900 On Windows do the following:
903 \begin_layout Itemize
904 Assure that the path to the python.exe is in your system PATH variable.
907 \begin_layout Itemize
908 Double-click on the file
909 \begin_inset Flex Code
912 \begin_layout Plain Layout
913 updatetex2lyxtests.vcxproj
918 in the build directory or in the
919 \begin_inset Flex Code
922 \begin_layout Plain Layout
928 subdirectory of your build directory.
931 \begin_layout Itemize
932 In the appearing MSVC program right-click on the project
936 in the project explorer and chose
943 \begin_layout Standard
944 For convenience, these commands also produce re-exported roundtrip .lyx.tex
946 Please examine the changed output carefully before committing the changed
947 files to the repository: Since the test machinery does not do a roundtrip
949 \begin_inset Formula $\Rightarrow$
953 \begin_inset Formula $\Rightarrow$
956 .tex, and does not compare the produced dvi or pdf output, it assumes that
957 the stored .lyx reference produces correct output if processed by \SpecialChar LyX
959 There is only one chance to detect wrong output: before committing a new
961 Once it is committed, it is quite difficult to verify whether it is correct.
964 \begin_layout Standard
969 update the test references by opening them with \SpecialChar LyX
970 or directly running lyx2lyx
972 This would not work, since lyx2lyx and \SpecialChar LyX
973 produce slightly different files
974 regarding insignificant whitespace and line breaks.
977 \begin_layout Subsection
981 \begin_layout Standard
982 In many cases tests for new features may be added to one of the existing
983 test files, but sometimes this is not possible or not wanted.
984 Then a new test file needs to be added:
987 \begin_layout Enumerate
989 \begin_inset Flex Code
992 \begin_layout Plain Layout
993 src/tex2lyx/test/<test name>.tex
998 and run tex2lyx in roundtrip mode to produce the file
999 \begin_inset Flex Code
1002 \begin_layout Plain Layout
1003 src/tex2lyx/test/<test name>.lyx.lyx
1009 This file will be the new reference.
1012 \begin_layout Enumerate
1013 Once you confirmed that the tex2lyx output is correct, add the new files
1014 to the corresponding lists in
1015 \begin_inset Flex Code
1018 \begin_layout Plain Layout
1019 src/tex2lyx/test/runtests.py
1025 \begin_inset Flex Code
1028 \begin_layout Plain Layout
1029 src/tex2lyx/Makefile.am
1035 \begin_inset Flex Code
1038 \begin_layout Plain Layout
1039 src/tex2lyx/test/CMakeLists.txt
1047 \begin_layout Enumerate
1048 Commit the changes to the repository, or send a patch to the development
1049 list and ask for committing if you do not have commit rights.
1052 \begin_layout Section
1056 \begin_layout Standard
1057 The export tests are integration tests.
1058 They take longer to run and are more likely to break than the tex2lyx tests.
1059 Nevertheless, they have caught many regressions and without a better alternativ
1060 e it is important to keep them up-to-date and understand how they work.
1063 \begin_layout Subsection
1064 Expectations of LyX developers
1067 \begin_layout Standard
1068 Because the export tests are integration tests and take a long time to run,
1069 LyX developers are rarely expected to run all of the tests.
1070 Here are some good practices to follow by developers:
1073 \begin_layout Itemize
1074 When making a non-trivial change to a .layout file, run the export and layout
1075 tests corresponding with that .layout file.
1078 \begin_layout Itemize
1079 When making non-trivial changes to a .lyx file, run the export tests correspondin
1080 g to that .lyx file.
1083 \begin_layout Itemize
1084 When making non-trivial changes to LyX's LaTeX export code (e.g.
1085 touching the encoding code or package handling code that you expect will
1086 change the exported LaTeX in some way), consider running all of the export
1087 tests before and after your change.
1088 If there are differences, please reconcile these (i.e.
1089 fix the bug or fix the tests)
1094 Ask for help if you're not sure what to do or if you do not want to run
1095 the tests, post the patch on the list and others will run the tests.
1098 \begin_layout Itemize
1099 Understand how to interpret test failures.
1100 If your commit is found to have broken a test, you should be able to interpret
1101 the test results when made aware of them.
1103 \begin_inset CommandInset ref
1105 reference "subsec:Interpreting-export-tests"
1112 \begin_layout Subsection
1113 Configuring the tests
1116 \begin_layout Standard
1117 To enable these tests when using CMake, add the
1118 \begin_inset Flex Code
1121 \begin_layout Plain Layout
1122 -DLYX_ENABLE_EXPORT_TESTS=ON
1131 \begin_layout Standard
1132 \begin_inset Flex Code
1135 \begin_layout Plain Layout
1136 cmake -DLYX_ENABLE_EXPORT_TESTS=ON /path/to/source
1144 \begin_layout Standard
1146 This flag will increase the time for the cmake command by several seconds,
1147 mainly because of the process of inverting tests (see Section
1148 \begin_inset CommandInset ref
1150 reference "subsec:Interpreting-export-tests"
1157 \begin_layout Subsection
1161 \begin_layout Standard
1162 To run all tests, in the build directory simply run the command
1163 \begin_inset Flex Code
1166 \begin_layout Plain Layout
1173 To run only some of the tests, use the command
1174 \begin_inset Flex Code
1177 \begin_layout Plain Layout
1184 \begin_inset Flex Code
1187 \begin_layout Plain Layout
1193 is a regular expression that matches test names.
1194 To run only the export tests, you can use
1195 \begin_inset Flex Code
1198 \begin_layout Plain Layout
1205 For the list of test categories available in addition to
1206 \begin_inset Quotes eld
1210 \begin_inset Quotes erd
1214 \begin_inset Flex Code
1217 \begin_layout Plain Layout
1218 ctest \SpecialChar nobreakdash
1219 \SpecialChar nobreakdash
1226 It is often useful to list the tests without running them (e.g.
1227 if you want to know how many tests there are or whether your
1228 \begin_inset Flex Code
1231 \begin_layout Plain Layout
1237 regular expression did what you expected).
1238 This can be done with the
1239 \begin_inset Flex Code
1242 \begin_layout Plain Layout
1249 \begin_inset Flex Code
1252 \begin_layout Plain Layout
1253 \SpecialChar nobreakdash
1254 \SpecialChar nobreakdash
1261 We are still working on getting the tests to run in parallel which is supported
1263 \begin_inset Flex Code
1266 \begin_layout Plain Layout
1273 \begin_inset Flex Code
1276 \begin_layout Plain Layout
1283 \begin_inset Flex Code
1286 \begin_layout Plain Layout
1287 \SpecialChar nobreakdash
1288 \SpecialChar nobreakdash
1295 However, when running the tests in parallel, sometimes tests fail that
1296 pass when run sequentially.
1297 A reasonable approach is to first run the tests in parallel and then run
1298 the failed tests sequentially.
1299 For example, to run 8 jobs at a time:
1302 \begin_layout Standard
1303 \begin_inset Flex Code
1306 \begin_layout Plain Layout
1315 \begin_layout Standard
1316 \begin_inset Flex Code
1319 \begin_layout Plain Layout
1320 ctest \SpecialChar nobreakdash
1321 \SpecialChar nobreakdash
1330 \begin_layout Standard
1332 Note that some tests cannot be run in parallel.
1333 These tests are marked in the code with the
1334 \begin_inset Flex Code
1337 \begin_layout Plain Layout
1347 \begin_layout Standard
1348 In some situations the option
1349 \begin_inset Flex Code
1352 \begin_layout Plain Layout
1353 \SpecialChar nobreakdash
1354 \SpecialChar nobreakdash
1361 There have been bugs in LyX and in LaTeX which cause compilation to hang,
1362 and without a timeout a test might never stop (in one case there was even
1364 If a test times out, the
1365 \begin_inset Flex Code
1368 \begin_layout Plain Layout
1374 command exits with error, but you can distinguish between a timed out test
1375 and a failed test in the output reported at the end of the
1376 \begin_inset Flex Code
1379 \begin_layout Plain Layout
1388 \begin_layout Subsection
1389 \begin_inset CommandInset label
1391 name "subsec:Interpreting-export-tests"
1395 Interpreting the export test results
1398 \begin_layout Standard
1399 A test can fail for several reasons, not all of them bad.
1402 \begin_layout Enumerate
1403 The .lyx file could have been added recently and some formats are not expected
1407 \begin_layout Enumerate
1408 A dependency is not met (e.g.
1409 the LaTeX class file).
1410 One hint that this is the case is that the corresponding
1411 \begin_inset Flex Code
1414 \begin_layout Plain Layout
1420 test will likely also fail.
1423 \begin_layout Enumerate
1424 An export that previously failed to compile now compiles.
1427 \begin_layout Enumerate
1428 An external dependency was updated (e.g.
1432 \begin_layout Enumerate
1433 A recent code change introduced a bug.
1436 \begin_layout Enumerate
1437 \begin_inset CommandInset label
1443 A change in a document exposed the incompatibility of that class with an
1448 \begin_layout Standard
1449 Because the .lyx files are exported in several formats, it is not surprising
1450 that many of the exports fail.
1451 This expectation of failure is addressed by
1452 \begin_inset Quotes eld
1456 \begin_inset Quotes erd
1459 the tests, that is, by marking the test as
1460 \begin_inset Quotes eld
1464 \begin_inset Quotes erd
1467 if the export exits with error and as
1468 \begin_inset Quotes eld
1472 \begin_inset Quotes erd
1475 if the export succeeds
1480 It follows that these expected failures will not show up as failed tests
1481 in the test results and thus will not pollute the
1482 \begin_inset Quotes eld
1486 \begin_inset Quotes erd
1490 If the export actually succeeds, then the test will fail.
1491 The purpose of this failure is to get your attention—something has changed,
1492 possibly for the better.
1495 \begin_layout Standard
1496 We try to document why a test is inverted or ignored.
1497 See the comment (prefixed with
1498 \begin_inset Flex Code
1501 \begin_layout Plain Layout
1507 ) above the block in which the test is listed as inverted or ignored in
1509 \begin_inset Flex Code
1512 \begin_layout Plain Layout
1513 development/autotests/revertedTests
1519 \begin_inset Flex Code
1522 \begin_layout Plain Layout
1523 development/autotests/ignoredTests
1529 It is possible that an export goes from succeeding to failing just because
1530 the document was changed and the document was never expected to work with
1531 a certain export format in the first case.
1532 Once this is confirmed to be the situation, the test can be inverted.
1535 \begin_layout Standard
1536 A good question is why do we enable the tests for non-default formats? The
1537 answer is that if a non-default route is broken it is often because a bug
1538 was introduced in LyX and not because a document-specific change was made
1539 that is not supported by the route.
1540 In other words, there is a high signal/noise ratio in the export tests
1541 for the non-default formats.
1545 \begin_layout Standard
1546 What action should you take if a test fails? First, check manually that
1547 when the compilation succeeded before the resulting PDF was good.
1548 In fact, sometimes it is an improvement when a test fails.
1549 If you check manually, it might be the case that the export was succeeding
1550 before but showing garbled text in a PDF output.
1551 Now it might fail with a clear message of "language xyz not supported".
1552 It is always good to check manually why something fails and if it passes
1553 if the PDF output is good.
1556 \begin_layout Standard
1557 Sometimes a test is fixed by accident.
1558 We should uninvert a test (remove it from the
1559 \begin_inset Flex Code
1562 \begin_layout Plain Layout
1568 file) in order to preserve the fix.
1571 \begin_layout Standard
1572 When a test or several tests fail, consider checking the files in the
1573 \begin_inset Flex Code
1576 \begin_layout Plain Layout
1582 subdirectory of your build directory.
1583 In this subdirectory are three files: the file
1584 \begin_inset Flex Code
1587 \begin_layout Plain Layout
1593 simply lists the tests that failed on your last
1594 \begin_inset Flex Code
1597 \begin_layout Plain Layout
1604 \begin_inset Flex Code
1607 \begin_layout Plain Layout
1613 file contains the output from the tests (and often has details explaining
1614 why a test failed); and the
1615 \begin_inset Flex Code
1618 \begin_layout Plain Layout
1624 file lists the times that it took to run the tests.
1627 \begin_layout Subsection
1631 \begin_layout Standard
1632 Some inverted tests are 'suspended'.
1633 This means, they are not executed using
1634 \begin_inset Flex Code
1637 \begin_layout Plain Layout
1644 \begin_inset Flex Code
1647 \begin_layout Plain Layout
1654 From time to time they still have to be checked.
1657 \begin_layout Standard
1658 These tests are suspended, because they fail for known reasons which cannot
1660 But it is expected the reason might disappear in the future.
1661 Be it new TL or better handling in \SpecialChar LyX
1665 \begin_layout Standard
1666 For ctest commands without the
1667 \begin_inset Flex Code
1670 \begin_layout Plain Layout
1676 parameter nothing changes.
1677 Suspended or not, tests will be executed depending only on the regexes
1678 parameters given to the ctest command.
1681 \begin_layout Section
1685 \begin_layout Standard
1686 These tests check whether a .lyx file loads without any terminal messages.
1687 They correspond to the manual operations of simply opening a .lyx file on
1688 the terminal, exiting LyX once the file is loaded, and then checking whether
1689 there is any output from the terminal.
1690 These tests are useful for catching malformed .lyx files and parsing bugs.
1691 They can also be used to find a .lyx file in which an instance of something
1693 To do this, compile LyX with a local patch that outputs something to the
1694 terminal when an instance is found, and then run the check_load tests to
1695 see if any fail, which would mean that the situation occurs in the LyX
1696 documentation files corresponding to the failed tests.
1697 These tests are expectedly fragile: any LyX diagnostic message, which is
1698 not necessarily an error, would cause the tests to fail.
1699 Similarly, any message output by a library (e.g.
1700 Qt) would also cause failure.
1701 There are some messages that the check_load tests are instructed to ignore,
1702 which are stored in the file
1703 \begin_inset Flex Code
1706 \begin_layout Plain Layout
1707 development/autotests/filterCheckWarnings
1715 \begin_layout Section
1719 \begin_layout Standard
1720 The URL tests are enabled with the
1721 \begin_inset Flex Code
1724 \begin_layout Plain Layout
1725 -DLYX_ENABLE_URLTESTS=ON
1730 CMake flag and are useful for finding broken links in our documentation
1732 If a URL test fails, to see which link in particular was reported as broken,
1734 \begin_inset Flex Code
1737 \begin_layout Plain Layout
1744 These tests are extremely fragile (e.g.
1745 a test can depend on your Internet connection) and a failed URL test should
1746 not be taken too seriously.
1749 \begin_layout Chapter
1750 Development policies
1753 \begin_layout Standard
1754 This chapter lists some guidelines that should be followed.
1755 This list is not complete, and many guidelines are in separate chapters,
1757 \begin_inset Quotes eld
1760 When is an update of the .lyx file format number needed?
1761 \begin_inset Quotes erd
1765 \begin_inset CommandInset ref
1767 reference "sec:When-is-an"
1774 \begin_layout Section
1775 When to set a fixed milestone?
1778 \begin_layout Standard
1779 Only set a fixed milestone (like 2.1.4 or 2.2.0) if at least one of the following
1783 \begin_layout Enumerate
1784 Somebody is actively working on a fix.
1787 \begin_layout Enumerate
1788 The bug is so severe that it would block the release if it is not fixed.
1791 \begin_layout Standard
1792 If a bug is important, but nobody is working on it, and it is no showstopper,
1793 use a milestone like 2.1.x or 2.2.x.
1794 For all other bugs, do not set a milestone at all.
1797 \begin_layout Section
1798 Can we add rc entries in stable branch?
1801 \begin_layout Standard
1803 We are supposed to increase the prefs2prefs version number with such things.
1806 \begin_layout Chapter
1807 Documentation policies
1810 \begin_layout Standard
1811 The main documentation consists of these files:
1814 \begin_layout Description
1815 splash.lyx it is the first file you see after an installation.
1816 We assume that a new user sees this.
1817 It is therefore designed to be as simple as possible.
1818 Therefore please don't add any new formatting, only fix typos etc.
1819 Splash.lyx is up to date for \SpecialChar LyX
1820 2.1.x, currently maintained by Uwe Stöhr.
1823 \begin_layout Description
1824 Intro.lyx This is the manual new users will read to learn \SpecialChar LyX
1826 It therefore uses a limited set of formatting.
1827 For example a standard document class.
1828 Since new users will first learn about the formatting possibilities of
1830 please keep this file that simple.
1831 Intro.lyx is up to date for \SpecialChar LyX
1832 2.1.x, currently maintained by Uwe Stöhr.
1835 \begin_layout Description
1836 Tutorial.lyx our tutorial.
1837 It must be always up to date.
1838 Normally there is nothing to add since we don't want to overwhelm new users
1839 with too much details.
1840 The will learn these details while using \SpecialChar LyX
1841 and we have special manuals.
1842 Tutorial.lyx is up to date for \SpecialChar LyX
1843 2.1.x, currently maintained by Uwe Stöhr.
1846 \begin_layout Description
1847 UserGuide.lyx our main user guide.
1848 It covers a mixture of basic and detailed information.
1849 Some information is also in the Math and EmbeddedObjects manual so that
1850 the UserGuide refers to these files.
1851 UserGuide.lyx is up to date for \SpecialChar LyX
1852 2.1.x, currently maintained by Uwe Stöhr.
1855 \begin_layout Description
1856 EmbeddedObjects.lyx a special manual to explain things like tables floats
1859 EmbeddedObjects.lyx is up to date for \SpecialChar LyX
1860 2.1.x, currently maintained by Uwe
1864 \begin_layout Description
1865 Math.lyx a special manual to explain everything regarding math in all detail.
1866 Math.lyx is up to date for \SpecialChar LyX
1867 2.1.x, currently maintained by Uwe Stöhr.
1870 \begin_layout Description
1871 Additional.lyx this manual covers information that would be too much detail
1872 for the UserGuide or would make the UserGuide uncompilable or only compilable
1873 when installing a lot of special \SpecialChar LaTeX
1875 What should be in the UserGuide or better in Additional is a matter of
1877 it is up to you to decide that.
1878 Additional.lyx is not completely up to date for \SpecialChar LyX
1881 \begin_inset space ~
1884 8 is up to date and currently maintained by Uwe Stöhr.
1885 It certainly needs a rewrite and update.
1886 For example many info in chapter
1887 \begin_inset space ~
1890 2 and 3 are already covered by the UserGuide and/or the EmbeddedObjects
1894 \begin_layout Description
1895 Customization.lyx this manual covers information how to customize \SpecialChar LyX
1897 output formats, operating systems, languages etc.
1898 It is currently completely out of date and needs a major rewrite and update.
1899 If you do this please assure that your information are given for all OSes
1900 and \SpecialChar LaTeX
1901 distributions (meaning be as objective as possible).
1904 \begin_layout Standard
1906 \begin_inset space ~
1909 rules in editing the docs:
1912 \begin_layout Enumerate
1913 If you are not the maintainer of a doc file or a chapter/section, you MUST
1914 use change tracking so that the maintainer could review your changes
1917 \begin_layout Enumerate
1918 Respect the formatting of the document.
1919 The different files use different formatting styles.
1920 That is OK and has historic reasons nobody fully know ;-).
1921 But it is important to be consistent within one file.
1924 \begin_layout Enumerate
1925 All changes you make to a file in one language MUST also go the file in
1926 the other actively maintained languages.
1927 Normally the maintainer does this for you, if you are the maintainer, you
1928 must do this by copying or changing the changed or added text to the other
1929 files so that the translators sees the blue underlined text and know what
1930 they have to translate and what was changed.
1933 \begin_layout Enumerate
1934 You MUST assure that the document is compilable as
1935 \begin_inset Quotes eld
1939 \begin_inset Quotes erd