3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
6 * \author Lars Gullik Bjønnes
7 * \author Jean-Marc Lasgouttes
8 * \author Angus Leeming
10 * \author André Pönitz
14 * Full author contact details are available in file CREDITS.
24 #include "support/debug.h"
26 #include "Converter.h"
28 #include "support/gettext.h"
31 #include "FontEnums.h"
34 #include "graphics/GraphicsTypes.h"
36 #include "support/convert.h"
37 #include "support/environment.h"
38 #include "support/filetools.h"
39 #include "support/lstrings.h"
40 #include "support/os.h"
41 #include "support/userinfo.h"
46 namespace os = support::os;
48 using support::ascii_lowercase;
49 using support::bformat;
50 using support::expandPath;
51 using support::FileName;
52 using support::getEnv;
53 using support::libFileSearch;
67 // when adding something to this array keep it sorted!
68 keyword_item lyxrcTags[] = {
69 { "\\accept_compound", LyXRC::RC_ACCEPT_COMPOUND },
70 { "\\allow_geometry_session", LyXRC::RC_GEOMETRY_SESSION },
71 { "\\alternate_language", LyXRC::RC_ALT_LANG },
72 { "\\auto_number", LyXRC::RC_AUTO_NUMBER },
73 { "\\auto_region_delete", LyXRC::RC_AUTOREGIONDELETE },
74 { "\\auto_reset_options", LyXRC::RC_AUTORESET_OPTIONS },
75 { "\\autosave", LyXRC::RC_AUTOSAVE },
76 { "\\backupdir_path", LyXRC::RC_BACKUPDIR_PATH },
77 { "\\bibtex_command", LyXRC::RC_BIBTEX_COMMAND },
78 { "\\bind_file", LyXRC::RC_BINDFILE },
79 { "\\check_lastfiles", LyXRC::RC_CHECKLASTFILES },
80 { "\\chktex_command", LyXRC::RC_CHKTEX_COMMAND },
81 { "\\converter", LyXRC::RC_CONVERTER },
82 { "\\converter_cache_maxage", LyXRC::RC_CONVERTER_CACHE_MAXAGE },
83 { "\\copier", LyXRC::RC_COPIER },
84 { "\\cursor_follows_scrollbar", LyXRC::RC_CURSOR_FOLLOWS_SCROLLBAR },
85 { "\\custom_export_command", LyXRC::RC_CUSTOM_EXPORT_COMMAND },
86 { "\\custom_export_format", LyXRC::RC_CUSTOM_EXPORT_FORMAT },
87 { "\\date_insert_format", LyXRC::RC_DATE_INSERT_FORMAT },
88 { "\\def_file", LyXRC::RC_DEFFILE },
89 { "\\default_language", LyXRC::RC_DEFAULT_LANGUAGE },
90 { "\\default_papersize", LyXRC::RC_DEFAULT_PAPERSIZE },
91 { "\\dialogs_iconify_with_main", LyXRC::RC_DIALOGS_ICONIFY_WITH_MAIN },
92 { "\\display_graphics", LyXRC::RC_DISPLAY_GRAPHICS },
93 { "\\document_path", LyXRC::RC_DOCUMENTPATH },
94 { "\\escape_chars", LyXRC::RC_ESC_CHARS },
95 { "\\example_path", LyXRC::RC_EXAMPLEPATH },
96 { "\\font_encoding", LyXRC::RC_FONT_ENCODING },
97 { "\\format", LyXRC::RC_FORMAT },
98 { "\\index_command", LyXRC::RC_INDEX_COMMAND },
99 { "\\input", LyXRC::RC_INPUT },
100 { "\\kbmap", LyXRC::RC_KBMAP },
101 { "\\kbmap_primary", LyXRC::RC_KBMAP_PRIMARY },
102 { "\\kbmap_secondary", LyXRC::RC_KBMAP_SECONDARY },
103 { "\\label_init_length", LyXRC::RC_LABEL_INIT_LENGTH },
104 { "\\language_auto_begin", LyXRC::RC_LANGUAGE_AUTO_BEGIN },
105 { "\\language_auto_end", LyXRC::RC_LANGUAGE_AUTO_END },
106 { "\\language_command_begin", LyXRC::RC_LANGUAGE_COMMAND_BEGIN },
107 { "\\language_command_end", LyXRC::RC_LANGUAGE_COMMAND_END },
108 { "\\language_command_local", LyXRC::RC_LANGUAGE_COMMAND_LOCAL },
109 { "\\language_global_options", LyXRC::RC_LANGUAGE_GLOBAL_OPTIONS },
110 { "\\language_package", LyXRC::RC_LANGUAGE_PACKAGE },
111 { "\\language_use_babel", LyXRC::RC_LANGUAGE_USE_BABEL },
112 { "\\load_session", LyXRC::RC_LOADSESSION },
113 { "\\make_backup", LyXRC::RC_MAKE_BACKUP },
114 { "\\mark_foreign_language", LyXRC::RC_MARK_FOREIGN_LANGUAGE },
115 { "\\num_lastfiles", LyXRC::RC_NUMLASTFILES },
116 { "\\path_prefix", LyXRC::RC_PATH_PREFIX },
117 { "\\personal_dictionary", LyXRC::RC_PERS_DICT },
118 { "\\plaintext_linelen", LyXRC::RC_PLAINTEXT_LINELEN },
119 { "\\plaintext_roff_command", LyXRC::RC_PLAINTEXT_ROFF_COMMAND },
120 { "\\preview", LyXRC::RC_PREVIEW },
121 { "\\preview_hashed_labels", LyXRC::RC_PREVIEW_HASHED_LABELS },
122 { "\\preview_scale_factor", LyXRC::RC_PREVIEW_SCALE_FACTOR },
123 { "\\print_adapt_output", LyXRC::RC_PRINT_ADAPTOUTPUT },
124 { "\\print_collcopies_flag", LyXRC::RC_PRINTCOLLCOPIESFLAG },
125 { "\\print_command", LyXRC::RC_PRINT_COMMAND },
126 { "\\print_copies_flag", LyXRC::RC_PRINTCOPIESFLAG },
127 { "\\print_evenpage_flag", LyXRC::RC_PRINTEVENPAGEFLAG },
128 { "\\print_extra_options", LyXRC::RC_PRINTEXSTRAOPTIONS },
129 { "\\print_file_extension", LyXRC::RC_PRINTFILEEXTENSION },
130 { "\\print_landscape_flag", LyXRC::RC_PRINTLANDSCAPEFLAG },
131 { "\\print_oddpage_flag", LyXRC::RC_PRINTODDPAGEFLAG },
132 { "\\print_pagerange_flag", LyXRC::RC_PRINTPAGERANGEFLAG },
133 { "\\print_paper_dimension_flag", LyXRC::RC_PRINTPAPERDIMENSIONFLAG },
134 { "\\print_paper_flag", LyXRC::RC_PRINTPAPERFLAG },
135 { "\\print_reverse_flag", LyXRC::RC_PRINTREVERSEFLAG },
136 { "\\print_spool_command", LyXRC::RC_PRINTSPOOL_COMMAND },
137 { "\\print_spool_printerprefix", LyXRC::RC_PRINTSPOOL_PRINTERPREFIX },
138 { "\\print_to_file", LyXRC::RC_PRINTTOFILE },
139 { "\\print_to_printer", LyXRC::RC_PRINTTOPRINTER },
140 { "\\printer", LyXRC::RC_PRINTER },
141 { "\\rtl", LyXRC::RC_RTL_SUPPORT },
142 { "\\screen_dpi", LyXRC::RC_SCREEN_DPI },
143 { "\\screen_font_roman", LyXRC::RC_SCREEN_FONT_ROMAN },
144 { "\\screen_font_roman_foundry", LyXRC::RC_SCREEN_FONT_ROMAN_FOUNDRY },
145 { "\\screen_font_sans", LyXRC::RC_SCREEN_FONT_SANS },
146 { "\\screen_font_sans_foundry", LyXRC::RC_SCREEN_FONT_SANS_FOUNDRY },
147 { "\\screen_font_scalable", LyXRC::RC_SCREEN_FONT_SCALABLE },
148 { "\\screen_font_sizes", LyXRC::RC_SCREEN_FONT_SIZES },
149 { "\\screen_font_typewriter", LyXRC::RC_SCREEN_FONT_TYPEWRITER },
150 { "\\screen_font_typewriter_foundry", LyXRC::RC_SCREEN_FONT_TYPEWRITER_FOUNDRY },
151 { "\\screen_zoom", LyXRC::RC_SCREEN_ZOOM },
152 { "\\serverpipe", LyXRC::RC_SERVERPIPE },
153 { "\\set_color", LyXRC::RC_SET_COLOR },
154 { "\\show_banner", LyXRC::RC_SHOW_BANNER },
155 { "\\sort_layouts", LyXRC::RC_SORT_LAYOUTS },
156 { "\\spell_command", LyXRC::RC_SPELL_COMMAND },
157 { "\\tempdir_path", LyXRC::RC_TEMPDIRPATH },
158 { "\\template_path", LyXRC::RC_TEMPLATEPATH },
159 { "\\tex_allows_spaces", LyXRC::RC_TEX_ALLOWS_SPACES },
160 { "\\tex_expects_windows_paths", LyXRC::RC_TEX_EXPECTS_WINDOWS_PATHS },
161 { "\\ui_file", LyXRC::RC_UIFILE },
162 { "\\use_alt_language", LyXRC::RC_USE_ALT_LANG },
163 { "\\use_converter_cache", LyXRC::RC_USE_CONVERTER_CACHE },
164 { "\\use_escape_chars", LyXRC::RC_USE_ESC_CHARS },
165 { "\\use_input_encoding", LyXRC::RC_USE_INP_ENC },
166 { "\\use_lastfilepos", LyXRC::RC_USELASTFILEPOS },
167 { "\\use_personal_dictionary", LyXRC::RC_USE_PERS_DICT },
168 { "\\use_pixmap_cache", LyXRC::RC_USE_PIXMAP_CACHE },
169 // compatibility with versions older than 1.4.0 only
170 { "\\use_pspell", LyXRC::RC_USE_SPELL_LIB },
171 { "\\use_spell_lib", LyXRC::RC_USE_SPELL_LIB },
172 // compatibility with versions older than 1.4.0 only
173 { "\\use_tempdir", LyXRC::RC_USETEMPDIR },
174 { "\\user_email", LyXRC::RC_USER_EMAIL },
175 { "\\user_name", LyXRC::RC_USER_NAME },
176 { "\\view_dvi_paper_option", LyXRC::RC_VIEWDVI_PAPEROPTION },
177 // compatibility with versions older than 1.4.0 only
178 { "\\viewer", LyXRC::RC_VIEWER}
181 const int lyxrcCount = sizeof(lyxrcTags) / sizeof(keyword_item);
192 void LyXRC::setDefaults() {
194 def_file = "default";
196 // Get printer from the environment. If fail, use default "",
197 // assuming that everything is set up correctly.
198 printer = getEnv("PRINTER");
199 print_adapt_output = false;
200 print_command = "dvips";
201 print_evenpage_flag = "-B";
202 print_oddpage_flag = "-A";
203 print_pagerange_flag = "-pp";
204 print_copies_flag = "-c";
205 print_collcopies_flag = "-C";
206 print_reverse_flag = "-r";
207 print_landscape_flag = "-t landscape";
208 print_to_printer = "-P";
209 print_to_file = "-o ";
210 print_file_extension = ".ps";
211 print_paper_flag = "-t";
212 print_paper_dimension_flag = "-T";
213 document_path.erase();
214 view_dvi_paper_option.erase();
215 default_papersize = PAPER_DEFAULT;
216 custom_export_format = "ps";
217 chktex_command = "chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38";
218 bibtex_command = "bibtex";
220 index_command = "makeindex -c -q";
222 // Because a screen typically is wider than a piece of paper:
224 allow_geometry_session = true;
225 // Default LaTeX font size:
226 font_sizes[FONT_SIZE_TINY] = "5.0";
227 font_sizes[FONT_SIZE_SCRIPT] = "7.0";
228 font_sizes[FONT_SIZE_FOOTNOTE] = "8.0";
229 font_sizes[FONT_SIZE_SMALL] = "9.0";
230 font_sizes[FONT_SIZE_NORMAL] = "10.0";
231 font_sizes[FONT_SIZE_LARGE] = "12.0";
232 font_sizes[FONT_SIZE_LARGER] = "14.4";
233 font_sizes[FONT_SIZE_LARGEST] = "17.26";
234 font_sizes[FONT_SIZE_HUGE] = "20.74";
235 font_sizes[FONT_SIZE_HUGER] = "24.88";
236 use_scalable_fonts = true;
237 roman_font_name = "";
239 typewriter_font_name = "";
241 auto_region_delete = true;
242 auto_reset_options = false;
243 plaintext_linelen = 65;
244 num_lastfiles = maxlastfiles;
245 check_lastfiles = true;
246 use_lastfilepos = true;
247 load_session = false;
249 backupdir_path.erase();
250 display_graphics = graphics::ColorDisplay;
251 // Spellchecker settings:
252 use_spell_lib = true;
253 isp_command = "ispell";
254 isp_accept_compound = false;
255 isp_use_input_encoding = false;
256 isp_use_alt_lang = false;
257 isp_use_pers_dict = false;
258 isp_use_esc_chars = false;
262 mark_foreign_language = true;
263 language_auto_begin = true;
264 language_auto_end = true;
265 language_global_options = true;
266 language_use_babel = true;
267 language_package = "\\usepackage{babel}";
268 language_command_begin = "\\selectlanguage{$$lang}";
269 language_command_local = "\\foreignlanguage{$$lang}{";
270 sort_layouts = false;
271 default_language = "english";
273 windows_style_tex_paths = false;
274 tex_allows_spaces = false;
275 date_insert_format = "%x";
276 cursor_follows_scrollbar = false;
277 dialogs_iconify_with_main = false;
278 label_init_length = 3;
279 preview = PREVIEW_OFF;
280 preview_hashed_labels = false;
281 preview_scale_factor = "0.9";
282 use_converter_cache = true;
283 use_pixmap_cache = false;
284 converter_cache_maxage = 6 * 30 * 24 * 3600; // 6 months
286 user_name = to_utf8(support::user_name());
288 user_email = to_utf8(support::user_email());
294 void oldFontFormat(string & family, string & foundry)
296 if (family.empty() || family[0] != '-')
298 foundry = token(family, '-', 1);
299 family = token(family, '-', 2);
307 int LyXRC::read(FileName const & filename)
309 Lexer lexrc(lyxrcTags, lyxrcCount);
310 if (lyxerr.debugging(Debug::PARSER))
311 lexrc.printTable(lyxerr);
313 lexrc.setFile(filename);
314 if (!lexrc.isOK()) return -2;
316 LYXERR(Debug::LYXRC, "Reading '" << filename << "'...");
322 int LyXRC::read(std::istream & is)
324 Lexer lexrc(lyxrcTags, lyxrcCount);
325 if (lyxerr.debugging(Debug::PARSER))
326 lexrc.printTable(lyxerr);
329 if (!lexrc.isOK()) return -2;
331 LYXERR(Debug::LYXRC, "Reading istream...");
337 int LyXRC::read(Lexer & lexrc)
339 if (!lexrc.isOK()) return -2;
341 while (lexrc.isOK()) {
342 // By using two switches we take advantage of the compiler
343 // telling us if we have missed a LyXRCTags element in
344 // the second switch.
345 // Note that this also shows a problem with Lexer since it
346 // helps us avoid taking advantage of the strictness of the
349 int le = lexrc.lex();
351 case Lexer::LEX_UNDEF:
352 lexrc.printError("Unknown tag `$$Token'");
354 case Lexer::LEX_FEOF:
358 switch (static_cast<LyXRCTags>(le)) {
359 case RC_INPUT: // Include file
362 libFileSearch(string(),
365 lexrc.printError("Error reading "
366 "included file: " + tmp.absFilename());
372 bind_file = os::internal_path(lexrc.getString());
378 def_file = os::internal_path(lexrc.getString());
384 ui_file = os::internal_path(lexrc.getString());
388 case RC_AUTORESET_OPTIONS:
390 auto_reset_options = lexrc.getBool();
394 case RC_DISPLAY_GRAPHICS:
396 display_graphics = graphics::displayTranslator().find(lexrc.getString());
400 case RC_TEX_EXPECTS_WINDOWS_PATHS:
402 windows_style_tex_paths = lexrc.getBool();
406 case RC_TEX_ALLOWS_SPACES:
408 tex_allows_spaces = lexrc.getBool();
414 use_kbmap = lexrc.getBool();
418 case RC_KBMAP_PRIMARY:
420 string const kmap(os::internal_path(lexrc.getString()));
423 } else if (!libFileSearch("kbd", kmap,
425 primary_kbmap = kmap;
427 lexrc.printError("LyX: Keymap `$$Token' not found");
432 case RC_KBMAP_SECONDARY:
434 string const kmap(os::internal_path(lexrc.getString()));
437 } else if (!libFileSearch("kbd", kmap,
439 secondary_kbmap = kmap;
441 lexrc.printError("LyX: Keymap `$$Token' not found");
446 case RC_FONT_ENCODING:
448 fontenc = lexrc.getString();
454 printer = lexrc.getString();
458 case RC_PRINT_COMMAND:
460 print_command = lexrc.getString();
464 case RC_PRINTEVENPAGEFLAG:
466 print_evenpage_flag = lexrc.getString();
470 case RC_PRINTODDPAGEFLAG:
472 print_oddpage_flag = lexrc.getString();
476 case RC_PRINTPAGERANGEFLAG:
478 print_pagerange_flag = lexrc.getString();
482 case RC_PRINTCOPIESFLAG:
484 print_copies_flag = lexrc.getString();
488 case RC_PRINTCOLLCOPIESFLAG:
490 print_collcopies_flag = lexrc.getString();
494 case RC_PRINTREVERSEFLAG:
496 print_reverse_flag = lexrc.getString();
500 case RC_PRINTLANDSCAPEFLAG:
502 print_landscape_flag = lexrc.getString();
506 case RC_PRINTTOPRINTER:
508 print_to_printer = lexrc.getString();
512 case RC_PRINT_ADAPTOUTPUT:
514 print_adapt_output = lexrc.getBool();
520 print_to_file = os::internal_path(lexrc.getString());
524 case RC_PRINTFILEEXTENSION:
526 print_file_extension = lexrc.getString();
530 case RC_PRINTEXSTRAOPTIONS:
532 print_extra_options = lexrc.getString();
536 case RC_PRINTSPOOL_COMMAND:
538 print_spool_command = lexrc.getString();
542 case RC_PRINTSPOOL_PRINTERPREFIX:
544 print_spool_printerprefix = lexrc.getString();
548 case RC_PRINTPAPERDIMENSIONFLAG:
550 print_paper_dimension_flag = lexrc.getString();
554 case RC_PRINTPAPERFLAG:
556 print_paper_flag = lexrc.getString();
560 case RC_CUSTOM_EXPORT_COMMAND:
562 custom_export_command = lexrc.getString();
566 case RC_CUSTOM_EXPORT_FORMAT:
568 custom_export_format = lexrc.getString();
572 case RC_DEFAULT_PAPERSIZE:
575 ascii_lowercase(lexrc.getString());
576 if (size == "usletter")
579 else if (size == "legal")
582 else if (size == "executive")
585 else if (size == "a3")
588 else if (size == "a4")
591 else if (size == "a5")
594 else if (size == "b5")
597 else if (size == "default")
603 case RC_VIEWDVI_PAPEROPTION:
605 view_dvi_paper_option = lexrc.getString();
607 view_dvi_paper_option.erase();
611 case RC_CHKTEX_COMMAND:
613 chktex_command = lexrc.getString();
617 case RC_BIBTEX_COMMAND:
619 bibtex_command = lexrc.getString();
623 case RC_INDEX_COMMAND:
625 index_command = lexrc.getString();
631 dpi = lexrc.getInteger();
637 zoom = lexrc.getInteger();
641 case RC_GEOMETRY_SESSION:
643 allow_geometry_session = lexrc.getBool();
647 case RC_SCREEN_FONT_SIZES:
649 font_sizes[FONT_SIZE_TINY] =
653 font_sizes[FONT_SIZE_SCRIPT] =
657 font_sizes[FONT_SIZE_FOOTNOTE] =
661 font_sizes[FONT_SIZE_SMALL] =
665 font_sizes[FONT_SIZE_NORMAL] =
669 font_sizes[FONT_SIZE_LARGE] =
673 font_sizes[FONT_SIZE_LARGER] =
677 font_sizes[FONT_SIZE_LARGEST] =
681 font_sizes[FONT_SIZE_HUGE] =
685 font_sizes[FONT_SIZE_HUGER] =
690 case RC_SCREEN_FONT_SCALABLE:
692 use_scalable_fonts = lexrc.getBool();
698 autosave = lexrc.getInteger();
702 case RC_DOCUMENTPATH:
704 document_path = os::internal_path(lexrc.getString());
705 document_path = expandPath(document_path);
711 example_path = os::internal_path(lexrc.getString());
712 example_path = expandPath(example_path);
716 case RC_TEMPLATEPATH:
718 template_path = os::internal_path(lexrc.getString());
719 template_path = expandPath(template_path);
725 tempdir_path = os::internal_path(lexrc.getString());
726 tempdir_path = expandPath(tempdir_path);
732 lyxerr << "Ignoring obsolete use_tempdir flag." << endl;
736 case RC_USELASTFILEPOS:
738 use_lastfilepos = lexrc.getBool();
744 load_session = lexrc.getBool();
748 case RC_NUMLASTFILES:
750 num_lastfiles = lexrc.getInteger();
754 case RC_CHECKLASTFILES:
756 check_lastfiles = lexrc.getBool();
760 case RC_SCREEN_FONT_ROMAN:
762 roman_font_name = lexrc.getString();
763 oldFontFormat(roman_font_name,
768 case RC_SCREEN_FONT_SANS:
770 sans_font_name = lexrc.getString();
771 oldFontFormat(sans_font_name, sans_font_foundry);
775 case RC_SCREEN_FONT_TYPEWRITER:
777 typewriter_font_name = lexrc.getString();
778 oldFontFormat(typewriter_font_name,
779 typewriter_font_foundry);
783 case RC_SCREEN_FONT_ROMAN_FOUNDRY:
785 roman_font_foundry = lexrc.getString();
789 case RC_SCREEN_FONT_SANS_FOUNDRY:
791 sans_font_foundry = lexrc.getString();
795 case RC_SCREEN_FONT_TYPEWRITER_FOUNDRY:
797 typewriter_font_foundry = lexrc.getString();
803 string lyx_name, x11_name;
806 lyx_name = lexrc.getString();
808 lexrc.printError("Missing color tag.");
813 x11_name = lexrc.getString();
815 lexrc.printError("Missing color name for color: `$$Token'");
819 ColorCode const col =
820 lcolor.getFromLyXName(lyx_name);
821 if (col == Color_none ||
822 col == Color_inherit ||
826 if (!lcolor.setColor(col, x11_name)) {
827 lyxerr << "Bad lyxrc set_color for "
833 case RC_AUTOREGIONDELETE:
834 // Auto region delete defaults to true
836 auto_region_delete = lexrc.getBool();
842 lyxpipes = os::internal_path(lexrc.getString());
843 lyxpipes = expandPath(lyxpipes);
847 case RC_CURSOR_FOLLOWS_SCROLLBAR:
849 cursor_follows_scrollbar = lexrc.getBool();
853 case RC_DIALOGS_ICONIFY_WITH_MAIN:
855 dialogs_iconify_with_main = lexrc.getBool();
859 case RC_PLAINTEXT_ROFF_COMMAND:
861 plaintext_roff_command = lexrc.getString();
864 case RC_PLAINTEXT_LINELEN:
866 plaintext_linelen = lexrc.getInteger();
869 // Spellchecker settings:
870 case RC_USE_SPELL_LIB:
872 use_spell_lib = lexrc.getBool();
875 case RC_SPELL_COMMAND:
877 isp_command = lexrc.getString();
880 case RC_ACCEPT_COMPOUND:
882 isp_accept_compound = lexrc.getBool();
887 isp_use_input_encoding = lexrc.getBool();
890 case RC_USE_ALT_LANG:
892 isp_use_alt_lang = lexrc.getBool();
895 case RC_USE_PERS_DICT:
897 isp_use_pers_dict = lexrc.getBool();
900 case RC_USE_PIXMAP_CACHE:
902 use_pixmap_cache = lexrc.getBool();
905 case RC_USE_ESC_CHARS:
907 isp_use_esc_chars = lexrc.getBool();
912 isp_alt_lang = lexrc.getString();
917 isp_pers_dict = os::internal_path(lexrc.getString());
922 isp_esc_chars = lexrc.getString();
927 make_backup = lexrc.getBool();
930 case RC_BACKUPDIR_PATH:
932 backupdir_path = os::internal_path(lexrc.getString());
933 backupdir_path = expandPath(backupdir_path);
936 case RC_DATE_INSERT_FORMAT:
938 date_insert_format = lexrc.getString();
941 case RC_LANGUAGE_PACKAGE:
943 language_package = lexrc.getString();
946 case RC_LANGUAGE_AUTO_BEGIN:
948 language_auto_begin = lexrc.getBool();
951 case RC_LANGUAGE_AUTO_END:
953 language_auto_end = lexrc.getBool();
956 case RC_LANGUAGE_GLOBAL_OPTIONS:
958 language_global_options = lexrc.getBool();
961 case RC_LANGUAGE_USE_BABEL:
963 language_use_babel = lexrc.getBool();
966 case RC_LANGUAGE_COMMAND_BEGIN:
968 language_command_begin = lexrc.getString();
971 case RC_LANGUAGE_COMMAND_END:
973 language_command_end = lexrc.getString();
976 case RC_LANGUAGE_COMMAND_LOCAL:
978 language_command_local = lexrc.getString();
983 rtl_support = lexrc.getBool();
988 auto_number = lexrc.getBool();
991 case RC_MARK_FOREIGN_LANGUAGE:
993 mark_foreign_language = lexrc.getBool();
1000 fmt = lexrc.getString();
1003 command = lexrc.getString();
1005 setMover(fmt, command);
1009 case RC_CONVERTER: {
1010 string from, to, command, flags;
1012 from = lexrc.getString();
1015 to = lexrc.getString();
1018 command = lexrc.getString();
1021 flags = lexrc.getString();
1023 if (command.empty()) {
1024 theConverters().erase(from, to);
1026 theConverters().add(from, to, command, flags);
1030 // compatibility with versions older than 1.4.0 only
1032 string format, command;
1034 format = lexrc.getString();
1037 command = lexrc.getString();
1039 formats.setViewer(format, command);
1043 string format, extension, prettyname, shortcut;
1045 format = lexrc.getString();
1048 extension = lexrc.getString();
1051 prettyname = lexrc.getString();
1054 shortcut = lexrc.getString();
1056 string viewer, editor;
1058 viewer = lexrc.getString();
1060 editor = lexrc.getString();
1062 // Hack to ensure compatibility with versions older
1064 int le = lexrc.lex();
1065 if (le != Lexer::LEX_FEOF && le != Lexer::LEX_UNDEF) {
1066 flags = lexrc.getString();
1067 if (le != Lexer::LEX_DATA) {
1068 // We have got a known token.
1069 // Therefore this is an old style
1070 // format definition without
1072 lexrc.pushToken(flags);
1076 int flgs = Format::none;
1077 while (!flags.empty()) {
1079 flags = support::split(flags, flag, ',');
1080 if (flag == "document")
1081 flgs |= Format::document;
1082 else if (flag == "vector")
1083 flgs |= Format::vector;
1085 lyxerr << "Ignoring unknown flag `"
1086 << flag << "' for format `"
1087 << format << "'." << endl;
1089 if (prettyname.empty()) {
1090 if (theConverters().formatIsUsed(format)) {
1091 lyxerr << "Can't delete format "
1094 formats.erase(format);
1097 formats.add(format, extension, prettyname,
1098 shortcut, viewer, editor, flgs);
1102 case RC_DEFAULT_LANGUAGE:
1104 default_language = lexrc.getString();
1108 case RC_LABEL_INIT_LENGTH:
1110 label_init_length = lexrc.getInteger();
1114 case RC_SHOW_BANNER:
1116 show_banner = lexrc.getBool();
1122 string const tmp = lexrc.getString();
1123 if (tmp == "true" || tmp == "on")
1124 preview = PREVIEW_ON;
1125 else if (tmp == "no_math")
1126 preview = PREVIEW_NO_MATH;
1128 preview = PREVIEW_OFF;
1129 if (tmp != "false" && tmp != "off")
1130 lyxerr << "Unrecognized "
1132 << tmp << '\n' << endl;
1137 case RC_PREVIEW_HASHED_LABELS:
1139 preview_hashed_labels = lexrc.getBool();
1143 case RC_PREVIEW_SCALE_FACTOR:
1145 preview_scale_factor = lexrc.getString();
1151 user_name = lexrc.getString();
1156 user_email = lexrc.getString();
1159 case RC_PATH_PREFIX:
1161 path_prefix = lexrc.getString();
1164 case RC_USE_CONVERTER_CACHE:
1166 use_converter_cache = lexrc.getBool();
1169 case RC_CONVERTER_CACHE_MAXAGE:
1171 converter_cache_maxage =
1172 convert<unsigned int>(lexrc.getString());
1175 case RC_SORT_LAYOUTS:
1177 sort_layouts = lexrc.getBool();
1180 case RC_LAST: break; // this is just a dummy
1184 /// Update converters data-structures
1185 theConverters().update(formats);
1186 theConverters().buildGraph();
1192 void LyXRC::write(FileName const & filename, bool ignore_system_lyxrc) const
1194 ofstream ofs(filename.toFilesystemEncoding().c_str());
1196 write(ofs, ignore_system_lyxrc);
1200 void LyXRC::print() const
1202 if (lyxerr.debugging())
1203 write(lyxerr, false);
1211 typedef std::pair<std::string, SpecialisedMover> Data;
1213 SameMover(Data const & comparison)
1214 : comparison_(comparison) {}
1216 bool operator()(Data const & data) const
1218 return data.first == comparison_.first &&
1219 data.second.command() == comparison_.second.command();
1227 void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) const
1229 LyXRCTags tag = RC_LAST;
1231 if (!name.empty()) {
1232 for (int i = 0; i != lyxrcCount; ++i)
1233 if ("\\" + name == lyxrcTags[i].tag)
1234 tag = static_cast<LyXRCTags>(lyxrcTags[i].code);
1238 os << "### This file is part of\n"
1239 << "### ========================================================\n"
1240 << "### LyX, The Document Processor\n"
1242 << "### Copyright 1995 Matthias Ettrich\n"
1243 << "### Copyright 1995-2007 The LyX Team.\n"
1245 << "### ========================================================\n"
1247 << "# This file is written by LyX, if you want to make your own\n"
1248 << "# modifications you should do them from inside LyX and save\n"
1251 // Why the switch you might ask. It is a trick to ensure that all
1252 // the elements in the LyXRCTags enum is handled. As you can see
1253 // there are no breaks at all. So it is just a huge fall-through.
1254 // The nice thing is that we will get a warning from the compiler
1255 // if we forget an element.
1259 // input/include files are not done here
1261 if (ignore_system_lyxrc ||
1262 bind_file != system_lyxrc.bind_file) {
1263 string const path = os::external_path(bind_file);
1264 os << "\\bind_file \"" << path << "\"\n";
1270 if (ignore_system_lyxrc ||
1271 def_file != system_lyxrc.def_file) {
1272 string const path = os::external_path(def_file);
1273 os << "\\def_file \"" << path << "\"\n";
1282 << "# MISC SECTION ######################################\n"
1284 // bind files are not done here.
1286 case RC_PATH_PREFIX:
1287 if (ignore_system_lyxrc ||
1288 path_prefix != system_lyxrc.path_prefix) {
1289 os << "\\path_prefix \"" << path_prefix << "\"\n";
1294 if (ignore_system_lyxrc ||
1295 ui_file != system_lyxrc.ui_file) {
1296 string const path = os::external_path(ui_file);
1297 os << "\\ui_file \"" << path << "\"\n";
1301 case RC_AUTOREGIONDELETE:
1302 if (ignore_system_lyxrc ||
1303 auto_region_delete != system_lyxrc.auto_region_delete) {
1304 os << "# Set to false to inhibit automatic replacement of\n"
1305 << "# the current selection.\n"
1306 << "\\auto_region_delete " << convert<string>(auto_region_delete)
1311 case RC_AUTORESET_OPTIONS:
1312 if (ignore_system_lyxrc ||
1313 auto_reset_options != system_lyxrc.auto_reset_options) {
1314 os << "# Set to false to inhibit automatic reset of\n"
1315 << "# the class options to defaults on class change.\n"
1316 << "\\auto_reset_options "
1317 << convert<string>(auto_reset_options)
1323 if (ignore_system_lyxrc ||
1324 autosave != system_lyxrc.autosave) {
1325 os << "# The time interval between auto-saves in seconds.\n"
1326 << "\\autosave " << autosave << '\n';
1330 case RC_DISPLAY_GRAPHICS:
1331 if (ignore_system_lyxrc ||
1332 display_graphics != system_lyxrc.display_graphics) {
1333 os << "# Display graphics within LyX\n"
1334 << "# monochrome|grayscale|color|none\n"
1335 << "\\display_graphics "
1336 << graphics::displayTranslator().find(
1337 graphics::DisplayType(display_graphics))
1342 case RC_SORT_LAYOUTS:
1343 if (ignore_system_lyxrc ||
1344 sort_layouts != system_lyxrc.sort_layouts) {
1345 os << "# Sort layouts alphabetically.\n"
1346 << "\\sort_layouts " << convert<string>(sort_layouts) << '\n';
1350 case RC_VIEWDVI_PAPEROPTION:
1351 if (ignore_system_lyxrc ||
1352 view_dvi_paper_option
1353 != system_lyxrc.view_dvi_paper_option) {
1354 os << "# Options used to specify paper size to the\n"
1355 << "# view_dvi_command (e.g. -paper)\n"
1356 << "\\view_dvi_paper_option \""
1357 << view_dvi_paper_option << "\"\n";
1361 case RC_DEFAULT_PAPERSIZE:
1362 if (ignore_system_lyxrc ||
1363 default_papersize != system_lyxrc.default_papersize) {
1364 os << "# The default papersize to use.\n"
1365 << "\\default_papersize \"";
1366 switch (default_papersize) {
1368 os << "default"; break;
1369 case PAPER_USLETTER:
1370 os << "usletter"; break;
1372 os << "legal"; break;
1373 case PAPER_USEXECUTIVE:
1374 os << "executive"; break;
1385 case PAPER_B4: break;
1391 case RC_CHKTEX_COMMAND:
1392 if (ignore_system_lyxrc ||
1393 chktex_command != system_lyxrc.chktex_command) {
1394 os << "\\chktex_command \"" << chktex_command << "\"\n";
1398 case RC_BIBTEX_COMMAND:
1399 if (ignore_system_lyxrc ||
1400 bibtex_command != system_lyxrc.bibtex_command) {
1401 os << "\\bibtex_command \"" << bibtex_command << "\"\n";
1405 case RC_INDEX_COMMAND:
1406 if (ignore_system_lyxrc ||
1407 index_command != system_lyxrc.index_command) {
1408 os << "\\index_command \"" << index_command << "\"\n";
1412 case RC_TEX_EXPECTS_WINDOWS_PATHS:
1413 if (ignore_system_lyxrc ||
1414 windows_style_tex_paths != system_lyxrc.windows_style_tex_paths) {
1415 os << "\\tex_expects_windows_paths "
1416 << convert<string>(windows_style_tex_paths) << '\n';
1420 case RC_TEX_ALLOWS_SPACES:
1421 if (tex_allows_spaces != system_lyxrc.tex_allows_spaces) {
1422 os << "\\tex_allows_spaces "
1423 << convert<string>(tex_allows_spaces) << '\n';
1428 if (ignore_system_lyxrc ||
1429 use_kbmap != system_lyxrc.use_kbmap) {
1430 os << "\\kbmap " << convert<string>(use_kbmap) << '\n';
1434 case RC_KBMAP_PRIMARY:
1435 if (ignore_system_lyxrc ||
1436 primary_kbmap != system_lyxrc.primary_kbmap) {
1437 string const path = os::external_path(primary_kbmap);
1438 os << "\\kbmap_primary \"" << path << "\"\n";
1442 case RC_KBMAP_SECONDARY:
1443 if (ignore_system_lyxrc ||
1444 secondary_kbmap != system_lyxrc.secondary_kbmap) {
1445 string const path = os::external_path(secondary_kbmap);
1446 os << "\\kbmap_secondary \"" << path << "\"\n";
1451 if (ignore_system_lyxrc ||
1452 lyxpipes != system_lyxrc.lyxpipes) {
1453 string const path = os::external_path(lyxpipes);
1454 os << "\\serverpipe \"" << path << "\"\n";
1458 case RC_DATE_INSERT_FORMAT:
1459 if (ignore_system_lyxrc ||
1460 date_insert_format != system_lyxrc.date_insert_format) {
1461 os << "\\date_insert_format \"" << date_insert_format
1466 case RC_LABEL_INIT_LENGTH:
1467 if (ignore_system_lyxrc ||
1468 label_init_length != system_lyxrc.label_init_length) {
1469 os << "\\label_init_length " << label_init_length
1476 os << "\\user_name \"" << user_name << "\"\n";
1481 os << "\\user_email \"" << user_email << "\"\n";
1485 case RC_SHOW_BANNER:
1486 if (ignore_system_lyxrc ||
1487 show_banner != system_lyxrc.show_banner) {
1488 os << "\\show_banner " << convert<string>(show_banner) << '\n';
1494 if (ignore_system_lyxrc ||
1495 preview != system_lyxrc.preview) {
1501 case PREVIEW_NO_MATH:
1508 os << "\\preview " << status << '\n';
1513 case RC_PREVIEW_HASHED_LABELS:
1514 if (ignore_system_lyxrc ||
1515 preview_hashed_labels !=
1516 system_lyxrc.preview_hashed_labels) {
1517 os << "\\preview_hashed_labels "
1518 << convert<string>(preview_hashed_labels) << '\n';
1523 case RC_PREVIEW_SCALE_FACTOR:
1524 if (ignore_system_lyxrc ||
1525 preview_scale_factor != system_lyxrc.preview_scale_factor) {
1526 os << "\\preview_scale_factor "
1527 << preview_scale_factor << '\n';
1532 case RC_USE_CONVERTER_CACHE:
1533 if (ignore_system_lyxrc ||
1534 use_converter_cache != system_lyxrc.use_converter_cache) {
1535 os << "\\use_converter_cache "
1536 << convert<string>(use_converter_cache) << '\n';
1541 case RC_CONVERTER_CACHE_MAXAGE:
1542 if (ignore_system_lyxrc ||
1543 converter_cache_maxage != system_lyxrc.converter_cache_maxage) {
1544 os << "\\converter_cache_maxage "
1545 << converter_cache_maxage << '\n';
1551 << "# SCREEN & FONTS SECTION ############################\n"
1555 if (ignore_system_lyxrc ||
1556 dpi != system_lyxrc.dpi) {
1557 os << "\\screen_dpi " << dpi << '\n';
1561 case RC_SCREEN_ZOOM:
1562 if (ignore_system_lyxrc ||
1563 zoom != system_lyxrc.zoom) {
1564 os << "\\screen_zoom " << zoom << '\n';
1568 case RC_GEOMETRY_SESSION:
1569 if (ignore_system_lyxrc ||
1570 allow_geometry_session != system_lyxrc.allow_geometry_session) {
1571 os << "\\allow_geometry_session " << convert<string>(allow_geometry_session)
1576 case RC_CURSOR_FOLLOWS_SCROLLBAR:
1577 if (ignore_system_lyxrc ||
1578 cursor_follows_scrollbar
1579 != system_lyxrc.cursor_follows_scrollbar) {
1580 os << "\\cursor_follows_scrollbar "
1581 << convert<string>(cursor_follows_scrollbar) << '\n';
1585 case RC_DIALOGS_ICONIFY_WITH_MAIN:
1586 if (ignore_system_lyxrc ||
1587 dialogs_iconify_with_main
1588 != system_lyxrc.dialogs_iconify_with_main) {
1589 os << "\\dialogs_iconify_with_main "
1590 << convert<string>(dialogs_iconify_with_main) << '\n';
1594 case RC_SCREEN_FONT_ROMAN:
1595 if (ignore_system_lyxrc ||
1596 roman_font_name != system_lyxrc.roman_font_name) {
1597 os << "\\screen_font_roman \"" << roman_font_name
1602 case RC_SCREEN_FONT_ROMAN_FOUNDRY:
1603 if (ignore_system_lyxrc ||
1604 roman_font_foundry != system_lyxrc.roman_font_foundry) {
1605 os << "\\screen_font_roman_foundry \"" << roman_font_foundry
1610 case RC_SCREEN_FONT_SANS:
1611 if (ignore_system_lyxrc ||
1612 sans_font_name != system_lyxrc.sans_font_name) {
1613 os << "\\screen_font_sans \"" << sans_font_name
1618 case RC_SCREEN_FONT_SANS_FOUNDRY:
1619 if (ignore_system_lyxrc ||
1620 sans_font_foundry != system_lyxrc.sans_font_foundry) {
1621 os << "\\screen_font_sans_foundry \"" << sans_font_foundry
1626 case RC_SCREEN_FONT_TYPEWRITER:
1627 if (ignore_system_lyxrc ||
1628 typewriter_font_name != system_lyxrc.typewriter_font_name) {
1629 os << "\\screen_font_typewriter \""
1630 << typewriter_font_name << "\"\n";
1634 case RC_SCREEN_FONT_TYPEWRITER_FOUNDRY:
1635 if (ignore_system_lyxrc ||
1636 typewriter_font_foundry != system_lyxrc.typewriter_font_foundry) {
1637 os << "\\screen_font_typewriter_foundry \""
1638 << typewriter_font_foundry << "\"\n";
1643 case RC_SCREEN_FONT_SCALABLE:
1644 if (ignore_system_lyxrc ||
1645 use_scalable_fonts != system_lyxrc.use_scalable_fonts) {
1646 os << "\\screen_font_scalable "
1647 << convert<string>(use_scalable_fonts)
1652 case RC_SCREEN_FONT_SIZES:
1653 if (ignore_system_lyxrc ||
1654 font_sizes[FONT_SIZE_TINY]
1655 != system_lyxrc.font_sizes[FONT_SIZE_TINY] ||
1656 font_sizes[FONT_SIZE_SCRIPT]
1657 != system_lyxrc.font_sizes[FONT_SIZE_SCRIPT] ||
1658 font_sizes[FONT_SIZE_FOOTNOTE]
1659 != system_lyxrc.font_sizes[FONT_SIZE_FOOTNOTE] ||
1660 font_sizes[FONT_SIZE_SMALL]
1661 != system_lyxrc.font_sizes[FONT_SIZE_SMALL] ||
1662 font_sizes[FONT_SIZE_NORMAL]
1663 != system_lyxrc.font_sizes[FONT_SIZE_NORMAL] ||
1664 font_sizes[FONT_SIZE_LARGE]
1665 != system_lyxrc.font_sizes[FONT_SIZE_LARGE] ||
1666 font_sizes[FONT_SIZE_LARGER]
1667 != system_lyxrc.font_sizes[FONT_SIZE_LARGER] ||
1668 font_sizes[FONT_SIZE_LARGEST]
1669 != system_lyxrc.font_sizes[FONT_SIZE_LARGEST] ||
1670 font_sizes[FONT_SIZE_HUGE]
1671 != system_lyxrc.font_sizes[FONT_SIZE_HUGE] ||
1672 font_sizes[FONT_SIZE_HUGER]
1673 != system_lyxrc.font_sizes[FONT_SIZE_HUGER]) {
1674 os.setf(ios::fixed);
1676 os << "\\screen_font_sizes"
1677 << ' ' << font_sizes[FONT_SIZE_TINY]
1678 << ' ' << font_sizes[FONT_SIZE_SCRIPT]
1679 << ' ' << font_sizes[FONT_SIZE_FOOTNOTE]
1680 << ' ' << font_sizes[FONT_SIZE_SMALL]
1681 << ' ' << font_sizes[FONT_SIZE_NORMAL]
1682 << ' ' << font_sizes[FONT_SIZE_LARGE]
1683 << ' ' << font_sizes[FONT_SIZE_LARGER]
1684 << ' ' << font_sizes[FONT_SIZE_LARGEST]
1685 << ' ' << font_sizes[FONT_SIZE_HUGE]
1686 << ' ' << font_sizes[FONT_SIZE_HUGER]
1693 << "# COLOR SECTION ###################################\n"
1697 for (int i = 0; i < Color_ignore; ++i) {
1698 ColorCode lc = static_cast<ColorCode>(i);
1700 string const col(lcolor.getX11Name(lc));
1701 if (ignore_system_lyxrc ||
1702 col != system_lcolor.getX11Name(lc)) {
1703 os << "\\set_color \""
1704 << lcolor.getLyXName(lc) << "\" \""
1712 << "# PRINTER SECTION ###################################\n"
1716 if (ignore_system_lyxrc ||
1717 printer != system_lyxrc.printer) {
1718 os << "\\printer \"" << printer << "\"\n";
1722 case RC_PRINT_ADAPTOUTPUT:
1723 if (ignore_system_lyxrc ||
1724 print_adapt_output != system_lyxrc.print_adapt_output) {
1725 os << "\\print_adapt_output "
1726 << convert<string>(print_adapt_output)
1731 case RC_PRINT_COMMAND:
1732 if (ignore_system_lyxrc ||
1733 print_command != system_lyxrc.print_command) {
1734 os << "\\print_command \"" << print_command << "\"\n";
1738 case RC_PRINTEXSTRAOPTIONS:
1739 if (ignore_system_lyxrc ||
1740 print_extra_options != system_lyxrc.print_extra_options) {
1741 os << "\\print_extra_options \"" << print_extra_options
1746 case RC_PRINTSPOOL_COMMAND:
1747 if (ignore_system_lyxrc ||
1748 print_spool_command != system_lyxrc.print_spool_command) {
1749 os << "\\print_spool_command \"" << print_spool_command
1754 case RC_PRINTSPOOL_PRINTERPREFIX:
1755 if (ignore_system_lyxrc ||
1756 print_spool_printerprefix
1757 != system_lyxrc.print_spool_printerprefix) {
1758 os << "\\print_spool_printerprefix \""
1759 << print_spool_printerprefix << "\"\n";
1763 case RC_PRINTEVENPAGEFLAG:
1764 if (ignore_system_lyxrc ||
1765 print_evenpage_flag != system_lyxrc.print_evenpage_flag) {
1766 os << "\\print_evenpage_flag \"" << print_evenpage_flag
1771 case RC_PRINTODDPAGEFLAG:
1772 if (ignore_system_lyxrc ||
1773 print_oddpage_flag != system_lyxrc.print_oddpage_flag) {
1774 os << "\\print_oddpage_flag \"" << print_oddpage_flag
1779 case RC_PRINTREVERSEFLAG:
1780 if (ignore_system_lyxrc ||
1781 print_reverse_flag != system_lyxrc.print_reverse_flag) {
1782 os << "\\print_reverse_flag \"" << print_reverse_flag
1787 case RC_PRINTLANDSCAPEFLAG:
1788 if (ignore_system_lyxrc ||
1789 print_landscape_flag != system_lyxrc.print_landscape_flag) {
1790 os << "\\print_landscape_flag \"" << print_landscape_flag
1795 case RC_PRINTPAGERANGEFLAG:
1796 if (ignore_system_lyxrc ||
1797 print_pagerange_flag != system_lyxrc.print_pagerange_flag) {
1798 os << "\\print_pagerange_flag \"" << print_pagerange_flag
1803 case RC_PRINTCOPIESFLAG:
1804 if (ignore_system_lyxrc ||
1805 print_copies_flag != system_lyxrc.print_copies_flag) {
1806 os << "\\print_copies_flag \"" << print_copies_flag
1811 case RC_PRINTCOLLCOPIESFLAG:
1812 if (ignore_system_lyxrc ||
1813 print_collcopies_flag
1814 != system_lyxrc.print_collcopies_flag) {
1815 os << "\\print_collcopies_flag \""
1816 << print_collcopies_flag
1821 case RC_PRINTPAPERFLAG:
1822 if (ignore_system_lyxrc ||
1823 print_paper_flag != system_lyxrc.print_paper_flag) {
1824 os << "\\print_paper_flag \"" << print_paper_flag
1829 case RC_PRINTPAPERDIMENSIONFLAG:
1830 if (ignore_system_lyxrc ||
1831 print_paper_dimension_flag
1832 != system_lyxrc.print_paper_dimension_flag) {
1833 os << "\\print_paper_dimension_flag \""
1834 << print_paper_dimension_flag << "\"\n";
1838 case RC_PRINTTOPRINTER:
1839 if (ignore_system_lyxrc ||
1840 print_to_printer != system_lyxrc.print_to_printer) {
1841 os << "\\print_to_printer \"" << print_to_printer
1846 case RC_PRINTTOFILE:
1847 if (ignore_system_lyxrc ||
1848 print_to_file != system_lyxrc.print_to_file) {
1849 string const path = os::external_path(print_to_file);
1850 os << "\\print_to_file \"" << path << "\"\n";
1854 case RC_PRINTFILEEXTENSION:
1855 if (ignore_system_lyxrc ||
1856 print_file_extension != system_lyxrc.print_file_extension) {
1857 os << "\\print_file_extension \""
1858 << print_file_extension
1865 << "# EXPORT SECTION ####################################\n"
1868 case RC_CUSTOM_EXPORT_COMMAND:
1869 if (ignore_system_lyxrc ||
1870 custom_export_command
1871 != system_lyxrc.custom_export_command) {
1872 os << "\\custom_export_command \""
1873 << custom_export_command
1878 case RC_CUSTOM_EXPORT_FORMAT:
1879 if (ignore_system_lyxrc ||
1880 custom_export_format
1881 != system_lyxrc.custom_export_format) {
1882 os << "\\custom_export_format \"" << custom_export_format
1889 << "# TEX SECTION #######################################\n"
1892 case RC_FONT_ENCODING:
1893 if (ignore_system_lyxrc ||
1894 fontenc != system_lyxrc.fontenc) {
1895 os << "\\font_encoding \"" << fontenc << "\"\n";
1901 << "# FILE SECTION ######################################\n"
1904 case RC_DOCUMENTPATH:
1905 if (ignore_system_lyxrc ||
1906 document_path != system_lyxrc.document_path) {
1907 string const path = os::external_path(document_path);
1908 os << "\\document_path \"" << path << "\"\n";
1912 case RC_USELASTFILEPOS:
1913 if (ignore_system_lyxrc ||
1914 use_lastfilepos != system_lyxrc.use_lastfilepos) {
1915 os << "\\use_lastfilepos " << convert<string>(use_lastfilepos)
1920 case RC_LOADSESSION:
1921 if (ignore_system_lyxrc ||
1922 load_session != system_lyxrc.load_session) {
1923 os << "\\load_session " << convert<string>(load_session)
1928 case RC_NUMLASTFILES:
1929 if (ignore_system_lyxrc ||
1930 num_lastfiles != system_lyxrc.num_lastfiles) {
1931 os << "\\num_lastfiles " << num_lastfiles << '\n';
1935 case RC_CHECKLASTFILES:
1936 if (ignore_system_lyxrc ||
1937 check_lastfiles != system_lyxrc.check_lastfiles) {
1938 os << "\\check_lastfiles " << convert<string>(check_lastfiles)
1943 case RC_EXAMPLEPATH:
1944 if (ignore_system_lyxrc ||
1945 example_path != system_lyxrc.example_path) {
1946 string const path = os::external_path(example_path);
1947 os << "\\example_path \"" << path << "\"\n";
1951 case RC_TEMPLATEPATH:
1952 if (ignore_system_lyxrc ||
1953 template_path != system_lyxrc.template_path) {
1954 string const path = os::external_path(template_path);
1955 os << "\\template_path \"" << path << "\"\n";
1959 case RC_TEMPDIRPATH:
1960 if (ignore_system_lyxrc ||
1961 tempdir_path != system_lyxrc.tempdir_path) {
1962 string const path = os::external_path(tempdir_path);
1963 os << "\\tempdir_path \"" << path << "\"\n";
1971 case RC_PLAINTEXT_LINELEN:
1972 if (ignore_system_lyxrc ||
1973 plaintext_linelen != system_lyxrc.plaintext_linelen) {
1974 os << "\\plaintext_linelen " << plaintext_linelen << '\n';
1978 case RC_MAKE_BACKUP:
1979 if (ignore_system_lyxrc ||
1980 make_backup != system_lyxrc.make_backup) {
1981 os << "\\make_backup " << convert<string>(make_backup) << '\n';
1985 case RC_BACKUPDIR_PATH:
1986 if (ignore_system_lyxrc ||
1987 backupdir_path != system_lyxrc.backupdir_path) {
1988 string const path = os::external_path(backupdir_path);
1989 os << "\\backupdir_path \"" << path << "\"\n";
1995 << "# PLAIN TEXT EXPORT SECTION ##############################\n"
1998 case RC_PLAINTEXT_ROFF_COMMAND:
1999 if (ignore_system_lyxrc ||
2000 plaintext_roff_command != system_lyxrc.plaintext_roff_command) {
2001 os << "\\plaintext_roff_command \"" << plaintext_roff_command
2008 << "# SPELLCHECKER SECTION ##############################\n"
2010 case RC_USE_SPELL_LIB:
2011 if (ignore_system_lyxrc ||
2012 use_spell_lib != system_lyxrc.use_spell_lib) {
2013 os << "\\use_spell_lib " << convert<string>(use_spell_lib) << '\n';
2017 case RC_SPELL_COMMAND:
2018 if (ignore_system_lyxrc ||
2019 isp_command != system_lyxrc.isp_command) {
2020 os << "\\spell_command \"" << isp_command << "\"\n";
2024 case RC_ACCEPT_COMPOUND:
2025 if (ignore_system_lyxrc ||
2026 isp_accept_compound != system_lyxrc.isp_accept_compound) {
2027 os << "\\accept_compound " << convert<string>(isp_accept_compound)
2032 case RC_USE_ALT_LANG:
2033 if (ignore_system_lyxrc ||
2034 isp_use_alt_lang != system_lyxrc.isp_use_alt_lang) {
2035 os << "\\use_alt_language " << convert<string>(isp_use_alt_lang)
2041 if (ignore_system_lyxrc ||
2042 isp_alt_lang != system_lyxrc.isp_alt_lang) {
2043 os << "\\alternate_language \"" << isp_alt_lang
2048 case RC_USE_ESC_CHARS:
2049 if (ignore_system_lyxrc ||
2050 isp_use_esc_chars != system_lyxrc.isp_use_esc_chars) {
2051 os << "\\use_escape_chars " << convert<string>(isp_use_esc_chars)
2057 if (ignore_system_lyxrc ||
2058 isp_esc_chars != system_lyxrc.isp_esc_chars) {
2059 os << "\\escape_chars \"" << isp_esc_chars << "\"\n";
2063 case RC_USE_PERS_DICT:
2064 if (ignore_system_lyxrc ||
2065 isp_use_pers_dict != system_lyxrc.isp_use_pers_dict) {
2066 os << "\\use_personal_dictionary "
2067 << convert<string>(isp_use_pers_dict)
2072 case RC_USE_PIXMAP_CACHE:
2073 if (ignore_system_lyxrc ||
2074 use_pixmap_cache != system_lyxrc.use_pixmap_cache) {
2075 os << "\\use_pixmap_cache "
2076 << convert<string>(use_pixmap_cache)
2080 if (isp_pers_dict != system_lyxrc.isp_pers_dict) {
2081 string const path = os::external_path(isp_pers_dict);
2082 os << "\\personal_dictionary \"" << path << "\"\n";
2086 case RC_USE_INP_ENC:
2087 if (ignore_system_lyxrc ||
2088 isp_use_input_encoding
2089 != system_lyxrc.isp_use_input_encoding) {
2090 os << "\\use_input_encoding "
2091 << convert<string>(isp_use_input_encoding)
2098 << "# LANGUAGE SUPPORT SECTION ##########################\n"
2101 case RC_RTL_SUPPORT:
2102 if (ignore_system_lyxrc ||
2103 rtl_support != system_lyxrc.rtl_support) {
2104 os << "\\rtl " << convert<string>(rtl_support) << '\n';
2108 case RC_LANGUAGE_PACKAGE:
2109 if (ignore_system_lyxrc ||
2110 language_package != system_lyxrc.language_package) {
2111 os << "\\language_package \"" << language_package
2116 case RC_LANGUAGE_GLOBAL_OPTIONS:
2117 if (ignore_system_lyxrc ||
2118 language_global_options
2119 != system_lyxrc.language_global_options) {
2120 os << "\\language_global_options \""
2121 << convert<string>(language_global_options)
2126 case RC_LANGUAGE_USE_BABEL:
2127 if (ignore_system_lyxrc ||
2128 language_use_babel != system_lyxrc.language_use_babel) {
2129 os << "\\language_use_babel \""
2130 << convert<string>(language_use_babel)
2135 case RC_LANGUAGE_COMMAND_BEGIN:
2136 if (ignore_system_lyxrc ||
2137 language_command_begin
2138 != system_lyxrc.language_command_begin) {
2139 os << "\\language_command_begin \""
2140 << language_command_begin
2145 case RC_LANGUAGE_COMMAND_END:
2146 if (ignore_system_lyxrc ||
2147 language_command_end
2148 != system_lyxrc.language_command_end) {
2149 os << "\\language_command_end \"" << language_command_end
2154 case RC_LANGUAGE_COMMAND_LOCAL:
2155 if (ignore_system_lyxrc ||
2156 language_command_local
2157 != system_lyxrc.language_command_local) {
2158 os << "\\language_command_local \""
2159 << language_command_local
2164 case RC_LANGUAGE_AUTO_BEGIN:
2165 if (ignore_system_lyxrc ||
2166 language_auto_begin != system_lyxrc.language_auto_begin) {
2167 os << "\\language_auto_begin "
2168 << convert<string>(language_auto_begin) << '\n';
2172 case RC_LANGUAGE_AUTO_END:
2173 if (ignore_system_lyxrc ||
2174 language_auto_end != system_lyxrc.language_auto_end) {
2175 os << "\\language_auto_end "
2176 << convert<string>(language_auto_end) << '\n';
2180 case RC_MARK_FOREIGN_LANGUAGE:
2181 if (ignore_system_lyxrc ||
2182 mark_foreign_language
2183 != system_lyxrc.mark_foreign_language) {
2184 os << "\\mark_foreign_language " <<
2185 convert<string>(mark_foreign_language) << '\n';
2191 << "# 2nd MISC SUPPORT SECTION ##########################\n"
2194 case RC_AUTO_NUMBER:
2195 if (ignore_system_lyxrc ||
2196 auto_number != system_lyxrc.auto_number) {
2197 os << "\\auto_number " << convert<string>(auto_number) << '\n';
2201 case RC_DEFAULT_LANGUAGE:
2202 if (ignore_system_lyxrc ||
2203 default_language != system_lyxrc.default_language) {
2204 os << "\\default_language " << default_language << '\n';
2210 << "# FORMATS SECTION ##########################\n"
2214 // New/modified formats
2215 for (Formats::const_iterator cit = formats.begin();
2216 cit != formats.end(); ++cit) {
2217 Format const * format =
2218 system_formats.getFormat(cit->name());
2220 format->extension() != cit->extension() ||
2221 format->prettyname() != cit->prettyname() ||
2222 format->shortcut() != cit->shortcut() ||
2223 format->viewer() != cit->viewer() ||
2224 format->editor() != cit->editor() ||
2225 format->documentFormat() != cit->documentFormat() ||
2226 format->vectorFormat() != cit->vectorFormat()) {
2227 os << "\\format \"" << cit->name() << "\" \""
2228 << cit->extension() << "\" \""
2229 << cit->prettyname() << "\" \""
2230 << cit->shortcut() << "\" \""
2231 << cit->viewer() << "\" \""
2232 << cit->editor() << "\" \"";
2233 std::vector<string> flags;
2234 if (cit->documentFormat())
2235 flags.push_back("document");
2236 if (cit->vectorFormat())
2237 flags.push_back("vector");
2238 os << support::getStringFromVector(flags);
2243 // Look for deleted formats
2244 for (Formats::const_iterator cit = system_formats.begin();
2245 cit != system_formats.end(); ++cit)
2246 if (!formats.getFormat(cit->name()))
2247 os << "\\format \"" << cit->name()
2248 << "\" \"\" \"\" \"\" \"\" \"\" \"\"\n";
2257 << "# CONVERTERS SECTION ##########################\n"
2261 // Look for new converters
2262 for (Converters::const_iterator cit = theConverters().begin();
2263 cit != theConverters().end(); ++cit) {
2264 Converter const * converter =
2265 theSystemConverters().getConverter(cit->from,
2268 converter->command != cit->command ||
2269 converter->flags != cit->flags)
2270 os << "\\converter \"" << cit->from << "\" \""
2271 << cit->to << "\" \""
2272 << cit->command << "\" \""
2273 << cit->flags << "\"\n";
2276 // New/modifed converters
2277 for (Converters::const_iterator cit = theSystemConverters().begin();
2278 cit != theSystemConverters().end(); ++cit)
2279 if (!theConverters().getConverter(cit->from, cit->to))
2280 os << "\\converter \"" << cit->from
2281 << "\" \"" << cit->to << "\" \"\" \"\"\n";
2288 << "# COPIERS SECTION ##########################\n"
2291 // Look for new movers
2292 Movers::const_iterator const sysbegin = theSystemMovers().begin();
2293 Movers::const_iterator const sysend = theSystemMovers().end();
2294 Movers::const_iterator it = theMovers().begin();
2295 Movers::const_iterator end = theMovers().end();
2297 for (; it != end; ++it) {
2298 Movers::const_iterator const sysit =
2299 std::find_if(sysbegin, sysend, SameMover(*it));
2300 if (sysit == sysend) {
2301 std::string const & fmt = it->first;
2302 std::string const & command =
2303 it->second.command();
2305 os << "\\copier " << fmt
2306 << " \"" << command << "\"\n";
2312 // We don't actually delete SpecialisedMover(s) from the
2313 // map, just clear their 'command', so there's no need
2314 // to test for anything else.
2322 string const LyXRC::getDescription(LyXRCTags tag)
2327 case RC_ACCEPT_COMPOUND:
2328 str = _("Consider run-together words, such as \"diskdrive\" for \"disk drive\", as legal words?");
2332 case RC_USE_ALT_LANG:
2333 str = _("Specify an alternate language. The default is to use the language of the document.");
2336 case RC_PLAINTEXT_ROFF_COMMAND:
2337 str = _("Use to define an external program to render tables in plain text output. E.g. \"groff -t -Tlatin1 $$FName\" where $$FName is the input file. If \"\" is specified, an internal routine is used.");
2340 case RC_PLAINTEXT_LINELEN:
2341 str = _("The maximum line length of exported plain text/LaTeX/SGML files. If set to 0, paragraphs are output in a single line; if the line length is > 0, paragraphs are separated by a blank line.");
2344 case RC_AUTOREGIONDELETE:
2345 str = _("De-select if you don't want the current selection to be replaced automatically by what you type.");
2348 case RC_AUTORESET_OPTIONS:
2349 str = _("De-select if you don't want the class options to be reset to defaults after class change.");
2353 str = _("The time interval between auto-saves (in seconds). 0 means no auto-save.");
2356 case RC_AUTO_NUMBER:
2359 case RC_BACKUPDIR_PATH:
2360 str = _("The path for storing backup files. If it is an empty string, LyX will store the backup file in the same directory as the original file.");
2363 case RC_BIBTEX_COMMAND:
2364 str = _("Define the options of bibtex (cf. man bibtex) or select an alternative compiler (e.g. mlbibtex or bibulus).");
2368 str = _("Keybindings file. Can either specify an absolute path, or LyX will look in its global and local bind/ directories.");
2371 case RC_CHECKLASTFILES:
2372 str = _("Select to check whether the lastfiles still exist.");
2375 case RC_CHKTEX_COMMAND:
2376 str = _("Define how to run chktex. E.g. \"chktex -n11 -n1 -n3 -n6 -n9 -22 -n25 -n30 -n38\" Refer to the ChkTeX documentation.");
2385 case RC_CURSOR_FOLLOWS_SCROLLBAR:
2386 str = _("LyX normally doesn't update the cursor position if you move the scrollbar. Set to true if you'd prefer to always have the cursor on screen.");
2389 case RC_CUSTOM_EXPORT_COMMAND:
2392 case RC_CUSTOM_EXPORT_FORMAT:
2395 case RC_DATE_INSERT_FORMAT:
2396 //xgettext:no-c-format
2397 str = _("This accepts the normal strftime formats; see man strftime for full details. E.g.\"%A, %e. %B %Y\".");
2401 //FIXME: fix description.
2402 str = _("Command definition file.");
2405 case RC_DEFAULT_LANGUAGE:
2406 str = _("New documents will be assigned this language.");
2409 case RC_DEFAULT_PAPERSIZE:
2410 str = _("Specify the default paper size.");
2413 case RC_DIALOGS_ICONIFY_WITH_MAIN:
2414 str = _("Iconify the dialogs when the main window is iconified. (Affects only dialogs shown after the change has been made.)");
2417 case RC_DISPLAY_GRAPHICS:
2418 str = _("Select how LyX will display any graphics.");
2421 case RC_DOCUMENTPATH:
2422 str = _("The default path for your documents. An empty value selects the directory LyX was started from.");
2426 case RC_USE_ESC_CHARS:
2427 str = _("Specify additional chars that can be part of a word.");
2430 case RC_EXAMPLEPATH:
2431 str = _("The path that LyX will set when offering to choose an example. An empty value selects the directory LyX was started from.");
2434 case RC_FONT_ENCODING:
2435 str = _("The font encoding used for the LaTeX2e fontenc package. T1 is highly recommended for non-English languages.");
2441 case RC_INDEX_COMMAND:
2442 str = _("Define the options of makeindex (cf. man makeindex) or select an alternative compiler. E.g., using xindy/make-rules, the command string would be \"makeindex.sh -m $$lang\".");
2449 case RC_KBMAP_PRIMARY:
2450 case RC_KBMAP_SECONDARY:
2451 str = _("Use this to set the correct mapping file for your keyboard. You'll need this if you for instance want to type German documents on an American keyboard.");
2454 case RC_LABEL_INIT_LENGTH:
2455 str = _("Maximum number of words in the initialization string for a new label");
2458 case RC_LANGUAGE_AUTO_BEGIN:
2459 str = _("Select if a language switching command is needed at the beginning of the document.");
2462 case RC_LANGUAGE_AUTO_END:
2463 str = _("Select if a language switching command is needed at the end of the document.");
2466 case RC_LANGUAGE_COMMAND_BEGIN:
2467 str = _("The LaTeX command for changing from the language of the document to another language. E.g. \\selectlanguage{$$lang} where $$lang is substituted by the name of the second language.");
2470 case RC_LANGUAGE_COMMAND_END:
2471 str = _("The LaTeX command for changing back to the language of the document.");
2474 case RC_LANGUAGE_COMMAND_LOCAL:
2475 str = _("The LaTeX command for local changing of the language.");
2478 case RC_LANGUAGE_GLOBAL_OPTIONS:
2479 str = _("De-select if you don't want the language(s) used as an argument to \\documentclass.");
2482 case RC_LANGUAGE_PACKAGE:
2483 str = _("The LaTeX command for loading the language package. E.g. \"\\usepackage{babel}\", \"\\usepackage{omega}\".");
2486 case RC_LANGUAGE_USE_BABEL:
2487 str = _("De-select if you don't want babel to be used when the language of the document is the default language.");
2490 case RC_USELASTFILEPOS:
2491 str = _("De-select if you do not want LyX to scroll to saved position.");
2494 case RC_LOADSESSION:
2495 str = _("De-select to prevent loading files opened from the last LyX session.");
2498 case RC_MAKE_BACKUP:
2499 str = _("De-select if you don't want LyX to create backup files.");
2502 case RC_MARK_FOREIGN_LANGUAGE:
2503 str = _("Select to control the highlighting of words with a language foreign to that of the document.");
2506 case RC_NUMLASTFILES:
2507 str = bformat(_("Maximal number of lastfiles. Up to %1$d can appear in the file menu."),
2511 case RC_PATH_PREFIX:
2512 str = _("Specify those directories which should be "
2513 "prepended to the PATH environment variable. "
2514 "Use the OS native format.");
2518 case RC_USE_PERS_DICT:
2519 str = _("Specify an alternate personal dictionary file. E.g. \".ispell_english\".");
2523 str = _("Shows a typeset preview of things such as math");
2526 case RC_PREVIEW_HASHED_LABELS:
2527 str = _("Previewed equations will have \"(#)\" labels rather than numbered ones");
2530 case RC_PREVIEW_SCALE_FACTOR:
2531 str = _("Scale the preview size to suit.");
2534 case RC_PRINTCOLLCOPIESFLAG:
2535 str = _("The option for specifying whether the copies should be collated.");
2538 case RC_PRINTCOPIESFLAG:
2539 str = _("The option for specifying the number of copies to print.");
2543 str = _("The default printer to print on. If none is specified, LyX will use the environment variable PRINTER.");
2546 case RC_PRINTEVENPAGEFLAG:
2547 str = _("The option to print only even pages.");
2550 case RC_PRINTEXSTRAOPTIONS:
2551 str = _("Extra options to pass to printing program after everything else, but before the filename of the DVI file to be printed.");
2554 case RC_PRINTFILEEXTENSION:
2555 str = _("Extension of printer program output file. Usually \".ps\".");
2558 case RC_PRINTLANDSCAPEFLAG:
2559 str = _("The option to print out in landscape.");
2562 case RC_PRINTODDPAGEFLAG:
2563 str = _("The option to print only odd pages.");
2566 case RC_PRINTPAGERANGEFLAG:
2567 str = _("The option for specifying a comma-separated list of pages to print.");
2570 case RC_PRINTPAPERDIMENSIONFLAG:
2571 str = _("Option to specify the dimensions of the print paper.");
2574 case RC_PRINTPAPERFLAG:
2575 str = _("The option to specify paper type.");
2578 case RC_PRINTREVERSEFLAG:
2579 str = _("The option to reverse the order of the pages printed.");
2582 case RC_PRINTSPOOL_COMMAND:
2583 str = _("When set, this printer option automatically prints to a file and then calls a separate print spooling program on that file with the given name and arguments.");
2586 case RC_PRINTSPOOL_PRINTERPREFIX:
2587 str = _("If you specify a printer name in the print dialog, the following argument is prepended along with the printer name after the spool command.");
2590 case RC_PRINTTOFILE:
2591 str = _("Option to pass to the print program to print to a file.");
2594 case RC_PRINTTOPRINTER:
2595 str = _("Option to pass to the print program to print on a specific printer.");
2598 case RC_PRINT_ADAPTOUTPUT:
2599 str = _("Select for LyX to pass the name of the destination printer to your print command.");
2602 case RC_PRINT_COMMAND:
2603 str = _("Your favorite print program, e.g. \"dvips\", \"dvilj4\".");
2606 case RC_RTL_SUPPORT:
2607 str = _("Select to enable support of right-to-left languages (e.g. Hebrew, Arabic).");
2611 str = _("DPI (dots per inch) of your monitor is auto-detected by LyX. If that goes wrong, override the setting here.");
2614 case RC_SCREEN_FONT_ROMAN:
2615 case RC_SCREEN_FONT_SANS:
2616 case RC_SCREEN_FONT_TYPEWRITER:
2617 str = _("The screen fonts used to display the text while editing.");
2620 case RC_SCREEN_FONT_ROMAN_FOUNDRY:
2621 case RC_SCREEN_FONT_SANS_FOUNDRY:
2622 case RC_SCREEN_FONT_TYPEWRITER_FOUNDRY:
2625 case RC_SCREEN_FONT_SCALABLE:
2626 str = _("Allow bitmap fonts to be resized. If you are using a bitmap font, selecting this option may make some fonts look blocky in LyX. Deselecting this option makes LyX use the nearest bitmap font size available, instead of scaling.");
2629 case RC_SCREEN_FONT_SIZES:
2630 str = _("The font sizes used for calculating the scaling of the screen fonts.");
2633 case RC_SCREEN_ZOOM:
2634 //xgettext:no-c-format
2635 str = _("The zoom percentage for screen fonts. A setting of 100% will make the fonts roughly the same size as on paper.");
2638 case RC_GEOMETRY_SESSION:
2639 str = _("Allow session manager to save and restore windows geometry.");
2643 str = _("This starts the lyxserver. The pipes get an additional extension \".in\" and \".out\". Only for advanced users.");
2649 case RC_SHOW_BANNER:
2650 str = _("De-select if you don't want the startup banner.");
2653 case RC_SPELL_COMMAND:
2654 str = _("What command runs the spellchecker?");
2657 case RC_TEMPDIRPATH:
2658 str = _("LyX will place its temporary directories in this path. They will be deleted when you quit LyX.");
2661 case RC_TEMPLATEPATH:
2662 str = _("The path that LyX will set when offering to choose a template. An empty value selects the directory LyX was started from.");
2665 case RC_TEX_ALLOWS_SPACES:
2668 case RC_TEX_EXPECTS_WINDOWS_PATHS:
2672 str = _("The UI (user interface) file. Can either specify an absolute path, or LyX will look in its global and local ui/ directories.");
2684 case RC_USE_INP_ENC:
2685 str = _("Specify whether to pass the -T input encoding option to ispell. Enable this if you cannot check the spelling of words containing accented letters. This may not work with all dictionaries.");
2688 case RC_USE_PIXMAP_CACHE:
2689 str = _("Enable the pixmap cache that might improve performance on Mac and Windows.");
2692 case RC_USE_SPELL_LIB:
2695 case RC_VIEWDVI_PAPEROPTION:
2696 _("Specify the paper command to DVI viewer (leave empty or use \"-paper\")");
2711 // The global instance
2714 // The global copy of the system lyxrc entries (everything except preferences)