1 #LyX 2.2 created this file. For more info see http://www.lyx.org/
5 \save_transient_properties true
6 \origin /systemlyxdir/doc/
8 \options BCOR8mm,captions=tableheading
9 \use_default_options false
13 \maintain_unincluded_children false
15 \language_package default
18 \font_roman "lmodern" "default"
19 \font_sans "lmss" "default"
20 \font_typewriter "lmtt" "default"
21 \font_math "auto" "auto"
22 \font_default_family default
23 \use_non_tex_fonts false
26 \font_sf_scale 100 100
27 \font_tt_scale 100 100
29 \default_output_format pdf2
31 \bibtex_command default
32 \index_command default
36 \pdf_title "LyX's Development manual"
37 \pdf_author "LyX Team"
38 \pdf_subject "LyX's development documentation"
39 \pdf_keywords "LyX, Documentation, Development"
41 \pdf_bookmarksnumbered true
42 \pdf_bookmarksopen true
43 \pdf_bookmarksopenlevel 1
48 \pdf_pdfusetitle false
49 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue, pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false"
52 \use_package amsmath 1
53 \use_package amssymb 1
56 \use_package mathdots 1
57 \use_package mathtools 0
59 \use_package stackrel 0
60 \use_package stmaryrd 0
61 \use_package undertilde 0
63 \cite_engine_type default
67 \paperorientation portrait
71 \notefontcolor #0000ff
78 \paragraph_separation indent
79 \paragraph_indentation default
80 \quotes_language english
83 \paperpagestyle headings
84 \tracking_changes false
94 Developing \SpecialChar LyX
98 \begin_layout Subtitle
103 by the \SpecialChar LyX
108 \begin_layout Plain Layout
110 If you have comments or error corrections, please send them to the \SpecialChar LyX
113 \begin_inset Flex Code
116 \begin_layout Plain Layout
118 <lyx-docs@lists.lyx.org>
131 \begin_layout Standard
132 \begin_inset CommandInset toc
133 LatexCommand tableofcontents
140 \begin_layout Section
144 \begin_layout Standard
145 This manual documents some aspects of \SpecialChar LyX
147 It is currently rather incomplete, but will hopefully be extended in the
149 Meanwhile, additional information can be found in the
150 \begin_inset Flex Code
153 \begin_layout Plain Layout
159 subfolder of the \SpecialChar LyX
160 source code distribution.
161 This document is not translated, since the development language of \SpecialChar LyX
164 If you want to use \SpecialChar LyX
165 you don't need to read this manual.
166 However, if you want to learn more about how \SpecialChar LyX
167 is developed, or even want
168 to participate in \SpecialChar LyX
169 development, you may find some interesting information.
172 \begin_layout Section
176 \begin_layout Standard
178 uses several custom file formats for configuration files and documents.
179 This chapter contains some background concerning these file formats.
180 Several file formats are also described in detail in the regular user documenta
184 \begin_layout Subsection
188 \begin_layout Subsection
189 When is an update of the .lyx file format number needed?
190 \begin_inset CommandInset label
192 name "sec:When-is-an"
199 \begin_layout Standard
200 When you are working on a new feature you may ask yourself whether it needs
201 an update of the .lyx file format number.
202 Whether an update is needed or not is not always obvious.
203 Below you can find a list of reasons for file format updates with explanations:
206 \begin_layout Description
215 setting Whenever you introduce a new setting that is stored in the document
216 header, a file format update is needed.
217 This is also true if you add a new valid value to an existing setting,
219 \begin_inset space \thinspace{}
223 \begin_inset space \space{}
226 a new language that is stored in
227 \begin_inset Flex Code
230 \begin_layout Plain Layout
241 \begin_layout Description
250 setting If a certain setting becomes obsolete and gets removed, a file format
254 \begin_layout Description
259 inset Of course a new inset requires a file format update.
262 \begin_layout Description
267 style in any layout file or module shipped with \SpecialChar LyX
268 , or new shipped layout
270 These requirements are currently under discussion and might change in the
274 \begin_layout Description
287 package Any new math package that is automatically loaded needs a file format
289 The reason for this is that there is no true ERT inset for math formulas:
290 Each command is parsed, and if a user happens to define a local command
291 with the same name as a command that triggers an automatic load of a package,
292 he needs to be able to switch off the automatic loading of that package.
293 This switch is stored by the
294 \begin_inset Flex Code
297 \begin_layout Plain Layout
306 \begin_layout Standard
307 If you are still unsure, please ask on the development list.
310 \begin_layout Subsection
311 How to update the file format number of .lyx files
312 \begin_inset CommandInset label
314 name "subsec:update_lyx_files"
321 \begin_layout Standard
322 Once you came to the conclusion that a file format update is needed you
323 should use the following procedure to perform the update:
326 \begin_layout Enumerate
327 Implement and test the new feature, including the reading and writing of
329 Note that any file produced at this stage does not use a valid format,
330 so do not use this version of \SpecialChar LyX
331 for working on any important documents.
334 \begin_layout Enumerate
335 Describe the new format in
336 \begin_inset Flex Code
339 \begin_layout Plain Layout
348 \begin_layout Enumerate
349 Update the \SpecialChar LyX
350 file format number in
351 \begin_inset Flex Code
354 \begin_layout Plain Layout
363 \begin_layout Enumerate
364 Update the range of file formats in the array
365 \begin_inset Flex Code
368 \begin_layout Plain Layout
375 \begin_inset Flex Code
378 \begin_layout Plain Layout
387 \begin_layout Enumerate
388 Add an entry to both format lists (for conversion and reversion) in
389 \begin_inset Newline newline
393 \begin_inset Flex Code
396 \begin_layout Plain Layout
397 lib/lyx2lyx/lyx_2_2.py
403 Add a conversion routine if needed (e.
404 \begin_inset space \thinspace{}
408 \begin_inset space \space{}
411 a new header setting always needs a conversion that adds the new setting,
412 a new document language does not need one).
413 Add a reversion routine if needed.
414 While the conversion routine is required to produce a document that is
415 equivalent to the old version, the requirements of the reversion are not
417 If possible, try to produce a proper reversion, using ERT if needed, but
418 for some features this might be too complicated.
419 In this case, the minimum requirement of the reversion routine is that
420 it produces a valid document which can be read by an older \SpecialChar LyX
422 If absolutely needed, even data loss is allowed for the reversion.
425 \begin_layout Enumerate
426 Since tex2lyx has several implicit file format dependencies caused by sharing
427 code with \SpecialChar LyX
428 , updating the file format of .lyx files produced by tex2lyx at
429 the same time as updating the main .lyx file format is strongly recommended.
430 Therefore, a compiler warning will be issued if the \SpecialChar LyX
431 and tex2lyx .lyx file
432 format numbers differ.
433 In many cases the tex2lyx update requires only the first and last item
435 \begin_inset Separator parbreak
442 \begin_layout Enumerate
443 Update the tex2lyx file format number in
444 \begin_inset Flex Code
447 \begin_layout Plain Layout
456 \begin_layout Enumerate
457 If the lyx2lyx conversion from the old to the new format is empty, or if
458 tex2lyx does not yet output the changed feature, you do not need any further
460 Otherwise, search for the changed feature in tex2lyx, and adjust the output
461 according to the lyx2lyx changes.
464 \begin_layout Enumerate
465 Update the tex2lyx test references as described in
466 \begin_inset CommandInset ref
467 LatexCommand formatted
468 reference "sec:Updating-test-references"
476 \begin_layout Enumerate
477 If you did not implement full tex2lyx support of the new feature, add a
479 \begin_inset Flex Code
482 \begin_layout Plain Layout
488 describing the missing bits.
489 Note that it is perfectly fine if you do not add full tex2lyx support for
490 a new feature: The updating recommendation above is only issued for the
491 syntax of the produced .lyx file.
492 It is no problem if some features supported by \SpecialChar LyX
493 are still output as ERT
494 by tex2lyx, since the problems in the past that resulted in the update
495 recommendation were related to mixed version syntax, not ERT.
498 \begin_layout Enumerate
499 It would be nice if you could create a .lyx test file which contains instances
500 of all changed or added features.
501 This could then be used to test lyx2lyx and tex2lyx.
502 Unfortunately it has not yet been decided how to collect such examples,
503 so please ask on the development list if you want to create one.
506 \begin_layout Enumerate
507 \begin_inset CommandInset label
509 name "enu:updatefiles"
513 Update LyX's .lyx documentation files to the new format.
514 The developer who makes the change knows best what changes to expect when
515 inspecting the resulting diff.
516 Because of this, you might be able to catch a bug in the lyx2lyx code that
517 updates the format just by taking a quick scan through the large diff that
519 \begin_inset Note Note
522 \begin_layout Plain Layout
523 Another advantage is that if later we suspect a bug in lyx2lyx we can easily
524 see which layout update made an unexpected change by looking at the git
525 log of a .lyx file that suffers the problem.
531 To do this, first make sure that there are no changes to the git repository
532 that you will not want to commit (this is needed because it will be convenient
533 to commit with the command
534 \begin_inset Flex Code
537 \begin_layout Plain Layout
544 Then run the following command in the root folder of the source:
545 \begin_inset Flex Code
548 \begin_layout Plain Layout
549 python development/tools/updatedocs.py
555 Then, revert the change to
556 \begin_inset Flex Code
559 \begin_layout Plain Layout
565 because that file is meant to be generated separately:
566 \begin_inset Flex Code
569 \begin_layout Plain Layout
570 git checkout lib/doc/LFUNs.lyx
576 \begin_inset Note Note
579 \begin_layout Plain Layout
580 TODO: this step should be done within updatedocs.py
586 Look at the resulting changes using the command
587 \begin_inset Flex Code
590 \begin_layout Plain Layout
597 If anything looks surprising, please investigate.
598 Finally, commit using
599 \begin_inset Flex Code
602 \begin_layout Plain Layout
611 \begin_layout Subsection
612 Updating the file format number of layout files
615 \begin_layout Standard
617 \begin_inset CommandInset ref
619 reference "enu:updatefiles"
624 \begin_inset CommandInset ref
626 reference "subsec:update_lyx_files"
631 \begin_inset Flex Code
634 \begin_layout Plain Layout
640 command, use this command:
641 \begin_inset Flex Code
644 \begin_layout Plain Layout
645 python development/tools/updatelayouts.py
653 \begin_layout Standard
654 Note that we do not update the local layout of our
655 \begin_inset Flex Code
658 \begin_layout Plain Layout
664 files because users would then not be able to export to older formats.
665 For example, if a 2.2.0 user exported a template to 2.1.x format and tried
666 to open the file in LyX 2.1.x, there would be an error because the file would
667 contain a local layout whose format is too new.
668 The root reason for this is that we do not support converting layouts to
669 older layout formats, as we do for the
670 \begin_inset Flex Code
673 \begin_layout Plain Layout
682 \begin_layout Subsection
683 Updating the file format number of bind/ui files
686 \begin_layout Standard
688 \begin_inset CommandInset ref
690 reference "enu:updatefiles"
695 \begin_inset CommandInset ref
697 reference "subsec:update_lyx_files"
702 \begin_inset Flex Code
705 \begin_layout Plain Layout
711 command, use this command:
712 \begin_inset Flex Code
715 \begin_layout Plain Layout
716 bash development/tools/updatelfuns.sh
724 \begin_layout Subsection
725 Backporting new styles to the stable version
728 \begin_layout Standard
729 Starting with the stable \SpecialChar LyX
730 2.1 branch, there is a mechanism in place to backport
731 new styles to the stable version without the need to update the file format.
732 The basic idea is that the new style definition is automatically copied
733 to the document preamble, so that it can even be used by older minor revisions
734 that did not yet include the style.
735 To backport a new style to the stable version, the following steps are
739 \begin_layout Enumerate
741 \begin_inset Flex Code
744 \begin_layout Plain Layout
750 to the style definition in the development version.
753 \begin_layout Enumerate
754 Copy the style definition to the stable version, but use
755 \begin_inset Flex Code
758 \begin_layout Plain Layout
765 If needed adjust the format to the one used by the stable version (see
766 the customization manual for details of the layout file format).
769 \begin_layout Enumerate
770 For each update of the style in a later stable version, increase the argument
772 \begin_inset Flex Code
775 \begin_layout Plain Layout
781 by one (in the stable version, the development version should not be touched).
784 \begin_layout Standard
785 For details about the
786 \begin_inset Flex Code
789 \begin_layout Plain Layout
795 flag see the customization manual.
797 \begin_inset Flex Code
800 \begin_layout Plain Layout
806 support is needed for backported styles: Since the style of the development
807 version has an infinite version number, it will always be used.
808 Furthermore, since its version number is less than one, the style will
809 not be written anymore to the document header for files saved by the new
813 \begin_layout Standard
814 \begin_inset Newpage newpage
820 \begin_layout Section
824 \begin_layout Standard
825 Automated tests are an important tool to detect bugs and regressions in
826 software development.
827 Some projects like gcc even require each bug fix to be accompanied by a
828 test case for the automatic test suite, that would detect this bug.
829 Testing interactive features automatically is of course very hard, but
830 core functionality like document import and export can be tested quite
831 easily, and some tests of this kind exist.
834 \begin_layout Subsection
838 \begin_layout Standard
839 There are attempts to set up a suite of unit tests for LyX.
842 \begin_layout Standard
843 TODO: describe what is done and what is still to do.
846 \begin_layout Subsection
850 \begin_layout Standard
851 The tex2lyx tests are located in the
852 \begin_inset Flex Code
855 \begin_layout Plain Layout
861 subfolder of the \SpecialChar LyX
862 source code distribution.
863 The actual testing is performed by the simple python script
864 \begin_inset Flex Code
867 \begin_layout Plain Layout
868 src/tex2lyx/test/runtests.py
874 Each test consists of two files:
875 \begin_inset Flex Code
878 \begin_layout Plain Layout
884 contains the \SpecialChar LaTeX
885 code that should be tested.
887 \begin_inset Flex Code
890 \begin_layout Plain Layout
896 contains the expected output of tex2lyx.
897 When a test is run, the actual produced output is compared with the stored
899 The test passes if both are identical.
900 The test machinery is also able to generate a file
901 \begin_inset Flex Code
904 \begin_layout Plain Layout
910 by exporting the produced .lyx file with \SpecialChar LyX
912 This may be useful for roundtrip comparisons.
915 \begin_layout Subsubsection
919 \begin_layout Standard
920 The tex2lyx tests can be run in several ways.
922 \begin_inset Flex Code
925 \begin_layout Plain Layout
931 subfolder of the build directory, the commands
932 \begin_inset Flex Code
935 \begin_layout Plain Layout
941 (cmake, all platforms),
942 \begin_inset Flex Code
945 \begin_layout Plain Layout
951 (cmake, when using a make based build system and not MSVC) or
952 \begin_inset Flex Code
955 \begin_layout Plain Layout
961 (autotools) will run the tex2lyx tests.
962 Alternatively, in the root of the build directory, the command
963 \begin_inset Flex Code
966 \begin_layout Plain Layout
972 runs all tests whose names match the regex
973 \begin_inset Quotes eld
977 \begin_inset Quotes erd
981 Another way to run the tex2lyx tests in the root build directory is to
982 instead use the command
983 \begin_inset Flex Code
986 \begin_layout Plain Layout
987 ctest -L '(cmplyx|roundtrip)'
992 , which runs all tests categorized with the label
993 \begin_inset Quotes eld
997 \begin_inset Quotes erd
1001 \begin_inset Quotes eld
1005 \begin_inset Quotes erd
1009 If a test fails, the differences between the expected and actual results
1010 are output in unified diff format.
1013 \begin_layout Subsubsection
1014 Updating test references
1015 \begin_inset CommandInset label
1017 name "sec:Updating-test-references"
1024 \begin_layout Standard
1025 In some cases a changed tex2lyx output is not a test failure, but wanted,
1027 \begin_inset space \thinspace{}
1031 \begin_inset space \space{}
1034 if a tex2lyx bug was fixed, or a new feature was added.
1035 In these cases the stored references need to be updated.
1036 To do so if using autotools, call
1037 \begin_inset Flex Code
1040 \begin_layout Plain Layout
1047 \begin_inset Flex Code
1050 \begin_layout Plain Layout
1056 subdirectory of the build directory.
1057 If instead using CMake, call
1058 \begin_inset Flex Code
1061 \begin_layout Plain Layout
1062 make updatetex2lyxtests
1067 in the build directory or in the
1068 \begin_inset Flex Code
1071 \begin_layout Plain Layout
1077 subdirectory of the build directory.
1081 \begin_layout Plain Layout
1082 Note that this is a case where a make target in the build directory can
1083 affect the source directory, which might not be advisable.
1088 On Windows do the following:
1091 \begin_layout Itemize
1092 Assure that the path to the python.exe is in your system PATH variable.
1095 \begin_layout Itemize
1096 Double-click on the file
1097 \begin_inset Flex Code
1100 \begin_layout Plain Layout
1101 updatetex2lyxtests.vcxproj
1106 in the build directory or in the
1107 \begin_inset Flex Code
1110 \begin_layout Plain Layout
1116 subdirectory of your build directory.
1119 \begin_layout Itemize
1120 In the appearing MSVC program right-click on the project
1124 in the project explorer and chose
1131 \begin_layout Standard
1132 For convenience, these commands also produce re-exported roundtrip .lyx.tex
1134 Please examine the changed output carefully before committing the changed
1135 files to the repository: Since the test machinery does not do a roundtrip
1137 \begin_inset Formula $\Rightarrow$
1141 \begin_inset Formula $\Rightarrow$
1144 .tex, and does not compare the produced dvi or pdf output, it assumes that
1145 the stored .lyx reference produces correct output if processed by \SpecialChar LyX
1147 There is only one chance to detect wrong output: before committing a new
1149 Once it is committed, it is quite difficult to verify whether it is correct.
1152 \begin_layout Standard
1157 update the test references by opening them with \SpecialChar LyX
1158 or directly running lyx2lyx
1160 This would not work, since lyx2lyx and \SpecialChar LyX
1161 produce slightly different files
1162 regarding insignificant whitespace and line breaks.
1165 \begin_layout Subsubsection
1169 \begin_layout Standard
1170 In many cases tests for new features may be added to one of the existing
1171 test files, but sometimes this is not possible or not wanted.
1172 Then a new test file needs to be added:
1175 \begin_layout Enumerate
1177 \begin_inset Flex Code
1180 \begin_layout Plain Layout
1181 src/tex2lyx/test/<test name>.tex
1186 and run tex2lyx in roundtrip mode to produce the file
1187 \begin_inset Flex Code
1190 \begin_layout Plain Layout
1191 src/tex2lyx/test/<test name>.lyx.lyx
1197 This file will be the new reference.
1200 \begin_layout Enumerate
1201 Once you confirmed that the tex2lyx output is correct, add the new files
1202 to the corresponding lists in
1203 \begin_inset Flex Code
1206 \begin_layout Plain Layout
1207 src/tex2lyx/test/runtests.py
1213 \begin_inset Flex Code
1216 \begin_layout Plain Layout
1217 src/tex2lyx/Makefile.am
1223 \begin_inset Flex Code
1226 \begin_layout Plain Layout
1227 src/tex2lyx/test/CMakeLists.txt
1235 \begin_layout Enumerate
1236 Commit the changes to the repository, or send a patch to the development
1237 list and ask for committing if you do not have commit rights.
1240 \begin_layout Subsection
1241 ctest automatic tests
1244 \begin_layout Standard
1245 Some tests are located in the
1246 \begin_inset Flex Code
1249 \begin_layout Plain Layout
1250 development/autotests/
1255 subfolder of the \SpecialChar LyX
1256 source code distribution.
1261 \begin_layout Plain Layout
1262 The README document in this folder only describes the
1263 \begin_inset Quotes eld
1267 \begin_inset Quotes erd
1270 subset of autotests!
1278 \begin_layout Standard
1279 These tests can be run by the commands
1280 \begin_inset Flex Code
1283 \begin_layout Plain Layout
1293 (all platforms) or (when using a make based build system and not MSVC)
1295 \begin_inset Flex Code
1298 \begin_layout Plain Layout
1305 \begin_inset Flex Code
1308 \begin_layout Plain Layout
1319 The test logs are written to the
1320 \begin_inset Flex Code
1323 \begin_layout Plain Layout
1337 \begin_layout Subsubsection
1341 \begin_layout Standard
1342 The export tests are integration tests.
1343 They take longer to run and are more likely to break than the tex2lyx tests.
1344 Nevertheless, they have caught many regressions and without a better alternativ
1345 e it is important to keep them up-to-date and understand how they work.
1348 \begin_layout Standard
1350 \begin_inset Quotes eld
1354 \begin_inset Quotes erd
1357 documentation, template, and example documents.
1358 In addition, there are a number of dedicated sample documents in the
1359 \begin_inset Flex Code
1362 \begin_layout Plain Layout
1368 subfolder of the \SpecialChar LyX
1369 source code distribution.
1370 All samples are (after copying and eventual processing by scripts) exported
1371 to various output formats via the
1372 \begin_inset Flex Code
1375 \begin_layout Plain Layout
1381 command line option.
1382 The test checks for errors reported by LyX (However, error-free export
1383 is no guarantee for an error-free output document.)
1386 \begin_layout Paragraph
1387 Expectations of LyX developers
1390 \begin_layout Standard
1391 Because the export tests are integration tests and take a long time to run,
1392 LyX developers are rarely expected to run all of the tests.
1393 Here are some good practices to follow by developers:
1396 \begin_layout Itemize
1397 When making a non-trivial change to a .layout file, run the export and layout
1398 tests corresponding with that .layout file.
1401 \begin_layout Itemize
1402 When making non-trivial changes to a .lyx file, run the export tests correspondin
1403 g to that .lyx file.
1406 \begin_layout Itemize
1407 When making non-trivial changes to LyX's \SpecialChar LaTeX
1409 touching the encoding code or package handling code that you expect will
1410 change the exported \SpecialChar LaTeX
1415 \begin_layout Standard
1416 \paragraph_spacing single
1417 Consider running all of the export tests before and after your change.
1418 If there are differences, please reconcile these (i.e.
1419 fix the bug or fix the tests)
1424 Ask for help if you're not sure what to.
1427 \begin_layout Standard
1428 If you do not want to run the tests,
1431 \begin_layout Itemize
1432 post the patch on the list and others will run the tests and eventually
1436 \begin_layout Itemize
1437 commit, but be prepared to fix eventually arising problems or to revert
1438 the commit if there is no easy fix.
1442 \begin_layout Itemize
1443 Understand how to interpret test failures.
1444 If your commit is found to have broken a test, you should be able to interpret
1445 the test results when made aware of them.
1447 \begin_inset CommandInset ref
1449 reference "subsec:Interpreting-export-tests"
1456 \begin_layout Paragraph
1457 \begin_inset CommandInset label
1459 name "par:export-test-output-formats"
1466 \begin_layout Standard
1467 The following output formats are currently tested for each sample document
1469 \begin_inset CommandInset ref
1471 reference "par:Export-test-filtering"
1478 \begin_layout Labeling
1479 \labelwidthstring 00.00.0000
1484 \begin_layout Labeling
1485 \labelwidthstring 00.00.0000
1486 lyx16 LyX 1.6 file format (lyx2lyx)
1489 \begin_layout Labeling
1490 \labelwidthstring 00.00.0000
1491 lyx21 LyX 2.1 file format (lyx2lyx)
1494 \begin_layout Labeling
1495 \labelwidthstring 00.00.0000
1496 xhtml LyXHTML (native LyX HTML export)
1500 \begin_layout Labeling
1501 \labelwidthstring 00.00.0000
1503 \begin_inset space ~
1507 \begin_inset space ~
1514 \begin_layout Labeling
1515 \labelwidthstring pdf5msystemFM
1516 dvi DVI (8-bit latex)
1519 \begin_layout Labeling
1520 \labelwidthstring pdf5msystemFM
1521 dvi3_texF DVI (LuaTeX with 8-bit TeX fonts)
1524 \begin_layout Labeling
1525 \labelwidthstring pdf5msystemFM
1526 dvi3_systemF DVI (LuaTeX with Unicode fonts)
1529 \begin_layout Labeling
1530 \labelwidthstring pdf5msystemFM
1534 \begin_layout Labeling
1535 \labelwidthstring pdf5msystemFM
1536 pdf4_texF PDF (XeTeX with 8-bit TeX fonts)
1539 \begin_layout Labeling
1540 \labelwidthstring pdf5msystemFM
1541 pdf4_systemF PDF (XeTeX with Unicode fonts)
1544 \begin_layout Labeling
1545 \labelwidthstring pdf5msystemFM
1546 pdf5_texF PDF (LuaTeX with 8-bit TeX fonts)
1549 \begin_layout Labeling
1550 \labelwidthstring pdf5msystemFM
1551 pdf5_systemF PDF (LuaTeX with Unicode fonts)
1555 \begin_layout Labeling
1556 \labelwidthstring 00.00.0000
1558 \begin_inset space ~
1562 \begin_inset space ~
1566 \begin_inset space ~
1570 \begin_inset space ~
1577 \begin_layout Labeling
1578 \labelwidthstring pdf5msystemFM
1579 pdf DVI -> PS (dvips) -> PDF (ps2pdf)
1582 \begin_layout Labeling
1583 \labelwidthstring pdf5msystemFM
1584 pdf3 DVI -> PDF (dvipdfm)
1588 \begin_layout Labeling
1589 \labelwidthstring 00.00.0000
1591 \begin_inset space ~
1594 tested: (or only if set as default output format in the document source)
1598 \begin_layout Labeling
1599 \labelwidthstring pdf5msystemFM
1603 \begin_layout Labeling
1604 \labelwidthstring pdf5msystemFM
1605 luatex LaTeX (LuaTeX)
1608 \begin_layout Labeling
1609 \labelwidthstring pdf5msystemFM
1610 dviluatex LaTeX (dviluatex)
1613 \begin_layout Labeling
1614 \labelwidthstring pdf5msystemFM
1615 pdflatex LaTeX (pdflatex)
1618 \begin_layout Labeling
1619 \labelwidthstring pdf5msystemFM
1620 platex LaTeX (pLaTeX)
1623 \begin_layout Labeling
1624 \labelwidthstring pdf5msystemFM
1628 \begin_layout Labeling
1629 \labelwidthstring pdf5msystemFM
1630 eps3 EPS (encapsulated Postscript) (cropped)
1633 \begin_layout Labeling
1634 \labelwidthstring pdf5msystemFM
1635 ps DVI -> Postscript (dvips)
1638 \begin_layout Labeling
1639 \labelwidthstring pdf5msystemFM
1643 \begin_layout Labeling
1644 \labelwidthstring pdf5msystemFM
1645 text (nor text2, ..., text4)
1648 \begin_layout Labeling
1649 \labelwidthstring pdf5msystemFM
1653 \begin_layout Labeling
1654 \labelwidthstring pdf5msystemFM
1658 \begin_layout Labeling
1659 \labelwidthstring pdf5msystemFM
1663 \begin_layout Labeling
1664 \labelwidthstring pdf5msystemFM
1669 \begin_layout Paragraph
1670 \begin_inset CommandInset label
1672 name "par:Configuring-ctests"
1676 Configuring the tests
1679 \begin_layout Standard
1680 To enable the export autotests, add the
1681 \begin_inset Flex Code
1684 \begin_layout Plain Layout
1685 -DLYX_ENABLE_EXPORT_TESTS=ON
1694 \begin_layout Standard
1695 \begin_inset Flex Code
1698 \begin_layout Plain Layout
1699 cmake -DLYX_ENABLE_EXPORT_TESTS=ON /path/to/source
1707 \begin_layout Standard
1709 This flag will increase the time for the cmake command by several seconds,
1710 mainly because of the process of inverting tests (see Section
1711 \begin_inset CommandInset ref
1713 reference "subsec:Interpreting-export-tests"
1720 \begin_layout Paragraph
1721 \begin_inset CommandInset label
1723 name "par:ctest-options"
1730 \begin_layout Standard
1731 To run all tests, in the build directory simply run the command
1732 \begin_inset Flex Code
1735 \begin_layout Plain Layout
1745 \begin_layout Standard
1746 To run only some of the tests, use command line options (see examples below):
1749 \begin_layout Labeling
1750 \labelwidthstring -R
1751 \begin_inset Flex Code
1754 \begin_layout Plain Layout
1760 Run only the tests whose names match the given regular expression.
1763 \begin_layout Labeling
1764 \labelwidthstring -R
1765 \begin_inset Flex Code
1768 \begin_layout Plain Layout
1774 Run only the tests whose labels match the given regular expression.
1775 A test may have more that one label.
1779 \begin_layout Labeling
1780 \labelwidthstring -R
1781 \begin_inset Flex Code
1784 \begin_layout Plain Layout
1790 Exclude the tests whose names match the given regular expression.
1793 \begin_layout Labeling
1794 \labelwidthstring -R
1795 \begin_inset Flex Code
1798 \begin_layout Plain Layout
1804 Exclude the tests whose labels match the given regular expression.
1805 Cannot be combined with
1806 \begin_inset Flex Code
1809 \begin_layout Plain Layout
1818 \begin_layout Standard
1819 The following options help to find good selection patterns:
1822 \begin_layout Labeling
1823 \labelwidthstring -R
1824 \begin_inset Flex Code
1827 \begin_layout Plain Layout
1833 List the tests that would be run but not actually run them.
1838 \begin_layout Standard
1839 Useful in conjunction with the -R, -L, -E and -LE options, e.g., if you want
1840 to know how many tests there are or whether your
1841 \begin_inset Flex Code
1844 \begin_layout Plain Layout
1850 regular expression did what you expected.
1854 \begin_layout Labeling
1855 \labelwidthstring -R
1856 \begin_inset Flex Code
1859 \begin_layout Plain Layout
1860 \SpecialChar nobreakdash
1861 \SpecialChar nobreakdash
1867 print the list of all labels associated with the test set.
1868 Can also be combined with -R, -L, -E, ...
1872 \begin_layout Standard
1873 Other useful options are:
1876 \begin_layout Labeling
1877 \labelwidthstring -R
1878 \begin_inset Flex Code
1881 \begin_layout Plain Layout
1887 Run the tests in parallel using the given number of jobs.
1891 \begin_layout Standard
1892 We are still working on getting the tests to run in parallel.
1893 However, when running the tests in parallel, sometimes tests fail that
1894 pass when run sequentially.
1895 A reasonable approach is to first run the tests in parallel and then run
1896 the failed tests sequentially.
1900 \begin_layout Standard
1901 For example, to run 8 jobs at a time:
1904 \begin_layout Standard
1905 \begin_inset Flex Code
1908 \begin_layout Plain Layout
1917 \begin_layout Standard
1918 \begin_inset Flex Code
1921 \begin_layout Plain Layout
1922 ctest \SpecialChar nobreakdash
1923 \SpecialChar nobreakdash
1932 \begin_layout Standard
1934 Note that some tests cannot be run in parallel.
1935 These tests are marked in the code with the
1936 \begin_inset Flex Code
1939 \begin_layout Plain Layout
1950 \begin_layout Labeling
1951 \labelwidthstring -R
1952 \begin_inset Flex Code
1955 \begin_layout Plain Layout
1956 \SpecialChar nobreakdash
1957 \SpecialChar nobreakdash
1963 Set a global timeout on all tests that do not already have a timeout set
1968 \begin_layout Standard
1969 There have been bugs in LyX and in \SpecialChar LaTeX
1970 which cause compilation to hang, and
1971 without a timeout a test might never stop (in one case there was even a
1973 If a test times out, the
1974 \begin_inset Flex Code
1977 \begin_layout Plain Layout
1983 command exits with error, but you can distinguish between a timed out test
1984 and a failed test in the output reported at the end of the
1985 \begin_inset Flex Code
1988 \begin_layout Plain Layout
1998 \begin_layout Standard
2000 \begin_inset Flex Code
2003 \begin_layout Plain Layout
2009 ) the full list of command line options.
2012 \begin_layout Paragraph
2016 \begin_layout Itemize
2017 run only the export tests:
2018 \begin_inset Flex Code
2021 \begin_layout Plain Layout
2030 \begin_layout Itemize
2032 \begin_inset Flex Code
2035 \begin_layout Plain Layout
2036 ctest -L "inverted|suspended"
2044 \begin_layout Itemize
2045 list all export tests which match any of the labelling patterns:
2046 \begin_inset Flex Code
2049 \begin_layout Plain Layout
2060 \begin_layout Itemize
2061 exclude rarely used output formats and post-processing tests
2062 \begin_inset Flex Code
2065 \begin_layout Plain Layout
2066 ctest -L export -E "_(texF|dvi3|pdf3?)"
2074 \begin_layout Paragraph
2075 \begin_inset CommandInset label
2077 name "subsec:Interpreting-export-tests"
2081 Interpreting the export test results
2084 \begin_layout Standard
2085 A test can fail for several reasons, not all of them bad.
2088 \begin_layout Enumerate
2089 A new or edited sample document may be incompatible with some output formats.
2092 \begin_layout Enumerate
2093 A dependency is not met (e.g.
2094 the \SpecialChar LaTeX
2096 One hint that this is the case is that the corresponding
2097 \begin_inset Flex Code
2100 \begin_layout Plain Layout
2106 test will likely also fail.
2109 \begin_layout Enumerate
2110 An inverted test fails to fail (i.e.
2111 export that previously failed now works).
2114 \begin_layout Enumerate
2115 An external dependency was updated (e.g.
2120 \begin_layout Enumerate
2121 A recent code change introduced a bug.
2124 \begin_layout Enumerate
2125 \begin_inset CommandInset label
2131 A change in a document exposed a previously unknown bug or an incompatibility
2132 with an export format (e.g.
2133 Lua\SpecialChar LaTeX
2137 \begin_layout Standard
2138 Because the .lyx files are exported in several formats, it is not surprising
2139 that many of the exports fail.
2140 This expectation of failure is addressed by
2141 \begin_inset Quotes eld
2145 \begin_inset Quotes erd
2148 the tests, that is, by marking the test as
2149 \begin_inset Quotes eld
2153 \begin_inset Quotes erd
2156 if the export exits with error and as
2157 \begin_inset Quotes eld
2161 \begin_inset Quotes erd
2164 if the export succeeds
2169 It follows that these expected failures will not show up as failed tests
2170 in the test results and thus will not pollute the
2171 \begin_inset Quotes eld
2175 \begin_inset Quotes erd
2179 If the export actually succeeds, then the test will fail.
2180 The purpose of this failure is to get your attention—something has changed,
2181 possibly for the better.
2184 \begin_layout Standard
2185 We try to document why a test is inverted or ignored.
2186 See the comment (prefixed with
2187 \begin_inset Flex Code
2190 \begin_layout Plain Layout
2196 ) above the block in which the test is listed as inverted or ignored in
2198 \begin_inset Flex Code
2201 \begin_layout Plain Layout
2202 development/autotests/suspiciousTests
2208 \begin_inset Flex Code
2211 \begin_layout Plain Layout
2212 development/autotests/unreliableTests
2218 \begin_inset Flex Code
2221 \begin_layout Plain Layout
2222 development/autotests/ignoredTests
2231 \begin_layout Standard
2232 A good question is why do we enable the tests for non-default formats? The
2233 answer is that if a non-default route is broken it is often because a bug
2234 was introduced in LyX and not because a document-specific change was made
2235 that is not supported by the route.
2236 In other words, there is a high signal/noise ratio in the export tests
2237 for some non-default formats.
2241 \begin_layout Standard
2242 When a test or several tests fail, consider checking the files in the
2243 \begin_inset Flex Code
2246 \begin_layout Plain Layout
2252 subdirectory of your build directory.
2253 In this subdirectory are three files: the file
2254 \begin_inset Flex Code
2257 \begin_layout Plain Layout
2263 simply lists the tests that failed on your last
2264 \begin_inset Flex Code
2267 \begin_layout Plain Layout
2274 \begin_inset Flex Code
2277 \begin_layout Plain Layout
2283 file contains the output from the tests (and often has details explaining
2284 why a test failed); and the
2285 \begin_inset Flex Code
2288 \begin_layout Plain Layout
2294 file lists the times that it took to run the tests.
2297 \begin_layout Paragraph
2298 What action should you take if a test fails?
2301 \begin_layout Standard
2302 \paragraph_spacing single
2303 It is always good to check manually why something fails and if it passes
2304 if the PDF output is good.
2307 \begin_layout Itemize
2308 Generally, if a change breaks compilation for the target format (for the
2309 manuals pdf2) without solving some important other issue,
2311 fix or revert the commit
2313 that led to failure.
2316 \begin_layout Itemize
2317 If it is not possible to (immediately) fix the failure but there are reasons
2318 not to revert the commit (e.g.
2319 it fixes another more important issue),
2323 the failing test case (see
2324 \begin_inset CommandInset ref
2326 reference "par:Inverted-tests"
2333 \begin_layout Itemize
2338 test case fails because the export now works,
2342 the test by removing the labeling pattern from
2343 \begin_inset Quotes eld
2347 \begin_inset Quotes erd
2351 \begin_inset CommandInset ref
2353 reference "par:Inverted-tests"
2360 \begin_layout Itemize
2361 If the export did not fail previously but led to wrong output (PDF, say),
2362 it is in fact an improvement when the test now fails, label it as
2363 \begin_inset Quotes eld
2366 unreliable:wrong:output
2367 \begin_inset Quotes erd
2371 \begin_inset CommandInset ref
2373 reference "par:Unreliable-tests"
2380 \begin_layout Paragraph
2381 \begin_inset CommandInset label
2383 name "par:Inverted-tests"
2390 \begin_layout Standard
2391 Test cases whose name matches a pattern in the file
2392 \begin_inset Flex Code
2395 \begin_layout Plain Layout
2396 development/autotests/suspiciousTests
2406 They get also the test property
2407 \begin_inset Flex Code
2410 \begin_layout Plain Layout
2417 they are reported as failing if the export works without error
2418 \begin_inset Flex URL
2421 \begin_layout Plain Layout
2423 https://cmake.org/cmake/help/v3.0/command/set_tests_properties.html
2431 \begin_layout Standard
2432 Add failing cases to this file, if they cannot be solved
2433 \begin_inset Quotes eld
2437 \begin_inset Quotes erd
2440 but it is expected that the export will work in a foreseeable future, e.g.
2441 low priority issues like failures to export to a non-target format (for
2442 the manuals everything except pdf2).
2445 \begin_layout Standard
2446 The following sublabels are currently present in
2447 \begin_inset Flex Code
2450 \begin_layout Plain Layout
2459 \begin_layout Description
2460 todo test failures that require attention:
2464 \begin_layout Itemize
2465 minor issues to explore and properly sort later,
2468 \begin_layout Itemize
2472 \begin_layout Itemize
2473 LyX bugs to report at trac (move pattern to section "lyxbugs" once done).
2477 \begin_layout Description
2478 lyxbugs LyX bugs with a Trac number.
2481 \begin_layout Description
2482 ert Export failures due to "raw" LaTeX use in ERT or preamble code.
2486 \begin_layout Standard
2487 "Wontfix" if demonstrating correct use and OK in the default output format.
2491 \begin_layout Description
2492 texissues Export fails due to LaTeX limitations like non-ASCII characters
2493 in verbatim or listings, incompatible packages, ...
2497 \begin_layout Standard
2498 "Wontfix" if documents demonstrate correct use in the default output format:
2501 \begin_layout Itemize
2502 If the source can be made more robust without becoming "hackish", fix the
2506 \begin_layout Itemize
2507 if LyX could be enhanced to care for a permanent TeX limitation, file a
2508 ticket at trac and add a pattern under lyxbugs,
2511 \begin_layout Itemize
2512 otherwise, add a pattern here.
2516 \begin_layout Description
2517 attic Documents in the attic.
2518 (Kept for reference and format conversion test.)
2521 \begin_layout Subparagraph
2525 \begin_layout Standard
2526 Test cases whose name additionally matches a pattern in the file
2527 \begin_inset Flex Code
2530 \begin_layout Plain Layout
2531 development/autotests/suspendedTests
2549 This means they are not executed using
2550 \begin_inset Flex Code
2553 \begin_layout Plain Layout
2560 \begin_inset Flex Code
2563 \begin_layout Plain Layout
2570 However, they also get the test property
2571 \begin_inset Flex Code
2574 \begin_layout Plain Layout
2581 they are reported as failing if the export works without error.
2582 From time to time they still have to be checked using
2583 \begin_inset Flex Code
2586 \begin_layout Plain Layout
2595 \begin_layout Standard
2596 These tests are suspended, because the export fails for known reasons which
2597 cannot ATM be resolved.
2598 But it is expected the reason might disappear in the future.
2599 Be it new TL or better handling in \SpecialChar LyX
2603 \begin_layout Standard
2604 For ctest commands without the
2605 \begin_inset Flex Code
2608 \begin_layout Plain Layout
2614 parameter nothing changes.
2615 Suspended or not, tests will be executed depending only on the selecting
2616 regular expression given to the ctest command (see
2617 \begin_inset CommandInset ref
2619 reference "par:ctest-options"
2626 \begin_layout Paragraph
2627 \begin_inset CommandInset label
2629 name "par:Unreliable-tests"
2636 \begin_layout Standard
2637 Test cases whose name matches a pattern in the file
2638 \begin_inset Flex Code
2641 \begin_layout Plain Layout
2642 development/autotests/unreliableTests
2654 \begin_layout Standard
2655 These tests are not executed using
2656 \begin_inset Flex Code
2659 \begin_layout Plain Layout
2666 \begin_inset Flex Code
2669 \begin_layout Plain Layout
2679 \begin_layout Standard
2680 They pass or fail for various reasons not related to LyX (nonstandard, erratic)
2681 or pass but should rather fail (wrong output).
2683 \begin_inset Note Note
2686 \begin_layout Plain Layout
2687 *invalid* tests (wrong output) are not *unreliable*.
2688 # Use "unfit" or "unapplicable" as better label and name of pattern file?
2697 \begin_layout Description
2698 nonstandard Documents with additional requirements, e.g.
2699 a class or package file not in TeXLive.
2701 \begin_inset Note Note
2704 \begin_layout Plain Layout
2705 TODO: rename to "extra"?
2714 \begin_layout Standard
2715 These tests are labeled as
2721 \begin_layout Description
2722 erratic Tests depending on local configuration, OS, TeX distribution, package
2723 versions, or the phase of the moon.
2725 \begin_inset Note Note
2728 \begin_layout Plain Layout
2733 only for the phase-of-moon dependency?
2742 \begin_layout Standard
2743 These tests are labeled as
2749 \begin_layout Description
2751 \begin_inset space ~
2754 output Export does not fail but the resulting document has errors.
2758 \begin_layout Standard
2759 \paragraph_spacing single
2760 \begin_inset Note Note
2763 \begin_layout Plain Layout
2764 \paragraph_spacing single
2765 These tests are actually not
2773 (not measuring what they should measure).
2782 \begin_layout Paragraph
2783 \begin_inset CommandInset label
2785 name "par:Export-test-filtering"
2789 Export test filtering
2792 \begin_layout Standard
2793 The assignment of a label to a test is controlled by a set of files with
2794 regular expressions that are matched against the test names.
2797 \begin_layout Description
2798 ignoredTests (small file)
2799 \begin_inset Newline newline
2802 Tests selected here are withdrawn in the configuration step (cf.
2804 \begin_inset CommandInset ref
2806 reference "par:Configuring-ctests"
2814 \begin_layout Labeling
2815 \labelwidthstring 00.00.0000
2816 Input Test of any export combination
2819 \begin_layout Labeling
2820 \labelwidthstring 00.00.0000
2821 Output Stop if tests not selected here
2825 \begin_layout Description
2826 unreliableTests: Tests selected either pass or fail, but that is dependent
2827 on the system where the test is run.
2828 Selected tests gain the label 'unreliable'.
2832 \begin_layout Labeling
2833 \labelwidthstring 00.00.0000
2834 Input Each test which passed 'ignoredTests'
2837 \begin_layout Labeling
2838 \labelwidthstring 00.00.0000
2839 Output Stop if test selected, gain label 'unreliable'.
2843 \begin_layout Description
2845 \begin_inset space \space{}
2852 \begin_layout Labeling
2853 \labelwidthstring 00.00.0000
2854 Input Each test which passed 'unreliableTests'
2857 \begin_layout Labeling
2858 \labelwidthstring 00.00.0000
2859 Output Stop if not selected.
2862 \begin_layout Standard
2863 The following file is meant as subselections of 'suspiciousTests'.
2864 If neither subselection applies, test gains labels 'export' and 'inverted'
2867 \begin_layout Description
2868 suspendedTests Tests selected here gain the label 'suspended' but _not_
2869 'export' or 'inverted', although in ctest they remain inverted.
2870 ('ctest' knows only 'inverted' or not, labels are used only for test selection)
2874 \begin_layout Labeling
2875 \labelwidthstring 00.00.0000
2876 Input Each test selected by 'suspiciousTests'
2879 \begin_layout Labeling
2880 \labelwidthstring 00.00.0000
2881 Output Selected test gains label 'suspended'.
2887 \begin_layout Standard
2888 The following table may clarify label assignement
2891 \begin_layout Standard
2892 \begin_inset Tabular
2893 <lyxtabular version="3" rows="7" columns="12">
2894 <features tabularvalignment="middle">
2895 <column alignment="left" valignment="top" width="0pt">
2896 <column alignment="left" valignment="top" width="0pt">
2897 <column alignment="left" valignment="top" width="0pt">
2898 <column alignment="left" valignment="top" width="0pt">
2899 <column alignment="center" valignment="top">
2900 <column alignment="center" valignment="top">
2901 <column alignment="center" valignment="top">
2902 <column alignment="center" valignment="top">
2903 <column alignment="center" valignment="top">
2904 <column alignment="center" valignment="top">
2905 <column alignment="center" valignment="top">
2906 <column alignment="center" valignment="top">
2908 <cell multicolumn="1" alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2911 \begin_layout Plain Layout
2917 <cell multicolumn="2" alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2920 \begin_layout Plain Layout
2926 <cell multicolumn="2" alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2929 \begin_layout Plain Layout
2935 <cell multicolumn="2" alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
2938 \begin_layout Plain Layout
2944 <cell multicolumn="1" alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2947 \begin_layout Plain Layout
2948 Marked in ctest, Assigned label
2953 <cell multicolumn="2" alignment="center" valignment="top" usebox="none">
2956 \begin_layout Plain Layout
2962 <cell multicolumn="2" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2965 \begin_layout Plain Layout
2971 <cell multicolumn="2" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2974 \begin_layout Plain Layout
2980 <cell multicolumn="2" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2983 \begin_layout Plain Layout
2989 <cell multicolumn="2" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2992 \begin_layout Plain Layout
2998 <cell multicolumn="2" alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3001 \begin_layout Plain Layout
3007 <cell multicolumn="2" alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
3010 \begin_layout Plain Layout
3018 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3021 \begin_layout Plain Layout
3027 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3030 \begin_layout Plain Layout
3036 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3039 \begin_layout Plain Layout
3045 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3048 \begin_layout Plain Layout
3054 <cell multicolumn="1" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3057 \begin_layout Plain Layout
3063 <cell multicolumn="2" alignment="center" valignment="top" topline="true" usebox="none">
3066 \begin_layout Plain Layout
3072 <cell multicolumn="1" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3075 \begin_layout Plain Layout
3081 <cell multicolumn="2" alignment="center" valignment="top" topline="true" usebox="none">
3084 \begin_layout Plain Layout
3090 <cell multicolumn="1" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3093 \begin_layout Plain Layout
3099 <cell multicolumn="2" alignment="center" valignment="top" topline="true" usebox="none">
3102 \begin_layout Plain Layout
3108 <cell multicolumn="1" alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3111 \begin_layout Plain Layout
3117 <cell multicolumn="2" alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
3120 \begin_layout Plain Layout
3128 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3131 \begin_layout Plain Layout
3137 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3140 \begin_layout Plain Layout
3146 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3149 \begin_layout Plain Layout
3155 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3158 \begin_layout Plain Layout
3164 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3167 \begin_layout Plain Layout
3173 <cell alignment="center" valignment="top" topline="true" usebox="none">
3176 \begin_layout Plain Layout
3182 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3185 \begin_layout Plain Layout
3191 <cell alignment="center" valignment="top" topline="true" usebox="none">
3194 \begin_layout Plain Layout
3200 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3203 \begin_layout Plain Layout
3209 <cell alignment="center" valignment="top" topline="true" usebox="none">
3212 \begin_layout Plain Layout
3218 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3221 \begin_layout Plain Layout
3227 <cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
3230 \begin_layout Plain Layout
3238 <cell multirow="3" alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3241 \begin_layout Plain Layout
3247 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3250 \begin_layout Plain Layout
3256 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3259 \begin_layout Plain Layout
3265 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3268 \begin_layout Plain Layout
3274 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3277 \begin_layout Plain Layout
3283 <cell alignment="center" valignment="top" topline="true" usebox="none">
3286 \begin_layout Plain Layout
3292 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3295 \begin_layout Plain Layout
3301 <cell alignment="center" valignment="top" topline="true" usebox="none">
3304 \begin_layout Plain Layout
3310 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3313 \begin_layout Plain Layout
3319 <cell alignment="center" valignment="top" topline="true" usebox="none">
3322 \begin_layout Plain Layout
3328 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3331 \begin_layout Plain Layout
3337 <cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
3340 \begin_layout Plain Layout
3348 <cell multirow="4" alignment="left" valignment="middle" topline="true" leftline="true" usebox="none">
3351 \begin_layout Plain Layout
3357 <cell multirow="3" alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3360 \begin_layout Plain Layout
3366 <cell multirow="3" alignment="left" valignment="middle" topline="true" bottomline="true" leftline="true" usebox="none">
3369 \begin_layout Plain Layout
3375 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3378 \begin_layout Plain Layout
3384 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3387 \begin_layout Plain Layout
3393 <cell alignment="center" valignment="top" topline="true" usebox="none">
3396 \begin_layout Plain Layout
3402 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3405 \begin_layout Plain Layout
3411 <cell alignment="center" valignment="top" topline="true" usebox="none">
3414 \begin_layout Plain Layout
3420 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3423 \begin_layout Plain Layout
3429 <cell alignment="center" valignment="top" topline="true" usebox="none">
3432 \begin_layout Plain Layout
3438 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3441 \begin_layout Plain Layout
3447 <cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
3450 \begin_layout Plain Layout
3458 <cell multirow="4" alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
3461 \begin_layout Plain Layout
3467 <cell multirow="4" alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
3470 \begin_layout Plain Layout
3476 <cell multirow="4" alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3479 \begin_layout Plain Layout
3485 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3488 \begin_layout Plain Layout
3494 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3497 \begin_layout Plain Layout
3503 <cell alignment="center" valignment="top" topline="true" usebox="none">
3506 \begin_layout Plain Layout
3512 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3515 \begin_layout Plain Layout
3521 <cell alignment="center" valignment="top" topline="true" usebox="none">
3524 \begin_layout Plain Layout
3530 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3533 \begin_layout Plain Layout
3539 <cell alignment="center" valignment="top" topline="true" usebox="none">
3542 \begin_layout Plain Layout
3548 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3551 \begin_layout Plain Layout
3557 <cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
3560 \begin_layout Plain Layout
3568 <cell multirow="4" alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3571 \begin_layout Plain Layout
3577 <cell multirow="4" alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3580 \begin_layout Plain Layout
3586 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3589 \begin_layout Plain Layout
3595 <cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3598 \begin_layout Plain Layout
3604 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3607 \begin_layout Plain Layout
3613 <cell alignment="center" valignment="top" topline="true" bottomline="true" usebox="none">
3616 \begin_layout Plain Layout
3622 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3625 \begin_layout Plain Layout
3631 <cell alignment="center" valignment="top" topline="true" bottomline="true" usebox="none">
3634 \begin_layout Plain Layout
3640 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3643 \begin_layout Plain Layout
3649 <cell alignment="center" valignment="top" topline="true" bottomline="true" usebox="none">
3652 \begin_layout Plain Layout
3658 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3661 \begin_layout Plain Layout
3667 <cell alignment="center" valignment="top" topline="true" bottomline="true" rightline="true" usebox="none">
3670 \begin_layout Plain Layout
3684 \begin_layout Subsubsection
3688 \begin_layout Standard
3689 These tests check whether a .lyx file loads without any terminal messages.
3690 They correspond to the manual operations of simply opening a .lyx file on
3691 the terminal, exiting LyX once the file is loaded, and then checking whether
3692 there is any output from the terminal.
3693 These tests are useful for catching malformed .lyx files and parsing bugs.
3694 They can also be used to find a .lyx file in which an instance of something
3696 To do this, compile LyX with a local patch that outputs something to the
3697 terminal when an instance is found, and then run the check_load tests to
3698 see if any fail, which would mean that the situation occurs in the LyX
3699 documentation files corresponding to the failed tests.
3700 These tests are expectedly fragile: any LyX diagnostic message, which is
3701 not necessarily an error, would cause the tests to fail.
3702 Similarly, any message output by a library (e.g.
3703 Qt) would also cause failure.
3704 There are some messages that the check_load tests are instructed to ignore,
3705 which are stored in the file
3706 \begin_inset Flex Code
3709 \begin_layout Plain Layout
3710 development/autotests/filterCheckWarnings
3718 \begin_layout Standard
3719 Under cmake, the tests are labeled as 'load'.
3722 \begin_layout Subsubsection
3726 \begin_layout Standard
3727 Automated tests based on the "MonKey Testing" keytest program.
3728 They are documented in the README document in
3729 \begin_inset Flex Code
3732 \begin_layout Plain Layout
3733 development/autotests
3738 subfolder of the \SpecialChar LyX
3739 source code distribution.
3743 \begin_layout Subsubsection
3747 \begin_layout Standard
3748 These tests combine lyx2lyx tests with check_load tests.
3749 They fail if either fails.
3752 \begin_layout Subsubsection
3756 \begin_layout Standard
3757 The URL tests are enabled with the
3758 \begin_inset Flex Code
3761 \begin_layout Plain Layout
3762 -DLYX_ENABLE_URLTESTS=ON
3767 CMake flag and are useful for finding broken links in our documentation
3769 If a URL test fails, to see which link in particular was reported as broken,
3771 \begin_inset Flex Code
3774 \begin_layout Plain Layout
3781 These tests are extremely fragile (e.g.
3782 a test can depend on your Internet connection) and a failed URL test should
3783 not be taken too seriously.
3784 URL tests are labeled as
3789 \begin_layout Paragraph
3793 \begin_layout Standard
3794 cmake is required to run the \SpecialChar LyX
3795 tests, running them is not implemented for
3799 \begin_layout Standard
3800 The appropriate commands are:
3803 \begin_layout Itemize
3809 \begin_inset Newline newline
3812 runs all tests with label
3817 \begin_layout Itemize
3820 ctest -R 'check_.*urls'
3823 \begin_inset Newline newline
3826 runs the tests 'check_accessible_urls'
3829 \begin_layout Standard
3830 Associated test results can be examined in ctest-log directory in files
3831 of the form 'LastFailed.*URLS.log'
3834 \begin_layout Section
3835 Development policies
3838 \begin_layout Standard
3839 This chapter lists some guidelines that should be followed.
3840 This list is not complete, and many guidelines are in separate chapters,
3842 \begin_inset Quotes eld
3845 When is an update of the .lyx file format number needed?
3846 \begin_inset Quotes erd
3850 \begin_inset CommandInset ref
3852 reference "sec:When-is-an"
3859 \begin_layout Subsection
3860 When to set a fixed milestone?
3863 \begin_layout Standard
3864 Only set a fixed milestone (like 2.1.4 or 2.2.0) if at least one of the following
3868 \begin_layout Enumerate
3869 Somebody is actively working on a fix.
3872 \begin_layout Enumerate
3873 The bug is so severe that it would block the release if it is not fixed.
3876 \begin_layout Standard
3877 If a bug is important, but nobody is working on it, and it is no showstopper,
3878 use a milestone like 2.1.x or 2.2.x.
3879 For all other bugs, do not set a milestone at all.
3882 \begin_layout Subsection
3883 Can we add rc entries in stable branch?
3886 \begin_layout Standard
3888 We are supposed to increase the prefs2prefs version number with such things.
3891 \begin_layout Section
3892 Documentation policies
3895 \begin_layout Standard
3896 The main documentation consists of these files:
3899 \begin_layout Description
3900 splash.lyx it is the first file you see after an installation.
3901 We assume that a new user sees this.
3902 It is therefore designed to be as simple as possible.
3903 Therefore please don't add any new formatting, only fix typos etc.
3904 Splash.lyx is up to date for \SpecialChar LyX
3905 2.1.x, currently maintained by Uwe Stöhr.
3908 \begin_layout Description
3909 Intro.lyx This is the manual new users will read to learn \SpecialChar LyX
3911 It therefore uses a limited set of formatting.
3912 For example a standard document class.
3913 Since new users will first learn about the formatting possibilities of
3915 please keep this file that simple.
3916 Intro.lyx is up to date for \SpecialChar LyX
3917 2.1.x, currently maintained by Uwe Stöhr.
3920 \begin_layout Description
3921 Tutorial.lyx our tutorial.
3922 It must be always up to date.
3923 Normally there is nothing to add since we don't want to overwhelm new users
3924 with too much details.
3925 The will learn these details while using \SpecialChar LyX
3926 and we have special manuals.
3927 Tutorial.lyx is up to date for \SpecialChar LyX
3928 2.1.x, currently maintained by Uwe Stöhr.
3931 \begin_layout Description
3932 UserGuide.lyx our main user guide.
3933 It covers a mixture of basic and detailed information.
3934 Some information is also in the Math and EmbeddedObjects manual so that
3935 the UserGuide refers to these files.
3936 UserGuide.lyx is up to date for \SpecialChar LyX
3937 2.1.x, currently maintained by Uwe Stöhr.
3940 \begin_layout Description
3941 EmbeddedObjects.lyx a special manual to explain things like tables floats
3944 EmbeddedObjects.lyx is up to date for \SpecialChar LyX
3945 2.1.x, currently maintained by Uwe
3949 \begin_layout Description
3950 Math.lyx a special manual to explain everything regarding math in all detail.
3951 Math.lyx is up to date for \SpecialChar LyX
3952 2.1.x, currently maintained by Uwe Stöhr.
3955 \begin_layout Description
3956 Additional.lyx this manual covers information that would be too much detail
3957 for the UserGuide or would make the UserGuide uncompilable or only compilable
3958 when installing a lot of special \SpecialChar LaTeX
3960 What should be in the UserGuide or better in Additional is a matter of
3962 it is up to you to decide that.
3963 Additional.lyx is not completely up to date for \SpecialChar LyX
3966 \begin_inset space ~
3969 8 is up to date and currently maintained by Uwe Stöhr.
3970 It certainly needs a rewrite and update.
3971 For example many info in chapter
3972 \begin_inset space ~
3975 2 and 3 are already covered by the UserGuide and/or the EmbeddedObjects
3979 \begin_layout Description
3980 Customization.lyx this manual covers information how to customize \SpecialChar LyX
3982 output formats, operating systems, languages etc.
3983 It is currently completely out of date and needs a major rewrite and update.
3984 If you do this please assure that your information are given for all OSes
3985 and \SpecialChar LaTeX
3986 distributions (meaning be as objective as possible).
3989 \begin_layout Standard
3991 \begin_inset space ~
3994 rules in editing the docs:
3997 \begin_layout Enumerate
3998 If you are not the maintainer of a doc file or a chapter/section, you MUST
3999 use change tracking so that the maintainer could review your changes
4002 \begin_layout Enumerate
4003 Respect the formatting of the document.
4004 The different files use different formatting styles.
4005 That is OK and has historic reasons nobody fully know ;-).
4006 But it is important to be consistent within one file.
4009 \begin_layout Enumerate
4010 All changes you make to a file in one language MUST also go the file in
4011 the other actively maintained languages.
4012 Normally the maintainer does this for you, if you are the maintainer, you
4013 must do this by copying or changing the changed or added text to the other
4014 files so that the translators sees the blue underlined text and know what
4015 they have to translate and what was changed.
4018 \begin_layout Enumerate
4019 You MUST assure that the document is compilable as
4020 \begin_inset Quotes eld
4024 \begin_inset Quotes erd