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"
44 using namespace lyx::support;
48 namespace os = support::os;
52 // when adding something to this array keep it sorted!
53 keyword_item lyxrcTags[] = {
54 { "\\accept_compound", LyXRC::RC_ACCEPT_COMPOUND },
55 { "\\allow_geometry_session", LyXRC::RC_GEOMETRY_SESSION },
56 { "\\alternate_language", LyXRC::RC_ALT_LANG },
57 { "\\auto_number", LyXRC::RC_AUTO_NUMBER },
58 { "\\auto_region_delete", LyXRC::RC_AUTOREGIONDELETE },
59 { "\\auto_reset_options", LyXRC::RC_AUTORESET_OPTIONS },
60 { "\\autosave", LyXRC::RC_AUTOSAVE },
61 { "\\backupdir_path", LyXRC::RC_BACKUPDIR_PATH },
62 { "\\bibtex_command", LyXRC::RC_BIBTEX_COMMAND },
63 { "\\bind_file", LyXRC::RC_BINDFILE },
64 { "\\check_lastfiles", LyXRC::RC_CHECKLASTFILES },
65 { "\\chktex_command", LyXRC::RC_CHKTEX_COMMAND },
66 { "\\converter", LyXRC::RC_CONVERTER },
67 { "\\converter_cache_maxage", LyXRC::RC_CONVERTER_CACHE_MAXAGE },
68 { "\\copier", LyXRC::RC_COPIER },
69 { "\\cursor_follows_scrollbar", LyXRC::RC_CURSOR_FOLLOWS_SCROLLBAR },
70 { "\\custom_export_command", LyXRC::RC_CUSTOM_EXPORT_COMMAND },
71 { "\\custom_export_format", LyXRC::RC_CUSTOM_EXPORT_FORMAT },
72 { "\\date_insert_format", LyXRC::RC_DATE_INSERT_FORMAT },
73 { "\\def_file", LyXRC::RC_DEFFILE },
74 { "\\default_language", LyXRC::RC_DEFAULT_LANGUAGE },
75 { "\\default_papersize", LyXRC::RC_DEFAULT_PAPERSIZE },
76 { "\\dialogs_iconify_with_main", LyXRC::RC_DIALOGS_ICONIFY_WITH_MAIN },
77 { "\\display_graphics", LyXRC::RC_DISPLAY_GRAPHICS },
78 { "\\document_path", LyXRC::RC_DOCUMENTPATH },
79 { "\\escape_chars", LyXRC::RC_ESC_CHARS },
80 { "\\example_path", LyXRC::RC_EXAMPLEPATH },
81 { "\\font_encoding", LyXRC::RC_FONT_ENCODING },
82 { "\\format", LyXRC::RC_FORMAT },
83 { "\\index_command", LyXRC::RC_INDEX_COMMAND },
84 { "\\input", LyXRC::RC_INPUT },
85 { "\\kbmap", LyXRC::RC_KBMAP },
86 { "\\kbmap_primary", LyXRC::RC_KBMAP_PRIMARY },
87 { "\\kbmap_secondary", LyXRC::RC_KBMAP_SECONDARY },
88 { "\\label_init_length", LyXRC::RC_LABEL_INIT_LENGTH },
89 { "\\language_auto_begin", LyXRC::RC_LANGUAGE_AUTO_BEGIN },
90 { "\\language_auto_end", LyXRC::RC_LANGUAGE_AUTO_END },
91 { "\\language_command_begin", LyXRC::RC_LANGUAGE_COMMAND_BEGIN },
92 { "\\language_command_end", LyXRC::RC_LANGUAGE_COMMAND_END },
93 { "\\language_command_local", LyXRC::RC_LANGUAGE_COMMAND_LOCAL },
94 { "\\language_global_options", LyXRC::RC_LANGUAGE_GLOBAL_OPTIONS },
95 { "\\language_package", LyXRC::RC_LANGUAGE_PACKAGE },
96 { "\\language_use_babel", LyXRC::RC_LANGUAGE_USE_BABEL },
97 { "\\load_session", LyXRC::RC_LOADSESSION },
98 { "\\make_backup", LyXRC::RC_MAKE_BACKUP },
99 { "\\mark_foreign_language", LyXRC::RC_MARK_FOREIGN_LANGUAGE },
100 { "\\num_lastfiles", LyXRC::RC_NUMLASTFILES },
101 { "\\path_prefix", LyXRC::RC_PATH_PREFIX },
102 { "\\personal_dictionary", LyXRC::RC_PERS_DICT },
103 { "\\plaintext_linelen", LyXRC::RC_PLAINTEXT_LINELEN },
104 { "\\plaintext_roff_command", LyXRC::RC_PLAINTEXT_ROFF_COMMAND },
105 { "\\preview", LyXRC::RC_PREVIEW },
106 { "\\preview_hashed_labels", LyXRC::RC_PREVIEW_HASHED_LABELS },
107 { "\\preview_scale_factor", LyXRC::RC_PREVIEW_SCALE_FACTOR },
108 { "\\print_adapt_output", LyXRC::RC_PRINT_ADAPTOUTPUT },
109 { "\\print_collcopies_flag", LyXRC::RC_PRINTCOLLCOPIESFLAG },
110 { "\\print_command", LyXRC::RC_PRINT_COMMAND },
111 { "\\print_copies_flag", LyXRC::RC_PRINTCOPIESFLAG },
112 { "\\print_evenpage_flag", LyXRC::RC_PRINTEVENPAGEFLAG },
113 { "\\print_extra_options", LyXRC::RC_PRINTEXSTRAOPTIONS },
114 { "\\print_file_extension", LyXRC::RC_PRINTFILEEXTENSION },
115 { "\\print_landscape_flag", LyXRC::RC_PRINTLANDSCAPEFLAG },
116 { "\\print_oddpage_flag", LyXRC::RC_PRINTODDPAGEFLAG },
117 { "\\print_pagerange_flag", LyXRC::RC_PRINTPAGERANGEFLAG },
118 { "\\print_paper_dimension_flag", LyXRC::RC_PRINTPAPERDIMENSIONFLAG },
119 { "\\print_paper_flag", LyXRC::RC_PRINTPAPERFLAG },
120 { "\\print_reverse_flag", LyXRC::RC_PRINTREVERSEFLAG },
121 { "\\print_spool_command", LyXRC::RC_PRINTSPOOL_COMMAND },
122 { "\\print_spool_printerprefix", LyXRC::RC_PRINTSPOOL_PRINTERPREFIX },
123 { "\\print_to_file", LyXRC::RC_PRINTTOFILE },
124 { "\\print_to_printer", LyXRC::RC_PRINTTOPRINTER },
125 { "\\printer", LyXRC::RC_PRINTER },
126 { "\\rtl", LyXRC::RC_RTL_SUPPORT },
127 { "\\screen_dpi", LyXRC::RC_SCREEN_DPI },
128 { "\\screen_font_roman", LyXRC::RC_SCREEN_FONT_ROMAN },
129 { "\\screen_font_roman_foundry", LyXRC::RC_SCREEN_FONT_ROMAN_FOUNDRY },
130 { "\\screen_font_sans", LyXRC::RC_SCREEN_FONT_SANS },
131 { "\\screen_font_sans_foundry", LyXRC::RC_SCREEN_FONT_SANS_FOUNDRY },
132 { "\\screen_font_scalable", LyXRC::RC_SCREEN_FONT_SCALABLE },
133 { "\\screen_font_sizes", LyXRC::RC_SCREEN_FONT_SIZES },
134 { "\\screen_font_typewriter", LyXRC::RC_SCREEN_FONT_TYPEWRITER },
135 { "\\screen_font_typewriter_foundry", LyXRC::RC_SCREEN_FONT_TYPEWRITER_FOUNDRY },
136 { "\\screen_zoom", LyXRC::RC_SCREEN_ZOOM },
137 { "\\serverpipe", LyXRC::RC_SERVERPIPE },
138 { "\\set_color", LyXRC::RC_SET_COLOR },
139 { "\\show_banner", LyXRC::RC_SHOW_BANNER },
140 { "\\sort_layouts", LyXRC::RC_SORT_LAYOUTS },
141 { "\\spell_command", LyXRC::RC_SPELL_COMMAND },
142 { "\\tempdir_path", LyXRC::RC_TEMPDIRPATH },
143 { "\\template_path", LyXRC::RC_TEMPLATEPATH },
144 { "\\tex_allows_spaces", LyXRC::RC_TEX_ALLOWS_SPACES },
145 { "\\tex_expects_windows_paths", LyXRC::RC_TEX_EXPECTS_WINDOWS_PATHS },
146 { "\\ui_file", LyXRC::RC_UIFILE },
147 { "\\use_alt_language", LyXRC::RC_USE_ALT_LANG },
148 { "\\use_converter_cache", LyXRC::RC_USE_CONVERTER_CACHE },
149 { "\\use_escape_chars", LyXRC::RC_USE_ESC_CHARS },
150 { "\\use_input_encoding", LyXRC::RC_USE_INP_ENC },
151 { "\\use_lastfilepos", LyXRC::RC_USELASTFILEPOS },
152 { "\\use_personal_dictionary", LyXRC::RC_USE_PERS_DICT },
153 { "\\use_pixmap_cache", LyXRC::RC_USE_PIXMAP_CACHE },
154 // compatibility with versions older than 1.4.0 only
155 { "\\use_pspell", LyXRC::RC_USE_SPELL_LIB },
156 { "\\use_spell_lib", LyXRC::RC_USE_SPELL_LIB },
157 // compatibility with versions older than 1.4.0 only
158 { "\\use_tempdir", LyXRC::RC_USETEMPDIR },
159 { "\\use_tooltip", LyXRC::RC_USE_TOOLTIP },
160 { "\\user_email", LyXRC::RC_USER_EMAIL },
161 { "\\user_name", LyXRC::RC_USER_NAME },
162 { "\\view_dvi_paper_option", LyXRC::RC_VIEWDVI_PAPEROPTION },
163 // compatibility with versions older than 1.4.0 only
164 { "\\viewer", LyXRC::RC_VIEWER}
167 const int lyxrcCount = sizeof(lyxrcTags) / sizeof(keyword_item);
178 void LyXRC::setDefaults() {
180 def_file = "default";
182 // Get printer from the environment. If fail, use default "",
183 // assuming that everything is set up correctly.
184 printer = getEnv("PRINTER");
185 print_adapt_output = false;
186 print_command = "dvips";
187 print_evenpage_flag = "-B";
188 print_oddpage_flag = "-A";
189 print_pagerange_flag = "-pp";
190 print_copies_flag = "-c";
191 print_collcopies_flag = "-C";
192 print_reverse_flag = "-r";
193 print_landscape_flag = "-t landscape";
194 print_to_printer = "-P";
195 print_to_file = "-o ";
196 print_file_extension = ".ps";
197 print_paper_flag = "-t";
198 print_paper_dimension_flag = "-T";
199 document_path.erase();
200 view_dvi_paper_option.erase();
201 default_papersize = PAPER_DEFAULT;
202 custom_export_format = "ps";
203 chktex_command = "chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38";
204 bibtex_command = "bibtex";
206 index_command = "makeindex -c -q";
208 // Because a screen typically is wider than a piece of paper:
210 allow_geometry_session = true;
211 // Default LaTeX font size:
212 font_sizes[FONT_SIZE_TINY] = "5.0";
213 font_sizes[FONT_SIZE_SCRIPT] = "7.0";
214 font_sizes[FONT_SIZE_FOOTNOTE] = "8.0";
215 font_sizes[FONT_SIZE_SMALL] = "9.0";
216 font_sizes[FONT_SIZE_NORMAL] = "10.0";
217 font_sizes[FONT_SIZE_LARGE] = "12.0";
218 font_sizes[FONT_SIZE_LARGER] = "14.4";
219 font_sizes[FONT_SIZE_LARGEST] = "17.26";
220 font_sizes[FONT_SIZE_HUGE] = "20.74";
221 font_sizes[FONT_SIZE_HUGER] = "24.88";
222 use_scalable_fonts = true;
223 roman_font_name = "";
225 typewriter_font_name = "";
227 auto_region_delete = true;
228 auto_reset_options = false;
229 plaintext_linelen = 65;
230 num_lastfiles = maxlastfiles;
231 check_lastfiles = true;
232 use_lastfilepos = true;
233 load_session = false;
235 backupdir_path.erase();
236 display_graphics = graphics::ColorDisplay;
237 // Spellchecker settings:
238 use_spell_lib = true;
239 isp_command = "ispell";
240 isp_accept_compound = false;
241 isp_use_input_encoding = false;
242 isp_use_alt_lang = false;
243 isp_use_pers_dict = false;
244 isp_use_esc_chars = false;
248 mark_foreign_language = true;
249 language_auto_begin = true;
250 language_auto_end = true;
251 language_global_options = true;
252 language_use_babel = true;
253 language_package = "\\usepackage{babel}";
254 language_command_begin = "\\selectlanguage{$$lang}";
255 language_command_local = "\\foreignlanguage{$$lang}{";
256 sort_layouts = false;
257 default_language = "english";
259 windows_style_tex_paths = false;
260 tex_allows_spaces = false;
261 date_insert_format = "%x";
262 cursor_follows_scrollbar = false;
263 dialogs_iconify_with_main = false;
264 label_init_length = 3;
265 preview = PREVIEW_OFF;
266 preview_hashed_labels = false;
267 preview_scale_factor = "0.9";
268 use_converter_cache = true;
270 use_pixmap_cache = false;
271 converter_cache_maxage = 6 * 30 * 24 * 3600; // 6 months
273 user_name = to_utf8(support::user_name());
275 user_email = to_utf8(support::user_email());
281 void oldFontFormat(string & family, string & foundry)
283 if (family.empty() || family[0] != '-')
285 foundry = token(family, '-', 1);
286 family = token(family, '-', 2);
294 int LyXRC::read(FileName const & filename)
296 Lexer lexrc(lyxrcTags, lyxrcCount);
297 if (lyxerr.debugging(Debug::PARSER))
298 lexrc.printTable(lyxerr);
300 lexrc.setFile(filename);
301 if (!lexrc.isOK()) return -2;
303 LYXERR(Debug::LYXRC, "Reading '" << filename << "'...");
309 int LyXRC::read(istream & is)
311 Lexer lexrc(lyxrcTags, lyxrcCount);
312 if (lyxerr.debugging(Debug::PARSER))
313 lexrc.printTable(lyxerr);
316 if (!lexrc.isOK()) return -2;
318 LYXERR(Debug::LYXRC, "Reading istream...");
324 int LyXRC::read(Lexer & lexrc)
326 if (!lexrc.isOK()) return -2;
328 while (lexrc.isOK()) {
329 // By using two switches we take advantage of the compiler
330 // telling us if we have missed a LyXRCTags element in
331 // the second switch.
332 // Note that this also shows a problem with Lexer since it
333 // helps us avoid taking advantage of the strictness of the
336 int le = lexrc.lex();
338 case Lexer::LEX_UNDEF:
339 lexrc.printError("Unknown tag `$$Token'");
341 case Lexer::LEX_FEOF:
345 switch (static_cast<LyXRCTags>(le)) {
346 case RC_INPUT: // Include file
349 libFileSearch(string(),
352 lexrc.printError("Error reading "
353 "included file: " + tmp.absFilename());
359 bind_file = os::internal_path(lexrc.getString());
365 def_file = os::internal_path(lexrc.getString());
371 ui_file = os::internal_path(lexrc.getString());
375 case RC_AUTORESET_OPTIONS:
377 auto_reset_options = lexrc.getBool();
381 case RC_DISPLAY_GRAPHICS:
383 display_graphics = graphics::displayTranslator().find(lexrc.getString());
387 case RC_TEX_EXPECTS_WINDOWS_PATHS:
389 windows_style_tex_paths = lexrc.getBool();
393 case RC_TEX_ALLOWS_SPACES:
395 tex_allows_spaces = lexrc.getBool();
401 use_kbmap = lexrc.getBool();
405 case RC_KBMAP_PRIMARY:
407 string const kmap(os::internal_path(lexrc.getString()));
410 } else if (!libFileSearch("kbd", kmap,
412 primary_kbmap = kmap;
414 lexrc.printError("LyX: Keymap `$$Token' not found");
419 case RC_KBMAP_SECONDARY:
421 string const kmap(os::internal_path(lexrc.getString()));
424 } else if (!libFileSearch("kbd", kmap,
426 secondary_kbmap = kmap;
428 lexrc.printError("LyX: Keymap `$$Token' not found");
433 case RC_FONT_ENCODING:
435 fontenc = lexrc.getString();
441 printer = lexrc.getString();
445 case RC_PRINT_COMMAND:
447 print_command = lexrc.getString();
451 case RC_PRINTEVENPAGEFLAG:
453 print_evenpage_flag = lexrc.getString();
457 case RC_PRINTODDPAGEFLAG:
459 print_oddpage_flag = lexrc.getString();
463 case RC_PRINTPAGERANGEFLAG:
465 print_pagerange_flag = lexrc.getString();
469 case RC_PRINTCOPIESFLAG:
471 print_copies_flag = lexrc.getString();
475 case RC_PRINTCOLLCOPIESFLAG:
477 print_collcopies_flag = lexrc.getString();
481 case RC_PRINTREVERSEFLAG:
483 print_reverse_flag = lexrc.getString();
487 case RC_PRINTLANDSCAPEFLAG:
489 print_landscape_flag = lexrc.getString();
493 case RC_PRINTTOPRINTER:
495 print_to_printer = lexrc.getString();
499 case RC_PRINT_ADAPTOUTPUT:
501 print_adapt_output = lexrc.getBool();
507 print_to_file = os::internal_path(lexrc.getString());
511 case RC_PRINTFILEEXTENSION:
513 print_file_extension = lexrc.getString();
517 case RC_PRINTEXSTRAOPTIONS:
519 print_extra_options = lexrc.getString();
523 case RC_PRINTSPOOL_COMMAND:
525 print_spool_command = lexrc.getString();
529 case RC_PRINTSPOOL_PRINTERPREFIX:
531 print_spool_printerprefix = lexrc.getString();
535 case RC_PRINTPAPERDIMENSIONFLAG:
537 print_paper_dimension_flag = lexrc.getString();
541 case RC_PRINTPAPERFLAG:
543 print_paper_flag = lexrc.getString();
547 case RC_CUSTOM_EXPORT_COMMAND:
549 custom_export_command = lexrc.getString();
553 case RC_CUSTOM_EXPORT_FORMAT:
555 custom_export_format = lexrc.getString();
559 case RC_DEFAULT_PAPERSIZE:
562 ascii_lowercase(lexrc.getString());
563 if (size == "usletter")
566 else if (size == "legal")
569 else if (size == "executive")
572 else if (size == "a3")
575 else if (size == "a4")
578 else if (size == "a5")
581 else if (size == "b5")
584 else if (size == "default")
590 case RC_VIEWDVI_PAPEROPTION:
592 view_dvi_paper_option = lexrc.getString();
594 view_dvi_paper_option.erase();
598 case RC_CHKTEX_COMMAND:
600 chktex_command = lexrc.getString();
604 case RC_BIBTEX_COMMAND:
606 bibtex_command = lexrc.getString();
610 case RC_INDEX_COMMAND:
612 index_command = lexrc.getString();
618 dpi = lexrc.getInteger();
624 zoom = lexrc.getInteger();
628 case RC_GEOMETRY_SESSION:
630 allow_geometry_session = lexrc.getBool();
634 case RC_SCREEN_FONT_SIZES:
636 font_sizes[FONT_SIZE_TINY] =
640 font_sizes[FONT_SIZE_SCRIPT] =
644 font_sizes[FONT_SIZE_FOOTNOTE] =
648 font_sizes[FONT_SIZE_SMALL] =
652 font_sizes[FONT_SIZE_NORMAL] =
656 font_sizes[FONT_SIZE_LARGE] =
660 font_sizes[FONT_SIZE_LARGER] =
664 font_sizes[FONT_SIZE_LARGEST] =
668 font_sizes[FONT_SIZE_HUGE] =
672 font_sizes[FONT_SIZE_HUGER] =
677 case RC_SCREEN_FONT_SCALABLE:
679 use_scalable_fonts = lexrc.getBool();
685 autosave = lexrc.getInteger();
689 case RC_DOCUMENTPATH:
691 document_path = os::internal_path(lexrc.getString());
692 document_path = expandPath(document_path);
698 example_path = os::internal_path(lexrc.getString());
699 example_path = expandPath(example_path);
703 case RC_TEMPLATEPATH:
705 template_path = os::internal_path(lexrc.getString());
706 template_path = expandPath(template_path);
712 tempdir_path = os::internal_path(lexrc.getString());
713 tempdir_path = expandPath(tempdir_path);
719 lyxerr << "Ignoring obsolete use_tempdir flag." << endl;
723 case RC_USELASTFILEPOS:
725 use_lastfilepos = lexrc.getBool();
731 load_session = lexrc.getBool();
735 case RC_NUMLASTFILES:
737 num_lastfiles = lexrc.getInteger();
741 case RC_CHECKLASTFILES:
743 check_lastfiles = lexrc.getBool();
747 case RC_SCREEN_FONT_ROMAN:
749 roman_font_name = lexrc.getString();
750 oldFontFormat(roman_font_name,
755 case RC_SCREEN_FONT_SANS:
757 sans_font_name = lexrc.getString();
758 oldFontFormat(sans_font_name, sans_font_foundry);
762 case RC_SCREEN_FONT_TYPEWRITER:
764 typewriter_font_name = lexrc.getString();
765 oldFontFormat(typewriter_font_name,
766 typewriter_font_foundry);
770 case RC_SCREEN_FONT_ROMAN_FOUNDRY:
772 roman_font_foundry = lexrc.getString();
776 case RC_SCREEN_FONT_SANS_FOUNDRY:
778 sans_font_foundry = lexrc.getString();
782 case RC_SCREEN_FONT_TYPEWRITER_FOUNDRY:
784 typewriter_font_foundry = lexrc.getString();
790 string lyx_name, x11_name;
793 lyx_name = lexrc.getString();
795 lexrc.printError("Missing color tag.");
800 x11_name = lexrc.getString();
802 lexrc.printError("Missing color name for color: `$$Token'");
806 ColorCode const col =
807 lcolor.getFromLyXName(lyx_name);
808 if (col == Color_none ||
809 col == Color_inherit ||
813 if (!lcolor.setColor(col, x11_name)) {
814 lyxerr << "Bad lyxrc set_color for "
820 case RC_AUTOREGIONDELETE:
821 // Auto region delete defaults to true
823 auto_region_delete = lexrc.getBool();
829 lyxpipes = os::internal_path(lexrc.getString());
830 lyxpipes = expandPath(lyxpipes);
834 case RC_CURSOR_FOLLOWS_SCROLLBAR:
836 cursor_follows_scrollbar = lexrc.getBool();
840 case RC_DIALOGS_ICONIFY_WITH_MAIN:
842 dialogs_iconify_with_main = lexrc.getBool();
846 case RC_PLAINTEXT_ROFF_COMMAND:
848 plaintext_roff_command = lexrc.getString();
851 case RC_PLAINTEXT_LINELEN:
853 plaintext_linelen = lexrc.getInteger();
856 // Spellchecker settings:
857 case RC_USE_SPELL_LIB:
859 use_spell_lib = lexrc.getBool();
862 case RC_SPELL_COMMAND:
864 isp_command = lexrc.getString();
867 case RC_ACCEPT_COMPOUND:
869 isp_accept_compound = lexrc.getBool();
874 isp_use_input_encoding = lexrc.getBool();
877 case RC_USE_ALT_LANG:
879 isp_use_alt_lang = lexrc.getBool();
882 case RC_USE_PERS_DICT:
884 isp_use_pers_dict = lexrc.getBool();
889 use_tooltip = lexrc.getBool();
892 case RC_USE_PIXMAP_CACHE:
894 use_pixmap_cache = lexrc.getBool();
897 case RC_USE_ESC_CHARS:
899 isp_use_esc_chars = lexrc.getBool();
904 isp_alt_lang = lexrc.getString();
909 isp_pers_dict = os::internal_path(lexrc.getString());
914 isp_esc_chars = lexrc.getString();
919 make_backup = lexrc.getBool();
922 case RC_BACKUPDIR_PATH:
924 backupdir_path = os::internal_path(lexrc.getString());
925 backupdir_path = expandPath(backupdir_path);
928 case RC_DATE_INSERT_FORMAT:
930 date_insert_format = lexrc.getString();
933 case RC_LANGUAGE_PACKAGE:
935 language_package = lexrc.getString();
938 case RC_LANGUAGE_AUTO_BEGIN:
940 language_auto_begin = lexrc.getBool();
943 case RC_LANGUAGE_AUTO_END:
945 language_auto_end = lexrc.getBool();
948 case RC_LANGUAGE_GLOBAL_OPTIONS:
950 language_global_options = lexrc.getBool();
953 case RC_LANGUAGE_USE_BABEL:
955 language_use_babel = lexrc.getBool();
958 case RC_LANGUAGE_COMMAND_BEGIN:
960 language_command_begin = lexrc.getString();
963 case RC_LANGUAGE_COMMAND_END:
965 language_command_end = lexrc.getString();
968 case RC_LANGUAGE_COMMAND_LOCAL:
970 language_command_local = lexrc.getString();
975 rtl_support = lexrc.getBool();
980 auto_number = lexrc.getBool();
983 case RC_MARK_FOREIGN_LANGUAGE:
985 mark_foreign_language = lexrc.getBool();
992 fmt = lexrc.getString();
995 command = lexrc.getString();
997 setMover(fmt, command);
1001 case RC_CONVERTER: {
1002 string from, to, command, flags;
1004 from = lexrc.getString();
1007 to = lexrc.getString();
1010 command = lexrc.getString();
1013 flags = lexrc.getString();
1015 if (command.empty()) {
1016 theConverters().erase(from, to);
1018 theConverters().add(from, to, command, flags);
1022 // compatibility with versions older than 1.4.0 only
1024 string format, command;
1026 format = lexrc.getString();
1029 command = lexrc.getString();
1031 formats.setViewer(format, command);
1035 string format, extension, prettyname, shortcut;
1037 format = lexrc.getString();
1040 extension = lexrc.getString();
1043 prettyname = lexrc.getString();
1046 shortcut = lexrc.getString();
1048 string viewer, editor;
1050 viewer = lexrc.getString();
1052 editor = lexrc.getString();
1054 // Hack to ensure compatibility with versions older
1056 int le = lexrc.lex();
1057 if (le != Lexer::LEX_FEOF && le != Lexer::LEX_UNDEF) {
1058 flags = lexrc.getString();
1059 if (le != Lexer::LEX_DATA) {
1060 // We have got a known token.
1061 // Therefore this is an old style
1062 // format definition without
1064 lexrc.pushToken(flags);
1068 int flgs = Format::none;
1069 while (!flags.empty()) {
1071 flags = split(flags, flag, ',');
1072 if (flag == "document")
1073 flgs |= Format::document;
1074 else if (flag == "vector")
1075 flgs |= Format::vector;
1077 lyxerr << "Ignoring unknown flag `"
1078 << flag << "' for format `"
1079 << format << "'." << endl;
1081 if (prettyname.empty()) {
1082 if (theConverters().formatIsUsed(format)) {
1083 lyxerr << "Can't delete format "
1086 formats.erase(format);
1089 formats.add(format, extension, prettyname,
1090 shortcut, viewer, editor, flgs);
1094 case RC_DEFAULT_LANGUAGE:
1096 default_language = lexrc.getString();
1100 case RC_LABEL_INIT_LENGTH:
1102 label_init_length = lexrc.getInteger();
1106 case RC_SHOW_BANNER:
1108 show_banner = lexrc.getBool();
1114 string const tmp = lexrc.getString();
1115 if (tmp == "true" || tmp == "on")
1116 preview = PREVIEW_ON;
1117 else if (tmp == "no_math")
1118 preview = PREVIEW_NO_MATH;
1120 preview = PREVIEW_OFF;
1121 if (tmp != "false" && tmp != "off")
1122 lyxerr << "Unrecognized "
1124 << tmp << '\n' << endl;
1129 case RC_PREVIEW_HASHED_LABELS:
1131 preview_hashed_labels = lexrc.getBool();
1135 case RC_PREVIEW_SCALE_FACTOR:
1137 preview_scale_factor = lexrc.getString();
1143 user_name = lexrc.getString();
1148 user_email = lexrc.getString();
1151 case RC_PATH_PREFIX:
1153 path_prefix = lexrc.getString();
1156 case RC_USE_CONVERTER_CACHE:
1158 use_converter_cache = lexrc.getBool();
1161 case RC_CONVERTER_CACHE_MAXAGE:
1163 converter_cache_maxage =
1164 convert<unsigned int>(lexrc.getString());
1167 case RC_SORT_LAYOUTS:
1169 sort_layouts = lexrc.getBool();
1172 case RC_LAST: break; // this is just a dummy
1176 /// Update converters data-structures
1177 theConverters().update(formats);
1178 theConverters().buildGraph();
1184 void LyXRC::write(FileName const & filename, bool ignore_system_lyxrc) const
1186 ofstream ofs(filename.toFilesystemEncoding().c_str());
1188 write(ofs, ignore_system_lyxrc);
1192 void LyXRC::print() const
1194 if (lyxerr.debugging())
1195 write(lyxerr, false);
1203 typedef pair<string, SpecialisedMover> Data;
1205 SameMover(Data const & comparison)
1206 : comparison_(comparison) {}
1208 bool operator()(Data const & data) const
1210 return data.first == comparison_.first &&
1211 data.second.command() == comparison_.second.command();
1219 void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) const
1221 LyXRCTags tag = RC_LAST;
1223 if (!name.empty()) {
1224 for (int i = 0; i != lyxrcCount; ++i)
1225 if ("\\" + name == lyxrcTags[i].tag)
1226 tag = static_cast<LyXRCTags>(lyxrcTags[i].code);
1230 os << "### This file is part of\n"
1231 << "### ========================================================\n"
1232 << "### LyX, The Document Processor\n"
1234 << "### Copyright 1995 Matthias Ettrich\n"
1235 << "### Copyright 1995-2007 The LyX Team.\n"
1237 << "### ========================================================\n"
1239 << "# This file is written by LyX, if you want to make your own\n"
1240 << "# modifications you should do them from inside LyX and save\n"
1243 // Why the switch you might ask. It is a trick to ensure that all
1244 // the elements in the LyXRCTags enum is handled. As you can see
1245 // there are no breaks at all. So it is just a huge fall-through.
1246 // The nice thing is that we will get a warning from the compiler
1247 // if we forget an element.
1251 // input/include files are not done here
1253 if (ignore_system_lyxrc ||
1254 bind_file != system_lyxrc.bind_file) {
1255 string const path = os::external_path(bind_file);
1256 os << "\\bind_file \"" << path << "\"\n";
1262 if (ignore_system_lyxrc ||
1263 def_file != system_lyxrc.def_file) {
1264 string const path = os::external_path(def_file);
1265 os << "\\def_file \"" << path << "\"\n";
1274 << "# MISC SECTION ######################################\n"
1276 // bind files are not done here.
1278 case RC_PATH_PREFIX:
1279 if (ignore_system_lyxrc ||
1280 path_prefix != system_lyxrc.path_prefix) {
1281 os << "\\path_prefix \"" << path_prefix << "\"\n";
1286 if (ignore_system_lyxrc ||
1287 ui_file != system_lyxrc.ui_file) {
1288 string const path = os::external_path(ui_file);
1289 os << "\\ui_file \"" << path << "\"\n";
1293 case RC_AUTOREGIONDELETE:
1294 if (ignore_system_lyxrc ||
1295 auto_region_delete != system_lyxrc.auto_region_delete) {
1296 os << "# Set to false to inhibit automatic replacement of\n"
1297 << "# the current selection.\n"
1298 << "\\auto_region_delete " << convert<string>(auto_region_delete)
1303 case RC_AUTORESET_OPTIONS:
1304 if (ignore_system_lyxrc ||
1305 auto_reset_options != system_lyxrc.auto_reset_options) {
1306 os << "# Set to false to inhibit automatic reset of\n"
1307 << "# the class options to defaults on class change.\n"
1308 << "\\auto_reset_options "
1309 << convert<string>(auto_reset_options)
1315 if (ignore_system_lyxrc ||
1316 autosave != system_lyxrc.autosave) {
1317 os << "# The time interval between auto-saves in seconds.\n"
1318 << "\\autosave " << autosave << '\n';
1322 case RC_DISPLAY_GRAPHICS:
1323 if (ignore_system_lyxrc ||
1324 display_graphics != system_lyxrc.display_graphics) {
1325 os << "# Display graphics within LyX\n"
1326 << "# monochrome|grayscale|color|none\n"
1327 << "\\display_graphics "
1328 << graphics::displayTranslator().find(
1329 graphics::DisplayType(display_graphics))
1334 case RC_SORT_LAYOUTS:
1335 if (ignore_system_lyxrc ||
1336 sort_layouts != system_lyxrc.sort_layouts) {
1337 os << "# Sort layouts alphabetically.\n"
1338 << "\\sort_layouts " << convert<string>(sort_layouts) << '\n';
1342 case RC_VIEWDVI_PAPEROPTION:
1343 if (ignore_system_lyxrc ||
1344 view_dvi_paper_option
1345 != system_lyxrc.view_dvi_paper_option) {
1346 os << "# Options used to specify paper size to the\n"
1347 << "# view_dvi_command (e.g. -paper)\n"
1348 << "\\view_dvi_paper_option \""
1349 << view_dvi_paper_option << "\"\n";
1353 case RC_DEFAULT_PAPERSIZE:
1354 if (ignore_system_lyxrc ||
1355 default_papersize != system_lyxrc.default_papersize) {
1356 os << "# The default papersize to use.\n"
1357 << "\\default_papersize \"";
1358 switch (default_papersize) {
1360 os << "default"; break;
1361 case PAPER_USLETTER:
1362 os << "usletter"; break;
1364 os << "legal"; break;
1365 case PAPER_USEXECUTIVE:
1366 os << "executive"; break;
1377 case PAPER_B4: break;
1383 case RC_CHKTEX_COMMAND:
1384 if (ignore_system_lyxrc ||
1385 chktex_command != system_lyxrc.chktex_command) {
1386 os << "\\chktex_command \"" << chktex_command << "\"\n";
1390 case RC_BIBTEX_COMMAND:
1391 if (ignore_system_lyxrc ||
1392 bibtex_command != system_lyxrc.bibtex_command) {
1393 os << "\\bibtex_command \"" << bibtex_command << "\"\n";
1397 case RC_INDEX_COMMAND:
1398 if (ignore_system_lyxrc ||
1399 index_command != system_lyxrc.index_command) {
1400 os << "\\index_command \"" << index_command << "\"\n";
1404 case RC_TEX_EXPECTS_WINDOWS_PATHS:
1405 if (ignore_system_lyxrc ||
1406 windows_style_tex_paths != system_lyxrc.windows_style_tex_paths) {
1407 os << "\\tex_expects_windows_paths "
1408 << convert<string>(windows_style_tex_paths) << '\n';
1412 case RC_TEX_ALLOWS_SPACES:
1413 if (tex_allows_spaces != system_lyxrc.tex_allows_spaces) {
1414 os << "\\tex_allows_spaces "
1415 << convert<string>(tex_allows_spaces) << '\n';
1420 if (ignore_system_lyxrc ||
1421 use_kbmap != system_lyxrc.use_kbmap) {
1422 os << "\\kbmap " << convert<string>(use_kbmap) << '\n';
1426 case RC_KBMAP_PRIMARY:
1427 if (ignore_system_lyxrc ||
1428 primary_kbmap != system_lyxrc.primary_kbmap) {
1429 string const path = os::external_path(primary_kbmap);
1430 os << "\\kbmap_primary \"" << path << "\"\n";
1434 case RC_KBMAP_SECONDARY:
1435 if (ignore_system_lyxrc ||
1436 secondary_kbmap != system_lyxrc.secondary_kbmap) {
1437 string const path = os::external_path(secondary_kbmap);
1438 os << "\\kbmap_secondary \"" << path << "\"\n";
1443 if (ignore_system_lyxrc ||
1444 lyxpipes != system_lyxrc.lyxpipes) {
1445 string const path = os::external_path(lyxpipes);
1446 os << "\\serverpipe \"" << path << "\"\n";
1450 case RC_DATE_INSERT_FORMAT:
1451 if (ignore_system_lyxrc ||
1452 date_insert_format != system_lyxrc.date_insert_format) {
1453 os << "\\date_insert_format \"" << date_insert_format
1458 case RC_LABEL_INIT_LENGTH:
1459 if (ignore_system_lyxrc ||
1460 label_init_length != system_lyxrc.label_init_length) {
1461 os << "\\label_init_length " << label_init_length
1468 os << "\\user_name \"" << user_name << "\"\n";
1473 os << "\\user_email \"" << user_email << "\"\n";
1477 case RC_SHOW_BANNER:
1478 if (ignore_system_lyxrc ||
1479 show_banner != system_lyxrc.show_banner) {
1480 os << "\\show_banner " << convert<string>(show_banner) << '\n';
1486 if (ignore_system_lyxrc ||
1487 preview != system_lyxrc.preview) {
1493 case PREVIEW_NO_MATH:
1500 os << "\\preview " << status << '\n';
1505 case RC_PREVIEW_HASHED_LABELS:
1506 if (ignore_system_lyxrc ||
1507 preview_hashed_labels !=
1508 system_lyxrc.preview_hashed_labels) {
1509 os << "\\preview_hashed_labels "
1510 << convert<string>(preview_hashed_labels) << '\n';
1515 case RC_PREVIEW_SCALE_FACTOR:
1516 if (ignore_system_lyxrc ||
1517 preview_scale_factor != system_lyxrc.preview_scale_factor) {
1518 os << "\\preview_scale_factor "
1519 << preview_scale_factor << '\n';
1524 case RC_USE_CONVERTER_CACHE:
1525 if (ignore_system_lyxrc ||
1526 use_converter_cache != system_lyxrc.use_converter_cache) {
1527 os << "\\use_converter_cache "
1528 << convert<string>(use_converter_cache) << '\n';
1533 case RC_CONVERTER_CACHE_MAXAGE:
1534 if (ignore_system_lyxrc ||
1535 converter_cache_maxage != system_lyxrc.converter_cache_maxage) {
1536 os << "\\converter_cache_maxage "
1537 << converter_cache_maxage << '\n';
1543 << "# SCREEN & FONTS SECTION ############################\n"
1547 if (ignore_system_lyxrc ||
1548 dpi != system_lyxrc.dpi) {
1549 os << "\\screen_dpi " << dpi << '\n';
1553 case RC_SCREEN_ZOOM:
1554 if (ignore_system_lyxrc ||
1555 zoom != system_lyxrc.zoom) {
1556 os << "\\screen_zoom " << zoom << '\n';
1560 case RC_GEOMETRY_SESSION:
1561 if (ignore_system_lyxrc ||
1562 allow_geometry_session != system_lyxrc.allow_geometry_session) {
1563 os << "\\allow_geometry_session " << convert<string>(allow_geometry_session)
1568 case RC_CURSOR_FOLLOWS_SCROLLBAR:
1569 if (ignore_system_lyxrc ||
1570 cursor_follows_scrollbar
1571 != system_lyxrc.cursor_follows_scrollbar) {
1572 os << "\\cursor_follows_scrollbar "
1573 << convert<string>(cursor_follows_scrollbar) << '\n';
1577 case RC_DIALOGS_ICONIFY_WITH_MAIN:
1578 if (ignore_system_lyxrc ||
1579 dialogs_iconify_with_main
1580 != system_lyxrc.dialogs_iconify_with_main) {
1581 os << "\\dialogs_iconify_with_main "
1582 << convert<string>(dialogs_iconify_with_main) << '\n';
1586 case RC_SCREEN_FONT_ROMAN:
1587 if (ignore_system_lyxrc ||
1588 roman_font_name != system_lyxrc.roman_font_name) {
1589 os << "\\screen_font_roman \"" << roman_font_name
1594 case RC_SCREEN_FONT_ROMAN_FOUNDRY:
1595 if (ignore_system_lyxrc ||
1596 roman_font_foundry != system_lyxrc.roman_font_foundry) {
1597 os << "\\screen_font_roman_foundry \"" << roman_font_foundry
1602 case RC_SCREEN_FONT_SANS:
1603 if (ignore_system_lyxrc ||
1604 sans_font_name != system_lyxrc.sans_font_name) {
1605 os << "\\screen_font_sans \"" << sans_font_name
1610 case RC_SCREEN_FONT_SANS_FOUNDRY:
1611 if (ignore_system_lyxrc ||
1612 sans_font_foundry != system_lyxrc.sans_font_foundry) {
1613 os << "\\screen_font_sans_foundry \"" << sans_font_foundry
1618 case RC_SCREEN_FONT_TYPEWRITER:
1619 if (ignore_system_lyxrc ||
1620 typewriter_font_name != system_lyxrc.typewriter_font_name) {
1621 os << "\\screen_font_typewriter \""
1622 << typewriter_font_name << "\"\n";
1626 case RC_SCREEN_FONT_TYPEWRITER_FOUNDRY:
1627 if (ignore_system_lyxrc ||
1628 typewriter_font_foundry != system_lyxrc.typewriter_font_foundry) {
1629 os << "\\screen_font_typewriter_foundry \""
1630 << typewriter_font_foundry << "\"\n";
1635 case RC_SCREEN_FONT_SCALABLE:
1636 if (ignore_system_lyxrc ||
1637 use_scalable_fonts != system_lyxrc.use_scalable_fonts) {
1638 os << "\\screen_font_scalable "
1639 << convert<string>(use_scalable_fonts)
1644 case RC_SCREEN_FONT_SIZES:
1645 if (ignore_system_lyxrc ||
1646 font_sizes[FONT_SIZE_TINY]
1647 != system_lyxrc.font_sizes[FONT_SIZE_TINY] ||
1648 font_sizes[FONT_SIZE_SCRIPT]
1649 != system_lyxrc.font_sizes[FONT_SIZE_SCRIPT] ||
1650 font_sizes[FONT_SIZE_FOOTNOTE]
1651 != system_lyxrc.font_sizes[FONT_SIZE_FOOTNOTE] ||
1652 font_sizes[FONT_SIZE_SMALL]
1653 != system_lyxrc.font_sizes[FONT_SIZE_SMALL] ||
1654 font_sizes[FONT_SIZE_NORMAL]
1655 != system_lyxrc.font_sizes[FONT_SIZE_NORMAL] ||
1656 font_sizes[FONT_SIZE_LARGE]
1657 != system_lyxrc.font_sizes[FONT_SIZE_LARGE] ||
1658 font_sizes[FONT_SIZE_LARGER]
1659 != system_lyxrc.font_sizes[FONT_SIZE_LARGER] ||
1660 font_sizes[FONT_SIZE_LARGEST]
1661 != system_lyxrc.font_sizes[FONT_SIZE_LARGEST] ||
1662 font_sizes[FONT_SIZE_HUGE]
1663 != system_lyxrc.font_sizes[FONT_SIZE_HUGE] ||
1664 font_sizes[FONT_SIZE_HUGER]
1665 != system_lyxrc.font_sizes[FONT_SIZE_HUGER]) {
1666 os.setf(ios::fixed);
1668 os << "\\screen_font_sizes"
1669 << ' ' << font_sizes[FONT_SIZE_TINY]
1670 << ' ' << font_sizes[FONT_SIZE_SCRIPT]
1671 << ' ' << font_sizes[FONT_SIZE_FOOTNOTE]
1672 << ' ' << font_sizes[FONT_SIZE_SMALL]
1673 << ' ' << font_sizes[FONT_SIZE_NORMAL]
1674 << ' ' << font_sizes[FONT_SIZE_LARGE]
1675 << ' ' << font_sizes[FONT_SIZE_LARGER]
1676 << ' ' << font_sizes[FONT_SIZE_LARGEST]
1677 << ' ' << font_sizes[FONT_SIZE_HUGE]
1678 << ' ' << font_sizes[FONT_SIZE_HUGER]
1685 << "# COLOR SECTION ###################################\n"
1689 for (int i = 0; i < Color_ignore; ++i) {
1690 ColorCode lc = static_cast<ColorCode>(i);
1692 string const col(lcolor.getX11Name(lc));
1693 if (ignore_system_lyxrc ||
1694 col != system_lcolor.getX11Name(lc)) {
1695 os << "\\set_color \""
1696 << lcolor.getLyXName(lc) << "\" \""
1704 << "# PRINTER SECTION ###################################\n"
1708 if (ignore_system_lyxrc ||
1709 printer != system_lyxrc.printer) {
1710 os << "\\printer \"" << printer << "\"\n";
1714 case RC_PRINT_ADAPTOUTPUT:
1715 if (ignore_system_lyxrc ||
1716 print_adapt_output != system_lyxrc.print_adapt_output) {
1717 os << "\\print_adapt_output "
1718 << convert<string>(print_adapt_output)
1723 case RC_PRINT_COMMAND:
1724 if (ignore_system_lyxrc ||
1725 print_command != system_lyxrc.print_command) {
1726 os << "\\print_command \"" << print_command << "\"\n";
1730 case RC_PRINTEXSTRAOPTIONS:
1731 if (ignore_system_lyxrc ||
1732 print_extra_options != system_lyxrc.print_extra_options) {
1733 os << "\\print_extra_options \"" << print_extra_options
1738 case RC_PRINTSPOOL_COMMAND:
1739 if (ignore_system_lyxrc ||
1740 print_spool_command != system_lyxrc.print_spool_command) {
1741 os << "\\print_spool_command \"" << print_spool_command
1746 case RC_PRINTSPOOL_PRINTERPREFIX:
1747 if (ignore_system_lyxrc ||
1748 print_spool_printerprefix
1749 != system_lyxrc.print_spool_printerprefix) {
1750 os << "\\print_spool_printerprefix \""
1751 << print_spool_printerprefix << "\"\n";
1755 case RC_PRINTEVENPAGEFLAG:
1756 if (ignore_system_lyxrc ||
1757 print_evenpage_flag != system_lyxrc.print_evenpage_flag) {
1758 os << "\\print_evenpage_flag \"" << print_evenpage_flag
1763 case RC_PRINTODDPAGEFLAG:
1764 if (ignore_system_lyxrc ||
1765 print_oddpage_flag != system_lyxrc.print_oddpage_flag) {
1766 os << "\\print_oddpage_flag \"" << print_oddpage_flag
1771 case RC_PRINTREVERSEFLAG:
1772 if (ignore_system_lyxrc ||
1773 print_reverse_flag != system_lyxrc.print_reverse_flag) {
1774 os << "\\print_reverse_flag \"" << print_reverse_flag
1779 case RC_PRINTLANDSCAPEFLAG:
1780 if (ignore_system_lyxrc ||
1781 print_landscape_flag != system_lyxrc.print_landscape_flag) {
1782 os << "\\print_landscape_flag \"" << print_landscape_flag
1787 case RC_PRINTPAGERANGEFLAG:
1788 if (ignore_system_lyxrc ||
1789 print_pagerange_flag != system_lyxrc.print_pagerange_flag) {
1790 os << "\\print_pagerange_flag \"" << print_pagerange_flag
1795 case RC_PRINTCOPIESFLAG:
1796 if (ignore_system_lyxrc ||
1797 print_copies_flag != system_lyxrc.print_copies_flag) {
1798 os << "\\print_copies_flag \"" << print_copies_flag
1803 case RC_PRINTCOLLCOPIESFLAG:
1804 if (ignore_system_lyxrc ||
1805 print_collcopies_flag
1806 != system_lyxrc.print_collcopies_flag) {
1807 os << "\\print_collcopies_flag \""
1808 << print_collcopies_flag
1813 case RC_PRINTPAPERFLAG:
1814 if (ignore_system_lyxrc ||
1815 print_paper_flag != system_lyxrc.print_paper_flag) {
1816 os << "\\print_paper_flag \"" << print_paper_flag
1821 case RC_PRINTPAPERDIMENSIONFLAG:
1822 if (ignore_system_lyxrc ||
1823 print_paper_dimension_flag
1824 != system_lyxrc.print_paper_dimension_flag) {
1825 os << "\\print_paper_dimension_flag \""
1826 << print_paper_dimension_flag << "\"\n";
1830 case RC_PRINTTOPRINTER:
1831 if (ignore_system_lyxrc ||
1832 print_to_printer != system_lyxrc.print_to_printer) {
1833 os << "\\print_to_printer \"" << print_to_printer
1838 case RC_PRINTTOFILE:
1839 if (ignore_system_lyxrc ||
1840 print_to_file != system_lyxrc.print_to_file) {
1841 string const path = os::external_path(print_to_file);
1842 os << "\\print_to_file \"" << path << "\"\n";
1846 case RC_PRINTFILEEXTENSION:
1847 if (ignore_system_lyxrc ||
1848 print_file_extension != system_lyxrc.print_file_extension) {
1849 os << "\\print_file_extension \""
1850 << print_file_extension
1857 << "# EXPORT SECTION ####################################\n"
1860 case RC_CUSTOM_EXPORT_COMMAND:
1861 if (ignore_system_lyxrc ||
1862 custom_export_command
1863 != system_lyxrc.custom_export_command) {
1864 os << "\\custom_export_command \""
1865 << custom_export_command
1870 case RC_CUSTOM_EXPORT_FORMAT:
1871 if (ignore_system_lyxrc ||
1872 custom_export_format
1873 != system_lyxrc.custom_export_format) {
1874 os << "\\custom_export_format \"" << custom_export_format
1881 << "# TEX SECTION #######################################\n"
1884 case RC_FONT_ENCODING:
1885 if (ignore_system_lyxrc ||
1886 fontenc != system_lyxrc.fontenc) {
1887 os << "\\font_encoding \"" << fontenc << "\"\n";
1893 << "# FILE SECTION ######################################\n"
1896 case RC_DOCUMENTPATH:
1897 if (ignore_system_lyxrc ||
1898 document_path != system_lyxrc.document_path) {
1899 string const path = os::external_path(document_path);
1900 os << "\\document_path \"" << path << "\"\n";
1904 case RC_USELASTFILEPOS:
1905 if (ignore_system_lyxrc ||
1906 use_lastfilepos != system_lyxrc.use_lastfilepos) {
1907 os << "\\use_lastfilepos " << convert<string>(use_lastfilepos)
1912 case RC_LOADSESSION:
1913 if (ignore_system_lyxrc ||
1914 load_session != system_lyxrc.load_session) {
1915 os << "\\load_session " << convert<string>(load_session)
1920 case RC_NUMLASTFILES:
1921 if (ignore_system_lyxrc ||
1922 num_lastfiles != system_lyxrc.num_lastfiles) {
1923 os << "\\num_lastfiles " << num_lastfiles << '\n';
1927 case RC_CHECKLASTFILES:
1928 if (ignore_system_lyxrc ||
1929 check_lastfiles != system_lyxrc.check_lastfiles) {
1930 os << "\\check_lastfiles " << convert<string>(check_lastfiles)
1935 case RC_EXAMPLEPATH:
1936 if (ignore_system_lyxrc ||
1937 example_path != system_lyxrc.example_path) {
1938 string const path = os::external_path(example_path);
1939 os << "\\example_path \"" << path << "\"\n";
1943 case RC_TEMPLATEPATH:
1944 if (ignore_system_lyxrc ||
1945 template_path != system_lyxrc.template_path) {
1946 string const path = os::external_path(template_path);
1947 os << "\\template_path \"" << path << "\"\n";
1951 case RC_TEMPDIRPATH:
1952 if (ignore_system_lyxrc ||
1953 tempdir_path != system_lyxrc.tempdir_path) {
1954 string const path = os::external_path(tempdir_path);
1955 os << "\\tempdir_path \"" << path << "\"\n";
1963 case RC_PLAINTEXT_LINELEN:
1964 if (ignore_system_lyxrc ||
1965 plaintext_linelen != system_lyxrc.plaintext_linelen) {
1966 os << "\\plaintext_linelen " << plaintext_linelen << '\n';
1970 case RC_MAKE_BACKUP:
1971 if (ignore_system_lyxrc ||
1972 make_backup != system_lyxrc.make_backup) {
1973 os << "\\make_backup " << convert<string>(make_backup) << '\n';
1977 case RC_BACKUPDIR_PATH:
1978 if (ignore_system_lyxrc ||
1979 backupdir_path != system_lyxrc.backupdir_path) {
1980 string const path = os::external_path(backupdir_path);
1981 os << "\\backupdir_path \"" << path << "\"\n";
1987 << "# PLAIN TEXT EXPORT SECTION ##############################\n"
1990 case RC_PLAINTEXT_ROFF_COMMAND:
1991 if (ignore_system_lyxrc ||
1992 plaintext_roff_command != system_lyxrc.plaintext_roff_command) {
1993 os << "\\plaintext_roff_command \"" << plaintext_roff_command
2000 << "# SPELLCHECKER SECTION ##############################\n"
2002 case RC_USE_SPELL_LIB:
2003 if (ignore_system_lyxrc ||
2004 use_spell_lib != system_lyxrc.use_spell_lib) {
2005 os << "\\use_spell_lib " << convert<string>(use_spell_lib) << '\n';
2009 case RC_SPELL_COMMAND:
2010 if (ignore_system_lyxrc ||
2011 isp_command != system_lyxrc.isp_command) {
2012 os << "\\spell_command \"" << isp_command << "\"\n";
2016 case RC_ACCEPT_COMPOUND:
2017 if (ignore_system_lyxrc ||
2018 isp_accept_compound != system_lyxrc.isp_accept_compound) {
2019 os << "\\accept_compound " << convert<string>(isp_accept_compound)
2024 case RC_USE_ALT_LANG:
2025 if (ignore_system_lyxrc ||
2026 isp_use_alt_lang != system_lyxrc.isp_use_alt_lang) {
2027 os << "\\use_alt_language " << convert<string>(isp_use_alt_lang)
2033 if (ignore_system_lyxrc ||
2034 isp_alt_lang != system_lyxrc.isp_alt_lang) {
2035 os << "\\alternate_language \"" << isp_alt_lang
2040 case RC_USE_ESC_CHARS:
2041 if (ignore_system_lyxrc ||
2042 isp_use_esc_chars != system_lyxrc.isp_use_esc_chars) {
2043 os << "\\use_escape_chars " << convert<string>(isp_use_esc_chars)
2049 if (ignore_system_lyxrc ||
2050 isp_esc_chars != system_lyxrc.isp_esc_chars) {
2051 os << "\\escape_chars \"" << isp_esc_chars << "\"\n";
2055 case RC_USE_PERS_DICT:
2056 if (ignore_system_lyxrc ||
2057 isp_use_pers_dict != system_lyxrc.isp_use_pers_dict) {
2058 os << "\\use_personal_dictionary "
2059 << convert<string>(isp_use_pers_dict)
2064 case RC_USE_TOOLTIP:
2065 if (ignore_system_lyxrc ||
2066 use_tooltip != system_lyxrc.use_tooltip) {
2067 os << "\\use_tooltip "
2068 << convert<string>(use_tooltip)
2071 case RC_USE_PIXMAP_CACHE:
2072 if (ignore_system_lyxrc ||
2073 use_pixmap_cache != system_lyxrc.use_pixmap_cache) {
2074 os << "\\use_pixmap_cache "
2075 << convert<string>(use_pixmap_cache)
2079 if (isp_pers_dict != system_lyxrc.isp_pers_dict) {
2080 string const path = os::external_path(isp_pers_dict);
2081 os << "\\personal_dictionary \"" << path << "\"\n";
2085 case RC_USE_INP_ENC:
2086 if (ignore_system_lyxrc ||
2087 isp_use_input_encoding
2088 != system_lyxrc.isp_use_input_encoding) {
2089 os << "\\use_input_encoding "
2090 << convert<string>(isp_use_input_encoding)
2097 << "# LANGUAGE SUPPORT SECTION ##########################\n"
2100 case RC_RTL_SUPPORT:
2101 if (ignore_system_lyxrc ||
2102 rtl_support != system_lyxrc.rtl_support) {
2103 os << "\\rtl " << convert<string>(rtl_support) << '\n';
2107 case RC_LANGUAGE_PACKAGE:
2108 if (ignore_system_lyxrc ||
2109 language_package != system_lyxrc.language_package) {
2110 os << "\\language_package \"" << language_package
2115 case RC_LANGUAGE_GLOBAL_OPTIONS:
2116 if (ignore_system_lyxrc ||
2117 language_global_options
2118 != system_lyxrc.language_global_options) {
2119 os << "\\language_global_options \""
2120 << convert<string>(language_global_options)
2125 case RC_LANGUAGE_USE_BABEL:
2126 if (ignore_system_lyxrc ||
2127 language_use_babel != system_lyxrc.language_use_babel) {
2128 os << "\\language_use_babel \""
2129 << convert<string>(language_use_babel)
2134 case RC_LANGUAGE_COMMAND_BEGIN:
2135 if (ignore_system_lyxrc ||
2136 language_command_begin
2137 != system_lyxrc.language_command_begin) {
2138 os << "\\language_command_begin \""
2139 << language_command_begin
2144 case RC_LANGUAGE_COMMAND_END:
2145 if (ignore_system_lyxrc ||
2146 language_command_end
2147 != system_lyxrc.language_command_end) {
2148 os << "\\language_command_end \"" << language_command_end
2153 case RC_LANGUAGE_COMMAND_LOCAL:
2154 if (ignore_system_lyxrc ||
2155 language_command_local
2156 != system_lyxrc.language_command_local) {
2157 os << "\\language_command_local \""
2158 << language_command_local
2163 case RC_LANGUAGE_AUTO_BEGIN:
2164 if (ignore_system_lyxrc ||
2165 language_auto_begin != system_lyxrc.language_auto_begin) {
2166 os << "\\language_auto_begin "
2167 << convert<string>(language_auto_begin) << '\n';
2171 case RC_LANGUAGE_AUTO_END:
2172 if (ignore_system_lyxrc ||
2173 language_auto_end != system_lyxrc.language_auto_end) {
2174 os << "\\language_auto_end "
2175 << convert<string>(language_auto_end) << '\n';
2179 case RC_MARK_FOREIGN_LANGUAGE:
2180 if (ignore_system_lyxrc ||
2181 mark_foreign_language
2182 != system_lyxrc.mark_foreign_language) {
2183 os << "\\mark_foreign_language " <<
2184 convert<string>(mark_foreign_language) << '\n';
2190 << "# 2nd MISC SUPPORT SECTION ##########################\n"
2193 case RC_AUTO_NUMBER:
2194 if (ignore_system_lyxrc ||
2195 auto_number != system_lyxrc.auto_number) {
2196 os << "\\auto_number " << convert<string>(auto_number) << '\n';
2200 case RC_DEFAULT_LANGUAGE:
2201 if (ignore_system_lyxrc ||
2202 default_language != system_lyxrc.default_language) {
2203 os << "\\default_language " << default_language << '\n';
2209 << "# FORMATS SECTION ##########################\n"
2213 // New/modified formats
2214 for (Formats::const_iterator cit = formats.begin();
2215 cit != formats.end(); ++cit) {
2216 Format const * format =
2217 system_formats.getFormat(cit->name());
2219 format->extension() != cit->extension() ||
2220 format->prettyname() != cit->prettyname() ||
2221 format->shortcut() != cit->shortcut() ||
2222 format->viewer() != cit->viewer() ||
2223 format->editor() != cit->editor() ||
2224 format->documentFormat() != cit->documentFormat() ||
2225 format->vectorFormat() != cit->vectorFormat()) {
2226 os << "\\format \"" << cit->name() << "\" \""
2227 << cit->extension() << "\" \""
2228 << cit->prettyname() << "\" \""
2229 << cit->shortcut() << "\" \""
2230 << cit->viewer() << "\" \""
2231 << cit->editor() << "\" \"";
2232 vector<string> flags;
2233 if (cit->documentFormat())
2234 flags.push_back("document");
2235 if (cit->vectorFormat())
2236 flags.push_back("vector");
2237 os << getStringFromVector(flags);
2242 // Look for deleted formats
2243 for (Formats::const_iterator cit = system_formats.begin();
2244 cit != system_formats.end(); ++cit)
2245 if (!formats.getFormat(cit->name()))
2246 os << "\\format \"" << cit->name()
2247 << "\" \"\" \"\" \"\" \"\" \"\" \"\"\n";
2256 << "# CONVERTERS SECTION ##########################\n"
2260 // Look for new converters
2261 for (Converters::const_iterator cit = theConverters().begin();
2262 cit != theConverters().end(); ++cit) {
2263 Converter const * converter =
2264 theSystemConverters().getConverter(cit->from,
2267 converter->command != cit->command ||
2268 converter->flags != cit->flags)
2269 os << "\\converter \"" << cit->from << "\" \""
2270 << cit->to << "\" \""
2271 << cit->command << "\" \""
2272 << cit->flags << "\"\n";
2275 // New/modifed converters
2276 for (Converters::const_iterator cit = theSystemConverters().begin();
2277 cit != theSystemConverters().end(); ++cit)
2278 if (!theConverters().getConverter(cit->from, cit->to))
2279 os << "\\converter \"" << cit->from
2280 << "\" \"" << cit->to << "\" \"\" \"\"\n";
2287 << "# COPIERS SECTION ##########################\n"
2290 // Look for new movers
2291 Movers::const_iterator const sysbegin = theSystemMovers().begin();
2292 Movers::const_iterator const sysend = theSystemMovers().end();
2293 Movers::const_iterator it = theMovers().begin();
2294 Movers::const_iterator end = theMovers().end();
2296 for (; it != end; ++it) {
2297 Movers::const_iterator const sysit =
2298 find_if(sysbegin, sysend, SameMover(*it));
2299 if (sysit == sysend) {
2300 string const & fmt = it->first;
2301 string const & command =
2302 it->second.command();
2304 os << "\\copier " << fmt
2305 << " \"" << command << "\"\n";
2311 // We don't actually delete SpecialisedMover(s) from the
2312 // map, just clear their 'command', so there's no need
2313 // to test for anything else.
2321 string const LyXRC::getDescription(LyXRCTags tag)
2326 case RC_ACCEPT_COMPOUND:
2327 str = _("Consider run-together words, such as \"diskdrive\" for \"disk drive\", as legal words?");
2331 case RC_USE_ALT_LANG:
2332 str = _("Specify an alternate language. The default is to use the language of the document.");
2335 case RC_PLAINTEXT_ROFF_COMMAND:
2336 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.");
2339 case RC_PLAINTEXT_LINELEN:
2340 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.");
2343 case RC_AUTOREGIONDELETE:
2344 str = _("De-select if you don't want the current selection to be replaced automatically by what you type.");
2347 case RC_AUTORESET_OPTIONS:
2348 str = _("De-select if you don't want the class options to be reset to defaults after class change.");
2352 str = _("The time interval between auto-saves (in seconds). 0 means no auto-save.");
2355 case RC_AUTO_NUMBER:
2358 case RC_BACKUPDIR_PATH:
2359 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.");
2362 case RC_BIBTEX_COMMAND:
2363 str = _("Define the options of bibtex (cf. man bibtex) or select an alternative compiler (e.g. mlbibtex or bibulus).");
2367 str = _("Keybindings file. Can either specify an absolute path, or LyX will look in its global and local bind/ directories.");
2370 case RC_CHECKLASTFILES:
2371 str = _("Select to check whether the lastfiles still exist.");
2374 case RC_CHKTEX_COMMAND:
2375 str = _("Define how to run chktex. E.g. \"chktex -n11 -n1 -n3 -n6 -n9 -22 -n25 -n30 -n38\" Refer to the ChkTeX documentation.");
2384 case RC_CURSOR_FOLLOWS_SCROLLBAR:
2385 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.");
2388 case RC_CUSTOM_EXPORT_COMMAND:
2391 case RC_CUSTOM_EXPORT_FORMAT:
2394 case RC_DATE_INSERT_FORMAT:
2395 //xgettext:no-c-format
2396 str = _("This accepts the normal strftime formats; see man strftime for full details. E.g.\"%A, %e. %B %Y\".");
2400 str = _("Command definition file. Can either specify an absolute path, or LyX will look in its global and local commands/ directories.");
2403 case RC_DEFAULT_LANGUAGE:
2404 str = _("New documents will be assigned this language.");
2407 case RC_DEFAULT_PAPERSIZE:
2408 str = _("Specify the default paper size.");
2411 case RC_DIALOGS_ICONIFY_WITH_MAIN:
2412 str = _("Iconify the dialogs when the main window is iconified. (Affects only dialogs shown after the change has been made.)");
2415 case RC_DISPLAY_GRAPHICS:
2416 str = _("Select how LyX will display any graphics.");
2419 case RC_DOCUMENTPATH:
2420 str = _("The default path for your documents. An empty value selects the directory LyX was started from.");
2424 case RC_USE_ESC_CHARS:
2425 str = _("Specify additional chars that can be part of a word.");
2428 case RC_EXAMPLEPATH:
2429 str = _("The path that LyX will set when offering to choose an example. An empty value selects the directory LyX was started from.");
2432 case RC_FONT_ENCODING:
2433 str = _("The font encoding used for the LaTeX2e fontenc package. T1 is highly recommended for non-English languages.");
2439 case RC_INDEX_COMMAND:
2440 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\".");
2447 case RC_KBMAP_PRIMARY:
2448 case RC_KBMAP_SECONDARY:
2449 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.");
2452 case RC_LABEL_INIT_LENGTH:
2453 str = _("Maximum number of words in the initialization string for a new label");
2456 case RC_LANGUAGE_AUTO_BEGIN:
2457 str = _("Select if a language switching command is needed at the beginning of the document.");
2460 case RC_LANGUAGE_AUTO_END:
2461 str = _("Select if a language switching command is needed at the end of the document.");
2464 case RC_LANGUAGE_COMMAND_BEGIN:
2465 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.");
2468 case RC_LANGUAGE_COMMAND_END:
2469 str = _("The LaTeX command for changing back to the language of the document.");
2472 case RC_LANGUAGE_COMMAND_LOCAL:
2473 str = _("The LaTeX command for local changing of the language.");
2476 case RC_LANGUAGE_GLOBAL_OPTIONS:
2477 str = _("De-select if you don't want the language(s) used as an argument to \\documentclass.");
2480 case RC_LANGUAGE_PACKAGE:
2481 str = _("The LaTeX command for loading the language package. E.g. \"\\usepackage{babel}\", \"\\usepackage{omega}\".");
2484 case RC_LANGUAGE_USE_BABEL:
2485 str = _("De-select if you don't want babel to be used when the language of the document is the default language.");
2488 case RC_USELASTFILEPOS:
2489 str = _("De-select if you do not want LyX to scroll to saved position.");
2492 case RC_LOADSESSION:
2493 str = _("De-select to prevent loading files opened from the last LyX session.");
2496 case RC_MAKE_BACKUP:
2497 str = _("De-select if you don't want LyX to create backup files.");
2500 case RC_MARK_FOREIGN_LANGUAGE:
2501 str = _("Select to control the highlighting of words with a language foreign to that of the document.");
2504 case RC_NUMLASTFILES:
2505 str = bformat(_("Maximal number of lastfiles. Up to %1$d can appear in the file menu."),
2509 case RC_PATH_PREFIX:
2510 str = _("Specify those directories which should be "
2511 "prepended to the PATH environment variable. "
2512 "Use the OS native format.");
2516 case RC_USE_PERS_DICT:
2517 str = _("Specify an alternate personal dictionary file. E.g. \".ispell_english\".");
2521 str = _("Shows a typeset preview of things such as math");
2524 case RC_PREVIEW_HASHED_LABELS:
2525 str = _("Previewed equations will have \"(#)\" labels rather than numbered ones");
2528 case RC_PREVIEW_SCALE_FACTOR:
2529 str = _("Scale the preview size to suit.");
2532 case RC_PRINTCOLLCOPIESFLAG:
2533 str = _("The option for specifying whether the copies should be collated.");
2536 case RC_PRINTCOPIESFLAG:
2537 str = _("The option for specifying the number of copies to print.");
2541 str = _("The default printer to print on. If none is specified, LyX will use the environment variable PRINTER.");
2544 case RC_PRINTEVENPAGEFLAG:
2545 str = _("The option to print only even pages.");
2548 case RC_PRINTEXSTRAOPTIONS:
2549 str = _("Extra options to pass to printing program after everything else, but before the filename of the DVI file to be printed.");
2552 case RC_PRINTFILEEXTENSION:
2553 str = _("Extension of printer program output file. Usually \".ps\".");
2556 case RC_PRINTLANDSCAPEFLAG:
2557 str = _("The option to print out in landscape.");
2560 case RC_PRINTODDPAGEFLAG:
2561 str = _("The option to print only odd pages.");
2564 case RC_PRINTPAGERANGEFLAG:
2565 str = _("The option for specifying a comma-separated list of pages to print.");
2568 case RC_PRINTPAPERDIMENSIONFLAG:
2569 str = _("Option to specify the dimensions of the print paper.");
2572 case RC_PRINTPAPERFLAG:
2573 str = _("The option to specify paper type.");
2576 case RC_PRINTREVERSEFLAG:
2577 str = _("The option to reverse the order of the pages printed.");
2580 case RC_PRINTSPOOL_COMMAND:
2581 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.");
2584 case RC_PRINTSPOOL_PRINTERPREFIX:
2585 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.");
2588 case RC_PRINTTOFILE:
2589 str = _("Option to pass to the print program to print to a file.");
2592 case RC_PRINTTOPRINTER:
2593 str = _("Option to pass to the print program to print on a specific printer.");
2596 case RC_PRINT_ADAPTOUTPUT:
2597 str = _("Select for LyX to pass the name of the destination printer to your print command.");
2600 case RC_PRINT_COMMAND:
2601 str = _("Your favorite print program, e.g. \"dvips\", \"dvilj4\".");
2604 case RC_RTL_SUPPORT:
2605 str = _("Select to enable support of right-to-left languages (e.g. Hebrew, Arabic).");
2609 str = _("DPI (dots per inch) of your monitor is auto-detected by LyX. If that goes wrong, override the setting here.");
2612 case RC_SCREEN_FONT_ROMAN:
2613 case RC_SCREEN_FONT_SANS:
2614 case RC_SCREEN_FONT_TYPEWRITER:
2615 str = _("The screen fonts used to display the text while editing.");
2618 case RC_SCREEN_FONT_ROMAN_FOUNDRY:
2619 case RC_SCREEN_FONT_SANS_FOUNDRY:
2620 case RC_SCREEN_FONT_TYPEWRITER_FOUNDRY:
2623 case RC_SCREEN_FONT_SCALABLE:
2624 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.");
2627 case RC_SCREEN_FONT_SIZES:
2628 str = _("The font sizes used for calculating the scaling of the screen fonts.");
2631 case RC_SCREEN_ZOOM:
2632 //xgettext:no-c-format
2633 str = _("The zoom percentage for screen fonts. A setting of 100% will make the fonts roughly the same size as on paper.");
2636 case RC_GEOMETRY_SESSION:
2637 str = _("Allow session manager to save and restore windows geometry.");
2641 str = _("This starts the lyxserver. The pipes get an additional extension \".in\" and \".out\". Only for advanced users.");
2647 case RC_SHOW_BANNER:
2648 str = _("De-select if you don't want the startup banner.");
2651 case RC_SPELL_COMMAND:
2652 str = _("What command runs the spellchecker?");
2655 case RC_TEMPDIRPATH:
2656 str = _("LyX will place its temporary directories in this path. They will be deleted when you quit LyX.");
2659 case RC_TEMPLATEPATH:
2660 str = _("The path that LyX will set when offering to choose a template. An empty value selects the directory LyX was started from.");
2663 case RC_TEX_ALLOWS_SPACES:
2666 case RC_TEX_EXPECTS_WINDOWS_PATHS:
2670 str = _("The UI (user interface) file. Can either specify an absolute path, or LyX will look in its global and local ui/ directories.");
2682 case RC_USE_INP_ENC:
2683 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.");
2686 case RC_USE_TOOLTIP:
2687 str = _("Enable the automatic appearance of tool tips in the work area.");
2690 case RC_USE_PIXMAP_CACHE:
2691 str = _("Enable the pixmap cache that might improve performance on Mac and Windows.");
2694 case RC_USE_SPELL_LIB:
2697 case RC_VIEWDVI_PAPEROPTION:
2698 _("Specify the paper command to DVI viewer (leave empty or use \"-paper\")");
2713 // The global instance
2716 // The global copy of the system lyxrc entries (everything except preferences)