]> git.lyx.org Git - lyx.git/blob - lib/doc/Development.lyx
6310876631ff87b0302796a7060b20193f4fffa2
[lyx.git] / lib / doc / Development.lyx
1 #LyX 2.2 created this file. For more info see http://www.lyx.org/
2 \lyxformat 501
3 \begin_document
4 \begin_header
5 \origin /systemlyxdir/doc/
6 \textclass scrartcl
7 \options BCOR8mm,captions=tableheading
8 \use_default_options false
9 \begin_modules
10 logicalmkup
11 \end_modules
12 \maintain_unincluded_children false
13 \begin_local_layout
14 Format 7
15 InsetLayout CharStyle:MenuItem
16 LyxType               charstyle
17 LabelString           menu
18 LatexType             command
19 LatexName             menuitem
20 Font
21 Family              Sans
22 EndFont
23 Preamble
24 \newcommand*{\menuitem}[1]{{\sffamily #1}}
25 EndPreamble
26 End
27 \end_local_layout
28 \language english
29 \language_package default
30 \inputencoding auto
31 \fontencoding global
32 \font_roman "lmodern" "default"
33 \font_sans "lmss" "default"
34 \font_typewriter "lmtt" "default"
35 \font_math "auto" "auto"
36 \font_default_family default
37 \use_non_tex_fonts false
38 \font_sc false
39 \font_osf false
40 \font_sf_scale 100 100
41 \font_tt_scale 100 100
42 \graphics default
43 \default_output_format default
44 \output_sync 0
45 \bibtex_command default
46 \index_command default
47 \paperfontsize 12
48 \spacing single
49 \use_hyperref true
50 \pdf_title "LyX's Development manual"
51 \pdf_author "LyX Team"
52 \pdf_subject "LyX's development documentation"
53 \pdf_keywords "LyX, Documentation, Development"
54 \pdf_bookmarks true
55 \pdf_bookmarksnumbered true
56 \pdf_bookmarksopen true
57 \pdf_bookmarksopenlevel 1
58 \pdf_breaklinks false
59 \pdf_pdfborder false
60 \pdf_colorlinks true
61 \pdf_backref false
62 \pdf_pdfusetitle false
63 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue, pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false"
64 \papersize a4paper
65 \use_geometry false
66 \use_package amsmath 1
67 \use_package amssymb 1
68 \use_package cancel 0
69 \use_package esint 0
70 \use_package mathdots 1
71 \use_package mathtools 0
72 \use_package mhchem 1
73 \use_package stackrel 0
74 \use_package stmaryrd 0
75 \use_package undertilde 0
76 \cite_engine basic
77 \cite_engine_type default
78 \biblio_style plain
79 \use_bibtopic false
80 \use_indices false
81 \paperorientation portrait
82 \suppress_date false
83 \justification true
84 \use_refstyle 0
85 \notefontcolor #0000ff
86 \index Index
87 \shortcut idx
88 \color #008000
89 \end_index
90 \secnumdepth 3
91 \tocdepth 3
92 \paragraph_separation indent
93 \paragraph_indentation default
94 \quotes_language english
95 \papercolumns 1
96 \papersides 2
97 \paperpagestyle headings
98 \tracking_changes false
99 \output_changes false
100 \html_math_output 0
101 \html_css_as_file 0
102 \html_be_strict true
103 \end_header
104
105 \begin_body
106
107 \begin_layout Title
108 Developing \SpecialChar LyX
109
110 \end_layout
111
112 \begin_layout Subtitle
113 Version 2.2.x
114 \end_layout
115
116 \begin_layout Author
117 by the \SpecialChar LyX
118  Team
119 \begin_inset Foot
120 status collapsed
121
122 \begin_layout Plain Layout
123 \noindent
124 If you have comments or error corrections, please send them to the \SpecialChar LyX
125  Documentatio
126 n mailing list, 
127 \begin_inset Flex Code
128 status collapsed
129
130 \begin_layout Plain Layout
131 \noindent
132 <lyx-docs@lists.lyx.org>
133 \end_layout
134
135 \end_inset
136
137 .
138 \end_layout
139
140 \end_inset
141
142
143 \end_layout
144
145 \begin_layout Standard
146 \begin_inset CommandInset toc
147 LatexCommand tableofcontents
148
149 \end_inset
150
151
152 \end_layout
153
154 \begin_layout Section
155 Introduction
156 \end_layout
157
158 \begin_layout Standard
159 This manual documents some aspects of \SpecialChar LyX
160  development.
161  It is currently rather incomplete, but will hopefully be extended in the
162  future.
163  Meanwhile, additional information can be found in the 
164 \begin_inset Flex Code
165 status collapsed
166
167 \begin_layout Plain Layout
168 development
169 \end_layout
170
171 \end_inset
172
173  subfolder of the \SpecialChar LyX
174  source code distribution.
175  This document is not translated, since the development language of \SpecialChar LyX
176  is
177  english.
178  If you want to use \SpecialChar LyX
179  you don't need to read this manual.
180  However, if you want to learn more about how \SpecialChar LyX
181  is developed, or even want
182  to participate in \SpecialChar LyX
183  development, you may find some interesting information.
184 \end_layout
185
186 \begin_layout Section
187 File formats
188 \end_layout
189
190 \begin_layout Standard
191 \SpecialChar LyX
192  uses several custom file formats for configuration files and documents.
193  This chapter contains some background concerning these file formats.
194  Several file formats are also described in detail in the regular user documenta
195 tion.
196 \end_layout
197
198 \begin_layout Subsection
199 File Format Numbers
200 \end_layout
201
202 \begin_layout Subsection
203 When is an update of the .lyx file format number needed?
204 \begin_inset CommandInset label
205 LatexCommand label
206 name "sec:When-is-an"
207
208 \end_inset
209
210
211 \end_layout
212
213 \begin_layout Standard
214 When you are working on a new feature you may ask yourself whether it needs
215  an update of the .lyx file format number.
216  Whether an update is needed or not is not always obvious.
217  Below you can find a list of reasons for file format updates with explanations:
218 \end_layout
219
220 \begin_layout Description
221 New
222 \begin_inset space ~
223 \end_inset
224
225 document
226 \begin_inset space ~
227 \end_inset
228
229 setting Whenever you introduce a new setting that is stored in the document
230  header, a file format update is needed.
231  This is also true if you add a new valid value to an existing setting,
232  e.
233 \begin_inset space \thinspace{}
234 \end_inset
235
236 g.
237 \begin_inset space \space{}
238 \end_inset
239
240 a new language that is stored in 
241 \begin_inset Flex Code
242 status collapsed
243
244 \begin_layout Plain Layout
245
246 \backslash
247 language
248 \end_layout
249
250 \end_inset
251
252 .
253 \end_layout
254
255 \begin_layout Description
256 Removed
257 \begin_inset space ~
258 \end_inset
259
260 document
261 \begin_inset space ~
262 \end_inset
263
264 setting If a certain setting becomes obsolete and gets removed, a file format
265  update is needed.
266 \end_layout
267
268 \begin_layout Description
269 New
270 \begin_inset space ~
271 \end_inset
272
273 inset Of course a new inset requires a file format update.
274 \end_layout
275
276 \begin_layout Description
277 New
278 \begin_inset space ~
279 \end_inset
280
281 style in any layout file or module shipped with \SpecialChar LyX
282 , or new shipped layout
283  file or module.
284  These requirements are currently under discussion and might change in the
285  future.
286 \end_layout
287
288 \begin_layout Description
289 Automatically
290 \begin_inset space ~
291 \end_inset
292
293 loaded
294 \begin_inset space ~
295 \end_inset
296
297 math
298 \begin_inset space ~
299 \end_inset
300
301 package Any new math package that is automatically loaded needs a file format
302  update.
303  The reason for this is that there is no true ERT inset for math formulas:
304  Each command is parsed, and if a user happens to defne a local command
305  with the same name as a command that triggers an automatic load of a package,
306  he needs to be able to switch off the automatic loading of that package.
307  This switch is stored by the 
308 \begin_inset Flex Code
309 status collapsed
310
311 \begin_layout Plain Layout
312 use_package
313 \end_layout
314
315 \end_inset
316
317  header setting.
318 \end_layout
319
320 \begin_layout Standard
321 If you are still unsure, please ask on the development list.
322 \end_layout
323
324 \begin_layout Subsection
325 How to update the file format number of .lyx files
326 \end_layout
327
328 \begin_layout Standard
329 Once you came to the conclusion that a file format update is needed you
330  should use the following procedure to perform the update:
331 \end_layout
332
333 \begin_layout Enumerate
334 Implement and test the new feature, including the reading and writing of
335  .lyx files.
336  Note that any file produced at this stage does not use a valid format,
337  so do not use this version of \SpecialChar LyX
338  for working on any important documents.
339 \end_layout
340
341 \begin_layout Enumerate
342 Describe the new format in 
343 \begin_inset Flex Code
344 status collapsed
345
346 \begin_layout Plain Layout
347 development/FORMAT
348 \end_layout
349
350 \end_inset
351
352 .
353 \end_layout
354
355 \begin_layout Enumerate
356 Update the \SpecialChar LyX
357  file format number in 
358 \begin_inset Flex Code
359 status collapsed
360
361 \begin_layout Plain Layout
362 src/version.h
363 \end_layout
364
365 \end_inset
366
367 .
368 \end_layout
369
370 \begin_layout Enumerate
371 Add an entry to both format lists (for conversion and reversion) in
372 \begin_inset Newline newline
373 \end_inset
374
375
376 \begin_inset Flex Code
377 status collapsed
378
379 \begin_layout Plain Layout
380 lib/lyx2lyx/lyx_2_2.py
381 \end_layout
382
383 \end_inset
384
385 .
386  Add a conversion routine if needed (e.
387 \begin_inset space \thinspace{}
388 \end_inset
389
390 g.
391 \begin_inset space \space{}
392 \end_inset
393
394 a new header setting always needs a conversion that adds the new setting,
395  a new document language does not need one).
396  Add a reversion routine if needed.
397  While the conversion routine is required to produce a document that is
398  equivalent to the old version, the requirements of the reversion are not
399  that strict.
400  If possible, try to produce a proper reversion, using ERT if needed, but
401  for some features this might be too complicated.
402  In this case, the minimum requirement of the reversion routine is that
403  it produces a valid document which can be read by an older \SpecialChar LyX
404 .
405  If absolutely needed, even data loss is allowed for the reversion.
406 \end_layout
407
408 \begin_layout Enumerate
409 Since tex2lyx has several implicit file format dependencies caused by sharing
410  code with \SpecialChar LyX
411 , updating the file format of .lyx files produced by tex2lyx at
412  the same time as updating the main .lyx file format is strongly recommended.
413  Therefore, a compiler warning will be issued if the \SpecialChar LyX
414  and tex2lyx .lyx file
415  format numbers differ.
416  In many cases the tex2lyx update requires only the first and last item
417  of the list below:
418 \begin_inset Separator parbreak
419 \end_inset
420
421
422 \end_layout
423
424 \begin_deeper
425 \begin_layout Enumerate
426 Update the tex2lyx file format number in 
427 \begin_inset Flex Code
428 status collapsed
429
430 \begin_layout Plain Layout
431 src/version.h
432 \end_layout
433
434 \end_inset
435
436 .
437 \end_layout
438
439 \begin_layout Enumerate
440 If the lyx2lyx conversion from the old to the new format is empty, or if
441  tex2lyx does not yet output the changed feature, you do not need any further
442  tex2lyx changes.
443  Otherwise, search for the changed feature in tex2lyx, and adjust the output
444  according to the lyx2lyx changes.
445 \end_layout
446
447 \begin_layout Enumerate
448 Update the tex2lyx test references as described in 
449 \begin_inset CommandInset ref
450 LatexCommand formatted
451 reference "sec:Updating-test-references"
452
453 \end_inset
454
455 .
456 \end_layout
457
458 \end_deeper
459 \begin_layout Enumerate
460 If you did not implement full tex2lyx support of the new feature, add a
461  line to 
462 \begin_inset Flex Code
463 status collapsed
464
465 \begin_layout Plain Layout
466 src/tex2lyx/TODO.txt
467 \end_layout
468
469 \end_inset
470
471  describing the missing bits.
472  Note that it is perfectly fine if you do not add full tex2lyx support for
473  a new feature: The updating recommendation above is only issued for the
474  syntax of the produced .lyx file.
475  It is no problem if some features supported by \SpecialChar LyX
476  are still output as ERT
477  by tex2lyx, since the problems in the past that resulted in the update
478  recommendation were related to mixed version syntax, not ERT.
479 \end_layout
480
481 \begin_layout Enumerate
482 It would be nice if you could create a .lyx test file which contains instances
483  of all changed or added features.
484  This could then be used to test lyx2lyx and tex2lyx.
485  Unfortunately it has not yet been decided how to collect such examples,
486  so please ask on the development list if you want to create one.
487 \end_layout
488
489 \begin_layout Subsection
490 Backporting new styles to the stable version
491 \end_layout
492
493 \begin_layout Standard
494 Starting with the stable \SpecialChar LyX
495  2.1 branch, there is a mechanism in place to backport
496  new styles to the stable version without the need to update the file format.
497  The basic idea is that the new style definition is automatically copied
498  to the document preamble, so that it can even be used by older minor revisions
499  that did not yet include the style.
500  To backport a new style to the stable version, the following steps are
501  needed:
502 \end_layout
503
504 \begin_layout Enumerate
505 Add the line 
506 \begin_inset Flex Code
507 status collapsed
508
509 \begin_layout Plain Layout
510 ForceLocal -1
511 \end_layout
512
513 \end_inset
514
515  to the style definition in the development version.
516 \end_layout
517
518 \begin_layout Enumerate
519 Copy the style definition to the stable version, but use 
520 \begin_inset Flex Code
521 status collapsed
522
523 \begin_layout Plain Layout
524 ForceLocal 1
525 \end_layout
526
527 \end_inset
528
529  instead.
530  If needed adjust the format to the one used by the stable version (see
531  the customization manual for details of the layout file format).
532 \end_layout
533
534 \begin_layout Enumerate
535 For each update of the style in a later stable version, increase the argument
536  of 
537 \begin_inset Flex Code
538 status collapsed
539
540 \begin_layout Plain Layout
541 ForceLocal
542 \end_layout
543
544 \end_inset
545
546  by one (in the stable version, the development version should not be touched).
547 \end_layout
548
549 \begin_layout Standard
550 For details about the 
551 \begin_inset Flex Code
552 status collapsed
553
554 \begin_layout Plain Layout
555 ForceLocal
556 \end_layout
557
558 \end_inset
559
560  flag see the customization manual.
561  No 
562 \begin_inset Flex Code
563 status collapsed
564
565 \begin_layout Plain Layout
566 lyx2lyx
567 \end_layout
568
569 \end_inset
570
571  support is needed for backported styles: Since the style of the development
572  version has an infinite version number, it will always be used.
573  Furthermore, since its version number is less than one, the style will
574  not be written anymore to the document header for files saved by the new
575  version.
576 \end_layout
577
578 \begin_layout Standard
579 \begin_inset Newpage newpage
580 \end_inset
581
582
583 \end_layout
584
585 \begin_layout Section
586 Tests
587 \end_layout
588
589 \begin_layout Standard
590 Automated tests are an important tool to detect bugs and regressions in
591  software development.
592  Some projects like gcc even require each bug fix to be accompanied by a
593  test case for the automatic test suite, that would detect this bug.
594  Testing interactive features automatically is of course very hard, but
595  core functionality like document import and export can be tested quite
596  easily, and some tests of this kind exist.
597 \end_layout
598
599 \begin_layout Subsection
600 \SpecialChar LyX
601  tests
602 \end_layout
603
604 \begin_layout Standard
605 Some tests are located in the 
606 \begin_inset Flex Code
607 status collapsed
608
609 \begin_layout Plain Layout
610 development/autotests
611 \end_layout
612
613 \end_inset
614
615  subfolder of the \SpecialChar LyX
616  source code distribution.
617 \end_layout
618
619 \begin_layout Subsubsection
620 Running the tests
621 \end_layout
622
623 \begin_layout Standard
624 cmake is required to run the \SpecialChar LyX
625  tests, running them is not implemented for
626  autotools.
627  The \SpecialChar LyX
628  tests can be run by the commands 
629 \begin_inset Flex Code
630 status collapsed
631
632 \begin_layout Plain Layout
633 ctest
634 \end_layout
635
636 \end_inset
637
638  (all platforms) or 
639 \begin_inset Flex Code
640 status collapsed
641
642 \begin_layout Plain Layout
643 make test
644 \end_layout
645
646 \end_inset
647
648  (when using a make based build system and not MSVC) in the 
649 \begin_inset Flex Code
650 status collapsed
651
652 \begin_layout Plain Layout
653 autotests
654 \end_layout
655
656 \end_inset
657
658  subfolder of the build directory.
659 \end_layout
660
661 \begin_layout Subsection
662 tex2lyx tests
663 \end_layout
664
665 \begin_layout Standard
666 The tex2lyx tests are located in the 
667 \begin_inset Flex Code
668 status collapsed
669
670 \begin_layout Plain Layout
671 src/tex2lyx/test
672 \end_layout
673
674 \end_inset
675
676  subfolder of the \SpecialChar LyX
677  source code distribution.
678  The actual testing is performed by the simple python script 
679 \begin_inset Flex Code
680 status collapsed
681
682 \begin_layout Plain Layout
683 src/tex2lyx/test/runtests.py
684 \end_layout
685
686 \end_inset
687
688 .
689  Each test consists of two files: 
690 \begin_inset Flex Code
691 status collapsed
692
693 \begin_layout Plain Layout
694 <test name>.tex
695 \end_layout
696
697 \end_inset
698
699  contains the \SpecialChar LaTeX
700  code that should be tested.
701  
702 \begin_inset Flex Code
703 status collapsed
704
705 \begin_layout Plain Layout
706 <test name>.lyx.lyx
707 \end_layout
708
709 \end_inset
710
711  contains the expected output of tex2lyx.
712  When a test is run, the actual produced output is compared with the stored
713  reference output.
714  The test passes if both are identical.
715  The test machinery is also able to generate a file 
716 \begin_inset Flex Code
717 status collapsed
718
719 \begin_layout Plain Layout
720 <test name>.lyx.tex
721 \end_layout
722
723 \end_inset
724
725  by exporting the produced .lyx file with \SpecialChar LyX
726  again.
727  This may be useful for roundtrip comparisons.
728 \end_layout
729
730 \begin_layout Subsubsection
731 Running the tests
732 \end_layout
733
734 \begin_layout Standard
735 The tex2lyx tests can be run in several ways.
736  When in the 
737 \begin_inset Flex Code
738 status collapsed
739
740 \begin_layout Plain Layout
741 src/tex2lyx
742 \end_layout
743
744 \end_inset
745
746  subfolder of the build directory, the commands 
747 \begin_inset Flex Code
748 status collapsed
749
750 \begin_layout Plain Layout
751 ctest
752 \end_layout
753
754 \end_inset
755
756  (cmake, all platforms), 
757 \begin_inset Flex Code
758 status collapsed
759
760 \begin_layout Plain Layout
761 make test
762 \end_layout
763
764 \end_inset
765
766  (cmake, when using a make based build system and not MSVC) or 
767 \begin_inset Flex Code
768 status collapsed
769
770 \begin_layout Plain Layout
771 make alltests
772 \end_layout
773
774 \end_inset
775
776  (autotools) will run the tex2lyx tests.
777  Alternatively, in the root of the build directory, the command 
778 \begin_inset Flex Code
779 status collapsed
780
781 \begin_layout Plain Layout
782 ctest -R tex2lyx
783 \end_layout
784
785 \end_inset
786
787  runs all tests whose names match the regex 
788 \begin_inset Quotes eld
789 \end_inset
790
791 tex2lyx
792 \begin_inset Quotes erd
793 \end_inset
794
795 .
796  Another way to run the tex2lyx tests in the root build directory is to
797  instead use the command 
798 \begin_inset Flex Code
799 status collapsed
800
801 \begin_layout Plain Layout
802 ctest -L '(cmplyx|roundtrip)'
803 \end_layout
804
805 \end_inset
806
807 , which runs all tests categorized with the label 
808 \begin_inset Quotes eld
809 \end_inset
810
811 roundtrip
812 \begin_inset Quotes erd
813 \end_inset
814
815  or 
816 \begin_inset Quotes eld
817 \end_inset
818
819 cmplyx
820 \begin_inset Quotes erd
821 \end_inset
822
823 .
824  If a test fails, the differences between the expected and actual results
825  are output in unified diff format.
826 \end_layout
827
828 \begin_layout Subsubsection
829 Updating test references
830 \begin_inset CommandInset label
831 LatexCommand label
832 name "sec:Updating-test-references"
833
834 \end_inset
835
836
837 \end_layout
838
839 \begin_layout Standard
840 In some cases a changed tex2lyx output is not a test failure, but wanted,
841  e.
842 \begin_inset space \thinspace{}
843 \end_inset
844
845 g.
846 \begin_inset space \space{}
847 \end_inset
848
849 if a tex2lyx bug was fixed, or a new feature was added.
850  In these cases the stored references need to be updated.
851  To do so if using autotools, call 
852 \begin_inset Flex Code
853 status collapsed
854
855 \begin_layout Plain Layout
856 make updatetests
857 \end_layout
858
859 \end_inset
860
861  in the 
862 \begin_inset Flex Code
863 status collapsed
864
865 \begin_layout Plain Layout
866 src/tex2lyx
867 \end_layout
868
869 \end_inset
870
871  subdirectory of the build directory.
872  If instead using CMake, call 
873 \begin_inset Flex Code
874 status collapsed
875
876 \begin_layout Plain Layout
877 make updatetex2lyxtests
878 \end_layout
879
880 \end_inset
881
882  in the build directory or in the 
883 \begin_inset Flex Code
884 status collapsed
885
886 \begin_layout Plain Layout
887 src/tex2lyx/test
888 \end_layout
889
890 \end_inset
891
892  subdirectory of the build directory.
893 \begin_inset Foot
894 status collapsed
895
896 \begin_layout Plain Layout
897 Note that this is a case where a make target in the build directory can
898  affect the source directory, which might not be advisable.
899 \end_layout
900
901 \end_inset
902
903  On Windows do the following:
904 \end_layout
905
906 \begin_layout Itemize
907 Assure that the path to the python.exe is in your system PATH variable.
908 \end_layout
909
910 \begin_layout Itemize
911 Double-click on the file 
912 \begin_inset Flex Code
913 status collapsed
914
915 \begin_layout Plain Layout
916 updatetex2lyxtests.vcxproj
917 \end_layout
918
919 \end_inset
920
921  in the build directory or in the 
922 \begin_inset Flex Code
923 status collapsed
924
925 \begin_layout Plain Layout
926 src/tex2lyx/test
927 \end_layout
928
929 \end_inset
930
931  subdirectory of your build directory.
932 \end_layout
933
934 \begin_layout Itemize
935 In the appearing MSVC program right-click on the project 
936 \family sans
937 updatetex2lyxtests
938 \family default
939  in the project explorer and chose 
940 \family sans
941 Create
942 \family default
943 .
944 \end_layout
945
946 \begin_layout Standard
947 For convenience, these commands also produce re-exported roundtrip .lyx.tex
948  files.
949  Please examine the changed output carefully before committing the changed
950  files to the repository: Since the test machinery does not do a roundtrip
951  test .tex 
952 \begin_inset Formula $\Rightarrow$
953 \end_inset
954
955  .lyx 
956 \begin_inset Formula $\Rightarrow$
957 \end_inset
958
959  .tex, and does not compare the produced dvi or pdf output, it assumes that
960  the stored .lyx reference produces correct output if processed by \SpecialChar LyX
961 .
962  There is only one chance to detect wrong output: before committing a new
963  reference.
964  Once it is committed, it is quite difficult to verify whether it is correct.
965 \end_layout
966
967 \begin_layout Standard
968 Please 
969 \emph on
970 do not
971 \emph default
972  update the test references by opening them with \SpecialChar LyX
973  or directly running lyx2lyx
974  on them.
975  This would not work, since lyx2lyx and \SpecialChar LyX
976  produce slightly different files
977  regarding insignificant whitespace and line breaks.
978 \end_layout
979
980 \begin_layout Subsubsection
981 Adding a new test
982 \end_layout
983
984 \begin_layout Standard
985 In many cases tests for new features may be added to one of the existing
986  test files, but sometimes this is not possible or not wanted.
987  Then a new test file needs to be added:
988 \end_layout
989
990 \begin_layout Enumerate
991 Create the new file 
992 \begin_inset Flex Code
993 status collapsed
994
995 \begin_layout Plain Layout
996 src/tex2lyx/test/<test name>.tex
997 \end_layout
998
999 \end_inset
1000
1001  and run tex2lyx in roundtrip mode to produce the file 
1002 \begin_inset Flex Code
1003 status collapsed
1004
1005 \begin_layout Plain Layout
1006 src/tex2lyx/test/<test name>.lyx.lyx
1007 \end_layout
1008
1009 \end_inset
1010
1011 .
1012  This file will be the new reference.
1013 \end_layout
1014
1015 \begin_layout Enumerate
1016 Once you confirmed that the tex2lyx output is correct, add the new files
1017  to the corresponding lists in 
1018 \begin_inset Flex Code
1019 status collapsed
1020
1021 \begin_layout Plain Layout
1022 src/tex2lyx/test/runtests.py
1023 \end_layout
1024
1025 \end_inset
1026
1027
1028 \begin_inset Flex Code
1029 status collapsed
1030
1031 \begin_layout Plain Layout
1032 src/tex2lyx/Makefile.am
1033 \end_layout
1034
1035 \end_inset
1036
1037  and 
1038 \begin_inset Flex Code
1039 status collapsed
1040
1041 \begin_layout Plain Layout
1042 src/tex2lyx/test/CMakeLists.txt
1043 \end_layout
1044
1045 \end_inset
1046
1047 .
1048 \end_layout
1049
1050 \begin_layout Enumerate
1051 Commit the changes to the repository, or send a patch to the development
1052  list and ask for committing if you do not have commit rights.
1053 \end_layout
1054
1055 \begin_layout Subsection
1056 Export tests
1057 \end_layout
1058
1059 \begin_layout Standard
1060 The export tests are integration tests.
1061  They take longer to run and are more likely to break than the tex2lyx tests.
1062  Nevertheless, they have caught many regressions and without a better alternativ
1063 e it is important to keep them up-to-date and understand how they work.
1064 \end_layout
1065
1066 \begin_layout Subsubsection
1067 Expectations of LyX developers
1068 \end_layout
1069
1070 \begin_layout Standard
1071 Because the export tests are integration tests and take a long time to run,
1072  LyX developers are rarely expected to run all of the tests.
1073  Here are some good practices to follow by developers:
1074 \end_layout
1075
1076 \begin_layout Itemize
1077 When making a non-trivial change to a .layout file, run the export and layout
1078  tests corresponding with that .layout file.
1079 \end_layout
1080
1081 \begin_layout Itemize
1082 When making non-trivial changes to a .lyx file, run the export tests correspondin
1083 g to that .lyx file.
1084 \end_layout
1085
1086 \begin_layout Itemize
1087 When making non-trivial changes to LyX's LaTeX export code (e.g.
1088  touching the encoding code or package handling code that you expect will
1089  change the exported LaTeX in some way), consider running all of the export
1090  tests before and after your change.
1091  If there are differences, please reconcile these (i.e.
1092  fix the bug or fix the tests) 
1093 \emph on
1094 before
1095 \emph default
1096  committing.
1097  Ask for help if you're not sure what to do or if you do not want to run
1098  the tests, post the patch on the list and others will run the tests.
1099 \end_layout
1100
1101 \begin_layout Itemize
1102 Understand how to interpret test failures.
1103  If your commit is found to have broken a test, you should be able to interpret
1104  the test results when made aware of them.
1105  See Section 
1106 \begin_inset CommandInset ref
1107 LatexCommand ref
1108 reference "subsec:Interpreting-export-tests"
1109
1110 \end_inset
1111
1112 .
1113 \end_layout
1114
1115 \begin_layout Subsubsection
1116 Configuring the tests
1117 \end_layout
1118
1119 \begin_layout Standard
1120 To enable these tests when using CMake, add the 
1121 \begin_inset Flex Code
1122 status collapsed
1123
1124 \begin_layout Plain Layout
1125 -DLYX_ENABLE_EXPORT_TESTS=ON
1126 \end_layout
1127
1128 \end_inset
1129
1130  flag.
1131  For example:
1132 \end_layout
1133
1134 \begin_layout Standard
1135 \begin_inset Flex Code
1136 status collapsed
1137
1138 \begin_layout Plain Layout
1139 cmake -DLYX_ENABLE_EXPORT_TESTS=ON /path/to/source
1140 \end_layout
1141
1142 \end_inset
1143
1144
1145 \end_layout
1146
1147 \begin_layout Standard
1148 \noindent
1149 This flag will increase the time for the cmake command by several seconds,
1150  mainly because of the process of inverting tests (see Section 
1151 \begin_inset CommandInset ref
1152 LatexCommand ref
1153 reference "subsec:Interpreting-export-tests"
1154
1155 \end_inset
1156
1157 ).
1158 \end_layout
1159
1160 \begin_layout Subsubsection
1161 Running the tests
1162 \end_layout
1163
1164 \begin_layout Standard
1165 To run all tests, in the build directory simply run the command 
1166 \begin_inset Flex Code
1167 status collapsed
1168
1169 \begin_layout Plain Layout
1170 ctest
1171 \end_layout
1172
1173 \end_inset
1174
1175 .
1176  To run only some of the tests, use the command 
1177 \begin_inset Flex Code
1178 status collapsed
1179
1180 \begin_layout Plain Layout
1181 ctest -R <pattern>
1182 \end_layout
1183
1184 \end_inset
1185
1186 , where 
1187 \begin_inset Flex Code
1188 status collapsed
1189
1190 \begin_layout Plain Layout
1191 <pattern>
1192 \end_layout
1193
1194 \end_inset
1195
1196  is a regular expression that matches test names.
1197  To run only the export tests, you can use 
1198 \begin_inset Flex Code
1199 status collapsed
1200
1201 \begin_layout Plain Layout
1202 ctest -L export
1203 \end_layout
1204
1205 \end_inset
1206
1207 .
1208  For the list of test categories available in addition to 
1209 \begin_inset Quotes eld
1210 \end_inset
1211
1212 export
1213 \begin_inset Quotes erd
1214 \end_inset
1215
1216 , run 
1217 \begin_inset Flex Code
1218 status collapsed
1219
1220 \begin_layout Plain Layout
1221 ctest \SpecialChar nobreakdash
1222 \SpecialChar nobreakdash
1223 print-labels
1224 \end_layout
1225
1226 \end_inset
1227
1228 .
1229  It is often useful to list the tests without running them (e.g.
1230  if you want to know how many tests there are or whether your 
1231 \begin_inset Flex Code
1232 status collapsed
1233
1234 \begin_layout Plain Layout
1235 <pattern>
1236 \end_layout
1237
1238 \end_inset
1239
1240  regular expression did what you expected).
1241  This can be done with the 
1242 \begin_inset Flex Code
1243 status collapsed
1244
1245 \begin_layout Plain Layout
1246 -N
1247 \end_layout
1248
1249 \end_inset
1250
1251  or 
1252 \begin_inset Flex Code
1253 status collapsed
1254
1255 \begin_layout Plain Layout
1256 \SpecialChar nobreakdash
1257 \SpecialChar nobreakdash
1258 show-only
1259 \end_layout
1260
1261 \end_inset
1262
1263  argument.
1264  We are still working on getting the tests to run in parallel which is supported
1265  by the 
1266 \begin_inset Flex Code
1267 status collapsed
1268
1269 \begin_layout Plain Layout
1270 ctest
1271 \end_layout
1272
1273 \end_inset
1274
1275  command with the 
1276 \begin_inset Flex Code
1277 status collapsed
1278
1279 \begin_layout Plain Layout
1280 -j <jobs>
1281 \end_layout
1282
1283 \end_inset
1284
1285  or 
1286 \begin_inset Flex Code
1287 status collapsed
1288
1289 \begin_layout Plain Layout
1290 \SpecialChar nobreakdash
1291 \SpecialChar nobreakdash
1292 parallel <jobs>
1293 \end_layout
1294
1295 \end_inset
1296
1297  argument.
1298  However, when running the tests in parallel, sometimes tests fail that
1299  pass when run sequentially.
1300  A reasonable approach is to first run the tests in parallel and then run
1301  the failed tests sequentially.
1302  For example, to run 8 jobs at a time:
1303 \end_layout
1304
1305 \begin_layout Standard
1306 \begin_inset Flex Code
1307 status collapsed
1308
1309 \begin_layout Plain Layout
1310 ctest -j8
1311 \end_layout
1312
1313 \end_inset
1314
1315
1316 \end_layout
1317
1318 \begin_layout Standard
1319 \begin_inset Flex Code
1320 status collapsed
1321
1322 \begin_layout Plain Layout
1323 ctest \SpecialChar nobreakdash
1324 \SpecialChar nobreakdash
1325 rerun-failed
1326 \end_layout
1327
1328 \end_inset
1329
1330
1331 \end_layout
1332
1333 \begin_layout Standard
1334 \noindent
1335 Note that some tests cannot be run in parallel.
1336  These tests are marked in the code with the 
1337 \begin_inset Flex Code
1338 status collapsed
1339
1340 \begin_layout Plain Layout
1341 \noindent
1342 RUN_SERIAL ON
1343 \end_layout
1344
1345 \end_inset
1346
1347  CMake property.
1348 \end_layout
1349
1350 \begin_layout Standard
1351 In some situations the option 
1352 \begin_inset Flex Code
1353 status collapsed
1354
1355 \begin_layout Plain Layout
1356 \SpecialChar nobreakdash
1357 \SpecialChar nobreakdash
1358 timeout <seconds>
1359 \end_layout
1360
1361 \end_inset
1362
1363  is useful.
1364  There have been bugs in LyX and in LaTeX which cause compilation to hang,
1365  and without a timeout a test might never stop (in one case there was even
1366  a memory leak).
1367  If a test times out, the 
1368 \begin_inset Flex Code
1369 status collapsed
1370
1371 \begin_layout Plain Layout
1372 ctest
1373 \end_layout
1374
1375 \end_inset
1376
1377  command exits with error, but you can distinguish between a timed out test
1378  and a failed test in the output reported at the end of the 
1379 \begin_inset Flex Code
1380 status collapsed
1381
1382 \begin_layout Plain Layout
1383 ctest
1384 \end_layout
1385
1386 \end_inset
1387
1388  command.
1389 \end_layout
1390
1391 \begin_layout Subsubsection
1392 \begin_inset CommandInset label
1393 LatexCommand label
1394 name "subsec:Interpreting-export-tests"
1395
1396 \end_inset
1397
1398 Interpreting the export test results
1399 \end_layout
1400
1401 \begin_layout Standard
1402 A test can fail for several reasons, not all of them bad.
1403 \end_layout
1404
1405 \begin_layout Enumerate
1406 The .lyx file could have been added recently and some formats are not expected
1407  to work well.
1408 \end_layout
1409
1410 \begin_layout Enumerate
1411 A dependency is not met (e.g.
1412  the LaTeX class file).
1413  One hint that this is the case is that the corresponding 
1414 \begin_inset Flex Code
1415 status open
1416
1417 \begin_layout Plain Layout
1418 check_load
1419 \end_layout
1420
1421 \end_inset
1422
1423  test will likely also fail.
1424 \end_layout
1425
1426 \begin_layout Enumerate
1427 An export that previously failed to compile now compiles.
1428 \end_layout
1429
1430 \begin_layout Enumerate
1431 An external dependency was updated (e.g.
1432  TeX Live).
1433 \end_layout
1434
1435 \begin_layout Enumerate
1436 A recent code change introduced a bug.
1437 \end_layout
1438
1439 \begin_layout Enumerate
1440 \begin_inset CommandInset label
1441 LatexCommand label
1442 name "enu:exposed"
1443
1444 \end_inset
1445
1446 A change in a document exposed the incompatibility of that class with an
1447  export format (e.g.
1448  LuaTeX).
1449 \end_layout
1450
1451 \begin_layout Standard
1452 Because the .lyx files are exported in several formats, it is not surprising
1453  that many of the exports fail.
1454  This expectation of failure is addressed by 
1455 \begin_inset Quotes eld
1456 \end_inset
1457
1458 inverting
1459 \begin_inset Quotes erd
1460 \end_inset
1461
1462  the tests, that is, by marking the test as 
1463 \begin_inset Quotes eld
1464 \end_inset
1465
1466 passing
1467 \begin_inset Quotes erd
1468 \end_inset
1469
1470  if the export exits with error and as 
1471 \begin_inset Quotes eld
1472 \end_inset
1473
1474 failing
1475 \begin_inset Quotes erd
1476 \end_inset
1477
1478  if the export succeeds
1479 \emph on
1480 .
1481
1482 \emph default
1483  It follows that these expected failures will not show up as failed tests
1484  in the test results and thus will not pollute the 
1485 \begin_inset Quotes eld
1486 \end_inset
1487
1488 good
1489 \begin_inset Quotes erd
1490 \end_inset
1491
1492  tests.
1493  If the export actually succeeds, then the test will fail.
1494  The purpose of this failure is to get your attention—something has changed,
1495  possibly for the better.
1496 \end_layout
1497
1498 \begin_layout Standard
1499 We try to document why a test is inverted or ignored.
1500  See the comment (prefixed with 
1501 \begin_inset Flex Code
1502 status collapsed
1503
1504 \begin_layout Plain Layout
1505 #
1506 \end_layout
1507
1508 \end_inset
1509
1510 ) above the block in which the test is listed as inverted or ignored in
1511  the files 
1512 \begin_inset Flex Code
1513 status collapsed
1514
1515 \begin_layout Plain Layout
1516 development/autotests/revertedTests
1517 \end_layout
1518
1519 \end_inset
1520
1521  and 
1522 \begin_inset Flex Code
1523 status collapsed
1524
1525 \begin_layout Plain Layout
1526 development/autotests/ignoredTests
1527 \end_layout
1528
1529 \end_inset
1530
1531 .
1532  It is possible that an export goes from succeeding to failing just because
1533  the document was changed and the document was never expected to work with
1534  a certain export format in the first case.
1535  Once this is confirmed to be the situation, the test can be inverted.
1536 \end_layout
1537
1538 \begin_layout Standard
1539 A good question is why do we enable the tests for non-default formats? The
1540  answer is that if a non-default route is broken it is often because a bug
1541  was introduced in LyX and not because a document-specific change was made
1542  that is not supported by the route.
1543  In other words, there is a high signal/noise ratio in the export tests
1544  for the non-default formats.
1545  
1546 \end_layout
1547
1548 \begin_layout Standard
1549 What action should you take if a test fails? First, check manually that
1550  when the compilation succeeded before the resulting PDF was good.
1551  In fact, sometimes it is an improvement when a test fails.
1552  If you check manually, it might be the case that the export was succeeding
1553  before but showing garbled text in a PDF output.
1554  Now it might fail with a clear message of "language xyz not supported".
1555  It is always good to check manually why something fails and if it passes
1556  if the PDF output is good.
1557 \end_layout
1558
1559 \begin_layout Standard
1560 Sometimes a test is fixed by accident.
1561  We should uninvert a test (remove it from the 
1562 \begin_inset Flex Code
1563 status collapsed
1564
1565 \begin_layout Plain Layout
1566 revertedTests
1567 \end_layout
1568
1569 \end_inset
1570
1571  file) in order to preserve the fix.
1572 \end_layout
1573
1574 \begin_layout Standard
1575 When a test or several tests fail, consider checking the files in the 
1576 \begin_inset Flex Code
1577 status collapsed
1578
1579 \begin_layout Plain Layout
1580 Testing/Temporary/
1581 \end_layout
1582
1583 \end_inset
1584
1585  subdirectory of your build directory.
1586  In this subdirectory are three files: the file 
1587 \begin_inset Flex Code
1588 status collapsed
1589
1590 \begin_layout Plain Layout
1591 LastTestsFailed.log
1592 \end_layout
1593
1594 \end_inset
1595
1596  simply lists the tests that failed on your last 
1597 \begin_inset Flex Code
1598 status collapsed
1599
1600 \begin_layout Plain Layout
1601 ctest
1602 \end_layout
1603
1604 \end_inset
1605
1606  command; the 
1607 \begin_inset Flex Code
1608 status collapsed
1609
1610 \begin_layout Plain Layout
1611 LastTest.log
1612 \end_layout
1613
1614 \end_inset
1615
1616  file contains the output from the tests (and often has details explaining
1617  why a test failed); and the 
1618 \begin_inset Flex Code
1619 status collapsed
1620
1621 \begin_layout Plain Layout
1622 CTestCostData.txt
1623 \end_layout
1624
1625 \end_inset
1626
1627  file lists the times that it took to run the tests.
1628 \end_layout
1629
1630 \begin_layout Subsubsection
1631 Suspended tests
1632 \end_layout
1633
1634 \begin_layout Standard
1635 Some inverted tests are 'suspended'.
1636  This means, they are not executed using 
1637 \begin_inset Flex Code
1638 status collapsed
1639
1640 \begin_layout Plain Layout
1641 ctest -L export
1642 \end_layout
1643
1644 \end_inset
1645
1646  or 
1647 \begin_inset Flex Code
1648 status collapsed
1649
1650 \begin_layout Plain Layout
1651 ctest -L reverted
1652 \end_layout
1653
1654 \end_inset
1655
1656 .
1657  From time to time they still have to be checked.
1658 \end_layout
1659
1660 \begin_layout Standard
1661 These tests are suspended, because they fail for known reasons which cannot
1662  ATM be resolved.
1663  But it is expected the reason might disappear in the future.
1664  Be it new TL or better handling in \SpecialChar LyX
1665 .
1666 \end_layout
1667
1668 \begin_layout Standard
1669 For ctest commands without the 
1670 \begin_inset Flex Code
1671 status collapsed
1672
1673 \begin_layout Plain Layout
1674 -L
1675 \end_layout
1676
1677 \end_inset
1678
1679  parameter nothing changes.
1680  Suspended or not, tests will be executed depending only on the regexes
1681  parameters given to the ctest command.
1682 \end_layout
1683
1684 \begin_layout Subsection
1685 check_load tests
1686 \end_layout
1687
1688 \begin_layout Standard
1689 These tests check whether a .lyx file loads without any terminal messages.
1690  They correspond to the manual operations of simply opening a .lyx file on
1691  the terminal, exiting LyX once the file is loaded, and then checking whether
1692  there is any output from the terminal.
1693  These tests are useful for catching malformed .lyx files and parsing bugs.
1694  They can also be used to find a .lyx file in which an instance of something
1695  happens.
1696  To do this, compile LyX with a local patch that outputs something to the
1697  terminal when an instance is found, and then run the check_load tests to
1698  see if any fail, which would mean that the situation occurs in the LyX
1699  documentation files corresponding to the failed tests.
1700  These tests are expectedly fragile: any LyX diagnostic message, which is
1701  not necessarily an error, would cause the tests to fail.
1702  Similarly, any message output by a library (e.g.
1703  Qt) would also cause failure.
1704  There are some messages that the check_load tests are instructed to ignore,
1705  which are stored in the file 
1706 \begin_inset Flex Code
1707 status collapsed
1708
1709 \begin_layout Plain Layout
1710 development/autotests/filterCheckWarnings
1711 \end_layout
1712
1713 \end_inset
1714
1715 .
1716 \end_layout
1717
1718 \begin_layout Subsection
1719 URL tests
1720 \end_layout
1721
1722 \begin_layout Standard
1723 The URL tests are enabled with the 
1724 \begin_inset Flex Code
1725 status collapsed
1726
1727 \begin_layout Plain Layout
1728 -DLYX_ENABLE_URLTESTS=ON
1729 \end_layout
1730
1731 \end_inset
1732
1733  CMake flag and are useful for finding broken links in our documentation
1734  files.
1735  If a URL test fails, to see which link in particular was reported as broken,
1736  see the output in 
1737 \begin_inset Flex Code
1738 status collapsed
1739
1740 \begin_layout Plain Layout
1741 LastTest.log
1742 \end_layout
1743
1744 \end_inset
1745
1746 .
1747  These tests are extremely fragile (e.g.
1748  a test can depend on your Internet connection) and a failed URL test should
1749  not be taken too seriously.
1750 \end_layout
1751
1752 \begin_layout Section
1753 Development policies
1754 \end_layout
1755
1756 \begin_layout Standard
1757 This chapter lists some guidelines that should be followed.
1758  This list is not complete, and many guidelines are in separate chapters,
1759  such as 
1760 \begin_inset Quotes eld
1761 \end_inset
1762
1763 When is an update of the .lyx file format number needed?
1764 \begin_inset Quotes erd
1765 \end_inset
1766
1767  in Section 
1768 \begin_inset CommandInset ref
1769 LatexCommand ref
1770 reference "sec:When-is-an"
1771
1772 \end_inset
1773
1774 .
1775 \end_layout
1776
1777 \begin_layout Subsection
1778 When to set a fixed milestone?
1779 \end_layout
1780
1781 \begin_layout Standard
1782 Only set a fixed milestone (like 2.1.4 or 2.2.0) if at least one of the following
1783  holds:
1784 \end_layout
1785
1786 \begin_layout Enumerate
1787 Somebody is actively working on a fix.
1788 \end_layout
1789
1790 \begin_layout Enumerate
1791 The bug is so severe that it would block the release if it is not fixed.
1792 \end_layout
1793
1794 \begin_layout Standard
1795 If a bug is important, but nobody is working on it, and it is no showstopper,
1796  use a milestone like 2.1.x or 2.2.x.
1797  For all other bugs, do not set a milestone at all.
1798 \end_layout
1799
1800 \begin_layout Subsection
1801 Can we add rc entries in stable branch?
1802 \end_layout
1803
1804 \begin_layout Standard
1805 No.
1806  We are supposed to increase the prefs2prefs version number with such things.
1807 \end_layout
1808
1809 \begin_layout Section
1810 Documentation policies
1811 \end_layout
1812
1813 \begin_layout Standard
1814 The main documentation consists of these files:
1815 \end_layout
1816
1817 \begin_layout Description
1818 splash.lyx it is the first file you see after an installation.
1819  We assume that a new user sees this.
1820  It is therefore designed to be as simple as possible.
1821  Therefore please don't add any new formatting, only fix typos etc.
1822  Splash.lyx is up to date for \SpecialChar LyX
1823  2.1.x, currently maintained by Uwe Stöhr.
1824 \end_layout
1825
1826 \begin_layout Description
1827 Intro.lyx This is the manual new users will read to learn \SpecialChar LyX
1828 .
1829  It therefore uses a limited set of formatting.
1830  For example a standard document class.
1831  Since new users will first learn about the formatting possibilities of
1832  \SpecialChar LyX
1833  please keep this file that simple.
1834  Intro.lyx is up to date for \SpecialChar LyX
1835  2.1.x, currently maintained by Uwe Stöhr.
1836 \end_layout
1837
1838 \begin_layout Description
1839 Tutorial.lyx our tutorial.
1840  It must be always up to date.
1841  Normally there is nothing to add since we don't want to overwhelm new users
1842  with too much details.
1843  The will learn these details while using \SpecialChar LyX
1844  and we have special manuals.
1845  Tutorial.lyx is up to date for \SpecialChar LyX
1846  2.1.x, currently maintained by Uwe Stöhr.
1847 \end_layout
1848
1849 \begin_layout Description
1850 UserGuide.lyx our main user guide.
1851  It covers a mixture of basic and detailed information.
1852  Some information is also in the Math and EmbeddedObjects manual so that
1853  the UserGuide refers to these files.
1854  UserGuide.lyx is up to date for \SpecialChar LyX
1855  2.1.x, currently maintained by Uwe Stöhr.
1856 \end_layout
1857
1858 \begin_layout Description
1859 EmbeddedObjects.lyx a special manual to explain things like tables floats
1860  boxes etc.
1861  in all detail.
1862  EmbeddedObjects.lyx is up to date for \SpecialChar LyX
1863  2.1.x, currently maintained by Uwe
1864  Stöhr.
1865 \end_layout
1866
1867 \begin_layout Description
1868 Math.lyx a special manual to explain everything regarding math in all detail.
1869  Math.lyx is up to date for \SpecialChar LyX
1870  2.1.x, currently maintained by Uwe Stöhr.
1871 \end_layout
1872
1873 \begin_layout Description
1874 Additional.lyx this manual covers information that would be too much detail
1875  for the UserGuide or would make the UserGuide uncompilable or only compilable
1876  when installing a lot of special \SpecialChar LaTeX
1877 -packages.
1878  What should be in the UserGuide or better in Additional is a matter of
1879  taste.
1880  it is up to you to decide that.
1881  Additional.lyx is not completely up to date for \SpecialChar LyX
1882  2.1.x.
1883  Only chapter
1884 \begin_inset space ~
1885 \end_inset
1886
1887 8 is up to date and currently maintained by Uwe Stöhr.
1888  It certainly needs a rewrite and update.
1889  For example many info in chapter
1890 \begin_inset space ~
1891 \end_inset
1892
1893 2 and 3 are already covered by the UserGuide and/or the EmbeddedObjects
1894  manual.
1895 \end_layout
1896
1897 \begin_layout Description
1898 Customization.lyx this manual covers information how to customize \SpecialChar LyX
1899  for certain
1900  output formats, operating systems, languages etc.
1901  It is currently completely out of date and needs a major rewrite and update.
1902  If you do this please assure that your information are given for all OSes
1903  and \SpecialChar LaTeX
1904  distributions (meaning be as objective as possible).
1905 \end_layout
1906
1907 \begin_layout Standard
1908 There are only 4
1909 \begin_inset space ~
1910 \end_inset
1911
1912 rules in editing the docs:
1913 \end_layout
1914
1915 \begin_layout Enumerate
1916 If you are not the maintainer of a doc file or a chapter/section, you MUST
1917  use change tracking so that the maintainer could review your changes
1918 \end_layout
1919
1920 \begin_layout Enumerate
1921 Respect the formatting of the document.
1922  The different files use different formatting styles.
1923  That is OK and has historic reasons nobody fully know ;-).
1924  But it is important to be consistent within one file.
1925 \end_layout
1926
1927 \begin_layout Enumerate
1928 All changes you make to a file in one language MUST also go the file in
1929  the other actively maintained languages.
1930  Normally the maintainer does this for you, if you are the maintainer, you
1931  must do this by copying or changing the changed or added text to the other
1932  files so that the translators sees the blue underlined text and know what
1933  they have to translate and what was changed.
1934 \end_layout
1935
1936 \begin_layout Enumerate
1937 You MUST assure that the document is compilable as 
1938 \begin_inset Quotes eld
1939 \end_inset
1940
1941 PDF (pdflatex)
1942 \begin_inset Quotes erd
1943 \end_inset
1944
1945  after your changes.
1946 \end_layout
1947
1948 \end_body
1949 \end_document