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.
25 #include "converter.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"
43 namespace os = lyx::support::os;
45 using lyx::support::ascii_lowercase;
46 using lyx::support::bformat;
47 using lyx::support::expandPath;
48 using lyx::support::getEnv;
49 using lyx::support::libFileSearch;
50 using lyx::support::token;
63 // when adding something to this array keep it sorted!
64 keyword_item lyxrcTags[] = {
65 { "\\accept_compound", LyXRC::RC_ACCEPT_COMPOUND },
66 { "\\alternate_language", LyXRC::RC_ALT_LANG },
67 { "\\ascii_linelen", LyXRC::RC_ASCII_LINELEN },
68 { "\\ascii_roff_command", LyXRC::RC_ASCIIROFF_COMMAND },
69 { "\\auto_number", LyXRC::RC_AUTO_NUMBER },
70 { "\\auto_region_delete", LyXRC::RC_AUTOREGIONDELETE },
71 { "\\auto_reset_options", LyXRC::RC_AUTORESET_OPTIONS },
72 { "\\autosave", LyXRC::RC_AUTOSAVE },
73 { "\\backupdir_path", LyXRC::RC_BACKUPDIR_PATH },
74 { "\\bibtex_command", LyXRC::RC_BIBTEX_COMMAND },
75 { "\\bind_file", LyXRC::RC_BINDFILE },
76 { "\\check_lastfiles", LyXRC::RC_CHECKLASTFILES },
77 { "\\chktex_command", LyXRC::RC_CHKTEX_COMMAND },
78 { "\\converter", LyXRC::RC_CONVERTER },
79 { "\\copier", LyXRC::RC_COPIER },
80 { "\\cursor_follows_scrollbar", LyXRC::RC_CURSOR_FOLLOWS_SCROLLBAR },
81 { "\\custom_export_command", LyXRC::RC_CUSTOM_EXPORT_COMMAND },
82 { "\\custom_export_format", LyXRC::RC_CUSTOM_EXPORT_FORMAT },
83 { "\\cygwin_path_fix_needed", LyXRC::RC_CYGWIN_PATH_FIX },
84 { "\\date_insert_format", LyXRC::RC_DATE_INSERT_FORMAT },
85 { "\\default_language", LyXRC::RC_DEFAULT_LANGUAGE },
86 { "\\default_papersize", LyXRC::RC_DEFAULT_PAPERSIZE },
87 { "\\dialogs_iconify_with_main", LyXRC::RC_DIALOGS_ICONIFY_WITH_MAIN },
88 { "\\display_graphics", LyXRC::RC_DISPLAY_GRAPHICS },
89 { "\\document_path", LyXRC::RC_DOCUMENTPATH },
90 { "\\escape_chars", LyXRC::RC_ESC_CHARS },
91 { "\\font_encoding", LyXRC::RC_FONT_ENCODING },
92 { "\\format", LyXRC::RC_FORMAT },
93 { "\\index_command", LyXRC::RC_INDEX_COMMAND },
94 { "\\input", LyXRC::RC_INPUT },
95 { "\\kbmap", LyXRC::RC_KBMAP },
96 { "\\kbmap_primary", LyXRC::RC_KBMAP_PRIMARY },
97 { "\\kbmap_secondary", LyXRC::RC_KBMAP_SECONDARY },
98 { "\\label_init_length", LyXRC::RC_LABEL_INIT_LENGTH },
99 { "\\language_auto_begin", LyXRC::RC_LANGUAGE_AUTO_BEGIN },
100 { "\\language_auto_end", LyXRC::RC_LANGUAGE_AUTO_END },
101 { "\\language_command_begin", LyXRC::RC_LANGUAGE_COMMAND_BEGIN },
102 { "\\language_command_end", LyXRC::RC_LANGUAGE_COMMAND_END },
103 { "\\language_command_local", LyXRC::RC_LANGUAGE_COMMAND_LOCAL },
104 { "\\language_global_options", LyXRC::RC_LANGUAGE_GLOBAL_OPTIONS },
105 { "\\language_package", LyXRC::RC_LANGUAGE_PACKAGE },
106 { "\\language_use_babel", LyXRC::RC_LANGUAGE_USE_BABEL },
107 { "\\load_session", LyXRC::RC_LOADSESSION },
108 { "\\make_backup", LyXRC::RC_MAKE_BACKUP },
109 { "\\mark_foreign_language", LyXRC::RC_MARK_FOREIGN_LANGUAGE },
110 { "\\num_lastfiles", LyXRC::RC_NUMLASTFILES },
111 { "\\path_prefix", LyXRC::RC_PATH_PREFIX },
112 { "\\personal_dictionary", LyXRC::RC_PERS_DICT },
113 { "\\popup_bold_font", LyXRC::RC_POPUP_BOLD_FONT },
114 { "\\popup_font_encoding", LyXRC::RC_POPUP_FONT_ENCODING },
115 { "\\popup_normal_font", LyXRC::RC_POPUP_NORMAL_FONT },
116 { "\\preview", LyXRC::RC_PREVIEW },
117 { "\\preview_hashed_labels", LyXRC::RC_PREVIEW_HASHED_LABELS },
118 { "\\preview_scale_factor", LyXRC::RC_PREVIEW_SCALE_FACTOR },
119 { "\\print_adapt_output", LyXRC::RC_PRINT_ADAPTOUTPUT },
120 { "\\print_collcopies_flag", LyXRC::RC_PRINTCOLLCOPIESFLAG },
121 { "\\print_command", LyXRC::RC_PRINT_COMMAND },
122 { "\\print_copies_flag", LyXRC::RC_PRINTCOPIESFLAG },
123 { "\\print_evenpage_flag", LyXRC::RC_PRINTEVENPAGEFLAG },
124 { "\\print_extra_options", LyXRC::RC_PRINTEXSTRAOPTIONS },
125 { "\\print_file_extension", LyXRC::RC_PRINTFILEEXTENSION },
126 { "\\print_landscape_flag", LyXRC::RC_PRINTLANDSCAPEFLAG },
127 { "\\print_oddpage_flag", LyXRC::RC_PRINTODDPAGEFLAG },
128 { "\\print_pagerange_flag", LyXRC::RC_PRINTPAGERANGEFLAG },
129 { "\\print_paper_dimension_flag", LyXRC::RC_PRINTPAPERDIMENSIONFLAG },
130 { "\\print_paper_flag", LyXRC::RC_PRINTPAPERFLAG },
131 { "\\print_reverse_flag", LyXRC::RC_PRINTREVERSEFLAG },
132 { "\\print_spool_command", LyXRC::RC_PRINTSPOOL_COMMAND },
133 { "\\print_spool_printerprefix", LyXRC::RC_PRINTSPOOL_PRINTERPREFIX },
134 { "\\print_to_file", LyXRC::RC_PRINTTOFILE },
135 { "\\print_to_printer", LyXRC::RC_PRINTTOPRINTER },
136 { "\\printer", LyXRC::RC_PRINTER },
137 { "\\rtl", LyXRC::RC_RTL_SUPPORT },
138 { "\\screen_dpi", LyXRC::RC_SCREEN_DPI },
139 { "\\screen_font_encoding", LyXRC::RC_SCREEN_FONT_ENCODING },
140 // compatibility with versions older than 1.2.0 only Angus 10 Jan 2002
141 { "\\screen_font_encoding_menu", LyXRC::RC_POPUP_FONT_ENCODING },
142 // compatibility with versions older than 1.2.0 only Angus 10 Jan 2002
143 { "\\screen_font_menu", LyXRC::RC_POPUP_BOLD_FONT },
144 // compatibility with versions older than 1.2.0 only Angus 10 Jan 2002
145 { "\\screen_font_popup", LyXRC::RC_POPUP_NORMAL_FONT },
146 { "\\screen_font_roman", LyXRC::RC_SCREEN_FONT_ROMAN },
147 { "\\screen_font_roman_foundry", LyXRC::RC_SCREEN_FONT_ROMAN_FOUNDRY },
148 { "\\screen_font_sans", LyXRC::RC_SCREEN_FONT_SANS },
149 { "\\screen_font_sans_foundry", LyXRC::RC_SCREEN_FONT_SANS_FOUNDRY },
150 { "\\screen_font_scalable", LyXRC::RC_SCREEN_FONT_SCALABLE },
151 { "\\screen_font_sizes", LyXRC::RC_SCREEN_FONT_SIZES },
152 { "\\screen_font_typewriter", LyXRC::RC_SCREEN_FONT_TYPEWRITER },
153 { "\\screen_font_typewriter_foundry", LyXRC::RC_SCREEN_FONT_TYPEWRITER_FOUNDRY },
154 { "\\screen_geometry_height", LyXRC::RC_SCREEN_GEOMETRY_HEIGHT },
155 { "\\screen_geometry_width", LyXRC::RC_SCREEN_GEOMETRY_WIDTH },
156 { "\\screen_geometry_xysaved", LyXRC::RC_SCREEN_GEOMETRY_XYSAVED },
157 { "\\screen_zoom", LyXRC::RC_SCREEN_ZOOM },
158 { "\\serverpipe", LyXRC::RC_SERVERPIPE },
159 { "\\set_color", LyXRC::RC_SET_COLOR },
160 { "\\show_banner", LyXRC::RC_SHOW_BANNER },
161 { "\\spell_command", LyXRC::RC_SPELL_COMMAND },
162 { "\\tempdir_path", LyXRC::RC_TEMPDIRPATH },
163 { "\\template_path", LyXRC::RC_TEMPLATEPATH },
164 { "\\tex_allows_spaces", LyXRC::RC_TEX_ALLOWS_SPACES },
165 { "\\ui_file", LyXRC::RC_UIFILE },
166 { "\\use_alt_language", LyXRC::RC_USE_ALT_LANG },
167 { "\\use_escape_chars", LyXRC::RC_USE_ESC_CHARS },
168 { "\\use_input_encoding", LyXRC::RC_USE_INP_ENC },
169 { "\\use_lastfilepos", LyXRC::RC_USELASTFILEPOS },
170 { "\\use_personal_dictionary", LyXRC::RC_USE_PERS_DICT },
171 // compatibility with versions older than 1.4.0 only
172 { "\\use_pspell", LyXRC::RC_USE_SPELL_LIB },
173 { "\\use_spell_lib", LyXRC::RC_USE_SPELL_LIB },
174 // compatibility with versions older than 1.4.0 only
175 { "\\use_tempdir", LyXRC::RC_USETEMPDIR },
176 { "\\user_email", LyXRC::RC_USER_EMAIL },
177 { "\\user_name", LyXRC::RC_USER_NAME },
178 { "\\view_dvi_paper_option", LyXRC::RC_VIEWDVI_PAPEROPTION },
179 // compatibility with versions older than 1.4.0 only
180 { "\\viewer" ,LyXRC::RC_VIEWER},
181 { "\\wheel_jump", LyXRC::RC_WHEEL_JUMP }
184 const int lyxrcCount = sizeof(lyxrcTags) / sizeof(keyword_item);
195 void LyXRC::setDefaults() {
198 // Get printer from the environment. If fail, use default "",
199 // assuming that everything is set up correctly.
200 printer = getEnv("PRINTER");
201 print_adapt_output = false;
202 print_command = "dvips";
203 print_evenpage_flag = "-B";
204 print_oddpage_flag = "-A";
205 print_pagerange_flag = "-pp";
206 print_copies_flag = "-c";
207 print_collcopies_flag = "-C";
208 print_reverse_flag = "-r";
209 print_landscape_flag = "-t landscape";
210 print_to_printer = "-P";
211 print_to_file = "-o ";
212 print_file_extension = ".ps";
213 print_paper_flag = "-t";
214 print_paper_dimension_flag = "-T";
215 document_path.erase();
216 view_dvi_paper_option.erase();
217 default_papersize = PAPER_DEFAULT;
218 custom_export_format = "ps";
219 chktex_command = "chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38";
220 bibtex_command = "bibtex";
222 index_command = "makeindex -c -q";
224 // Because a screen typically is wider than a piece of paper:
228 geometry_xysaved = true;
230 // Default LaTeX font size:
231 font_sizes[LyXFont::SIZE_TINY] = "5.0";
232 font_sizes[LyXFont::SIZE_SCRIPT] = "7.0";
233 font_sizes[LyXFont::SIZE_FOOTNOTE] = "8.0";
234 font_sizes[LyXFont::SIZE_SMALL] = "9.0";
235 font_sizes[LyXFont::SIZE_NORMAL] = "10.0";
236 font_sizes[LyXFont::SIZE_LARGE] = "12.0";
237 font_sizes[LyXFont::SIZE_LARGER] = "14.4";
238 font_sizes[LyXFont::SIZE_LARGEST] = "17.26";
239 font_sizes[LyXFont::SIZE_HUGE] = "20.74";
240 font_sizes[LyXFont::SIZE_HUGER] = "24.88";
241 use_scalable_fonts = true;
242 roman_font_name = "";
244 typewriter_font_name = "";
245 popup_bold_font = "-*-helvetica-bold-r";
246 popup_normal_font = "-*-helvetica-medium-r";
247 font_norm = "iso8859-1";
248 font_norm_type = ISO_8859_1;
249 popup_font_encoding.erase();
251 auto_region_delete = true;
252 auto_reset_options = false;
254 num_lastfiles = maxlastfiles;
255 check_lastfiles = true;
256 use_lastfilepos = true;
257 load_session = false;
259 backupdir_path.erase();
260 display_graphics = lyx::graphics::ColorDisplay;
261 // Spellchecker settings:
262 use_spell_lib = true;
263 isp_command = "ispell";
264 isp_accept_compound = false;
265 isp_use_input_encoding = false;
266 isp_use_alt_lang = false;
267 isp_use_pers_dict = false;
268 isp_use_esc_chars = false;
272 mark_foreign_language = true;
273 language_auto_begin = true;
274 language_auto_end = true;
275 language_global_options = true;
276 language_use_babel = true;
277 language_package = "\\usepackage{babel}";
278 language_command_begin = "\\selectlanguage{$$lang}";
279 language_command_local = "\\foreignlanguage{$$lang}{";
280 default_language = "english";
282 cygwin_path_fix = false;
283 tex_allows_spaces = false;
284 date_insert_format = "%A, %e %B %Y";
285 cursor_follows_scrollbar = false;
286 dialogs_iconify_with_main = false;
287 label_init_length = 3;
288 preview = PREVIEW_OFF;
289 preview_hashed_labels = false;
290 preview_scale_factor = "0.9";
292 user_name = lyx::support::user_name();
294 user_email = lyx::support::user_email();
300 void oldFontFormat(string & family, string & foundry)
302 if (family.empty() || family[0] != '-')
304 foundry = token(family, '-', 1);
305 family = token(family, '-', 2);
313 int LyXRC::read(string const & filename)
315 LyXLex lexrc(lyxrcTags, lyxrcCount);
316 if (lyxerr.debugging(Debug::PARSER))
317 lexrc.printTable(lyxerr);
319 lexrc.setFile(filename);
320 if (!lexrc.isOK()) return -2;
322 lyxerr[Debug::LYXRC] << "Reading '" << filename << "'..." << endl;
328 int LyXRC::read(std::istream & is)
330 LyXLex lexrc(lyxrcTags, lyxrcCount);
331 if (lyxerr.debugging(Debug::PARSER))
332 lexrc.printTable(lyxerr);
335 if (!lexrc.isOK()) return -2;
337 lyxerr[Debug::LYXRC] << "Reading istream..." << endl;
343 int LyXRC::read(LyXLex & lexrc)
345 if (!lexrc.isOK()) return -2;
347 while (lexrc.isOK()) {
348 // By using two switches we take advantage of the compiler
349 // telling us if we have missed a LyXRCTags element in
350 // the second switch.
351 // Note that this also shows a problem with LyXLex since it
352 // helps us avoid taking advantage of the strictness of the
355 int le = lexrc.lex();
357 case LyXLex::LEX_UNDEF:
358 lexrc.printError("Unknown tag `$$Token'");
360 case LyXLex::LEX_FEOF:
364 switch (static_cast<LyXRCTags>(le)) {
365 case RC_INPUT: // Include file
368 libFileSearch(string(),
371 lexrc.printError("Error reading "
372 "included file: "+tmp);
378 bind_file = os::internal_path(lexrc.getString());
384 ui_file = os::internal_path(lexrc.getString());
388 case RC_AUTORESET_OPTIONS:
390 auto_reset_options = lexrc.getBool();
394 case RC_DISPLAY_GRAPHICS:
396 display_graphics = lyx::graphics::displayTranslator().find(lexrc.getString());
400 case RC_CYGWIN_PATH_FIX:
402 cygwin_path_fix = lexrc.getBool();
406 case RC_TEX_ALLOWS_SPACES:
408 tex_allows_spaces = lexrc.getBool();
414 use_kbmap = lexrc.getBool();
418 case RC_KBMAP_PRIMARY:
420 string const kmap(os::internal_path(lexrc.getString()));
423 } else if (!libFileSearch("kbd", kmap,
425 primary_kbmap = kmap;
427 lexrc.printError("LyX: Keymap `$$Token' not found");
432 case RC_KBMAP_SECONDARY:
434 string const kmap(os::internal_path(lexrc.getString()));
437 } else if (!libFileSearch("kbd", kmap,
439 secondary_kbmap = kmap;
441 lexrc.printError("LyX: Keymap `$$Token' not found");
446 case RC_FONT_ENCODING:
448 fontenc = lexrc.getString();
454 printer = lexrc.getString();
458 case RC_PRINT_COMMAND:
460 print_command = lexrc.getString();
464 case RC_PRINTEVENPAGEFLAG:
466 print_evenpage_flag = lexrc.getString();
470 case RC_PRINTODDPAGEFLAG:
472 print_oddpage_flag = lexrc.getString();
476 case RC_PRINTPAGERANGEFLAG:
478 print_pagerange_flag = lexrc.getString();
482 case RC_PRINTCOPIESFLAG:
484 print_copies_flag = lexrc.getString();
488 case RC_PRINTCOLLCOPIESFLAG:
490 print_collcopies_flag = lexrc.getString();
494 case RC_PRINTREVERSEFLAG:
496 print_reverse_flag = lexrc.getString();
500 case RC_PRINTLANDSCAPEFLAG:
502 print_landscape_flag = lexrc.getString();
506 case RC_PRINTTOPRINTER:
508 print_to_printer = lexrc.getString();
512 case RC_PRINT_ADAPTOUTPUT:
514 print_adapt_output = lexrc.getBool();
520 print_to_file = os::internal_path(lexrc.getString());
524 case RC_PRINTFILEEXTENSION:
526 print_file_extension = lexrc.getString();
530 case RC_PRINTEXSTRAOPTIONS:
532 print_extra_options = lexrc.getString();
536 case RC_PRINTSPOOL_COMMAND:
538 print_spool_command = lexrc.getString();
542 case RC_PRINTSPOOL_PRINTERPREFIX:
544 print_spool_printerprefix = lexrc.getString();
548 case RC_PRINTPAPERDIMENSIONFLAG:
550 print_paper_dimension_flag = lexrc.getString();
554 case RC_PRINTPAPERFLAG:
556 print_paper_flag = lexrc.getString();
560 case RC_CUSTOM_EXPORT_COMMAND:
562 custom_export_command = lexrc.getString();
566 case RC_CUSTOM_EXPORT_FORMAT:
568 custom_export_format = lexrc.getString();
572 case RC_DEFAULT_PAPERSIZE:
575 ascii_lowercase(lexrc.getString());
576 if (size == "usletter")
579 else if (size == "legal")
582 else if (size == "executive")
585 else if (size == "a3")
588 else if (size == "a4")
591 else if (size == "a5")
594 else if (size == "b5")
597 else if (size == "default")
603 case RC_VIEWDVI_PAPEROPTION:
605 view_dvi_paper_option = lexrc.getString();
607 view_dvi_paper_option.erase();
611 case RC_CHKTEX_COMMAND:
613 chktex_command = lexrc.getString();
617 case RC_BIBTEX_COMMAND:
619 bibtex_command = lexrc.getString();
623 case RC_INDEX_COMMAND:
625 index_command = lexrc.getString();
631 dpi = lexrc.getInteger();
637 zoom = lexrc.getInteger();
641 case RC_SCREEN_GEOMETRY_HEIGHT:
643 geometry_height = lexrc.getInteger();
647 case RC_SCREEN_GEOMETRY_WIDTH:
649 geometry_width = lexrc.getInteger();
653 case RC_SCREEN_GEOMETRY_XYSAVED:
655 geometry_xysaved = lexrc.getBool();
661 wheel_jump = lexrc.getInteger();
665 case RC_SCREEN_FONT_SIZES:
667 font_sizes[LyXFont::SIZE_TINY] =
671 font_sizes[LyXFont::SIZE_SCRIPT] =
675 font_sizes[LyXFont::SIZE_FOOTNOTE] =
679 font_sizes[LyXFont::SIZE_SMALL] =
683 font_sizes[LyXFont::SIZE_NORMAL] =
687 font_sizes[LyXFont::SIZE_LARGE] =
691 font_sizes[LyXFont::SIZE_LARGER] =
695 font_sizes[LyXFont::SIZE_LARGEST] =
699 font_sizes[LyXFont::SIZE_HUGE] =
703 font_sizes[LyXFont::SIZE_HUGER] =
708 case RC_SCREEN_FONT_SCALABLE:
710 use_scalable_fonts = lexrc.getBool();
716 autosave = lexrc.getInteger();
720 case RC_DOCUMENTPATH:
722 document_path = os::internal_path(lexrc.getString());
723 document_path = expandPath(document_path);
727 case RC_TEMPLATEPATH:
729 template_path = os::internal_path(lexrc.getString());
730 template_path = expandPath(template_path);
736 tempdir_path = os::internal_path(lexrc.getString());
737 tempdir_path = expandPath(tempdir_path);
743 lyxerr << "Ignoring obsolete use_tempdir flag." << endl;
747 case RC_USELASTFILEPOS:
749 use_lastfilepos = lexrc.getBool();
755 load_session = lexrc.getBool();
759 case RC_NUMLASTFILES:
761 num_lastfiles = lexrc.getInteger();
765 case RC_CHECKLASTFILES:
767 check_lastfiles = lexrc.getBool();
771 case RC_SCREEN_FONT_ROMAN:
773 roman_font_name = lexrc.getString();
774 oldFontFormat(roman_font_name,
779 case RC_SCREEN_FONT_SANS:
781 sans_font_name = lexrc.getString();
782 oldFontFormat(sans_font_name, sans_font_foundry);
786 case RC_SCREEN_FONT_TYPEWRITER:
788 typewriter_font_name = lexrc.getString();
789 oldFontFormat(typewriter_font_name,
790 typewriter_font_foundry);
794 case RC_SCREEN_FONT_ROMAN_FOUNDRY:
796 roman_font_foundry = lexrc.getString();
800 case RC_SCREEN_FONT_SANS_FOUNDRY:
802 sans_font_foundry = lexrc.getString();
806 case RC_SCREEN_FONT_TYPEWRITER_FOUNDRY:
808 typewriter_font_foundry = lexrc.getString();
812 case RC_SCREEN_FONT_ENCODING:
814 font_norm = lexrc.getString();
815 set_font_norm_type();
819 case RC_POPUP_BOLD_FONT:
821 popup_bold_font = lexrc.getString();
825 case RC_POPUP_NORMAL_FONT:
827 popup_normal_font = lexrc.getString();
831 case RC_POPUP_FONT_ENCODING:
833 popup_font_encoding = lexrc.getString();
839 string lyx_name, x11_name;
842 lyx_name = lexrc.getString();
844 lexrc.printError("Missing color tag.");
849 x11_name = lexrc.getString();
851 lexrc.printError("Missing color name for color: `$$Token'");
855 LColor::color const col =
856 lcolor.getFromLyXName(lyx_name);
857 if (col == LColor::none ||
858 col == LColor::inherit ||
859 col == LColor::ignore)
862 if (!lcolor.setColor(col, x11_name)) {
863 lyxerr << "Bad lyxrc set_color for "
869 case RC_AUTOREGIONDELETE:
870 // Auto region delete defaults to true
872 auto_region_delete = lexrc.getBool();
878 lyxpipes = os::internal_path(lexrc.getString());
879 lyxpipes = expandPath(lyxpipes);
883 case RC_CURSOR_FOLLOWS_SCROLLBAR:
885 cursor_follows_scrollbar = lexrc.getBool();
889 case RC_DIALOGS_ICONIFY_WITH_MAIN:
891 dialogs_iconify_with_main = lexrc.getBool();
895 case RC_ASCIIROFF_COMMAND:
897 ascii_roff_command = lexrc.getString();
900 case RC_ASCII_LINELEN:
902 ascii_linelen = lexrc.getInteger();
905 // Spellchecker settings:
906 case RC_USE_SPELL_LIB:
908 use_spell_lib = lexrc.getBool();
911 case RC_SPELL_COMMAND:
913 isp_command = lexrc.getString();
916 case RC_ACCEPT_COMPOUND:
918 isp_accept_compound = lexrc.getBool();
923 isp_use_input_encoding = lexrc.getBool();
926 case RC_USE_ALT_LANG:
928 isp_use_alt_lang = lexrc.getBool();
931 case RC_USE_PERS_DICT:
933 isp_use_pers_dict = lexrc.getBool();
936 case RC_USE_ESC_CHARS:
938 isp_use_esc_chars = lexrc.getBool();
943 isp_alt_lang = lexrc.getString();
948 isp_pers_dict = os::internal_path(lexrc.getString());
953 isp_esc_chars = lexrc.getString();
958 make_backup = lexrc.getBool();
961 case RC_BACKUPDIR_PATH:
963 backupdir_path = os::internal_path(lexrc.getString());
964 backupdir_path = expandPath(backupdir_path);
967 case RC_DATE_INSERT_FORMAT:
969 date_insert_format = lexrc.getString();
972 case RC_LANGUAGE_PACKAGE:
974 language_package = lexrc.getString();
977 case RC_LANGUAGE_AUTO_BEGIN:
979 language_auto_begin = lexrc.getBool();
982 case RC_LANGUAGE_AUTO_END:
984 language_auto_end = lexrc.getBool();
987 case RC_LANGUAGE_GLOBAL_OPTIONS:
989 language_global_options = lexrc.getBool();
992 case RC_LANGUAGE_USE_BABEL:
994 language_use_babel = lexrc.getBool();
997 case RC_LANGUAGE_COMMAND_BEGIN:
999 language_command_begin = lexrc.getString();
1002 case RC_LANGUAGE_COMMAND_END:
1004 language_command_end = lexrc.getString();
1007 case RC_LANGUAGE_COMMAND_LOCAL:
1009 language_command_local = lexrc.getString();
1012 case RC_RTL_SUPPORT:
1014 rtl_support = lexrc.getBool();
1017 case RC_AUTO_NUMBER:
1019 auto_number = lexrc.getBool();
1022 case RC_MARK_FOREIGN_LANGUAGE:
1024 mark_foreign_language = lexrc.getBool();
1029 string fmt, command;
1031 fmt = lexrc.getString();
1034 command = lexrc.getString();
1036 movers.set(fmt, command);
1040 case RC_CONVERTER: {
1041 string from, to, command, flags;
1043 from = lexrc.getString();
1046 to = lexrc.getString();
1049 command = lexrc.getString();
1052 flags = lexrc.getString();
1055 || token(command, ' ', 0) == "none") {
1056 converters.erase(from, to);
1058 converters.add(from, to, command, flags);
1062 // compatibility with versions older than 1.4.0 only
1064 string format, command;
1066 format = lexrc.getString();
1069 command = lexrc.getString();
1071 formats.setViewer(format, command);
1075 string format, extension, prettyname, shortcut;
1077 format = lexrc.getString();
1080 extension = lexrc.getString();
1083 prettyname = lexrc.getString();
1086 shortcut = lexrc.getString();
1088 string viewer, editor;
1089 // Hack to ensure compatibility with versions older
1091 int le = lexrc.lex();
1092 if (le != LyXLex::LEX_FEOF && le != LyXLex::LEX_UNDEF) {
1093 viewer = lexrc.getString();
1094 if (le == LyXLex::LEX_DATA) {
1096 editor = lexrc.getString();
1099 // We have got a known token.
1100 // Therefore this is an old style
1101 // format definition without
1102 // viewer and editor.
1103 lexrc.pushToken(viewer);
1107 if (prettyname.empty()) {
1108 if (converters.formatIsUsed(format)) {
1109 lyxerr << "Can't delete format "
1112 formats.erase(format);
1115 formats.add(format, extension, prettyname,
1116 shortcut, viewer, editor);
1120 case RC_DEFAULT_LANGUAGE:
1122 default_language = lexrc.getString();
1126 case RC_LABEL_INIT_LENGTH:
1128 label_init_length = lexrc.getInteger();
1132 case RC_SHOW_BANNER:
1134 show_banner = lexrc.getBool();
1140 string const tmp = lexrc.getString();
1141 if (tmp == "true" || tmp == "on")
1142 preview = PREVIEW_ON;
1143 else if (tmp == "no_math")
1144 preview = PREVIEW_NO_MATH;
1146 preview = PREVIEW_OFF;
1147 if (tmp != "false" && tmp != "off")
1148 lyxerr << "Unrecognized "
1150 << tmp << '\n' << endl;
1155 case RC_PREVIEW_HASHED_LABELS:
1157 preview_hashed_labels = lexrc.getBool();
1161 case RC_PREVIEW_SCALE_FACTOR:
1163 preview_scale_factor = lexrc.getString();
1169 user_name = lexrc.getString();
1174 user_email = lexrc.getString();
1177 case RC_PATH_PREFIX:
1179 path_prefix = lexrc.getString();
1182 case RC_LAST: break; // this is just a dummy
1186 /// Update converters data-structures
1187 converters.update(formats);
1188 converters.buildGraph();
1194 void LyXRC::write(string const & filename, bool ignore_system_lyxrc) const
1196 ofstream ofs(filename.c_str());
1198 write(ofs, ignore_system_lyxrc);
1202 void LyXRC::print() const
1204 if (lyxerr.debugging())
1205 write(lyxerr, false);
1213 typedef std::pair<std::string, SpecialisedMover> Data;
1215 SameMover(Data const & comparison)
1216 : comparison_(comparison) {}
1218 bool operator()(Data const & data) const
1220 return data.first == comparison_.first &&
1221 data.second.command() == comparison_.second.command();
1229 void LyXRC::write(ostream & os, bool ignore_system_lyxrc) const
1231 os << "### This file is part of\n"
1232 << "### ========================================================\n"
1233 << "### LyX, The Document Processor\n"
1235 << "### Copyright 1995 Matthias Ettrich\n"
1236 << "### Copyright 1995-2001 The LyX Team.\n"
1238 << "### ========================================================\n"
1240 << "# This file is written by LyX, if you want to make your own\n"
1241 << "# modifications you should do them from inside LyX and save\n"
1244 // Why the switch you might ask. It is a trick to ensure that all
1245 // the elements in the LyXRCTags enum is handled. As you can see
1246 // there are no breaks at all. So it is just a huge fall-through.
1247 // The nice thing is that we will get a warning from the compiler
1248 // if we forget an element.
1249 LyXRCTags tag = RC_LAST;
1253 // input/include files are not done here
1255 if (ignore_system_lyxrc ||
1256 bind_file != system_lyxrc.bind_file) {
1257 string const path = os::external_path(bind_file);
1258 os << "\\bind_file \"" << path << "\"\n";
1264 << "# MISC SECTION ######################################\n"
1267 // bind files are not done here.
1269 case RC_PATH_PREFIX:
1270 if (ignore_system_lyxrc ||
1271 path_prefix != system_lyxrc.path_prefix) {
1272 os << "\\path_prefix \"" << path_prefix << "\"\n";
1276 if (ignore_system_lyxrc ||
1277 ui_file != system_lyxrc.ui_file) {
1278 string const path = os::external_path(ui_file);
1279 os << "\\ui_file \"" << path << "\"\n";
1281 case RC_AUTOREGIONDELETE:
1282 if (ignore_system_lyxrc ||
1283 auto_region_delete != system_lyxrc.auto_region_delete) {
1284 os << "# Set to false to inhibit automatic replacement of\n"
1285 << "# the current selection.\n"
1286 << "\\auto_region_delete " << convert<string>(auto_region_delete)
1289 case RC_AUTORESET_OPTIONS:
1290 if (ignore_system_lyxrc ||
1291 auto_reset_options != system_lyxrc.auto_reset_options) {
1292 os << "# Set to false to inhibit automatic reset of\n"
1293 << "# the class options to defaults on class change.\n"
1294 << "\\auto_reset_options "
1295 << convert<string>(auto_reset_options)
1299 if (ignore_system_lyxrc ||
1300 autosave != system_lyxrc.autosave) {
1301 os << "# The time interval between auto-saves in seconds.\n"
1302 << "\\autosave " << autosave << '\n';
1304 case RC_DISPLAY_GRAPHICS:
1305 if (ignore_system_lyxrc ||
1306 display_graphics != system_lyxrc.display_graphics) {
1307 os << "# Display graphics within LyX\n"
1308 << "# monochrome|grayscale|color|none\n"
1309 << "\\display_graphics "
1310 << lyx::graphics::displayTranslator().find(display_graphics)
1314 case RC_VIEWDVI_PAPEROPTION:
1315 if (ignore_system_lyxrc ||
1316 view_dvi_paper_option
1317 != system_lyxrc.view_dvi_paper_option) {
1318 os << "# Options used to specify paper size to the\n"
1319 << "# view_dvi_command (e.g. -paper)\n"
1320 << "\\view_dvi_paper_option \""
1321 << view_dvi_paper_option << "\"\n";
1323 case RC_DEFAULT_PAPERSIZE:
1324 if (ignore_system_lyxrc ||
1325 default_papersize != system_lyxrc.default_papersize) {
1326 os << "# The default papersize to use.\n"
1327 << "\\default_papersize \"";
1328 switch (default_papersize) {
1330 os << "default"; break;
1331 case PAPER_USLETTER:
1332 os << "usletter"; break;
1334 os << "legal"; break;
1335 case PAPER_USEXECUTIVE:
1336 os << "executive"; break;
1347 case PAPER_B4: break;
1351 case RC_CHKTEX_COMMAND:
1352 if (ignore_system_lyxrc ||
1353 chktex_command != system_lyxrc.chktex_command) {
1354 os << "\\chktex_command \"" << chktex_command << "\"\n";
1356 case RC_BIBTEX_COMMAND:
1357 if (ignore_system_lyxrc ||
1358 bibtex_command != system_lyxrc.bibtex_command) {
1359 os << "\\bibtex_command \"" << bibtex_command << "\"\n";
1361 case RC_INDEX_COMMAND:
1362 if (ignore_system_lyxrc ||
1363 index_command != system_lyxrc.index_command) {
1364 os << "\\index_command \"" << index_command << "\"\n";
1366 case RC_CYGWIN_PATH_FIX:
1367 if (ignore_system_lyxrc ||
1368 cygwin_path_fix != system_lyxrc.cygwin_path_fix) {
1369 os << "\\cygwin_path_fix_needed "
1370 << convert<string>(cygwin_path_fix) << '\n';
1372 case RC_TEX_ALLOWS_SPACES:
1373 if (tex_allows_spaces != system_lyxrc.tex_allows_spaces) {
1374 os << "\\tex_allows_spaces "
1375 << convert<string>(tex_allows_spaces) << '\n';
1378 if (ignore_system_lyxrc ||
1379 use_kbmap != system_lyxrc.use_kbmap) {
1380 os << "\\kbmap " << convert<string>(use_kbmap) << '\n';
1382 case RC_KBMAP_PRIMARY:
1383 if (ignore_system_lyxrc ||
1384 primary_kbmap != system_lyxrc.primary_kbmap) {
1385 string const path = os::external_path(primary_kbmap);
1386 os << "\\kbmap_primary \"" << path << "\"\n";
1388 case RC_KBMAP_SECONDARY:
1389 if (ignore_system_lyxrc ||
1390 secondary_kbmap != system_lyxrc.secondary_kbmap) {
1391 string const path = os::external_path(secondary_kbmap);
1392 os << "\\kbmap_secondary \"" << path << "\"\n";
1395 if (ignore_system_lyxrc ||
1396 lyxpipes != system_lyxrc.lyxpipes) {
1397 string const path = os::external_path(lyxpipes);
1398 os << "\\serverpipe \"" << path << "\"\n";
1400 case RC_DATE_INSERT_FORMAT:
1401 if (ignore_system_lyxrc ||
1402 date_insert_format != system_lyxrc.date_insert_format) {
1403 os << "\\date_insert_format \"" << date_insert_format
1406 case RC_LABEL_INIT_LENGTH:
1407 if (ignore_system_lyxrc ||
1408 label_init_length != system_lyxrc.label_init_length) {
1409 os << "\\label_init_length " << label_init_length
1414 os << "\\user_name \"" << user_name << "\"\n";
1417 os << "\\user_email \"" << user_email << "\"\n";
1419 case RC_SHOW_BANNER:
1420 if (ignore_system_lyxrc ||
1421 show_banner != system_lyxrc.show_banner) {
1422 os << "\\show_banner " << convert<string>(show_banner) << '\n';
1426 if (ignore_system_lyxrc ||
1427 preview != system_lyxrc.preview) {
1433 case PREVIEW_NO_MATH:
1440 os << "\\preview " << status << '\n';
1443 case RC_PREVIEW_HASHED_LABELS:
1444 if (ignore_system_lyxrc ||
1445 preview_hashed_labels !=
1446 system_lyxrc.preview_hashed_labels) {
1447 os << "\\preview_hashed_labels "
1448 << convert<string>(preview_hashed_labels) << '\n';
1451 case RC_PREVIEW_SCALE_FACTOR:
1452 if (ignore_system_lyxrc ||
1453 preview_scale_factor != system_lyxrc.preview_scale_factor) {
1454 os << "\\preview_scale_factor "
1455 << preview_scale_factor << '\n';
1459 << "# SCREEN & FONTS SECTION ############################\n"
1462 case RC_POPUP_NORMAL_FONT:
1463 if (ignore_system_lyxrc ||
1464 popup_normal_font != system_lyxrc.popup_normal_font) {
1465 os << "\\popup_normal_font \"" << popup_normal_font
1468 case RC_POPUP_BOLD_FONT:
1469 if (ignore_system_lyxrc ||
1470 popup_bold_font != system_lyxrc.popup_bold_font) {
1471 os << "\\popup_bold_font \"" << popup_bold_font
1474 case RC_POPUP_FONT_ENCODING:
1475 if (ignore_system_lyxrc ||
1476 popup_font_encoding != system_lyxrc.popup_font_encoding) {
1477 os << "\\popup_font_encoding \"" << popup_font_encoding
1481 if (ignore_system_lyxrc ||
1482 dpi != system_lyxrc.dpi) {
1483 os << "\\screen_dpi " << dpi << '\n';
1485 case RC_SCREEN_ZOOM:
1486 if (ignore_system_lyxrc ||
1487 zoom != system_lyxrc.zoom) {
1488 os << "\\screen_zoom " << zoom << '\n';
1490 case RC_SCREEN_GEOMETRY_HEIGHT:
1491 if (ignore_system_lyxrc ||
1492 geometry_height != system_lyxrc.geometry_height) {
1493 os << "\\screen_geometry_height " << geometry_height
1496 case RC_SCREEN_GEOMETRY_WIDTH:
1497 if (ignore_system_lyxrc ||
1498 geometry_width != system_lyxrc.geometry_width) {
1499 os << "\\screen_geometry_width " << geometry_width
1502 case RC_SCREEN_GEOMETRY_XYSAVED:
1503 if (ignore_system_lyxrc ||
1504 geometry_xysaved != system_lyxrc.geometry_xysaved) {
1505 os << "\\screen_geometry_xysaved " << convert<string>(geometry_xysaved)
1509 if (ignore_system_lyxrc ||
1510 wheel_jump != system_lyxrc.wheel_jump) {
1511 os << "\\wheel_jump " << wheel_jump << '\n';
1513 case RC_CURSOR_FOLLOWS_SCROLLBAR:
1514 if (ignore_system_lyxrc ||
1515 cursor_follows_scrollbar
1516 != system_lyxrc.cursor_follows_scrollbar) {
1517 os << "\\cursor_follows_scrollbar "
1518 << convert<string>(cursor_follows_scrollbar) << '\n';
1520 case RC_DIALOGS_ICONIFY_WITH_MAIN:
1521 if (ignore_system_lyxrc ||
1522 dialogs_iconify_with_main
1523 != system_lyxrc.dialogs_iconify_with_main) {
1524 os << "\\dialogs_iconify_with_main "
1525 << convert<string>(dialogs_iconify_with_main) << '\n';
1527 case RC_SCREEN_FONT_ROMAN:
1528 if (ignore_system_lyxrc ||
1529 roman_font_name != system_lyxrc.roman_font_name) {
1530 os << "\\screen_font_roman \"" << roman_font_name
1533 case RC_SCREEN_FONT_ROMAN_FOUNDRY:
1534 if (ignore_system_lyxrc ||
1535 roman_font_foundry != system_lyxrc.roman_font_foundry) {
1536 os << "\\screen_font_roman_foundry \"" << roman_font_foundry
1539 case RC_SCREEN_FONT_SANS:
1540 if (ignore_system_lyxrc ||
1541 sans_font_name != system_lyxrc.sans_font_name) {
1542 os << "\\screen_font_sans \"" << sans_font_name
1545 case RC_SCREEN_FONT_SANS_FOUNDRY:
1546 if (ignore_system_lyxrc ||
1547 sans_font_foundry != system_lyxrc.sans_font_foundry) {
1548 os << "\\screen_font_sans_foundry \"" << sans_font_foundry
1551 case RC_SCREEN_FONT_TYPEWRITER:
1552 if (ignore_system_lyxrc ||
1553 typewriter_font_name != system_lyxrc.typewriter_font_name) {
1554 os << "\\screen_font_typewriter \""
1555 << typewriter_font_name << "\"\n";
1557 case RC_SCREEN_FONT_TYPEWRITER_FOUNDRY:
1558 if (ignore_system_lyxrc ||
1559 typewriter_font_foundry != system_lyxrc.typewriter_font_foundry) {
1560 os << "\\screen_font_typewriter_foundry \""
1561 << typewriter_font_foundry << "\"\n";
1564 case RC_SCREEN_FONT_SCALABLE:
1565 if (ignore_system_lyxrc ||
1566 use_scalable_fonts != system_lyxrc.use_scalable_fonts) {
1567 os << "\\screen_font_scalable "
1568 << convert<string>(use_scalable_fonts)
1571 case RC_SCREEN_FONT_ENCODING:
1572 if (ignore_system_lyxrc ||
1573 font_norm != system_lyxrc.font_norm) {
1574 os << "\\screen_font_encoding \"" << font_norm
1577 case RC_SCREEN_FONT_SIZES:
1578 if (ignore_system_lyxrc ||
1579 font_sizes[LyXFont::SIZE_TINY]
1580 != system_lyxrc.font_sizes[LyXFont::SIZE_TINY] ||
1581 font_sizes[LyXFont::SIZE_SCRIPT]
1582 != system_lyxrc.font_sizes[LyXFont::SIZE_SCRIPT] ||
1583 font_sizes[LyXFont::SIZE_FOOTNOTE]
1584 != system_lyxrc.font_sizes[LyXFont::SIZE_FOOTNOTE] ||
1585 font_sizes[LyXFont::SIZE_SMALL]
1586 != system_lyxrc.font_sizes[LyXFont::SIZE_SMALL] ||
1587 font_sizes[LyXFont::SIZE_NORMAL]
1588 != system_lyxrc.font_sizes[LyXFont::SIZE_NORMAL] ||
1589 font_sizes[LyXFont::SIZE_LARGE]
1590 != system_lyxrc.font_sizes[LyXFont::SIZE_LARGE] ||
1591 font_sizes[LyXFont::SIZE_LARGER]
1592 != system_lyxrc.font_sizes[LyXFont::SIZE_LARGER] ||
1593 font_sizes[LyXFont::SIZE_LARGEST]
1594 != system_lyxrc.font_sizes[LyXFont::SIZE_LARGEST] ||
1595 font_sizes[LyXFont::SIZE_HUGE]
1596 != system_lyxrc.font_sizes[LyXFont::SIZE_HUGE] ||
1597 font_sizes[LyXFont::SIZE_HUGER]
1598 != system_lyxrc.font_sizes[LyXFont::SIZE_HUGER]) {
1599 os.setf(ios::fixed);
1601 os << "\\screen_font_sizes"
1602 << ' ' << font_sizes[LyXFont::SIZE_TINY]
1603 << ' ' << font_sizes[LyXFont::SIZE_SCRIPT]
1604 << ' ' << font_sizes[LyXFont::SIZE_FOOTNOTE]
1605 << ' ' << font_sizes[LyXFont::SIZE_SMALL]
1606 << ' ' << font_sizes[LyXFont::SIZE_NORMAL]
1607 << ' ' << font_sizes[LyXFont::SIZE_LARGE]
1608 << ' ' << font_sizes[LyXFont::SIZE_LARGER]
1609 << ' ' << font_sizes[LyXFont::SIZE_LARGEST]
1610 << ' ' << font_sizes[LyXFont::SIZE_HUGE]
1611 << ' ' << font_sizes[LyXFont::SIZE_HUGER]
1616 << "# COLOR SECTION ###################################\n"
1620 for (int i = 0; i < LColor::ignore; ++i) {
1621 LColor::color lc = static_cast<LColor::color>(i);
1623 string const col(lcolor.getX11Name(lc));
1624 if (ignore_system_lyxrc ||
1625 col != system_lcolor.getX11Name(lc)) {
1626 os << "\\set_color \""
1627 << lcolor.getLyXName(lc) << "\" \""
1633 << "# PRINTER SECTION ###################################\n"
1637 if (ignore_system_lyxrc ||
1638 printer != system_lyxrc.printer) {
1639 os << "\\printer \"" << printer << "\"\n";
1641 case RC_PRINT_ADAPTOUTPUT:
1642 if (ignore_system_lyxrc ||
1643 print_adapt_output != system_lyxrc.print_adapt_output) {
1644 os << "\\print_adapt_output "
1645 << convert<string>(print_adapt_output)
1648 case RC_PRINT_COMMAND:
1649 if (ignore_system_lyxrc ||
1650 print_command != system_lyxrc.print_command) {
1651 os << "\\print_command \"" << print_command << "\"\n";
1653 case RC_PRINTEXSTRAOPTIONS:
1654 if (ignore_system_lyxrc ||
1655 print_extra_options != system_lyxrc.print_extra_options) {
1656 os << "\\print_extra_options \"" << print_extra_options
1659 case RC_PRINTSPOOL_COMMAND:
1660 if (ignore_system_lyxrc ||
1661 print_spool_command != system_lyxrc.print_spool_command) {
1662 os << "\\print_spool_command \"" << print_spool_command
1665 case RC_PRINTSPOOL_PRINTERPREFIX:
1666 if (ignore_system_lyxrc ||
1667 print_spool_printerprefix
1668 != system_lyxrc.print_spool_printerprefix) {
1669 os << "\\print_spool_printerprefix \""
1670 << print_spool_printerprefix << "\"\n";
1672 case RC_PRINTEVENPAGEFLAG:
1673 if (ignore_system_lyxrc ||
1674 print_evenpage_flag != system_lyxrc.print_evenpage_flag) {
1675 os << "\\print_evenpage_flag \"" << print_evenpage_flag
1678 case RC_PRINTODDPAGEFLAG:
1679 if (ignore_system_lyxrc ||
1680 print_oddpage_flag != system_lyxrc.print_oddpage_flag) {
1681 os << "\\print_oddpage_flag \"" << print_oddpage_flag
1684 case RC_PRINTREVERSEFLAG:
1685 if (ignore_system_lyxrc ||
1686 print_reverse_flag != system_lyxrc.print_reverse_flag) {
1687 os << "\\print_reverse_flag \"" << print_reverse_flag
1690 case RC_PRINTLANDSCAPEFLAG:
1691 if (ignore_system_lyxrc ||
1692 print_landscape_flag != system_lyxrc.print_landscape_flag) {
1693 os << "\\print_landscape_flag \"" << print_landscape_flag
1696 case RC_PRINTPAGERANGEFLAG:
1697 if (ignore_system_lyxrc ||
1698 print_pagerange_flag != system_lyxrc.print_pagerange_flag) {
1699 os << "\\print_pagerange_flag \"" << print_pagerange_flag
1702 case RC_PRINTCOPIESFLAG:
1703 if (ignore_system_lyxrc ||
1704 print_copies_flag != system_lyxrc.print_copies_flag) {
1705 os << "\\print_copies_flag \"" << print_copies_flag
1708 case RC_PRINTCOLLCOPIESFLAG:
1709 if (ignore_system_lyxrc ||
1710 print_collcopies_flag
1711 != system_lyxrc.print_collcopies_flag) {
1712 os << "\\print_collcopies_flag \""
1713 << print_collcopies_flag
1716 case RC_PRINTPAPERFLAG:
1717 if (ignore_system_lyxrc ||
1718 print_paper_flag != system_lyxrc.print_paper_flag) {
1719 os << "\\print_paper_flag \"" << print_paper_flag
1722 case RC_PRINTPAPERDIMENSIONFLAG:
1723 if (ignore_system_lyxrc ||
1724 print_paper_dimension_flag
1725 != system_lyxrc.print_paper_dimension_flag) {
1726 os << "\\print_paper_dimension_flag \""
1727 << print_paper_dimension_flag << "\"\n";
1729 case RC_PRINTTOPRINTER:
1730 if (ignore_system_lyxrc ||
1731 print_to_printer != system_lyxrc.print_to_printer) {
1732 os << "\\print_to_printer \"" << print_to_printer
1735 case RC_PRINTTOFILE:
1736 if (ignore_system_lyxrc ||
1737 print_to_file != system_lyxrc.print_to_file) {
1738 string const path = os::external_path(print_to_file);
1739 os << "\\print_to_file \"" << path << "\"\n";
1741 case RC_PRINTFILEEXTENSION:
1742 if (ignore_system_lyxrc ||
1743 print_file_extension != system_lyxrc.print_file_extension) {
1744 os << "\\print_file_extension \""
1745 << print_file_extension
1750 << "# EXPORT SECTION ####################################\n"
1753 case RC_CUSTOM_EXPORT_COMMAND:
1754 if (ignore_system_lyxrc ||
1755 custom_export_command
1756 != system_lyxrc.custom_export_command) {
1757 os << "\\custom_export_command \""
1758 << custom_export_command
1761 case RC_CUSTOM_EXPORT_FORMAT:
1762 if (ignore_system_lyxrc ||
1763 custom_export_format
1764 != system_lyxrc.custom_export_format) {
1765 os << "\\custom_export_format \"" << custom_export_format
1770 << "# TEX SECTION #######################################\n"
1773 case RC_FONT_ENCODING:
1774 if (ignore_system_lyxrc ||
1775 fontenc != system_lyxrc.fontenc) {
1776 os << "\\font_encoding \"" << fontenc << "\"\n";
1780 << "# FILE SECTION ######################################\n"
1783 case RC_DOCUMENTPATH:
1784 if (ignore_system_lyxrc ||
1785 document_path != system_lyxrc.document_path) {
1786 string const path = os::external_path(document_path);
1787 os << "\\document_path \"" << path << "\"\n";
1789 case RC_USELASTFILEPOS:
1790 if (ignore_system_lyxrc ||
1791 use_lastfilepos != system_lyxrc.use_lastfilepos) {
1792 os << "\\use_lastfilepos " << convert<string>(use_lastfilepos)
1795 case RC_LOADSESSION:
1796 if (ignore_system_lyxrc ||
1797 load_session != system_lyxrc.load_session) {
1798 os << "\\load_session " << convert<string>(load_session)
1801 case RC_NUMLASTFILES:
1802 if (ignore_system_lyxrc ||
1803 num_lastfiles != system_lyxrc.num_lastfiles) {
1804 os << "\\num_lastfiles " << num_lastfiles << '\n';
1806 case RC_CHECKLASTFILES:
1807 if (ignore_system_lyxrc ||
1808 check_lastfiles != system_lyxrc.check_lastfiles) {
1809 os << "\\check_lastfiles " << convert<string>(check_lastfiles)
1812 case RC_TEMPLATEPATH:
1813 if (ignore_system_lyxrc ||
1814 template_path != system_lyxrc.template_path) {
1815 string const path = os::external_path(template_path);
1816 os << "\\template_path \"" << path << "\"\n";
1818 case RC_TEMPDIRPATH:
1819 if (ignore_system_lyxrc ||
1820 tempdir_path != system_lyxrc.tempdir_path) {
1821 string const path = os::external_path(tempdir_path);
1822 os << "\\tempdir_path \"" << path << "\"\n";
1826 case RC_ASCII_LINELEN:
1827 if (ignore_system_lyxrc ||
1828 ascii_linelen != system_lyxrc.ascii_linelen) {
1829 os << "\\ascii_linelen " << ascii_linelen << '\n';
1831 case RC_MAKE_BACKUP:
1832 if (ignore_system_lyxrc ||
1833 make_backup != system_lyxrc.make_backup) {
1834 os << "\\make_backup " << convert<string>(make_backup) << '\n';
1836 case RC_BACKUPDIR_PATH:
1837 if (ignore_system_lyxrc ||
1838 backupdir_path != system_lyxrc.backupdir_path) {
1839 string const path = os::external_path(backupdir_path);
1840 os << "\\backupdir_path \"" << path << "\"\n";
1844 << "# ASCII EXPORT SECTION ##############################\n"
1847 case RC_ASCIIROFF_COMMAND:
1848 if (ignore_system_lyxrc ||
1849 ascii_roff_command != system_lyxrc.ascii_roff_command) {
1850 os << "\\ascii_roff_command \"" << ascii_roff_command
1855 << "# SPELLCHECKER SECTION ##############################\n"
1857 case RC_USE_SPELL_LIB:
1858 if (ignore_system_lyxrc ||
1859 use_spell_lib != system_lyxrc.use_spell_lib) {
1860 os << "\\use_spell_lib " << convert<string>(use_spell_lib) << '\n';
1862 case RC_SPELL_COMMAND:
1863 if (ignore_system_lyxrc ||
1864 isp_command != system_lyxrc.isp_command) {
1865 os << "\\spell_command \"" << isp_command << "\"\n";
1867 case RC_ACCEPT_COMPOUND:
1868 if (ignore_system_lyxrc ||
1869 isp_accept_compound != system_lyxrc.isp_accept_compound) {
1870 os << "\\accept_compound " << convert<string>(isp_accept_compound)
1873 case RC_USE_ALT_LANG:
1874 if (ignore_system_lyxrc ||
1875 isp_use_alt_lang != system_lyxrc.isp_use_alt_lang) {
1876 os << "\\use_alt_language " << convert<string>(isp_use_alt_lang)
1880 if (ignore_system_lyxrc ||
1881 isp_alt_lang != system_lyxrc.isp_alt_lang) {
1882 os << "\\alternate_language \"" << isp_alt_lang
1885 case RC_USE_ESC_CHARS:
1886 if (ignore_system_lyxrc ||
1887 isp_use_esc_chars != system_lyxrc.isp_use_esc_chars) {
1888 os << "\\use_escape_chars " << convert<string>(isp_use_esc_chars)
1892 if (ignore_system_lyxrc ||
1893 isp_esc_chars != system_lyxrc.isp_esc_chars) {
1894 os << "\\escape_chars \"" << isp_esc_chars << "\"\n";
1896 case RC_USE_PERS_DICT:
1897 if (ignore_system_lyxrc ||
1898 isp_use_pers_dict != system_lyxrc.isp_use_pers_dict) {
1899 os << "\\use_personal_dictionary "
1900 << convert<string>(isp_use_pers_dict)
1904 if (isp_pers_dict != system_lyxrc.isp_pers_dict) {
1905 string const path = os::external_path(isp_pers_dict);
1906 os << "\\personal_dictionary \"" << path << "\"\n";
1908 case RC_USE_INP_ENC:
1909 if (ignore_system_lyxrc ||
1910 isp_use_input_encoding
1911 != system_lyxrc.isp_use_input_encoding) {
1912 os << "\\use_input_encoding "
1913 << convert<string>(isp_use_input_encoding)
1918 << "# LANGUAGE SUPPORT SECTION ##########################\n"
1921 case RC_RTL_SUPPORT:
1922 if (ignore_system_lyxrc ||
1923 rtl_support != system_lyxrc.rtl_support) {
1924 os << "\\rtl " << convert<string>(rtl_support) << '\n';
1926 case RC_LANGUAGE_PACKAGE:
1927 if (ignore_system_lyxrc ||
1928 language_package != system_lyxrc.language_package) {
1929 os << "\\language_package \"" << language_package
1932 case RC_LANGUAGE_GLOBAL_OPTIONS:
1933 if (ignore_system_lyxrc ||
1934 language_global_options
1935 != system_lyxrc.language_global_options) {
1936 os << "\\language_global_options \""
1937 << convert<string>(language_global_options)
1940 case RC_LANGUAGE_USE_BABEL:
1941 if (ignore_system_lyxrc ||
1942 language_use_babel != system_lyxrc.language_use_babel) {
1943 os << "\\language_use_babel \""
1944 << convert<string>(language_use_babel)
1947 case RC_LANGUAGE_COMMAND_BEGIN:
1948 if (ignore_system_lyxrc ||
1949 language_command_begin
1950 != system_lyxrc.language_command_begin) {
1951 os << "\\language_command_begin \""
1952 << language_command_begin
1955 case RC_LANGUAGE_COMMAND_END:
1956 if (ignore_system_lyxrc ||
1957 language_command_end
1958 != system_lyxrc.language_command_end) {
1959 os << "\\language_command_end \"" << language_command_end
1962 case RC_LANGUAGE_COMMAND_LOCAL:
1963 if (ignore_system_lyxrc ||
1964 language_command_local
1965 != system_lyxrc.language_command_local) {
1966 os << "\\language_command_local \""
1967 << language_command_local
1970 case RC_LANGUAGE_AUTO_BEGIN:
1971 if (ignore_system_lyxrc ||
1972 language_auto_begin != system_lyxrc.language_auto_begin) {
1973 os << "\\language_auto_begin "
1974 << convert<string>(language_auto_begin) << '\n';
1976 case RC_LANGUAGE_AUTO_END:
1977 if (ignore_system_lyxrc ||
1978 language_auto_end != system_lyxrc.language_auto_end) {
1979 os << "\\language_auto_end "
1980 << convert<string>(language_auto_end) << '\n';
1982 case RC_MARK_FOREIGN_LANGUAGE:
1983 if (ignore_system_lyxrc ||
1984 mark_foreign_language
1985 != system_lyxrc.mark_foreign_language) {
1986 os << "\\mark_foreign_language " <<
1987 convert<string>(mark_foreign_language) << '\n';
1991 << "# 2nd MISC SUPPORT SECTION ##########################\n"
1994 case RC_AUTO_NUMBER:
1995 if (ignore_system_lyxrc ||
1996 auto_number != system_lyxrc.auto_number) {
1997 os << "\\auto_number " << convert<string>(auto_number) << '\n';
1999 case RC_DEFAULT_LANGUAGE:
2000 if (ignore_system_lyxrc ||
2001 default_language != system_lyxrc.default_language) {
2002 os << "\\default_language " << default_language << '\n';
2006 << "# FORMATS SECTION ##########################\n"
2010 // New/modifed formats
2011 for (Formats::const_iterator cit = formats.begin();
2012 cit != formats.end(); ++cit) {
2013 Format const * format =
2014 system_formats.getFormat(cit->name());
2016 format->extension() != cit->extension() ||
2017 format->prettyname() != cit->prettyname() ||
2018 format->shortcut() != cit->shortcut() ||
2019 format->viewer() != cit->viewer() ||
2020 format->editor() != cit->editor())
2021 os << "\\format \"" << cit->name() << "\" \""
2022 << cit->extension() << "\" \""
2023 << cit->prettyname() << "\" \""
2024 << cit->shortcut() << "\" \""
2025 << cit->viewer() << "\" \""
2026 << cit->editor() << "\"\n";
2029 // Look for deleted formats
2030 for (Formats::const_iterator cit = system_formats.begin();
2031 cit != system_formats.end(); ++cit)
2032 if (!formats.getFormat(cit->name()))
2033 os << "\\format \"" << cit->name()
2034 << "\" \"\" \"\" \"\" \"\" \"\"\n";
2039 << "# CONVERTERS SECTION ##########################\n"
2043 // Look for new converters
2044 for (Converters::const_iterator cit = converters.begin();
2045 cit != converters.end(); ++cit) {
2046 Converter const * converter =
2047 system_converters.getConverter(cit->from,
2050 converter->command != cit->command ||
2051 converter->flags != cit->flags)
2052 os << "\\converter \"" << cit->from << "\" \""
2053 << cit->to << "\" \""
2054 << cit->command << "\" \""
2055 << cit->flags << "\"\n";
2058 // New/modifed converters
2059 for (Converters::const_iterator cit = system_converters.begin();
2060 cit != system_converters.end(); ++cit)
2061 if (!converters.getConverter(cit->from, cit->to))
2062 os << "\\converter \"" << cit->from
2063 << "\" \"" << cit->to << "\" \"\" \"\"\n";
2067 << "# COPIERS SECTION ##########################\n"
2070 // Look for new movers
2071 Movers::iterator const sysbegin = system_movers.begin();
2072 Movers::iterator const sysend = system_movers.end();
2074 for (Movers::iterator it = movers.begin(), end = movers.end();
2076 Movers::iterator const sysit =
2077 std::find_if(sysbegin, sysend, SameMover(*it));
2078 if (sysit == sysend) {
2079 std::string const & fmt = it->first;
2080 std::string const & command =
2081 it->second.command();
2083 os << "\\copier " << fmt
2084 << " \"" << command << "\"\n";
2088 // We don't actually delete SpecialisedMover(s) from the
2089 // map, just clear their 'command', so there's no need
2090 // to test for anything else.
2096 void LyXRC::set_font_norm_type()
2098 if (font_norm == "iso10646-1")
2099 font_norm_type = ISO_10646_1;
2100 else if (font_norm == "iso8859-1")
2101 font_norm_type = ISO_8859_1;
2102 else if (font_norm == "iso8859-3")
2103 font_norm_type = ISO_8859_3;
2104 else if (font_norm == "iso8859-4")
2105 font_norm_type = ISO_8859_4;
2106 else if (font_norm == "iso8859-6.8x")
2107 font_norm_type = ISO_8859_6_8;
2108 else if (font_norm == "iso8859-9")
2109 font_norm_type = ISO_8859_9;
2110 else if (font_norm == "iso8859-15")
2111 font_norm_type = ISO_8859_15;
2113 font_norm_type = OTHER_ENCODING;
2117 string const LyXRC::getDescription(LyXRCTags tag)
2122 case RC_ACCEPT_COMPOUND:
2123 str = _("Consider run-together words, such as \"diskdrive\" for \"disk drive\", as legal words?");
2127 case RC_USE_ALT_LANG:
2128 str = _("Specify an alternate language. The default is to use the language of the document.");
2131 case RC_ASCIIROFF_COMMAND:
2132 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 \"none\" is specified, an internal routine is used.");
2135 case RC_ASCII_LINELEN:
2136 str = _("This is the maximum line length of an exported text file (LaTeX, SGML or plain text).");
2139 case RC_AUTOREGIONDELETE:
2140 str = _("De-select if you don't want the current selection to be replaced automatically by what you type.");
2143 case RC_AUTORESET_OPTIONS:
2144 str = _("De-select if you don't want the class options to be reset to defaults after class change.");
2148 str = _("The time interval between auto-saves (in seconds). 0 means no auto-save.");
2151 case RC_AUTO_NUMBER:
2154 case RC_BACKUPDIR_PATH:
2155 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.");
2158 case RC_BIBTEX_COMMAND:
2159 str = _("Define the options of bibtex (cf. man bibtex) or select an alternative compiler (e.g. mlbibtex or bibulus).");
2163 str = _("Keybindings file. Can either specify an absolute path, or LyX will look in its global and local bind/ directories.");
2166 case RC_CHECKLASTFILES:
2167 str = _("Select to check whether the lastfiles still exist.");
2170 case RC_CHKTEX_COMMAND:
2171 str = _("Define how to run chktex. E.g. \"chktex -n11 -n1 -n3 -n6 -n9 -22 -n25 -n30 -n38\" Refer to the ChkTeX documentation.");
2180 case RC_CURSOR_FOLLOWS_SCROLLBAR:
2181 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.");
2184 case RC_CUSTOM_EXPORT_COMMAND:
2187 case RC_CUSTOM_EXPORT_FORMAT:
2190 case RC_CYGWIN_PATH_FIX:
2193 case RC_DATE_INSERT_FORMAT:
2194 //xgettext:no-c-format
2195 str = _("This accepts the normal strftime formats; see man strftime for full details. E.g.\"%A, %e. %B %Y\".");
2198 case RC_DEFAULT_LANGUAGE:
2199 str = _("New documents will be assigned this language.");
2202 case RC_DEFAULT_PAPERSIZE:
2203 str = _("Specify the default paper size.");
2206 case RC_DIALOGS_ICONIFY_WITH_MAIN:
2207 str = _("Iconify the dialogs when the main window is iconified. (Affects only dialogs shown after the change has been made.)");
2210 case RC_DISPLAY_GRAPHICS:
2211 str = _("Select how LyX will display any graphics.");
2214 case RC_DOCUMENTPATH:
2215 str = _("The default path for your documents. An empty value selects the directory LyX was started from.");
2219 case RC_USE_ESC_CHARS:
2220 str = _("Specify additional chars that can be part of a word.");
2223 case RC_FONT_ENCODING:
2224 str = _("The font encoding used for the LaTeX2e fontenc package. T1 is highly recommended for non-English languages.");
2230 case RC_INDEX_COMMAND:
2231 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\".");
2238 case RC_KBMAP_PRIMARY:
2239 case RC_KBMAP_SECONDARY:
2240 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.");
2243 case RC_LABEL_INIT_LENGTH:
2244 str = _("Maximum number of words in the initialization string for a new label");
2247 case RC_LANGUAGE_AUTO_BEGIN:
2248 str = _("Select if a language switching command is needed at the beginning of the document.");
2251 case RC_LANGUAGE_AUTO_END:
2252 str = _("Select if a language switching command is needed at the end of the document.");
2255 case RC_LANGUAGE_COMMAND_BEGIN:
2256 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.");
2259 case RC_LANGUAGE_COMMAND_END:
2260 str = _("The LaTeX command for changing back to the language of the document.");
2263 case RC_LANGUAGE_COMMAND_LOCAL:
2264 str = _("The LaTeX command for local changing of the language.");
2267 case RC_LANGUAGE_GLOBAL_OPTIONS:
2268 str = _("De-select if you don't want the language(s) used as an argument to \\documentclass.");
2271 case RC_LANGUAGE_PACKAGE:
2272 str = _("The LaTeX command for loading the language package. E.g. \"\\usepackage{babel}\", \"\\usepackage{omega}\".");
2275 case RC_LANGUAGE_USE_BABEL:
2276 str = _("De-select if you don't want babel to be used when the language of the document is the default language.");
2279 case RC_USELASTFILEPOS:
2280 str = _("De-select if you do not want LyX to scroll to saved position.");
2283 case RC_LOADSESSION:
2284 str = _("De-select to prevent loading files opened from the last lyx session.");
2287 case RC_MAKE_BACKUP:
2288 str = _("De-select if you don't want LyX to create backup files.");
2291 case RC_MARK_FOREIGN_LANGUAGE:
2292 str = _("Select to control the highlighting of words with a language foreign to that of the document.");
2295 case RC_NUMLASTFILES:
2296 str = bformat(_("Maximal number of lastfiles. Up to %1$d can appear in the file menu."), maxlastfiles);
2299 case RC_PATH_PREFIX:
2300 str = _("Specify those directories which should be "
2301 "prepended to the PATH environment variable. "
2302 "Use the OS native format.");
2306 case RC_USE_PERS_DICT:
2307 str = _("Specify an alternate personal dictionary file. E.g. \".ispell_english\".");
2310 case RC_POPUP_BOLD_FONT:
2311 str = _("The bold font in the dialogs.");
2314 case RC_POPUP_FONT_ENCODING:
2315 str = _("The encoding for the menu/popups fonts.");
2318 case RC_POPUP_NORMAL_FONT:
2319 str = _("The normal font in the dialogs.");
2323 str = _("Shows a typeset preview of things such as math");
2326 case RC_PREVIEW_HASHED_LABELS:
2327 str = _("Previewed equations will have \"(#)\" labels rather than numbered ones");
2330 case RC_PREVIEW_SCALE_FACTOR:
2331 str = _("Scale the preview size to suit.");
2334 case RC_PRINTCOLLCOPIESFLAG:
2335 str = _("The option for specifying whether the copies should be collated.");
2338 case RC_PRINTCOPIESFLAG:
2339 str = _("The option for specifying the number of copies to print.");
2343 str = _("The default printer to print on. If none is specified, LyX will use the environment variable PRINTER.");
2346 case RC_PRINTEVENPAGEFLAG:
2347 str = _("The option to print only even pages.");
2350 case RC_PRINTEXSTRAOPTIONS:
2351 str = _("Extra options to pass to printing program after everything else, but before the filename of the DVI file to be printed.");
2354 case RC_PRINTFILEEXTENSION:
2355 str = _("Extension of printer program output file. Usually \".ps\".");
2358 case RC_PRINTLANDSCAPEFLAG:
2359 str = _("The option to print out in landscape.");
2362 case RC_PRINTODDPAGEFLAG:
2363 str = _("The option to print only odd pages.");
2366 case RC_PRINTPAGERANGEFLAG:
2367 str = _("The option for specifying a comma-separated list of pages to print.");
2370 case RC_PRINTPAPERDIMENSIONFLAG:
2371 str = _("Option to specify the dimensions of the print paper.");
2374 case RC_PRINTPAPERFLAG:
2375 str = _("The option to specify paper type.");
2378 case RC_PRINTREVERSEFLAG:
2379 str = _("The option to reverse the order of the pages printed.");
2382 case RC_PRINTSPOOL_COMMAND:
2383 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.");
2386 case RC_PRINTSPOOL_PRINTERPREFIX:
2387 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.");
2390 case RC_PRINTTOFILE:
2391 str = _("Option to pass to the print program to print to a file.");
2394 case RC_PRINTTOPRINTER:
2395 str = _("Option to pass to the print program to print on a specific printer.");
2398 case RC_PRINT_ADAPTOUTPUT:
2399 str = _("Select for LyX to pass the name of the destination printer to your print command.");
2402 case RC_PRINT_COMMAND:
2403 str = _("Your favorite print program, e.g. \"dvips\", \"dvilj4\".");
2406 case RC_RTL_SUPPORT:
2407 str = _("Select to enable support of right-to-left languages (e.g. Hebrew, Arabic).");
2411 str = _("DPI (dots per inch) of your monitor is auto-detected by LyX. If that goes wrong, override the setting here.");
2414 case RC_SCREEN_FONT_ENCODING:
2415 str = _("The encoding for the screen fonts.");
2418 case RC_SCREEN_FONT_ROMAN:
2419 case RC_SCREEN_FONT_SANS:
2420 case RC_SCREEN_FONT_TYPEWRITER:
2421 str = _("The screen fonts used to display the text while editing.");
2424 case RC_SCREEN_FONT_ROMAN_FOUNDRY:
2425 case RC_SCREEN_FONT_SANS_FOUNDRY:
2426 case RC_SCREEN_FONT_TYPEWRITER_FOUNDRY:
2429 case RC_SCREEN_FONT_SCALABLE:
2430 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.");
2433 case RC_SCREEN_FONT_SIZES:
2434 str = _("The font sizes used for calculating the scaling of the screen fonts.");
2437 case RC_SCREEN_ZOOM:
2438 //xgettext:no-c-format
2439 str = _("The zoom percentage for screen fonts. A setting of 100% will make the fonts roughly the same size as on paper.");
2442 case RC_SCREEN_GEOMETRY_HEIGHT:
2443 case RC_SCREEN_GEOMETRY_WIDTH:
2444 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).");
2447 case RC_SCREEN_GEOMETRY_XYSAVED:
2448 str = _("Allow session manager to save and restore windows position.");
2452 str = _("This starts the lyxserver. The pipes get an additional extension \".in\" and \".out\". Only for advanced users.");
2458 case RC_SHOW_BANNER:
2459 str = _("De-select if you don't want the startup banner.");
2462 case RC_SPELL_COMMAND:
2463 str = _("What command runs the spellchecker?");
2466 case RC_TEMPDIRPATH:
2467 str = _("LyX will place its temporary directories in this path. They will be deleted when you quit LyX.");
2470 case RC_TEMPLATEPATH:
2471 str = _("The path that LyX will set when offering to choose a template. An empty value selects the directory LyX was started from.");
2474 case RC_TEX_ALLOWS_SPACES:
2478 str = _("The UI (user interface) file. Can either specify an absolute path, or LyX will look in its global and local ui/ directories.");
2490 case RC_USE_INP_ENC:
2491 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.");
2494 case RC_USE_SPELL_LIB:
2497 case RC_VIEWDVI_PAPEROPTION:
2498 str = _("Specify the paper command to DVI viewer (leave empty or use \"-paper\")");
2505 str = _("The number of lines that are scrolled by mice with wheels or five button mice.");
2515 // The global instance
2518 // The global copy of the system lyxrc entries (everything except preferences)