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.
26 #include "Converter.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 { "\\alternate_language", LyXRC::RC_ALT_LANG },
71 { "\\auto_number", LyXRC::RC_AUTO_NUMBER },
72 { "\\auto_region_delete", LyXRC::RC_AUTOREGIONDELETE },
73 { "\\auto_reset_options", LyXRC::RC_AUTORESET_OPTIONS },
74 { "\\autosave", LyXRC::RC_AUTOSAVE },
75 { "\\backupdir_path", LyXRC::RC_BACKUPDIR_PATH },
76 { "\\bibtex_command", LyXRC::RC_BIBTEX_COMMAND },
77 { "\\bind_file", LyXRC::RC_BINDFILE },
78 { "\\check_lastfiles", LyXRC::RC_CHECKLASTFILES },
79 { "\\chktex_command", LyXRC::RC_CHKTEX_COMMAND },
80 { "\\converter", LyXRC::RC_CONVERTER },
81 { "\\converter_cache_maxage", LyXRC::RC_CONVERTER_CACHE_MAXAGE },
82 { "\\copier", LyXRC::RC_COPIER },
83 { "\\cursor_follows_scrollbar", LyXRC::RC_CURSOR_FOLLOWS_SCROLLBAR },
84 { "\\custom_export_command", LyXRC::RC_CUSTOM_EXPORT_COMMAND },
85 { "\\custom_export_format", LyXRC::RC_CUSTOM_EXPORT_FORMAT },
86 { "\\date_insert_format", LyXRC::RC_DATE_INSERT_FORMAT },
87 { "\\def_file", LyXRC::RC_DEFFILE },
88 { "\\default_language", LyXRC::RC_DEFAULT_LANGUAGE },
89 { "\\default_papersize", LyXRC::RC_DEFAULT_PAPERSIZE },
90 { "\\dialogs_iconify_with_main", LyXRC::RC_DIALOGS_ICONIFY_WITH_MAIN },
91 { "\\display_graphics", LyXRC::RC_DISPLAY_GRAPHICS },
92 { "\\document_path", LyXRC::RC_DOCUMENTPATH },
93 { "\\escape_chars", LyXRC::RC_ESC_CHARS },
94 { "\\font_encoding", LyXRC::RC_FONT_ENCODING },
95 { "\\format", LyXRC::RC_FORMAT },
96 { "\\index_command", LyXRC::RC_INDEX_COMMAND },
97 { "\\input", LyXRC::RC_INPUT },
98 { "\\kbmap", LyXRC::RC_KBMAP },
99 { "\\kbmap_primary", LyXRC::RC_KBMAP_PRIMARY },
100 { "\\kbmap_secondary", LyXRC::RC_KBMAP_SECONDARY },
101 { "\\label_init_length", LyXRC::RC_LABEL_INIT_LENGTH },
102 { "\\language_auto_begin", LyXRC::RC_LANGUAGE_AUTO_BEGIN },
103 { "\\language_auto_end", LyXRC::RC_LANGUAGE_AUTO_END },
104 { "\\language_command_begin", LyXRC::RC_LANGUAGE_COMMAND_BEGIN },
105 { "\\language_command_end", LyXRC::RC_LANGUAGE_COMMAND_END },
106 { "\\language_command_local", LyXRC::RC_LANGUAGE_COMMAND_LOCAL },
107 { "\\language_global_options", LyXRC::RC_LANGUAGE_GLOBAL_OPTIONS },
108 { "\\language_package", LyXRC::RC_LANGUAGE_PACKAGE },
109 { "\\language_use_babel", LyXRC::RC_LANGUAGE_USE_BABEL },
110 { "\\load_session", LyXRC::RC_LOADSESSION },
111 { "\\make_backup", LyXRC::RC_MAKE_BACKUP },
112 { "\\mark_foreign_language", LyXRC::RC_MARK_FOREIGN_LANGUAGE },
113 { "\\num_lastfiles", LyXRC::RC_NUMLASTFILES },
114 { "\\path_prefix", LyXRC::RC_PATH_PREFIX },
115 { "\\personal_dictionary", LyXRC::RC_PERS_DICT },
116 { "\\plaintext_linelen", LyXRC::RC_PLAINTEXT_LINELEN },
117 { "\\plaintext_roff_command", LyXRC::RC_PLAINTEXT_ROFF_COMMAND },
118 { "\\preview", LyXRC::RC_PREVIEW },
119 { "\\preview_hashed_labels", LyXRC::RC_PREVIEW_HASHED_LABELS },
120 { "\\preview_scale_factor", LyXRC::RC_PREVIEW_SCALE_FACTOR },
121 { "\\print_adapt_output", LyXRC::RC_PRINT_ADAPTOUTPUT },
122 { "\\print_collcopies_flag", LyXRC::RC_PRINTCOLLCOPIESFLAG },
123 { "\\print_command", LyXRC::RC_PRINT_COMMAND },
124 { "\\print_copies_flag", LyXRC::RC_PRINTCOPIESFLAG },
125 { "\\print_evenpage_flag", LyXRC::RC_PRINTEVENPAGEFLAG },
126 { "\\print_extra_options", LyXRC::RC_PRINTEXSTRAOPTIONS },
127 { "\\print_file_extension", LyXRC::RC_PRINTFILEEXTENSION },
128 { "\\print_landscape_flag", LyXRC::RC_PRINTLANDSCAPEFLAG },
129 { "\\print_oddpage_flag", LyXRC::RC_PRINTODDPAGEFLAG },
130 { "\\print_pagerange_flag", LyXRC::RC_PRINTPAGERANGEFLAG },
131 { "\\print_paper_dimension_flag", LyXRC::RC_PRINTPAPERDIMENSIONFLAG },
132 { "\\print_paper_flag", LyXRC::RC_PRINTPAPERFLAG },
133 { "\\print_reverse_flag", LyXRC::RC_PRINTREVERSEFLAG },
134 { "\\print_spool_command", LyXRC::RC_PRINTSPOOL_COMMAND },
135 { "\\print_spool_printerprefix", LyXRC::RC_PRINTSPOOL_PRINTERPREFIX },
136 { "\\print_to_file", LyXRC::RC_PRINTTOFILE },
137 { "\\print_to_printer", LyXRC::RC_PRINTTOPRINTER },
138 { "\\printer", LyXRC::RC_PRINTER },
139 { "\\rtl", LyXRC::RC_RTL_SUPPORT },
140 { "\\screen_dpi", LyXRC::RC_SCREEN_DPI },
141 { "\\screen_font_roman", LyXRC::RC_SCREEN_FONT_ROMAN },
142 { "\\screen_font_roman_foundry", LyXRC::RC_SCREEN_FONT_ROMAN_FOUNDRY },
143 { "\\screen_font_sans", LyXRC::RC_SCREEN_FONT_SANS },
144 { "\\screen_font_sans_foundry", LyXRC::RC_SCREEN_FONT_SANS_FOUNDRY },
145 { "\\screen_font_scalable", LyXRC::RC_SCREEN_FONT_SCALABLE },
146 { "\\screen_font_sizes", LyXRC::RC_SCREEN_FONT_SIZES },
147 { "\\screen_font_typewriter", LyXRC::RC_SCREEN_FONT_TYPEWRITER },
148 { "\\screen_font_typewriter_foundry", LyXRC::RC_SCREEN_FONT_TYPEWRITER_FOUNDRY },
149 { "\\screen_geometry_height", LyXRC::RC_SCREEN_GEOMETRY_HEIGHT },
150 { "\\screen_geometry_width", LyXRC::RC_SCREEN_GEOMETRY_WIDTH },
151 { "\\screen_geometry_xysaved", LyXRC::RC_SCREEN_GEOMETRY_XYSAVED },
152 { "\\screen_zoom", LyXRC::RC_SCREEN_ZOOM },
153 { "\\serverpipe", LyXRC::RC_SERVERPIPE },
154 { "\\set_color", LyXRC::RC_SET_COLOR },
155 { "\\show_banner", LyXRC::RC_SHOW_BANNER },
156 { "\\sort_layouts", LyXRC::RC_SORT_LAYOUTS },
157 { "\\spell_command", LyXRC::RC_SPELL_COMMAND },
158 { "\\tempdir_path", LyXRC::RC_TEMPDIRPATH },
159 { "\\template_path", LyXRC::RC_TEMPLATEPATH },
160 { "\\tex_allows_spaces", LyXRC::RC_TEX_ALLOWS_SPACES },
161 { "\\tex_expects_windows_paths", LyXRC::RC_TEX_EXPECTS_WINDOWS_PATHS },
162 { "\\ui_file", LyXRC::RC_UIFILE },
163 { "\\use_alt_language", LyXRC::RC_USE_ALT_LANG },
164 { "\\use_converter_cache", LyXRC::RC_USE_CONVERTER_CACHE },
165 { "\\use_escape_chars", LyXRC::RC_USE_ESC_CHARS },
166 { "\\use_input_encoding", LyXRC::RC_USE_INP_ENC },
167 { "\\use_lastfilepos", LyXRC::RC_USELASTFILEPOS },
168 { "\\use_personal_dictionary", LyXRC::RC_USE_PERS_DICT },
169 { "\\use_pixmap_cache", LyXRC::RC_USE_PIXMAP_CACHE },
170 // compatibility with versions older than 1.4.0 only
171 { "\\use_pspell", LyXRC::RC_USE_SPELL_LIB },
172 { "\\use_spell_lib", LyXRC::RC_USE_SPELL_LIB },
173 // compatibility with versions older than 1.4.0 only
174 { "\\use_tempdir", LyXRC::RC_USETEMPDIR },
175 { "\\user_email", LyXRC::RC_USER_EMAIL },
176 { "\\user_name", LyXRC::RC_USER_NAME },
177 { "\\view_dvi_paper_option", LyXRC::RC_VIEWDVI_PAPEROPTION },
178 // compatibility with versions older than 1.4.0 only
179 { "\\viewer", LyXRC::RC_VIEWER}
182 const int lyxrcCount = sizeof(lyxrcTags) / sizeof(keyword_item);
193 void LyXRC::setDefaults() {
195 def_file = "default";
197 // Get printer from the environment. If fail, use default "",
198 // assuming that everything is set up correctly.
199 printer = getEnv("PRINTER");
200 print_adapt_output = false;
201 print_command = "dvips";
202 print_evenpage_flag = "-B";
203 print_oddpage_flag = "-A";
204 print_pagerange_flag = "-pp";
205 print_copies_flag = "-c";
206 print_collcopies_flag = "-C";
207 print_reverse_flag = "-r";
208 print_landscape_flag = "-t landscape";
209 print_to_printer = "-P";
210 print_to_file = "-o ";
211 print_file_extension = ".ps";
212 print_paper_flag = "-t";
213 print_paper_dimension_flag = "-T";
214 document_path.erase();
215 view_dvi_paper_option.erase();
216 default_papersize = PAPER_DEFAULT;
217 custom_export_format = "ps";
218 chktex_command = "chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38";
219 bibtex_command = "bibtex";
221 index_command = "makeindex -c -q";
223 // Because a screen typically is wider than a piece of paper:
227 geometry_xysaved = true;
228 // Default LaTeX font size:
229 font_sizes[FONT_SIZE_TINY] = "5.0";
230 font_sizes[FONT_SIZE_SCRIPT] = "7.0";
231 font_sizes[FONT_SIZE_FOOTNOTE] = "8.0";
232 font_sizes[FONT_SIZE_SMALL] = "9.0";
233 font_sizes[FONT_SIZE_NORMAL] = "10.0";
234 font_sizes[FONT_SIZE_LARGE] = "12.0";
235 font_sizes[FONT_SIZE_LARGER] = "14.4";
236 font_sizes[FONT_SIZE_LARGEST] = "17.26";
237 font_sizes[FONT_SIZE_HUGE] = "20.74";
238 font_sizes[FONT_SIZE_HUGER] = "24.88";
239 use_scalable_fonts = true;
240 roman_font_name = "";
242 typewriter_font_name = "";
244 auto_region_delete = true;
245 auto_reset_options = false;
246 plaintext_linelen = 65;
247 num_lastfiles = maxlastfiles;
248 check_lastfiles = true;
249 use_lastfilepos = true;
250 load_session = false;
252 backupdir_path.erase();
253 display_graphics = graphics::ColorDisplay;
254 // Spellchecker settings:
255 use_spell_lib = true;
256 isp_command = "ispell";
257 isp_accept_compound = false;
258 isp_use_input_encoding = false;
259 isp_use_alt_lang = false;
260 isp_use_pers_dict = false;
261 isp_use_esc_chars = false;
265 mark_foreign_language = true;
266 language_auto_begin = true;
267 language_auto_end = true;
268 language_global_options = true;
269 language_use_babel = true;
270 language_package = "\\usepackage{babel}";
271 language_command_begin = "\\selectlanguage{$$lang}";
272 language_command_local = "\\foreignlanguage{$$lang}{";
273 sort_layouts = false;
274 default_language = "english";
276 windows_style_tex_paths = false;
277 tex_allows_spaces = false;
278 date_insert_format = "%x";
279 cursor_follows_scrollbar = false;
280 dialogs_iconify_with_main = false;
281 label_init_length = 3;
282 preview = PREVIEW_OFF;
283 preview_hashed_labels = false;
284 preview_scale_factor = "0.9";
285 use_converter_cache = true;
286 use_pixmap_cache = false;
287 converter_cache_maxage = 6 * 30 * 24 * 3600; // 6 months
289 user_name = to_utf8(support::user_name());
291 user_email = to_utf8(support::user_email());
297 void oldFontFormat(string & family, string & foundry)
299 if (family.empty() || family[0] != '-')
301 foundry = token(family, '-', 1);
302 family = token(family, '-', 2);
310 int LyXRC::read(FileName const & filename)
312 Lexer lexrc(lyxrcTags, lyxrcCount);
313 if (lyxerr.debugging(Debug::PARSER))
314 lexrc.printTable(lyxerr);
316 lexrc.setFile(filename);
317 if (!lexrc.isOK()) return -2;
319 LYXERR(Debug::LYXRC) << "Reading '" << filename << "'..." << endl;
325 int LyXRC::read(std::istream & is)
327 Lexer lexrc(lyxrcTags, lyxrcCount);
328 if (lyxerr.debugging(Debug::PARSER))
329 lexrc.printTable(lyxerr);
332 if (!lexrc.isOK()) return -2;
334 LYXERR(Debug::LYXRC) << "Reading istream..." << endl;
340 int LyXRC::read(Lexer & lexrc)
342 if (!lexrc.isOK()) return -2;
344 while (lexrc.isOK()) {
345 // By using two switches we take advantage of the compiler
346 // telling us if we have missed a LyXRCTags element in
347 // the second switch.
348 // Note that this also shows a problem with Lexer since it
349 // helps us avoid taking advantage of the strictness of the
352 int le = lexrc.lex();
354 case Lexer::LEX_UNDEF:
355 lexrc.printError("Unknown tag `$$Token'");
357 case Lexer::LEX_FEOF:
361 switch (static_cast<LyXRCTags>(le)) {
362 case RC_INPUT: // Include file
365 libFileSearch(string(),
368 lexrc.printError("Error reading "
369 "included file: " + tmp.absFilename());
375 bind_file = os::internal_path(lexrc.getString());
381 def_file = os::internal_path(lexrc.getString());
387 ui_file = os::internal_path(lexrc.getString());
391 case RC_AUTORESET_OPTIONS:
393 auto_reset_options = lexrc.getBool();
397 case RC_DISPLAY_GRAPHICS:
399 display_graphics = graphics::displayTranslator().find(lexrc.getString());
403 case RC_TEX_EXPECTS_WINDOWS_PATHS:
405 windows_style_tex_paths = lexrc.getBool();
409 case RC_TEX_ALLOWS_SPACES:
411 tex_allows_spaces = lexrc.getBool();
417 use_kbmap = lexrc.getBool();
421 case RC_KBMAP_PRIMARY:
423 string const kmap(os::internal_path(lexrc.getString()));
426 } else if (!libFileSearch("kbd", kmap,
428 primary_kbmap = kmap;
430 lexrc.printError("LyX: Keymap `$$Token' not found");
435 case RC_KBMAP_SECONDARY:
437 string const kmap(os::internal_path(lexrc.getString()));
440 } else if (!libFileSearch("kbd", kmap,
442 secondary_kbmap = kmap;
444 lexrc.printError("LyX: Keymap `$$Token' not found");
449 case RC_FONT_ENCODING:
451 fontenc = lexrc.getString();
457 printer = lexrc.getString();
461 case RC_PRINT_COMMAND:
463 print_command = lexrc.getString();
467 case RC_PRINTEVENPAGEFLAG:
469 print_evenpage_flag = lexrc.getString();
473 case RC_PRINTODDPAGEFLAG:
475 print_oddpage_flag = lexrc.getString();
479 case RC_PRINTPAGERANGEFLAG:
481 print_pagerange_flag = lexrc.getString();
485 case RC_PRINTCOPIESFLAG:
487 print_copies_flag = lexrc.getString();
491 case RC_PRINTCOLLCOPIESFLAG:
493 print_collcopies_flag = lexrc.getString();
497 case RC_PRINTREVERSEFLAG:
499 print_reverse_flag = lexrc.getString();
503 case RC_PRINTLANDSCAPEFLAG:
505 print_landscape_flag = lexrc.getString();
509 case RC_PRINTTOPRINTER:
511 print_to_printer = lexrc.getString();
515 case RC_PRINT_ADAPTOUTPUT:
517 print_adapt_output = lexrc.getBool();
523 print_to_file = os::internal_path(lexrc.getString());
527 case RC_PRINTFILEEXTENSION:
529 print_file_extension = lexrc.getString();
533 case RC_PRINTEXSTRAOPTIONS:
535 print_extra_options = lexrc.getString();
539 case RC_PRINTSPOOL_COMMAND:
541 print_spool_command = lexrc.getString();
545 case RC_PRINTSPOOL_PRINTERPREFIX:
547 print_spool_printerprefix = lexrc.getString();
551 case RC_PRINTPAPERDIMENSIONFLAG:
553 print_paper_dimension_flag = lexrc.getString();
557 case RC_PRINTPAPERFLAG:
559 print_paper_flag = lexrc.getString();
563 case RC_CUSTOM_EXPORT_COMMAND:
565 custom_export_command = lexrc.getString();
569 case RC_CUSTOM_EXPORT_FORMAT:
571 custom_export_format = lexrc.getString();
575 case RC_DEFAULT_PAPERSIZE:
578 ascii_lowercase(lexrc.getString());
579 if (size == "usletter")
582 else if (size == "legal")
585 else if (size == "executive")
588 else if (size == "a3")
591 else if (size == "a4")
594 else if (size == "a5")
597 else if (size == "b5")
600 else if (size == "default")
606 case RC_VIEWDVI_PAPEROPTION:
608 view_dvi_paper_option = lexrc.getString();
610 view_dvi_paper_option.erase();
614 case RC_CHKTEX_COMMAND:
616 chktex_command = lexrc.getString();
620 case RC_BIBTEX_COMMAND:
622 bibtex_command = lexrc.getString();
626 case RC_INDEX_COMMAND:
628 index_command = lexrc.getString();
634 dpi = lexrc.getInteger();
640 zoom = lexrc.getInteger();
644 case RC_SCREEN_GEOMETRY_HEIGHT:
646 geometry_height = lexrc.getInteger();
650 case RC_SCREEN_GEOMETRY_WIDTH:
652 geometry_width = lexrc.getInteger();
656 case RC_SCREEN_GEOMETRY_XYSAVED:
658 geometry_xysaved = lexrc.getBool();
662 case RC_SCREEN_FONT_SIZES:
664 font_sizes[FONT_SIZE_TINY] =
668 font_sizes[FONT_SIZE_SCRIPT] =
672 font_sizes[FONT_SIZE_FOOTNOTE] =
676 font_sizes[FONT_SIZE_SMALL] =
680 font_sizes[FONT_SIZE_NORMAL] =
684 font_sizes[FONT_SIZE_LARGE] =
688 font_sizes[FONT_SIZE_LARGER] =
692 font_sizes[FONT_SIZE_LARGEST] =
696 font_sizes[FONT_SIZE_HUGE] =
700 font_sizes[FONT_SIZE_HUGER] =
705 case RC_SCREEN_FONT_SCALABLE:
707 use_scalable_fonts = lexrc.getBool();
713 autosave = lexrc.getInteger();
717 case RC_DOCUMENTPATH:
719 document_path = os::internal_path(lexrc.getString());
720 document_path = expandPath(document_path);
724 case RC_TEMPLATEPATH:
726 template_path = os::internal_path(lexrc.getString());
727 template_path = expandPath(template_path);
733 tempdir_path = os::internal_path(lexrc.getString());
734 tempdir_path = expandPath(tempdir_path);
740 lyxerr << "Ignoring obsolete use_tempdir flag." << endl;
744 case RC_USELASTFILEPOS:
746 use_lastfilepos = lexrc.getBool();
752 load_session = lexrc.getBool();
756 case RC_NUMLASTFILES:
758 num_lastfiles = lexrc.getInteger();
762 case RC_CHECKLASTFILES:
764 check_lastfiles = lexrc.getBool();
768 case RC_SCREEN_FONT_ROMAN:
770 roman_font_name = lexrc.getString();
771 oldFontFormat(roman_font_name,
776 case RC_SCREEN_FONT_SANS:
778 sans_font_name = lexrc.getString();
779 oldFontFormat(sans_font_name, sans_font_foundry);
783 case RC_SCREEN_FONT_TYPEWRITER:
785 typewriter_font_name = lexrc.getString();
786 oldFontFormat(typewriter_font_name,
787 typewriter_font_foundry);
791 case RC_SCREEN_FONT_ROMAN_FOUNDRY:
793 roman_font_foundry = lexrc.getString();
797 case RC_SCREEN_FONT_SANS_FOUNDRY:
799 sans_font_foundry = lexrc.getString();
803 case RC_SCREEN_FONT_TYPEWRITER_FOUNDRY:
805 typewriter_font_foundry = lexrc.getString();
811 string lyx_name, x11_name;
814 lyx_name = lexrc.getString();
816 lexrc.printError("Missing color tag.");
821 x11_name = lexrc.getString();
823 lexrc.printError("Missing color name for color: `$$Token'");
827 ColorCode const col =
828 lcolor.getFromLyXName(lyx_name);
829 if (col == Color_none ||
830 col == Color_inherit ||
834 if (!lcolor.setColor(col, x11_name)) {
835 lyxerr << "Bad lyxrc set_color for "
841 case RC_AUTOREGIONDELETE:
842 // Auto region delete defaults to true
844 auto_region_delete = lexrc.getBool();
850 lyxpipes = os::internal_path(lexrc.getString());
851 lyxpipes = expandPath(lyxpipes);
855 case RC_CURSOR_FOLLOWS_SCROLLBAR:
857 cursor_follows_scrollbar = lexrc.getBool();
861 case RC_DIALOGS_ICONIFY_WITH_MAIN:
863 dialogs_iconify_with_main = lexrc.getBool();
867 case RC_PLAINTEXT_ROFF_COMMAND:
869 plaintext_roff_command = lexrc.getString();
872 case RC_PLAINTEXT_LINELEN:
874 plaintext_linelen = lexrc.getInteger();
877 // Spellchecker settings:
878 case RC_USE_SPELL_LIB:
880 use_spell_lib = lexrc.getBool();
883 case RC_SPELL_COMMAND:
885 isp_command = lexrc.getString();
888 case RC_ACCEPT_COMPOUND:
890 isp_accept_compound = lexrc.getBool();
895 isp_use_input_encoding = lexrc.getBool();
898 case RC_USE_ALT_LANG:
900 isp_use_alt_lang = lexrc.getBool();
903 case RC_USE_PERS_DICT:
905 isp_use_pers_dict = lexrc.getBool();
908 case RC_USE_PIXMAP_CACHE:
910 use_pixmap_cache = lexrc.getBool();
913 case RC_USE_ESC_CHARS:
915 isp_use_esc_chars = lexrc.getBool();
920 isp_alt_lang = lexrc.getString();
925 isp_pers_dict = os::internal_path(lexrc.getString());
930 isp_esc_chars = lexrc.getString();
935 make_backup = lexrc.getBool();
938 case RC_BACKUPDIR_PATH:
940 backupdir_path = os::internal_path(lexrc.getString());
941 backupdir_path = expandPath(backupdir_path);
944 case RC_DATE_INSERT_FORMAT:
946 date_insert_format = lexrc.getString();
949 case RC_LANGUAGE_PACKAGE:
951 language_package = lexrc.getString();
954 case RC_LANGUAGE_AUTO_BEGIN:
956 language_auto_begin = lexrc.getBool();
959 case RC_LANGUAGE_AUTO_END:
961 language_auto_end = lexrc.getBool();
964 case RC_LANGUAGE_GLOBAL_OPTIONS:
966 language_global_options = lexrc.getBool();
969 case RC_LANGUAGE_USE_BABEL:
971 language_use_babel = lexrc.getBool();
974 case RC_LANGUAGE_COMMAND_BEGIN:
976 language_command_begin = lexrc.getString();
979 case RC_LANGUAGE_COMMAND_END:
981 language_command_end = lexrc.getString();
984 case RC_LANGUAGE_COMMAND_LOCAL:
986 language_command_local = lexrc.getString();
991 rtl_support = lexrc.getBool();
996 auto_number = lexrc.getBool();
999 case RC_MARK_FOREIGN_LANGUAGE:
1001 mark_foreign_language = lexrc.getBool();
1006 string fmt, command;
1008 fmt = lexrc.getString();
1011 command = lexrc.getString();
1013 setMover(fmt, command);
1017 case RC_CONVERTER: {
1018 string from, to, command, flags;
1020 from = lexrc.getString();
1023 to = lexrc.getString();
1026 command = lexrc.getString();
1029 flags = lexrc.getString();
1031 if (command.empty()) {
1032 theConverters().erase(from, to);
1034 theConverters().add(from, to, command, flags);
1038 // compatibility with versions older than 1.4.0 only
1040 string format, command;
1042 format = lexrc.getString();
1045 command = lexrc.getString();
1047 formats.setViewer(format, command);
1051 string format, extension, prettyname, shortcut;
1053 format = lexrc.getString();
1056 extension = lexrc.getString();
1059 prettyname = lexrc.getString();
1062 shortcut = lexrc.getString();
1064 string viewer, editor;
1066 viewer = lexrc.getString();
1068 editor = lexrc.getString();
1070 // Hack to ensure compatibility with versions older
1072 int le = lexrc.lex();
1073 if (le != Lexer::LEX_FEOF && le != Lexer::LEX_UNDEF) {
1074 flags = lexrc.getString();
1075 if (le != Lexer::LEX_DATA) {
1076 // We have got a known token.
1077 // Therefore this is an old style
1078 // format definition without
1080 lexrc.pushToken(flags);
1084 int flgs = Format::none;
1085 while (!flags.empty()) {
1087 flags = support::split(flags, flag, ',');
1088 if (flag == "document")
1089 flgs |= Format::document;
1090 else if (flag == "vector")
1091 flgs |= Format::vector;
1093 lyxerr << "Ignoring unknown flag `"
1094 << flag << "' for format `"
1095 << format << "'." << endl;
1097 if (prettyname.empty()) {
1098 if (theConverters().formatIsUsed(format)) {
1099 lyxerr << "Can't delete format "
1102 formats.erase(format);
1105 formats.add(format, extension, prettyname,
1106 shortcut, viewer, editor, flgs);
1110 case RC_DEFAULT_LANGUAGE:
1112 default_language = lexrc.getString();
1116 case RC_LABEL_INIT_LENGTH:
1118 label_init_length = lexrc.getInteger();
1122 case RC_SHOW_BANNER:
1124 show_banner = lexrc.getBool();
1130 string const tmp = lexrc.getString();
1131 if (tmp == "true" || tmp == "on")
1132 preview = PREVIEW_ON;
1133 else if (tmp == "no_math")
1134 preview = PREVIEW_NO_MATH;
1136 preview = PREVIEW_OFF;
1137 if (tmp != "false" && tmp != "off")
1138 lyxerr << "Unrecognized "
1140 << tmp << '\n' << endl;
1145 case RC_PREVIEW_HASHED_LABELS:
1147 preview_hashed_labels = lexrc.getBool();
1151 case RC_PREVIEW_SCALE_FACTOR:
1153 preview_scale_factor = lexrc.getString();
1159 user_name = lexrc.getString();
1164 user_email = lexrc.getString();
1167 case RC_PATH_PREFIX:
1169 path_prefix = lexrc.getString();
1172 case RC_USE_CONVERTER_CACHE:
1174 use_converter_cache = lexrc.getBool();
1177 case RC_CONVERTER_CACHE_MAXAGE:
1179 converter_cache_maxage =
1180 convert<unsigned int>(lexrc.getString());
1183 case RC_SORT_LAYOUTS:
1185 sort_layouts = lexrc.getBool();
1188 case RC_LAST: break; // this is just a dummy
1192 /// Update converters data-structures
1193 theConverters().update(formats);
1194 theConverters().buildGraph();
1200 void LyXRC::write(FileName const & filename, bool ignore_system_lyxrc) const
1202 ofstream ofs(filename.toFilesystemEncoding().c_str());
1204 write(ofs, ignore_system_lyxrc);
1208 void LyXRC::print() const
1210 if (lyxerr.debugging())
1211 write(lyxerr, false);
1219 typedef std::pair<std::string, SpecialisedMover> Data;
1221 SameMover(Data const & comparison)
1222 : comparison_(comparison) {}
1224 bool operator()(Data const & data) const
1226 return data.first == comparison_.first &&
1227 data.second.command() == comparison_.second.command();
1235 void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) const
1237 LyXRCTags tag = RC_LAST;
1239 if (!name.empty()) {
1240 for (int i = 0; i != lyxrcCount; ++i)
1241 if ("\\" + name == lyxrcTags[i].tag)
1242 tag = static_cast<LyXRCTags>(lyxrcTags[i].code);
1246 os << "### This file is part of\n"
1247 << "### ========================================================\n"
1248 << "### LyX, The Document Processor\n"
1250 << "### Copyright 1995 Matthias Ettrich\n"
1251 << "### Copyright 1995-2007 The LyX Team.\n"
1253 << "### ========================================================\n"
1255 << "# This file is written by LyX, if you want to make your own\n"
1256 << "# modifications you should do them from inside LyX and save\n"
1259 // Why the switch you might ask. It is a trick to ensure that all
1260 // the elements in the LyXRCTags enum is handled. As you can see
1261 // there are no breaks at all. So it is just a huge fall-through.
1262 // The nice thing is that we will get a warning from the compiler
1263 // if we forget an element.
1267 // input/include files are not done here
1269 if (ignore_system_lyxrc ||
1270 bind_file != system_lyxrc.bind_file) {
1271 string const path = os::external_path(bind_file);
1272 os << "\\bind_file \"" << path << "\"\n";
1278 if (ignore_system_lyxrc ||
1279 def_file != system_lyxrc.def_file) {
1280 string const path = os::external_path(def_file);
1281 os << "\\def_file \"" << path << "\"\n";
1290 << "# MISC SECTION ######################################\n"
1292 // bind files are not done here.
1294 case RC_PATH_PREFIX:
1295 if (ignore_system_lyxrc ||
1296 path_prefix != system_lyxrc.path_prefix) {
1297 os << "\\path_prefix \"" << path_prefix << "\"\n";
1302 if (ignore_system_lyxrc ||
1303 ui_file != system_lyxrc.ui_file) {
1304 string const path = os::external_path(ui_file);
1305 os << "\\ui_file \"" << path << "\"\n";
1309 case RC_AUTOREGIONDELETE:
1310 if (ignore_system_lyxrc ||
1311 auto_region_delete != system_lyxrc.auto_region_delete) {
1312 os << "# Set to false to inhibit automatic replacement of\n"
1313 << "# the current selection.\n"
1314 << "\\auto_region_delete " << convert<string>(auto_region_delete)
1319 case RC_AUTORESET_OPTIONS:
1320 if (ignore_system_lyxrc ||
1321 auto_reset_options != system_lyxrc.auto_reset_options) {
1322 os << "# Set to false to inhibit automatic reset of\n"
1323 << "# the class options to defaults on class change.\n"
1324 << "\\auto_reset_options "
1325 << convert<string>(auto_reset_options)
1331 if (ignore_system_lyxrc ||
1332 autosave != system_lyxrc.autosave) {
1333 os << "# The time interval between auto-saves in seconds.\n"
1334 << "\\autosave " << autosave << '\n';
1338 case RC_DISPLAY_GRAPHICS:
1339 if (ignore_system_lyxrc ||
1340 display_graphics != system_lyxrc.display_graphics) {
1341 os << "# Display graphics within LyX\n"
1342 << "# monochrome|grayscale|color|none\n"
1343 << "\\display_graphics "
1344 << graphics::displayTranslator().find(
1345 graphics::DisplayType(display_graphics))
1350 case RC_SORT_LAYOUTS:
1351 if (ignore_system_lyxrc ||
1352 sort_layouts != system_lyxrc.sort_layouts) {
1353 os << "# Sort layouts alphabetically.\n"
1354 << "\\sort_layouts " << convert<string>(sort_layouts) << '\n';
1358 case RC_VIEWDVI_PAPEROPTION:
1359 if (ignore_system_lyxrc ||
1360 view_dvi_paper_option
1361 != system_lyxrc.view_dvi_paper_option) {
1362 os << "# Options used to specify paper size to the\n"
1363 << "# view_dvi_command (e.g. -paper)\n"
1364 << "\\view_dvi_paper_option \""
1365 << view_dvi_paper_option << "\"\n";
1369 case RC_DEFAULT_PAPERSIZE:
1370 if (ignore_system_lyxrc ||
1371 default_papersize != system_lyxrc.default_papersize) {
1372 os << "# The default papersize to use.\n"
1373 << "\\default_papersize \"";
1374 switch (default_papersize) {
1376 os << "default"; break;
1377 case PAPER_USLETTER:
1378 os << "usletter"; break;
1380 os << "legal"; break;
1381 case PAPER_USEXECUTIVE:
1382 os << "executive"; break;
1393 case PAPER_B4: break;
1399 case RC_CHKTEX_COMMAND:
1400 if (ignore_system_lyxrc ||
1401 chktex_command != system_lyxrc.chktex_command) {
1402 os << "\\chktex_command \"" << chktex_command << "\"\n";
1406 case RC_BIBTEX_COMMAND:
1407 if (ignore_system_lyxrc ||
1408 bibtex_command != system_lyxrc.bibtex_command) {
1409 os << "\\bibtex_command \"" << bibtex_command << "\"\n";
1413 case RC_INDEX_COMMAND:
1414 if (ignore_system_lyxrc ||
1415 index_command != system_lyxrc.index_command) {
1416 os << "\\index_command \"" << index_command << "\"\n";
1420 case RC_TEX_EXPECTS_WINDOWS_PATHS:
1421 if (ignore_system_lyxrc ||
1422 windows_style_tex_paths != system_lyxrc.windows_style_tex_paths) {
1423 os << "\\tex_expects_windows_paths "
1424 << convert<string>(windows_style_tex_paths) << '\n';
1428 case RC_TEX_ALLOWS_SPACES:
1429 if (tex_allows_spaces != system_lyxrc.tex_allows_spaces) {
1430 os << "\\tex_allows_spaces "
1431 << convert<string>(tex_allows_spaces) << '\n';
1436 if (ignore_system_lyxrc ||
1437 use_kbmap != system_lyxrc.use_kbmap) {
1438 os << "\\kbmap " << convert<string>(use_kbmap) << '\n';
1442 case RC_KBMAP_PRIMARY:
1443 if (ignore_system_lyxrc ||
1444 primary_kbmap != system_lyxrc.primary_kbmap) {
1445 string const path = os::external_path(primary_kbmap);
1446 os << "\\kbmap_primary \"" << path << "\"\n";
1450 case RC_KBMAP_SECONDARY:
1451 if (ignore_system_lyxrc ||
1452 secondary_kbmap != system_lyxrc.secondary_kbmap) {
1453 string const path = os::external_path(secondary_kbmap);
1454 os << "\\kbmap_secondary \"" << path << "\"\n";
1459 if (ignore_system_lyxrc ||
1460 lyxpipes != system_lyxrc.lyxpipes) {
1461 string const path = os::external_path(lyxpipes);
1462 os << "\\serverpipe \"" << path << "\"\n";
1466 case RC_DATE_INSERT_FORMAT:
1467 if (ignore_system_lyxrc ||
1468 date_insert_format != system_lyxrc.date_insert_format) {
1469 os << "\\date_insert_format \"" << date_insert_format
1474 case RC_LABEL_INIT_LENGTH:
1475 if (ignore_system_lyxrc ||
1476 label_init_length != system_lyxrc.label_init_length) {
1477 os << "\\label_init_length " << label_init_length
1484 os << "\\user_name \"" << user_name << "\"\n";
1489 os << "\\user_email \"" << user_email << "\"\n";
1493 case RC_SHOW_BANNER:
1494 if (ignore_system_lyxrc ||
1495 show_banner != system_lyxrc.show_banner) {
1496 os << "\\show_banner " << convert<string>(show_banner) << '\n';
1502 if (ignore_system_lyxrc ||
1503 preview != system_lyxrc.preview) {
1509 case PREVIEW_NO_MATH:
1516 os << "\\preview " << status << '\n';
1521 case RC_PREVIEW_HASHED_LABELS:
1522 if (ignore_system_lyxrc ||
1523 preview_hashed_labels !=
1524 system_lyxrc.preview_hashed_labels) {
1525 os << "\\preview_hashed_labels "
1526 << convert<string>(preview_hashed_labels) << '\n';
1531 case RC_PREVIEW_SCALE_FACTOR:
1532 if (ignore_system_lyxrc ||
1533 preview_scale_factor != system_lyxrc.preview_scale_factor) {
1534 os << "\\preview_scale_factor "
1535 << preview_scale_factor << '\n';
1540 case RC_USE_CONVERTER_CACHE:
1541 if (ignore_system_lyxrc ||
1542 use_converter_cache != system_lyxrc.use_converter_cache) {
1543 os << "\\use_converter_cache "
1544 << convert<string>(use_converter_cache) << '\n';
1549 case RC_CONVERTER_CACHE_MAXAGE:
1550 if (ignore_system_lyxrc ||
1551 converter_cache_maxage != system_lyxrc.converter_cache_maxage) {
1552 os << "\\converter_cache_maxage "
1553 << converter_cache_maxage << '\n';
1559 << "# SCREEN & FONTS SECTION ############################\n"
1563 if (ignore_system_lyxrc ||
1564 dpi != system_lyxrc.dpi) {
1565 os << "\\screen_dpi " << dpi << '\n';
1569 case RC_SCREEN_ZOOM:
1570 if (ignore_system_lyxrc ||
1571 zoom != system_lyxrc.zoom) {
1572 os << "\\screen_zoom " << zoom << '\n';
1576 case RC_SCREEN_GEOMETRY_HEIGHT:
1577 if (ignore_system_lyxrc ||
1578 geometry_height != system_lyxrc.geometry_height) {
1579 os << "\\screen_geometry_height " << geometry_height
1584 case RC_SCREEN_GEOMETRY_WIDTH:
1585 if (ignore_system_lyxrc ||
1586 geometry_width != system_lyxrc.geometry_width) {
1587 os << "\\screen_geometry_width " << geometry_width
1592 case RC_SCREEN_GEOMETRY_XYSAVED:
1593 if (ignore_system_lyxrc ||
1594 geometry_xysaved != system_lyxrc.geometry_xysaved) {
1595 os << "\\screen_geometry_xysaved " << convert<string>(geometry_xysaved)
1600 case RC_CURSOR_FOLLOWS_SCROLLBAR:
1601 if (ignore_system_lyxrc ||
1602 cursor_follows_scrollbar
1603 != system_lyxrc.cursor_follows_scrollbar) {
1604 os << "\\cursor_follows_scrollbar "
1605 << convert<string>(cursor_follows_scrollbar) << '\n';
1609 case RC_DIALOGS_ICONIFY_WITH_MAIN:
1610 if (ignore_system_lyxrc ||
1611 dialogs_iconify_with_main
1612 != system_lyxrc.dialogs_iconify_with_main) {
1613 os << "\\dialogs_iconify_with_main "
1614 << convert<string>(dialogs_iconify_with_main) << '\n';
1618 case RC_SCREEN_FONT_ROMAN:
1619 if (ignore_system_lyxrc ||
1620 roman_font_name != system_lyxrc.roman_font_name) {
1621 os << "\\screen_font_roman \"" << roman_font_name
1626 case RC_SCREEN_FONT_ROMAN_FOUNDRY:
1627 if (ignore_system_lyxrc ||
1628 roman_font_foundry != system_lyxrc.roman_font_foundry) {
1629 os << "\\screen_font_roman_foundry \"" << roman_font_foundry
1634 case RC_SCREEN_FONT_SANS:
1635 if (ignore_system_lyxrc ||
1636 sans_font_name != system_lyxrc.sans_font_name) {
1637 os << "\\screen_font_sans \"" << sans_font_name
1642 case RC_SCREEN_FONT_SANS_FOUNDRY:
1643 if (ignore_system_lyxrc ||
1644 sans_font_foundry != system_lyxrc.sans_font_foundry) {
1645 os << "\\screen_font_sans_foundry \"" << sans_font_foundry
1650 case RC_SCREEN_FONT_TYPEWRITER:
1651 if (ignore_system_lyxrc ||
1652 typewriter_font_name != system_lyxrc.typewriter_font_name) {
1653 os << "\\screen_font_typewriter \""
1654 << typewriter_font_name << "\"\n";
1658 case RC_SCREEN_FONT_TYPEWRITER_FOUNDRY:
1659 if (ignore_system_lyxrc ||
1660 typewriter_font_foundry != system_lyxrc.typewriter_font_foundry) {
1661 os << "\\screen_font_typewriter_foundry \""
1662 << typewriter_font_foundry << "\"\n";
1667 case RC_SCREEN_FONT_SCALABLE:
1668 if (ignore_system_lyxrc ||
1669 use_scalable_fonts != system_lyxrc.use_scalable_fonts) {
1670 os << "\\screen_font_scalable "
1671 << convert<string>(use_scalable_fonts)
1676 case RC_SCREEN_FONT_SIZES:
1677 if (ignore_system_lyxrc ||
1678 font_sizes[FONT_SIZE_TINY]
1679 != system_lyxrc.font_sizes[FONT_SIZE_TINY] ||
1680 font_sizes[FONT_SIZE_SCRIPT]
1681 != system_lyxrc.font_sizes[FONT_SIZE_SCRIPT] ||
1682 font_sizes[FONT_SIZE_FOOTNOTE]
1683 != system_lyxrc.font_sizes[FONT_SIZE_FOOTNOTE] ||
1684 font_sizes[FONT_SIZE_SMALL]
1685 != system_lyxrc.font_sizes[FONT_SIZE_SMALL] ||
1686 font_sizes[FONT_SIZE_NORMAL]
1687 != system_lyxrc.font_sizes[FONT_SIZE_NORMAL] ||
1688 font_sizes[FONT_SIZE_LARGE]
1689 != system_lyxrc.font_sizes[FONT_SIZE_LARGE] ||
1690 font_sizes[FONT_SIZE_LARGER]
1691 != system_lyxrc.font_sizes[FONT_SIZE_LARGER] ||
1692 font_sizes[FONT_SIZE_LARGEST]
1693 != system_lyxrc.font_sizes[FONT_SIZE_LARGEST] ||
1694 font_sizes[FONT_SIZE_HUGE]
1695 != system_lyxrc.font_sizes[FONT_SIZE_HUGE] ||
1696 font_sizes[FONT_SIZE_HUGER]
1697 != system_lyxrc.font_sizes[FONT_SIZE_HUGER]) {
1698 os.setf(ios::fixed);
1700 os << "\\screen_font_sizes"
1701 << ' ' << font_sizes[FONT_SIZE_TINY]
1702 << ' ' << font_sizes[FONT_SIZE_SCRIPT]
1703 << ' ' << font_sizes[FONT_SIZE_FOOTNOTE]
1704 << ' ' << font_sizes[FONT_SIZE_SMALL]
1705 << ' ' << font_sizes[FONT_SIZE_NORMAL]
1706 << ' ' << font_sizes[FONT_SIZE_LARGE]
1707 << ' ' << font_sizes[FONT_SIZE_LARGER]
1708 << ' ' << font_sizes[FONT_SIZE_LARGEST]
1709 << ' ' << font_sizes[FONT_SIZE_HUGE]
1710 << ' ' << font_sizes[FONT_SIZE_HUGER]
1717 << "# COLOR SECTION ###################################\n"
1721 for (int i = 0; i < Color_ignore; ++i) {
1722 ColorCode lc = static_cast<ColorCode>(i);
1724 string const col(lcolor.getX11Name(lc));
1725 if (ignore_system_lyxrc ||
1726 col != system_lcolor.getX11Name(lc)) {
1727 os << "\\set_color \""
1728 << lcolor.getLyXName(lc) << "\" \""
1736 << "# PRINTER SECTION ###################################\n"
1740 if (ignore_system_lyxrc ||
1741 printer != system_lyxrc.printer) {
1742 os << "\\printer \"" << printer << "\"\n";
1746 case RC_PRINT_ADAPTOUTPUT:
1747 if (ignore_system_lyxrc ||
1748 print_adapt_output != system_lyxrc.print_adapt_output) {
1749 os << "\\print_adapt_output "
1750 << convert<string>(print_adapt_output)
1755 case RC_PRINT_COMMAND:
1756 if (ignore_system_lyxrc ||
1757 print_command != system_lyxrc.print_command) {
1758 os << "\\print_command \"" << print_command << "\"\n";
1762 case RC_PRINTEXSTRAOPTIONS:
1763 if (ignore_system_lyxrc ||
1764 print_extra_options != system_lyxrc.print_extra_options) {
1765 os << "\\print_extra_options \"" << print_extra_options
1770 case RC_PRINTSPOOL_COMMAND:
1771 if (ignore_system_lyxrc ||
1772 print_spool_command != system_lyxrc.print_spool_command) {
1773 os << "\\print_spool_command \"" << print_spool_command
1778 case RC_PRINTSPOOL_PRINTERPREFIX:
1779 if (ignore_system_lyxrc ||
1780 print_spool_printerprefix
1781 != system_lyxrc.print_spool_printerprefix) {
1782 os << "\\print_spool_printerprefix \""
1783 << print_spool_printerprefix << "\"\n";
1787 case RC_PRINTEVENPAGEFLAG:
1788 if (ignore_system_lyxrc ||
1789 print_evenpage_flag != system_lyxrc.print_evenpage_flag) {
1790 os << "\\print_evenpage_flag \"" << print_evenpage_flag
1795 case RC_PRINTODDPAGEFLAG:
1796 if (ignore_system_lyxrc ||
1797 print_oddpage_flag != system_lyxrc.print_oddpage_flag) {
1798 os << "\\print_oddpage_flag \"" << print_oddpage_flag
1803 case RC_PRINTREVERSEFLAG:
1804 if (ignore_system_lyxrc ||
1805 print_reverse_flag != system_lyxrc.print_reverse_flag) {
1806 os << "\\print_reverse_flag \"" << print_reverse_flag
1811 case RC_PRINTLANDSCAPEFLAG:
1812 if (ignore_system_lyxrc ||
1813 print_landscape_flag != system_lyxrc.print_landscape_flag) {
1814 os << "\\print_landscape_flag \"" << print_landscape_flag
1819 case RC_PRINTPAGERANGEFLAG:
1820 if (ignore_system_lyxrc ||
1821 print_pagerange_flag != system_lyxrc.print_pagerange_flag) {
1822 os << "\\print_pagerange_flag \"" << print_pagerange_flag
1827 case RC_PRINTCOPIESFLAG:
1828 if (ignore_system_lyxrc ||
1829 print_copies_flag != system_lyxrc.print_copies_flag) {
1830 os << "\\print_copies_flag \"" << print_copies_flag
1835 case RC_PRINTCOLLCOPIESFLAG:
1836 if (ignore_system_lyxrc ||
1837 print_collcopies_flag
1838 != system_lyxrc.print_collcopies_flag) {
1839 os << "\\print_collcopies_flag \""
1840 << print_collcopies_flag
1845 case RC_PRINTPAPERFLAG:
1846 if (ignore_system_lyxrc ||
1847 print_paper_flag != system_lyxrc.print_paper_flag) {
1848 os << "\\print_paper_flag \"" << print_paper_flag
1853 case RC_PRINTPAPERDIMENSIONFLAG:
1854 if (ignore_system_lyxrc ||
1855 print_paper_dimension_flag
1856 != system_lyxrc.print_paper_dimension_flag) {
1857 os << "\\print_paper_dimension_flag \""
1858 << print_paper_dimension_flag << "\"\n";
1862 case RC_PRINTTOPRINTER:
1863 if (ignore_system_lyxrc ||
1864 print_to_printer != system_lyxrc.print_to_printer) {
1865 os << "\\print_to_printer \"" << print_to_printer
1870 case RC_PRINTTOFILE:
1871 if (ignore_system_lyxrc ||
1872 print_to_file != system_lyxrc.print_to_file) {
1873 string const path = os::external_path(print_to_file);
1874 os << "\\print_to_file \"" << path << "\"\n";
1878 case RC_PRINTFILEEXTENSION:
1879 if (ignore_system_lyxrc ||
1880 print_file_extension != system_lyxrc.print_file_extension) {
1881 os << "\\print_file_extension \""
1882 << print_file_extension
1889 << "# EXPORT SECTION ####################################\n"
1892 case RC_CUSTOM_EXPORT_COMMAND:
1893 if (ignore_system_lyxrc ||
1894 custom_export_command
1895 != system_lyxrc.custom_export_command) {
1896 os << "\\custom_export_command \""
1897 << custom_export_command
1902 case RC_CUSTOM_EXPORT_FORMAT:
1903 if (ignore_system_lyxrc ||
1904 custom_export_format
1905 != system_lyxrc.custom_export_format) {
1906 os << "\\custom_export_format \"" << custom_export_format
1913 << "# TEX SECTION #######################################\n"
1916 case RC_FONT_ENCODING:
1917 if (ignore_system_lyxrc ||
1918 fontenc != system_lyxrc.fontenc) {
1919 os << "\\font_encoding \"" << fontenc << "\"\n";
1925 << "# FILE SECTION ######################################\n"
1928 case RC_DOCUMENTPATH:
1929 if (ignore_system_lyxrc ||
1930 document_path != system_lyxrc.document_path) {
1931 string const path = os::external_path(document_path);
1932 os << "\\document_path \"" << path << "\"\n";
1936 case RC_USELASTFILEPOS:
1937 if (ignore_system_lyxrc ||
1938 use_lastfilepos != system_lyxrc.use_lastfilepos) {
1939 os << "\\use_lastfilepos " << convert<string>(use_lastfilepos)
1944 case RC_LOADSESSION:
1945 if (ignore_system_lyxrc ||
1946 load_session != system_lyxrc.load_session) {
1947 os << "\\load_session " << convert<string>(load_session)
1952 case RC_NUMLASTFILES:
1953 if (ignore_system_lyxrc ||
1954 num_lastfiles != system_lyxrc.num_lastfiles) {
1955 os << "\\num_lastfiles " << num_lastfiles << '\n';
1959 case RC_CHECKLASTFILES:
1960 if (ignore_system_lyxrc ||
1961 check_lastfiles != system_lyxrc.check_lastfiles) {
1962 os << "\\check_lastfiles " << convert<string>(check_lastfiles)
1967 case RC_TEMPLATEPATH:
1968 if (ignore_system_lyxrc ||
1969 template_path != system_lyxrc.template_path) {
1970 string const path = os::external_path(template_path);
1971 os << "\\template_path \"" << path << "\"\n";
1975 case RC_TEMPDIRPATH:
1976 if (ignore_system_lyxrc ||
1977 tempdir_path != system_lyxrc.tempdir_path) {
1978 string const path = os::external_path(tempdir_path);
1979 os << "\\tempdir_path \"" << path << "\"\n";
1987 case RC_PLAINTEXT_LINELEN:
1988 if (ignore_system_lyxrc ||
1989 plaintext_linelen != system_lyxrc.plaintext_linelen) {
1990 os << "\\plaintext_linelen " << plaintext_linelen << '\n';
1994 case RC_MAKE_BACKUP:
1995 if (ignore_system_lyxrc ||
1996 make_backup != system_lyxrc.make_backup) {
1997 os << "\\make_backup " << convert<string>(make_backup) << '\n';
2001 case RC_BACKUPDIR_PATH:
2002 if (ignore_system_lyxrc ||
2003 backupdir_path != system_lyxrc.backupdir_path) {
2004 string const path = os::external_path(backupdir_path);
2005 os << "\\backupdir_path \"" << path << "\"\n";
2011 << "# PLAIN TEXT EXPORT SECTION ##############################\n"
2014 case RC_PLAINTEXT_ROFF_COMMAND:
2015 if (ignore_system_lyxrc ||
2016 plaintext_roff_command != system_lyxrc.plaintext_roff_command) {
2017 os << "\\plaintext_roff_command \"" << plaintext_roff_command
2024 << "# SPELLCHECKER SECTION ##############################\n"
2026 case RC_USE_SPELL_LIB:
2027 if (ignore_system_lyxrc ||
2028 use_spell_lib != system_lyxrc.use_spell_lib) {
2029 os << "\\use_spell_lib " << convert<string>(use_spell_lib) << '\n';
2033 case RC_SPELL_COMMAND:
2034 if (ignore_system_lyxrc ||
2035 isp_command != system_lyxrc.isp_command) {
2036 os << "\\spell_command \"" << isp_command << "\"\n";
2040 case RC_ACCEPT_COMPOUND:
2041 if (ignore_system_lyxrc ||
2042 isp_accept_compound != system_lyxrc.isp_accept_compound) {
2043 os << "\\accept_compound " << convert<string>(isp_accept_compound)
2048 case RC_USE_ALT_LANG:
2049 if (ignore_system_lyxrc ||
2050 isp_use_alt_lang != system_lyxrc.isp_use_alt_lang) {
2051 os << "\\use_alt_language " << convert<string>(isp_use_alt_lang)
2057 if (ignore_system_lyxrc ||
2058 isp_alt_lang != system_lyxrc.isp_alt_lang) {
2059 os << "\\alternate_language \"" << isp_alt_lang
2064 case RC_USE_ESC_CHARS:
2065 if (ignore_system_lyxrc ||
2066 isp_use_esc_chars != system_lyxrc.isp_use_esc_chars) {
2067 os << "\\use_escape_chars " << convert<string>(isp_use_esc_chars)
2073 if (ignore_system_lyxrc ||
2074 isp_esc_chars != system_lyxrc.isp_esc_chars) {
2075 os << "\\escape_chars \"" << isp_esc_chars << "\"\n";
2079 case RC_USE_PERS_DICT:
2080 if (ignore_system_lyxrc ||
2081 isp_use_pers_dict != system_lyxrc.isp_use_pers_dict) {
2082 os << "\\use_personal_dictionary "
2083 << convert<string>(isp_use_pers_dict)
2088 case RC_USE_PIXMAP_CACHE:
2089 if (ignore_system_lyxrc ||
2090 use_pixmap_cache != system_lyxrc.use_pixmap_cache) {
2091 os << "\\use_pixmap_cache "
2092 << convert<string>(use_pixmap_cache)
2096 if (isp_pers_dict != system_lyxrc.isp_pers_dict) {
2097 string const path = os::external_path(isp_pers_dict);
2098 os << "\\personal_dictionary \"" << path << "\"\n";
2102 case RC_USE_INP_ENC:
2103 if (ignore_system_lyxrc ||
2104 isp_use_input_encoding
2105 != system_lyxrc.isp_use_input_encoding) {
2106 os << "\\use_input_encoding "
2107 << convert<string>(isp_use_input_encoding)
2114 << "# LANGUAGE SUPPORT SECTION ##########################\n"
2117 case RC_RTL_SUPPORT:
2118 if (ignore_system_lyxrc ||
2119 rtl_support != system_lyxrc.rtl_support) {
2120 os << "\\rtl " << convert<string>(rtl_support) << '\n';
2124 case RC_LANGUAGE_PACKAGE:
2125 if (ignore_system_lyxrc ||
2126 language_package != system_lyxrc.language_package) {
2127 os << "\\language_package \"" << language_package
2132 case RC_LANGUAGE_GLOBAL_OPTIONS:
2133 if (ignore_system_lyxrc ||
2134 language_global_options
2135 != system_lyxrc.language_global_options) {
2136 os << "\\language_global_options \""
2137 << convert<string>(language_global_options)
2142 case RC_LANGUAGE_USE_BABEL:
2143 if (ignore_system_lyxrc ||
2144 language_use_babel != system_lyxrc.language_use_babel) {
2145 os << "\\language_use_babel \""
2146 << convert<string>(language_use_babel)
2151 case RC_LANGUAGE_COMMAND_BEGIN:
2152 if (ignore_system_lyxrc ||
2153 language_command_begin
2154 != system_lyxrc.language_command_begin) {
2155 os << "\\language_command_begin \""
2156 << language_command_begin
2161 case RC_LANGUAGE_COMMAND_END:
2162 if (ignore_system_lyxrc ||
2163 language_command_end
2164 != system_lyxrc.language_command_end) {
2165 os << "\\language_command_end \"" << language_command_end
2170 case RC_LANGUAGE_COMMAND_LOCAL:
2171 if (ignore_system_lyxrc ||
2172 language_command_local
2173 != system_lyxrc.language_command_local) {
2174 os << "\\language_command_local \""
2175 << language_command_local
2180 case RC_LANGUAGE_AUTO_BEGIN:
2181 if (ignore_system_lyxrc ||
2182 language_auto_begin != system_lyxrc.language_auto_begin) {
2183 os << "\\language_auto_begin "
2184 << convert<string>(language_auto_begin) << '\n';
2188 case RC_LANGUAGE_AUTO_END:
2189 if (ignore_system_lyxrc ||
2190 language_auto_end != system_lyxrc.language_auto_end) {
2191 os << "\\language_auto_end "
2192 << convert<string>(language_auto_end) << '\n';
2196 case RC_MARK_FOREIGN_LANGUAGE:
2197 if (ignore_system_lyxrc ||
2198 mark_foreign_language
2199 != system_lyxrc.mark_foreign_language) {
2200 os << "\\mark_foreign_language " <<
2201 convert<string>(mark_foreign_language) << '\n';
2207 << "# 2nd MISC SUPPORT SECTION ##########################\n"
2210 case RC_AUTO_NUMBER:
2211 if (ignore_system_lyxrc ||
2212 auto_number != system_lyxrc.auto_number) {
2213 os << "\\auto_number " << convert<string>(auto_number) << '\n';
2217 case RC_DEFAULT_LANGUAGE:
2218 if (ignore_system_lyxrc ||
2219 default_language != system_lyxrc.default_language) {
2220 os << "\\default_language " << default_language << '\n';
2226 << "# FORMATS SECTION ##########################\n"
2230 // New/modified formats
2231 for (Formats::const_iterator cit = formats.begin();
2232 cit != formats.end(); ++cit) {
2233 Format const * format =
2234 system_formats.getFormat(cit->name());
2236 format->extension() != cit->extension() ||
2237 format->prettyname() != cit->prettyname() ||
2238 format->shortcut() != cit->shortcut() ||
2239 format->viewer() != cit->viewer() ||
2240 format->editor() != cit->editor() ||
2241 format->documentFormat() != cit->documentFormat() ||
2242 format->vectorFormat() != cit->vectorFormat()) {
2243 os << "\\format \"" << cit->name() << "\" \""
2244 << cit->extension() << "\" \""
2245 << cit->prettyname() << "\" \""
2246 << cit->shortcut() << "\" \""
2247 << cit->viewer() << "\" \""
2248 << cit->editor() << "\" \"";
2249 std::vector<string> flags;
2250 if (cit->documentFormat())
2251 flags.push_back("document");
2252 if (cit->vectorFormat())
2253 flags.push_back("vector");
2254 os << support::getStringFromVector(flags);
2259 // Look for deleted formats
2260 for (Formats::const_iterator cit = system_formats.begin();
2261 cit != system_formats.end(); ++cit)
2262 if (!formats.getFormat(cit->name()))
2263 os << "\\format \"" << cit->name()
2264 << "\" \"\" \"\" \"\" \"\" \"\" \"\"\n";
2273 << "# CONVERTERS SECTION ##########################\n"
2277 // Look for new converters
2278 for (Converters::const_iterator cit = theConverters().begin();
2279 cit != theConverters().end(); ++cit) {
2280 Converter const * converter =
2281 theSystemConverters().getConverter(cit->from,
2284 converter->command != cit->command ||
2285 converter->flags != cit->flags)
2286 os << "\\converter \"" << cit->from << "\" \""
2287 << cit->to << "\" \""
2288 << cit->command << "\" \""
2289 << cit->flags << "\"\n";
2292 // New/modifed converters
2293 for (Converters::const_iterator cit = theSystemConverters().begin();
2294 cit != theSystemConverters().end(); ++cit)
2295 if (!theConverters().getConverter(cit->from, cit->to))
2296 os << "\\converter \"" << cit->from
2297 << "\" \"" << cit->to << "\" \"\" \"\"\n";
2304 << "# COPIERS SECTION ##########################\n"
2307 // Look for new movers
2308 Movers::const_iterator const sysbegin = theSystemMovers().begin();
2309 Movers::const_iterator const sysend = theSystemMovers().end();
2310 Movers::const_iterator it = theMovers().begin();
2311 Movers::const_iterator end = theMovers().end();
2313 for (; it != end; ++it) {
2314 Movers::const_iterator const sysit =
2315 std::find_if(sysbegin, sysend, SameMover(*it));
2316 if (sysit == sysend) {
2317 std::string const & fmt = it->first;
2318 std::string const & command =
2319 it->second.command();
2321 os << "\\copier " << fmt
2322 << " \"" << command << "\"\n";
2328 // We don't actually delete SpecialisedMover(s) from the
2329 // map, just clear their 'command', so there's no need
2330 // to test for anything else.
2338 string const LyXRC::getDescription(LyXRCTags tag)
2343 case RC_ACCEPT_COMPOUND:
2344 str = _("Consider run-together words, such as \"diskdrive\" for \"disk drive\", as legal words?");
2348 case RC_USE_ALT_LANG:
2349 str = _("Specify an alternate language. The default is to use the language of the document.");
2352 case RC_PLAINTEXT_ROFF_COMMAND:
2353 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.");
2356 case RC_PLAINTEXT_LINELEN:
2357 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.");
2360 case RC_AUTOREGIONDELETE:
2361 str = _("De-select if you don't want the current selection to be replaced automatically by what you type.");
2364 case RC_AUTORESET_OPTIONS:
2365 str = _("De-select if you don't want the class options to be reset to defaults after class change.");
2369 str = _("The time interval between auto-saves (in seconds). 0 means no auto-save.");
2372 case RC_AUTO_NUMBER:
2375 case RC_BACKUPDIR_PATH:
2376 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.");
2379 case RC_BIBTEX_COMMAND:
2380 str = _("Define the options of bibtex (cf. man bibtex) or select an alternative compiler (e.g. mlbibtex or bibulus).");
2384 str = _("Keybindings file. Can either specify an absolute path, or LyX will look in its global and local bind/ directories.");
2387 case RC_CHECKLASTFILES:
2388 str = _("Select to check whether the lastfiles still exist.");
2391 case RC_CHKTEX_COMMAND:
2392 str = _("Define how to run chktex. E.g. \"chktex -n11 -n1 -n3 -n6 -n9 -22 -n25 -n30 -n38\" Refer to the ChkTeX documentation.");
2401 case RC_CURSOR_FOLLOWS_SCROLLBAR:
2402 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.");
2405 case RC_CUSTOM_EXPORT_COMMAND:
2408 case RC_CUSTOM_EXPORT_FORMAT:
2411 case RC_DATE_INSERT_FORMAT:
2412 //xgettext:no-c-format
2413 str = _("This accepts the normal strftime formats; see man strftime for full details. E.g.\"%A, %e. %B %Y\".");
2417 //FIXME: fix description.
2418 str = _("Command definition file.");
2421 case RC_DEFAULT_LANGUAGE:
2422 str = _("New documents will be assigned this language.");
2425 case RC_DEFAULT_PAPERSIZE:
2426 str = _("Specify the default paper size.");
2429 case RC_DIALOGS_ICONIFY_WITH_MAIN:
2430 str = _("Iconify the dialogs when the main window is iconified. (Affects only dialogs shown after the change has been made.)");
2433 case RC_DISPLAY_GRAPHICS:
2434 str = _("Select how LyX will display any graphics.");
2437 case RC_DOCUMENTPATH:
2438 str = _("The default path for your documents. An empty value selects the directory LyX was started from.");
2442 case RC_USE_ESC_CHARS:
2443 str = _("Specify additional chars that can be part of a word.");
2446 case RC_FONT_ENCODING:
2447 str = _("The font encoding used for the LaTeX2e fontenc package. T1 is highly recommended for non-English languages.");
2453 case RC_INDEX_COMMAND:
2454 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\".");
2461 case RC_KBMAP_PRIMARY:
2462 case RC_KBMAP_SECONDARY:
2463 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.");
2466 case RC_LABEL_INIT_LENGTH:
2467 str = _("Maximum number of words in the initialization string for a new label");
2470 case RC_LANGUAGE_AUTO_BEGIN:
2471 str = _("Select if a language switching command is needed at the beginning of the document.");
2474 case RC_LANGUAGE_AUTO_END:
2475 str = _("Select if a language switching command is needed at the end of the document.");
2478 case RC_LANGUAGE_COMMAND_BEGIN:
2479 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.");
2482 case RC_LANGUAGE_COMMAND_END:
2483 str = _("The LaTeX command for changing back to the language of the document.");
2486 case RC_LANGUAGE_COMMAND_LOCAL:
2487 str = _("The LaTeX command for local changing of the language.");
2490 case RC_LANGUAGE_GLOBAL_OPTIONS:
2491 str = _("De-select if you don't want the language(s) used as an argument to \\documentclass.");
2494 case RC_LANGUAGE_PACKAGE:
2495 str = _("The LaTeX command for loading the language package. E.g. \"\\usepackage{babel}\", \"\\usepackage{omega}\".");
2498 case RC_LANGUAGE_USE_BABEL:
2499 str = _("De-select if you don't want babel to be used when the language of the document is the default language.");
2502 case RC_USELASTFILEPOS:
2503 str = _("De-select if you do not want LyX to scroll to saved position.");
2506 case RC_LOADSESSION:
2507 str = _("De-select to prevent loading files opened from the last LyX session.");
2510 case RC_MAKE_BACKUP:
2511 str = _("De-select if you don't want LyX to create backup files.");
2514 case RC_MARK_FOREIGN_LANGUAGE:
2515 str = _("Select to control the highlighting of words with a language foreign to that of the document.");
2518 case RC_NUMLASTFILES:
2519 str = bformat(_("Maximal number of lastfiles. Up to %1$d can appear in the file menu."),
2523 case RC_PATH_PREFIX:
2524 str = _("Specify those directories which should be "
2525 "prepended to the PATH environment variable. "
2526 "Use the OS native format.");
2530 case RC_USE_PERS_DICT:
2531 str = _("Specify an alternate personal dictionary file. E.g. \".ispell_english\".");
2535 str = _("Shows a typeset preview of things such as math");
2538 case RC_PREVIEW_HASHED_LABELS:
2539 str = _("Previewed equations will have \"(#)\" labels rather than numbered ones");
2542 case RC_PREVIEW_SCALE_FACTOR:
2543 str = _("Scale the preview size to suit.");
2546 case RC_PRINTCOLLCOPIESFLAG:
2547 str = _("The option for specifying whether the copies should be collated.");
2550 case RC_PRINTCOPIESFLAG:
2551 str = _("The option for specifying the number of copies to print.");
2555 str = _("The default printer to print on. If none is specified, LyX will use the environment variable PRINTER.");
2558 case RC_PRINTEVENPAGEFLAG:
2559 str = _("The option to print only even pages.");
2562 case RC_PRINTEXSTRAOPTIONS:
2563 str = _("Extra options to pass to printing program after everything else, but before the filename of the DVI file to be printed.");
2566 case RC_PRINTFILEEXTENSION:
2567 str = _("Extension of printer program output file. Usually \".ps\".");
2570 case RC_PRINTLANDSCAPEFLAG:
2571 str = _("The option to print out in landscape.");
2574 case RC_PRINTODDPAGEFLAG:
2575 str = _("The option to print only odd pages.");
2578 case RC_PRINTPAGERANGEFLAG:
2579 str = _("The option for specifying a comma-separated list of pages to print.");
2582 case RC_PRINTPAPERDIMENSIONFLAG:
2583 str = _("Option to specify the dimensions of the print paper.");
2586 case RC_PRINTPAPERFLAG:
2587 str = _("The option to specify paper type.");
2590 case RC_PRINTREVERSEFLAG:
2591 str = _("The option to reverse the order of the pages printed.");
2594 case RC_PRINTSPOOL_COMMAND:
2595 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.");
2598 case RC_PRINTSPOOL_PRINTERPREFIX:
2599 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.");
2602 case RC_PRINTTOFILE:
2603 str = _("Option to pass to the print program to print to a file.");
2606 case RC_PRINTTOPRINTER:
2607 str = _("Option to pass to the print program to print on a specific printer.");
2610 case RC_PRINT_ADAPTOUTPUT:
2611 str = _("Select for LyX to pass the name of the destination printer to your print command.");
2614 case RC_PRINT_COMMAND:
2615 str = _("Your favorite print program, e.g. \"dvips\", \"dvilj4\".");
2618 case RC_RTL_SUPPORT:
2619 str = _("Select to enable support of right-to-left languages (e.g. Hebrew, Arabic).");
2623 str = _("DPI (dots per inch) of your monitor is auto-detected by LyX. If that goes wrong, override the setting here.");
2626 case RC_SCREEN_FONT_ROMAN:
2627 case RC_SCREEN_FONT_SANS:
2628 case RC_SCREEN_FONT_TYPEWRITER:
2629 str = _("The screen fonts used to display the text while editing.");
2632 case RC_SCREEN_FONT_ROMAN_FOUNDRY:
2633 case RC_SCREEN_FONT_SANS_FOUNDRY:
2634 case RC_SCREEN_FONT_TYPEWRITER_FOUNDRY:
2637 case RC_SCREEN_FONT_SCALABLE:
2638 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.");
2641 case RC_SCREEN_FONT_SIZES:
2642 str = _("The font sizes used for calculating the scaling of the screen fonts.");
2645 case RC_SCREEN_ZOOM:
2646 //xgettext:no-c-format
2647 str = _("The zoom percentage for screen fonts. A setting of 100% will make the fonts roughly the same size as on paper.");
2650 case RC_SCREEN_GEOMETRY_HEIGHT:
2651 case RC_SCREEN_GEOMETRY_WIDTH:
2652 str = _("Specify geometry of the main view in width x height (values from last session will not be used if non-zero values are specified).");
2655 case RC_SCREEN_GEOMETRY_XYSAVED:
2656 str = _("Allow session manager to save and restore windows position.");
2660 str = _("This starts the lyxserver. The pipes get an additional extension \".in\" and \".out\". Only for advanced users.");
2666 case RC_SHOW_BANNER:
2667 str = _("De-select if you don't want the startup banner.");
2670 case RC_SPELL_COMMAND:
2671 str = _("What command runs the spellchecker?");
2674 case RC_TEMPDIRPATH:
2675 str = _("LyX will place its temporary directories in this path. They will be deleted when you quit LyX.");
2678 case RC_TEMPLATEPATH:
2679 str = _("The path that LyX will set when offering to choose a template. An empty value selects the directory LyX was started from.");
2682 case RC_TEX_ALLOWS_SPACES:
2685 case RC_TEX_EXPECTS_WINDOWS_PATHS:
2689 str = _("The UI (user interface) file. Can either specify an absolute path, or LyX will look in its global and local ui/ directories.");
2701 case RC_USE_INP_ENC:
2702 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.");
2705 case RC_USE_PIXMAP_CACHE:
2706 str = _("Enable the pixmap cache that might improve performance on Mac and Windows.");
2709 case RC_USE_SPELL_LIB:
2712 case RC_VIEWDVI_PAPEROPTION:
2713 _("Specify the paper command to DVI viewer (leave empty or use \"-paper\")");
2728 // The global instance
2731 // The global copy of the system lyxrc entries (everything except preferences)