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"
46 namespace os = support::os;
48 using support::ascii_lowercase;
49 using support::bformat;
50 using support::expandPath;
51 using support::getEnv;
52 using support::libFileSearch;
66 // when adding something to this array keep it sorted!
67 keyword_item lyxrcTags[] = {
68 { "\\accept_compound", LyXRC::RC_ACCEPT_COMPOUND },
69 { "\\alternate_language", LyXRC::RC_ALT_LANG },
70 { "\\ascii_linelen", LyXRC::RC_ASCII_LINELEN },
71 { "\\ascii_roff_command", LyXRC::RC_ASCIIROFF_COMMAND },
72 { "\\auto_number", LyXRC::RC_AUTO_NUMBER },
73 { "\\auto_region_delete", LyXRC::RC_AUTOREGIONDELETE },
74 { "\\auto_reset_options", LyXRC::RC_AUTORESET_OPTIONS },
75 { "\\autosave", LyXRC::RC_AUTOSAVE },
76 { "\\backupdir_path", LyXRC::RC_BACKUPDIR_PATH },
77 { "\\bibtex_command", LyXRC::RC_BIBTEX_COMMAND },
78 { "\\bind_file", LyXRC::RC_BINDFILE },
79 { "\\check_lastfiles", LyXRC::RC_CHECKLASTFILES },
80 { "\\chktex_command", LyXRC::RC_CHKTEX_COMMAND },
81 { "\\converter", LyXRC::RC_CONVERTER },
82 { "\\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 { "\\default_language", LyXRC::RC_DEFAULT_LANGUAGE },
88 { "\\default_papersize", LyXRC::RC_DEFAULT_PAPERSIZE },
89 { "\\dialogs_iconify_with_main", LyXRC::RC_DIALOGS_ICONIFY_WITH_MAIN },
90 { "\\display_graphics", LyXRC::RC_DISPLAY_GRAPHICS },
91 { "\\document_path", LyXRC::RC_DOCUMENTPATH },
92 { "\\escape_chars", LyXRC::RC_ESC_CHARS },
93 { "\\font_encoding", LyXRC::RC_FONT_ENCODING },
94 { "\\format", LyXRC::RC_FORMAT },
95 { "\\index_command", LyXRC::RC_INDEX_COMMAND },
96 { "\\input", LyXRC::RC_INPUT },
97 { "\\kbmap", LyXRC::RC_KBMAP },
98 { "\\kbmap_primary", LyXRC::RC_KBMAP_PRIMARY },
99 { "\\kbmap_secondary", LyXRC::RC_KBMAP_SECONDARY },
100 { "\\label_init_length", LyXRC::RC_LABEL_INIT_LENGTH },
101 { "\\language_auto_begin", LyXRC::RC_LANGUAGE_AUTO_BEGIN },
102 { "\\language_auto_end", LyXRC::RC_LANGUAGE_AUTO_END },
103 { "\\language_command_begin", LyXRC::RC_LANGUAGE_COMMAND_BEGIN },
104 { "\\language_command_end", LyXRC::RC_LANGUAGE_COMMAND_END },
105 { "\\language_command_local", LyXRC::RC_LANGUAGE_COMMAND_LOCAL },
106 { "\\language_global_options", LyXRC::RC_LANGUAGE_GLOBAL_OPTIONS },
107 { "\\language_package", LyXRC::RC_LANGUAGE_PACKAGE },
108 { "\\language_use_babel", LyXRC::RC_LANGUAGE_USE_BABEL },
109 { "\\load_session", LyXRC::RC_LOADSESSION },
110 { "\\make_backup", LyXRC::RC_MAKE_BACKUP },
111 { "\\mark_foreign_language", LyXRC::RC_MARK_FOREIGN_LANGUAGE },
112 { "\\num_lastfiles", LyXRC::RC_NUMLASTFILES },
113 { "\\path_prefix", LyXRC::RC_PATH_PREFIX },
114 { "\\personal_dictionary", LyXRC::RC_PERS_DICT },
115 { "\\popup_bold_font", LyXRC::RC_POPUP_BOLD_FONT },
116 { "\\popup_font_encoding", LyXRC::RC_POPUP_FONT_ENCODING },
117 { "\\popup_normal_font", LyXRC::RC_POPUP_NORMAL_FONT },
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_encoding", LyXRC::RC_SCREEN_FONT_ENCODING },
142 // compatibility with versions older than 1.2.0 only Angus 10 Jan 2002
143 { "\\screen_font_encoding_menu", LyXRC::RC_POPUP_FONT_ENCODING },
144 // compatibility with versions older than 1.2.0 only Angus 10 Jan 2002
145 { "\\screen_font_menu", LyXRC::RC_POPUP_BOLD_FONT },
146 // compatibility with versions older than 1.2.0 only Angus 10 Jan 2002
147 { "\\screen_font_popup", LyXRC::RC_POPUP_NORMAL_FONT },
148 { "\\screen_font_roman", LyXRC::RC_SCREEN_FONT_ROMAN },
149 { "\\screen_font_roman_foundry", LyXRC::RC_SCREEN_FONT_ROMAN_FOUNDRY },
150 { "\\screen_font_sans", LyXRC::RC_SCREEN_FONT_SANS },
151 { "\\screen_font_sans_foundry", LyXRC::RC_SCREEN_FONT_SANS_FOUNDRY },
152 { "\\screen_font_scalable", LyXRC::RC_SCREEN_FONT_SCALABLE },
153 { "\\screen_font_sizes", LyXRC::RC_SCREEN_FONT_SIZES },
154 { "\\screen_font_typewriter", LyXRC::RC_SCREEN_FONT_TYPEWRITER },
155 { "\\screen_font_typewriter_foundry", LyXRC::RC_SCREEN_FONT_TYPEWRITER_FOUNDRY },
156 { "\\screen_geometry_height", LyXRC::RC_SCREEN_GEOMETRY_HEIGHT },
157 { "\\screen_geometry_width", LyXRC::RC_SCREEN_GEOMETRY_WIDTH },
158 { "\\screen_geometry_xysaved", LyXRC::RC_SCREEN_GEOMETRY_XYSAVED },
159 { "\\screen_zoom", LyXRC::RC_SCREEN_ZOOM },
160 { "\\serverpipe", LyXRC::RC_SERVERPIPE },
161 { "\\set_color", LyXRC::RC_SET_COLOR },
162 { "\\show_banner", LyXRC::RC_SHOW_BANNER },
163 { "\\spell_command", LyXRC::RC_SPELL_COMMAND },
164 { "\\tempdir_path", LyXRC::RC_TEMPDIRPATH },
165 { "\\template_path", LyXRC::RC_TEMPLATEPATH },
166 { "\\tex_allows_spaces", LyXRC::RC_TEX_ALLOWS_SPACES },
167 { "\\tex_expects_windows_paths", LyXRC::RC_TEX_EXPECTS_WINDOWS_PATHS },
168 { "\\ui_file", LyXRC::RC_UIFILE },
169 { "\\use_alt_language", LyXRC::RC_USE_ALT_LANG },
170 { "\\use_escape_chars", LyXRC::RC_USE_ESC_CHARS },
171 { "\\use_input_encoding", LyXRC::RC_USE_INP_ENC },
172 { "\\use_lastfilepos", LyXRC::RC_USELASTFILEPOS },
173 { "\\use_personal_dictionary", LyXRC::RC_USE_PERS_DICT },
174 // compatibility with versions older than 1.4.0 only
175 { "\\use_pspell", LyXRC::RC_USE_SPELL_LIB },
176 { "\\use_spell_lib", LyXRC::RC_USE_SPELL_LIB },
177 // compatibility with versions older than 1.4.0 only
178 { "\\use_tempdir", LyXRC::RC_USETEMPDIR },
179 { "\\user_email", LyXRC::RC_USER_EMAIL },
180 { "\\user_name", LyXRC::RC_USER_NAME },
181 { "\\view_dvi_paper_option", LyXRC::RC_VIEWDVI_PAPEROPTION },
182 // compatibility with versions older than 1.4.0 only
183 { "\\viewer" ,LyXRC::RC_VIEWER}
186 const int lyxrcCount = sizeof(lyxrcTags) / sizeof(keyword_item);
197 void LyXRC::setDefaults() {
200 // Get printer from the environment. If fail, use default "",
201 // assuming that everything is set up correctly.
202 printer = getEnv("PRINTER");
203 print_adapt_output = false;
204 print_command = "dvips";
205 print_evenpage_flag = "-B";
206 print_oddpage_flag = "-A";
207 print_pagerange_flag = "-pp";
208 print_copies_flag = "-c";
209 print_collcopies_flag = "-C";
210 print_reverse_flag = "-r";
211 print_landscape_flag = "-t landscape";
212 print_to_printer = "-P";
213 print_to_file = "-o ";
214 print_file_extension = ".ps";
215 print_paper_flag = "-t";
216 print_paper_dimension_flag = "-T";
217 document_path.erase();
218 view_dvi_paper_option.erase();
219 default_papersize = PAPER_DEFAULT;
220 custom_export_format = "ps";
221 chktex_command = "chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38";
222 bibtex_command = "bibtex";
224 index_command = "makeindex -c -q";
226 // Because a screen typically is wider than a piece of paper:
230 geometry_xysaved = true;
231 // Default LaTeX font size:
232 font_sizes[LyXFont::SIZE_TINY] = "5.0";
233 font_sizes[LyXFont::SIZE_SCRIPT] = "7.0";
234 font_sizes[LyXFont::SIZE_FOOTNOTE] = "8.0";
235 font_sizes[LyXFont::SIZE_SMALL] = "9.0";
236 font_sizes[LyXFont::SIZE_NORMAL] = "10.0";
237 font_sizes[LyXFont::SIZE_LARGE] = "12.0";
238 font_sizes[LyXFont::SIZE_LARGER] = "14.4";
239 font_sizes[LyXFont::SIZE_LARGEST] = "17.26";
240 font_sizes[LyXFont::SIZE_HUGE] = "20.74";
241 font_sizes[LyXFont::SIZE_HUGER] = "24.88";
242 use_scalable_fonts = true;
243 roman_font_name = "";
245 typewriter_font_name = "";
246 popup_bold_font = "-*-helvetica-bold-r";
247 popup_normal_font = "-*-helvetica-medium-r";
248 font_norm = "iso8859-1";
249 font_norm_type = ISO_8859_1;
250 popup_font_encoding.erase();
252 auto_region_delete = true;
253 auto_reset_options = false;
255 num_lastfiles = maxlastfiles;
256 check_lastfiles = true;
257 use_lastfilepos = true;
258 load_session = false;
260 backupdir_path.erase();
261 display_graphics = graphics::ColorDisplay;
262 // Spellchecker settings:
263 use_spell_lib = true;
264 isp_command = "ispell";
265 isp_accept_compound = false;
266 isp_use_input_encoding = false;
267 isp_use_alt_lang = false;
268 isp_use_pers_dict = false;
269 isp_use_esc_chars = false;
273 mark_foreign_language = true;
274 language_auto_begin = true;
275 language_auto_end = true;
276 language_global_options = true;
277 language_use_babel = true;
278 language_package = "\\usepackage{babel}";
279 language_command_begin = "\\selectlanguage{$$lang}";
280 language_command_local = "\\foreignlanguage{$$lang}{";
281 default_language = "english";
283 windows_style_tex_paths = false;
284 tex_allows_spaces = false;
285 date_insert_format = "%x";
286 cursor_follows_scrollbar = false;
287 dialogs_iconify_with_main = false;
288 label_init_length = 3;
289 preview = PREVIEW_OFF;
290 preview_hashed_labels = false;
291 preview_scale_factor = "0.9";
293 user_name = support::user_name();
295 user_email = support::user_email();
301 void oldFontFormat(string & family, string & foundry)
303 if (family.empty() || family[0] != '-')
305 foundry = token(family, '-', 1);
306 family = token(family, '-', 2);
314 int LyXRC::read(string const & filename)
316 LyXLex lexrc(lyxrcTags, lyxrcCount);
317 if (lyxerr.debugging(Debug::PARSER))
318 lexrc.printTable(lyxerr);
320 lexrc.setFile(filename);
321 if (!lexrc.isOK()) return -2;
323 lyxerr[Debug::LYXRC] << "Reading '" << filename << "'..." << endl;
329 int LyXRC::read(std::istream & is)
331 LyXLex lexrc(lyxrcTags, lyxrcCount);
332 if (lyxerr.debugging(Debug::PARSER))
333 lexrc.printTable(lyxerr);
336 if (!lexrc.isOK()) return -2;
338 lyxerr[Debug::LYXRC] << "Reading istream..." << endl;
344 int LyXRC::read(LyXLex & lexrc)
346 if (!lexrc.isOK()) return -2;
348 while (lexrc.isOK()) {
349 // By using two switches we take advantage of the compiler
350 // telling us if we have missed a LyXRCTags element in
351 // the second switch.
352 // Note that this also shows a problem with LyXLex since it
353 // helps us avoid taking advantage of the strictness of the
356 int le = lexrc.lex();
358 case LyXLex::LEX_UNDEF:
359 lexrc.printError("Unknown tag `$$Token'");
361 case LyXLex::LEX_FEOF:
365 switch (static_cast<LyXRCTags>(le)) {
366 case RC_INPUT: // Include file
369 libFileSearch(string(),
372 lexrc.printError("Error reading "
373 "included file: "+tmp);
379 bind_file = os::internal_path(lexrc.getString());
385 ui_file = os::internal_path(lexrc.getString());
389 case RC_AUTORESET_OPTIONS:
391 auto_reset_options = lexrc.getBool();
395 case RC_DISPLAY_GRAPHICS:
397 display_graphics = graphics::displayTranslator().find(lexrc.getString());
401 case RC_TEX_EXPECTS_WINDOWS_PATHS:
403 windows_style_tex_paths = lexrc.getBool();
407 case RC_TEX_ALLOWS_SPACES:
409 tex_allows_spaces = lexrc.getBool();
415 use_kbmap = lexrc.getBool();
419 case RC_KBMAP_PRIMARY:
421 string const kmap(os::internal_path(lexrc.getString()));
424 } else if (!libFileSearch("kbd", kmap,
426 primary_kbmap = kmap;
428 lexrc.printError("LyX: Keymap `$$Token' not found");
433 case RC_KBMAP_SECONDARY:
435 string const kmap(os::internal_path(lexrc.getString()));
438 } else if (!libFileSearch("kbd", kmap,
440 secondary_kbmap = kmap;
442 lexrc.printError("LyX: Keymap `$$Token' not found");
447 case RC_FONT_ENCODING:
449 fontenc = lexrc.getString();
455 printer = lexrc.getString();
459 case RC_PRINT_COMMAND:
461 print_command = lexrc.getString();
465 case RC_PRINTEVENPAGEFLAG:
467 print_evenpage_flag = lexrc.getString();
471 case RC_PRINTODDPAGEFLAG:
473 print_oddpage_flag = lexrc.getString();
477 case RC_PRINTPAGERANGEFLAG:
479 print_pagerange_flag = lexrc.getString();
483 case RC_PRINTCOPIESFLAG:
485 print_copies_flag = lexrc.getString();
489 case RC_PRINTCOLLCOPIESFLAG:
491 print_collcopies_flag = lexrc.getString();
495 case RC_PRINTREVERSEFLAG:
497 print_reverse_flag = lexrc.getString();
501 case RC_PRINTLANDSCAPEFLAG:
503 print_landscape_flag = lexrc.getString();
507 case RC_PRINTTOPRINTER:
509 print_to_printer = lexrc.getString();
513 case RC_PRINT_ADAPTOUTPUT:
515 print_adapt_output = lexrc.getBool();
521 print_to_file = os::internal_path(lexrc.getString());
525 case RC_PRINTFILEEXTENSION:
527 print_file_extension = lexrc.getString();
531 case RC_PRINTEXSTRAOPTIONS:
533 print_extra_options = lexrc.getString();
537 case RC_PRINTSPOOL_COMMAND:
539 print_spool_command = lexrc.getString();
543 case RC_PRINTSPOOL_PRINTERPREFIX:
545 print_spool_printerprefix = lexrc.getString();
549 case RC_PRINTPAPERDIMENSIONFLAG:
551 print_paper_dimension_flag = lexrc.getString();
555 case RC_PRINTPAPERFLAG:
557 print_paper_flag = lexrc.getString();
561 case RC_CUSTOM_EXPORT_COMMAND:
563 custom_export_command = lexrc.getString();
567 case RC_CUSTOM_EXPORT_FORMAT:
569 custom_export_format = lexrc.getString();
573 case RC_DEFAULT_PAPERSIZE:
576 ascii_lowercase(lexrc.getString());
577 if (size == "usletter")
580 else if (size == "legal")
583 else if (size == "executive")
586 else if (size == "a3")
589 else if (size == "a4")
592 else if (size == "a5")
595 else if (size == "b5")
598 else if (size == "default")
604 case RC_VIEWDVI_PAPEROPTION:
606 view_dvi_paper_option = lexrc.getString();
608 view_dvi_paper_option.erase();
612 case RC_CHKTEX_COMMAND:
614 chktex_command = lexrc.getString();
618 case RC_BIBTEX_COMMAND:
620 bibtex_command = lexrc.getString();
624 case RC_INDEX_COMMAND:
626 index_command = lexrc.getString();
632 dpi = lexrc.getInteger();
638 zoom = lexrc.getInteger();
642 case RC_SCREEN_GEOMETRY_HEIGHT:
644 geometry_height = lexrc.getInteger();
648 case RC_SCREEN_GEOMETRY_WIDTH:
650 geometry_width = lexrc.getInteger();
654 case RC_SCREEN_GEOMETRY_XYSAVED:
656 geometry_xysaved = lexrc.getBool();
660 case RC_SCREEN_FONT_SIZES:
662 font_sizes[LyXFont::SIZE_TINY] =
666 font_sizes[LyXFont::SIZE_SCRIPT] =
670 font_sizes[LyXFont::SIZE_FOOTNOTE] =
674 font_sizes[LyXFont::SIZE_SMALL] =
678 font_sizes[LyXFont::SIZE_NORMAL] =
682 font_sizes[LyXFont::SIZE_LARGE] =
686 font_sizes[LyXFont::SIZE_LARGER] =
690 font_sizes[LyXFont::SIZE_LARGEST] =
694 font_sizes[LyXFont::SIZE_HUGE] =
698 font_sizes[LyXFont::SIZE_HUGER] =
703 case RC_SCREEN_FONT_SCALABLE:
705 use_scalable_fonts = lexrc.getBool();
711 autosave = lexrc.getInteger();
715 case RC_DOCUMENTPATH:
717 document_path = os::internal_path(lexrc.getString());
718 document_path = expandPath(document_path);
722 case RC_TEMPLATEPATH:
724 template_path = os::internal_path(lexrc.getString());
725 template_path = expandPath(template_path);
731 tempdir_path = os::internal_path(lexrc.getString());
732 tempdir_path = expandPath(tempdir_path);
738 lyxerr << "Ignoring obsolete use_tempdir flag." << endl;
742 case RC_USELASTFILEPOS:
744 use_lastfilepos = lexrc.getBool();
750 load_session = lexrc.getBool();
754 case RC_NUMLASTFILES:
756 num_lastfiles = lexrc.getInteger();
760 case RC_CHECKLASTFILES:
762 check_lastfiles = lexrc.getBool();
766 case RC_SCREEN_FONT_ROMAN:
768 roman_font_name = lexrc.getString();
769 oldFontFormat(roman_font_name,
774 case RC_SCREEN_FONT_SANS:
776 sans_font_name = lexrc.getString();
777 oldFontFormat(sans_font_name, sans_font_foundry);
781 case RC_SCREEN_FONT_TYPEWRITER:
783 typewriter_font_name = lexrc.getString();
784 oldFontFormat(typewriter_font_name,
785 typewriter_font_foundry);
789 case RC_SCREEN_FONT_ROMAN_FOUNDRY:
791 roman_font_foundry = lexrc.getString();
795 case RC_SCREEN_FONT_SANS_FOUNDRY:
797 sans_font_foundry = lexrc.getString();
801 case RC_SCREEN_FONT_TYPEWRITER_FOUNDRY:
803 typewriter_font_foundry = lexrc.getString();
807 case RC_SCREEN_FONT_ENCODING:
809 font_norm = lexrc.getString();
810 set_font_norm_type();
814 case RC_POPUP_BOLD_FONT:
816 popup_bold_font = lexrc.getString();
820 case RC_POPUP_NORMAL_FONT:
822 popup_normal_font = lexrc.getString();
826 case RC_POPUP_FONT_ENCODING:
828 popup_font_encoding = lexrc.getString();
834 string lyx_name, x11_name;
837 lyx_name = lexrc.getString();
839 lexrc.printError("Missing color tag.");
844 x11_name = lexrc.getString();
846 lexrc.printError("Missing color name for color: `$$Token'");
850 LColor::color const col =
851 lcolor.getFromLyXName(lyx_name);
852 if (col == LColor::none ||
853 col == LColor::inherit ||
854 col == LColor::ignore)
857 if (!lcolor.setColor(col, x11_name)) {
858 lyxerr << "Bad lyxrc set_color for "
864 case RC_AUTOREGIONDELETE:
865 // Auto region delete defaults to true
867 auto_region_delete = lexrc.getBool();
873 lyxpipes = os::internal_path(lexrc.getString());
874 lyxpipes = expandPath(lyxpipes);
878 case RC_CURSOR_FOLLOWS_SCROLLBAR:
880 cursor_follows_scrollbar = lexrc.getBool();
884 case RC_DIALOGS_ICONIFY_WITH_MAIN:
886 dialogs_iconify_with_main = lexrc.getBool();
890 case RC_ASCIIROFF_COMMAND:
892 ascii_roff_command = lexrc.getString();
895 case RC_ASCII_LINELEN:
897 ascii_linelen = lexrc.getInteger();
900 // Spellchecker settings:
901 case RC_USE_SPELL_LIB:
903 use_spell_lib = lexrc.getBool();
906 case RC_SPELL_COMMAND:
908 isp_command = lexrc.getString();
911 case RC_ACCEPT_COMPOUND:
913 isp_accept_compound = lexrc.getBool();
918 isp_use_input_encoding = lexrc.getBool();
921 case RC_USE_ALT_LANG:
923 isp_use_alt_lang = lexrc.getBool();
926 case RC_USE_PERS_DICT:
928 isp_use_pers_dict = lexrc.getBool();
931 case RC_USE_ESC_CHARS:
933 isp_use_esc_chars = lexrc.getBool();
938 isp_alt_lang = lexrc.getString();
943 isp_pers_dict = os::internal_path(lexrc.getString());
948 isp_esc_chars = lexrc.getString();
953 make_backup = lexrc.getBool();
956 case RC_BACKUPDIR_PATH:
958 backupdir_path = os::internal_path(lexrc.getString());
959 backupdir_path = expandPath(backupdir_path);
962 case RC_DATE_INSERT_FORMAT:
964 date_insert_format = lexrc.getString();
967 case RC_LANGUAGE_PACKAGE:
969 language_package = lexrc.getString();
972 case RC_LANGUAGE_AUTO_BEGIN:
974 language_auto_begin = lexrc.getBool();
977 case RC_LANGUAGE_AUTO_END:
979 language_auto_end = lexrc.getBool();
982 case RC_LANGUAGE_GLOBAL_OPTIONS:
984 language_global_options = lexrc.getBool();
987 case RC_LANGUAGE_USE_BABEL:
989 language_use_babel = lexrc.getBool();
992 case RC_LANGUAGE_COMMAND_BEGIN:
994 language_command_begin = lexrc.getString();
997 case RC_LANGUAGE_COMMAND_END:
999 language_command_end = lexrc.getString();
1002 case RC_LANGUAGE_COMMAND_LOCAL:
1004 language_command_local = lexrc.getString();
1007 case RC_RTL_SUPPORT:
1009 rtl_support = lexrc.getBool();
1012 case RC_AUTO_NUMBER:
1014 auto_number = lexrc.getBool();
1017 case RC_MARK_FOREIGN_LANGUAGE:
1019 mark_foreign_language = lexrc.getBool();
1024 string fmt, command;
1026 fmt = lexrc.getString();
1029 command = lexrc.getString();
1031 movers.set(fmt, command);
1035 case RC_CONVERTER: {
1036 string from, to, command, flags;
1038 from = lexrc.getString();
1041 to = lexrc.getString();
1044 command = lexrc.getString();
1047 flags = lexrc.getString();
1049 if (command.empty()) {
1050 converters.erase(from, to);
1052 converters.add(from, to, command, flags);
1056 // compatibility with versions older than 1.4.0 only
1058 string format, command;
1060 format = lexrc.getString();
1063 command = lexrc.getString();
1065 formats.setViewer(format, command);
1069 string format, extension, prettyname, shortcut;
1071 format = lexrc.getString();
1074 extension = lexrc.getString();
1077 prettyname = lexrc.getString();
1080 shortcut = lexrc.getString();
1082 string viewer, editor;
1084 viewer = lexrc.getString();
1086 editor = lexrc.getString();
1088 // Hack to ensure compatibility with versions older
1090 int le = lexrc.lex();
1091 if (le != LyXLex::LEX_FEOF && le != LyXLex::LEX_UNDEF) {
1092 flags = lexrc.getString();
1093 if (le != LyXLex::LEX_DATA) {
1094 // We have got a known token.
1095 // Therefore this is an old style
1096 // format definition without
1098 lexrc.pushToken(flags);
1102 int flgs = Format::none;
1103 while (!flags.empty()) {
1105 flags = support::split(flags, flag, ',');
1106 if (flag == "document")
1107 flgs |= Format::document;
1108 else if (flag == "vector")
1109 flgs |= Format::vector;
1111 lyxerr << "Ignoring unknown flag `"
1112 << flag << "' for format `"
1113 << format << "'." << endl;
1115 if (prettyname.empty()) {
1116 if (converters.formatIsUsed(format)) {
1117 lyxerr << "Can't delete format "
1120 formats.erase(format);
1123 formats.add(format, extension, prettyname,
1124 shortcut, viewer, editor, flgs);
1128 case RC_DEFAULT_LANGUAGE:
1130 default_language = lexrc.getString();
1134 case RC_LABEL_INIT_LENGTH:
1136 label_init_length = lexrc.getInteger();
1140 case RC_SHOW_BANNER:
1142 show_banner = lexrc.getBool();
1148 string const tmp = lexrc.getString();
1149 if (tmp == "true" || tmp == "on")
1150 preview = PREVIEW_ON;
1151 else if (tmp == "no_math")
1152 preview = PREVIEW_NO_MATH;
1154 preview = PREVIEW_OFF;
1155 if (tmp != "false" && tmp != "off")
1156 lyxerr << "Unrecognized "
1158 << tmp << '\n' << endl;
1163 case RC_PREVIEW_HASHED_LABELS:
1165 preview_hashed_labels = lexrc.getBool();
1169 case RC_PREVIEW_SCALE_FACTOR:
1171 preview_scale_factor = lexrc.getString();
1177 user_name = lexrc.getString();
1182 user_email = lexrc.getString();
1185 case RC_PATH_PREFIX:
1187 path_prefix = lexrc.getString();
1190 case RC_LAST: break; // this is just a dummy
1194 /// Update converters data-structures
1195 converters.update(formats);
1196 converters.buildGraph();
1202 void LyXRC::write(string const & filename, bool ignore_system_lyxrc) const
1204 ofstream ofs(filename.c_str());
1206 write(ofs, ignore_system_lyxrc);
1210 void LyXRC::print() const
1212 if (lyxerr.debugging())
1213 write(lyxerr, false);
1221 typedef std::pair<std::string, SpecialisedMover> Data;
1223 SameMover(Data const & comparison)
1224 : comparison_(comparison) {}
1226 bool operator()(Data const & data) const
1228 return data.first == comparison_.first &&
1229 data.second.command() == comparison_.second.command();
1237 void LyXRC::write(ostream & os, bool ignore_system_lyxrc) const
1239 os << "### This file is part of\n"
1240 << "### ========================================================\n"
1241 << "### LyX, The Document Processor\n"
1243 << "### Copyright 1995 Matthias Ettrich\n"
1244 << "### Copyright 1995-2001 The LyX Team.\n"
1246 << "### ========================================================\n"
1248 << "# This file is written by LyX, if you want to make your own\n"
1249 << "# modifications you should do them from inside LyX and save\n"
1252 // Why the switch you might ask. It is a trick to ensure that all
1253 // the elements in the LyXRCTags enum is handled. As you can see
1254 // there are no breaks at all. So it is just a huge fall-through.
1255 // The nice thing is that we will get a warning from the compiler
1256 // if we forget an element.
1257 LyXRCTags tag = RC_LAST;
1261 // input/include files are not done here
1263 if (ignore_system_lyxrc ||
1264 bind_file != system_lyxrc.bind_file) {
1265 string const path = os::external_path(bind_file);
1266 os << "\\bind_file \"" << path << "\"\n";
1272 << "# MISC SECTION ######################################\n"
1275 // bind files are not done here.
1277 case RC_PATH_PREFIX:
1278 if (ignore_system_lyxrc ||
1279 path_prefix != system_lyxrc.path_prefix) {
1280 os << "\\path_prefix \"" << path_prefix << "\"\n";
1284 if (ignore_system_lyxrc ||
1285 ui_file != system_lyxrc.ui_file) {
1286 string const path = os::external_path(ui_file);
1287 os << "\\ui_file \"" << path << "\"\n";
1289 case RC_AUTOREGIONDELETE:
1290 if (ignore_system_lyxrc ||
1291 auto_region_delete != system_lyxrc.auto_region_delete) {
1292 os << "# Set to false to inhibit automatic replacement of\n"
1293 << "# the current selection.\n"
1294 << "\\auto_region_delete " << convert<string>(auto_region_delete)
1297 case RC_AUTORESET_OPTIONS:
1298 if (ignore_system_lyxrc ||
1299 auto_reset_options != system_lyxrc.auto_reset_options) {
1300 os << "# Set to false to inhibit automatic reset of\n"
1301 << "# the class options to defaults on class change.\n"
1302 << "\\auto_reset_options "
1303 << convert<string>(auto_reset_options)
1307 if (ignore_system_lyxrc ||
1308 autosave != system_lyxrc.autosave) {
1309 os << "# The time interval between auto-saves in seconds.\n"
1310 << "\\autosave " << autosave << '\n';
1312 case RC_DISPLAY_GRAPHICS:
1313 if (ignore_system_lyxrc ||
1314 display_graphics != system_lyxrc.display_graphics) {
1315 os << "# Display graphics within LyX\n"
1316 << "# monochrome|grayscale|color|none\n"
1317 << "\\display_graphics "
1318 << graphics::displayTranslator().find(display_graphics)
1322 case RC_VIEWDVI_PAPEROPTION:
1323 if (ignore_system_lyxrc ||
1324 view_dvi_paper_option
1325 != system_lyxrc.view_dvi_paper_option) {
1326 os << "# Options used to specify paper size to the\n"
1327 << "# view_dvi_command (e.g. -paper)\n"
1328 << "\\view_dvi_paper_option \""
1329 << view_dvi_paper_option << "\"\n";
1331 case RC_DEFAULT_PAPERSIZE:
1332 if (ignore_system_lyxrc ||
1333 default_papersize != system_lyxrc.default_papersize) {
1334 os << "# The default papersize to use.\n"
1335 << "\\default_papersize \"";
1336 switch (default_papersize) {
1338 os << "default"; break;
1339 case PAPER_USLETTER:
1340 os << "usletter"; break;
1342 os << "legal"; break;
1343 case PAPER_USEXECUTIVE:
1344 os << "executive"; break;
1355 case PAPER_B4: break;
1359 case RC_CHKTEX_COMMAND:
1360 if (ignore_system_lyxrc ||
1361 chktex_command != system_lyxrc.chktex_command) {
1362 os << "\\chktex_command \"" << chktex_command << "\"\n";
1364 case RC_BIBTEX_COMMAND:
1365 if (ignore_system_lyxrc ||
1366 bibtex_command != system_lyxrc.bibtex_command) {
1367 os << "\\bibtex_command \"" << bibtex_command << "\"\n";
1369 case RC_INDEX_COMMAND:
1370 if (ignore_system_lyxrc ||
1371 index_command != system_lyxrc.index_command) {
1372 os << "\\index_command \"" << index_command << "\"\n";
1374 case RC_TEX_EXPECTS_WINDOWS_PATHS:
1375 if (ignore_system_lyxrc ||
1376 windows_style_tex_paths != system_lyxrc.windows_style_tex_paths) {
1377 os << "\\tex_expects_windows_paths "
1378 << convert<string>(windows_style_tex_paths) << '\n';
1380 case RC_TEX_ALLOWS_SPACES:
1381 if (tex_allows_spaces != system_lyxrc.tex_allows_spaces) {
1382 os << "\\tex_allows_spaces "
1383 << convert<string>(tex_allows_spaces) << '\n';
1386 if (ignore_system_lyxrc ||
1387 use_kbmap != system_lyxrc.use_kbmap) {
1388 os << "\\kbmap " << convert<string>(use_kbmap) << '\n';
1390 case RC_KBMAP_PRIMARY:
1391 if (ignore_system_lyxrc ||
1392 primary_kbmap != system_lyxrc.primary_kbmap) {
1393 string const path = os::external_path(primary_kbmap);
1394 os << "\\kbmap_primary \"" << path << "\"\n";
1396 case RC_KBMAP_SECONDARY:
1397 if (ignore_system_lyxrc ||
1398 secondary_kbmap != system_lyxrc.secondary_kbmap) {
1399 string const path = os::external_path(secondary_kbmap);
1400 os << "\\kbmap_secondary \"" << path << "\"\n";
1403 if (ignore_system_lyxrc ||
1404 lyxpipes != system_lyxrc.lyxpipes) {
1405 string const path = os::external_path(lyxpipes);
1406 os << "\\serverpipe \"" << path << "\"\n";
1408 case RC_DATE_INSERT_FORMAT:
1409 if (ignore_system_lyxrc ||
1410 date_insert_format != system_lyxrc.date_insert_format) {
1411 os << "\\date_insert_format \"" << date_insert_format
1414 case RC_LABEL_INIT_LENGTH:
1415 if (ignore_system_lyxrc ||
1416 label_init_length != system_lyxrc.label_init_length) {
1417 os << "\\label_init_length " << label_init_length
1422 os << "\\user_name \"" << user_name << "\"\n";
1425 os << "\\user_email \"" << user_email << "\"\n";
1427 case RC_SHOW_BANNER:
1428 if (ignore_system_lyxrc ||
1429 show_banner != system_lyxrc.show_banner) {
1430 os << "\\show_banner " << convert<string>(show_banner) << '\n';
1434 if (ignore_system_lyxrc ||
1435 preview != system_lyxrc.preview) {
1441 case PREVIEW_NO_MATH:
1448 os << "\\preview " << status << '\n';
1451 case RC_PREVIEW_HASHED_LABELS:
1452 if (ignore_system_lyxrc ||
1453 preview_hashed_labels !=
1454 system_lyxrc.preview_hashed_labels) {
1455 os << "\\preview_hashed_labels "
1456 << convert<string>(preview_hashed_labels) << '\n';
1459 case RC_PREVIEW_SCALE_FACTOR:
1460 if (ignore_system_lyxrc ||
1461 preview_scale_factor != system_lyxrc.preview_scale_factor) {
1462 os << "\\preview_scale_factor "
1463 << preview_scale_factor << '\n';
1467 << "# SCREEN & FONTS SECTION ############################\n"
1470 case RC_POPUP_NORMAL_FONT:
1471 if (ignore_system_lyxrc ||
1472 popup_normal_font != system_lyxrc.popup_normal_font) {
1473 os << "\\popup_normal_font \"" << popup_normal_font
1476 case RC_POPUP_BOLD_FONT:
1477 if (ignore_system_lyxrc ||
1478 popup_bold_font != system_lyxrc.popup_bold_font) {
1479 os << "\\popup_bold_font \"" << popup_bold_font
1482 case RC_POPUP_FONT_ENCODING:
1483 if (ignore_system_lyxrc ||
1484 popup_font_encoding != system_lyxrc.popup_font_encoding) {
1485 os << "\\popup_font_encoding \"" << popup_font_encoding
1489 if (ignore_system_lyxrc ||
1490 dpi != system_lyxrc.dpi) {
1491 os << "\\screen_dpi " << dpi << '\n';
1493 case RC_SCREEN_ZOOM:
1494 if (ignore_system_lyxrc ||
1495 zoom != system_lyxrc.zoom) {
1496 os << "\\screen_zoom " << zoom << '\n';
1498 case RC_SCREEN_GEOMETRY_HEIGHT:
1499 if (ignore_system_lyxrc ||
1500 geometry_height != system_lyxrc.geometry_height) {
1501 os << "\\screen_geometry_height " << geometry_height
1504 case RC_SCREEN_GEOMETRY_WIDTH:
1505 if (ignore_system_lyxrc ||
1506 geometry_width != system_lyxrc.geometry_width) {
1507 os << "\\screen_geometry_width " << geometry_width
1510 case RC_SCREEN_GEOMETRY_XYSAVED:
1511 if (ignore_system_lyxrc ||
1512 geometry_xysaved != system_lyxrc.geometry_xysaved) {
1513 os << "\\screen_geometry_xysaved " << convert<string>(geometry_xysaved)
1516 case RC_CURSOR_FOLLOWS_SCROLLBAR:
1517 if (ignore_system_lyxrc ||
1518 cursor_follows_scrollbar
1519 != system_lyxrc.cursor_follows_scrollbar) {
1520 os << "\\cursor_follows_scrollbar "
1521 << convert<string>(cursor_follows_scrollbar) << '\n';
1523 case RC_DIALOGS_ICONIFY_WITH_MAIN:
1524 if (ignore_system_lyxrc ||
1525 dialogs_iconify_with_main
1526 != system_lyxrc.dialogs_iconify_with_main) {
1527 os << "\\dialogs_iconify_with_main "
1528 << convert<string>(dialogs_iconify_with_main) << '\n';
1530 case RC_SCREEN_FONT_ROMAN:
1531 if (ignore_system_lyxrc ||
1532 roman_font_name != system_lyxrc.roman_font_name) {
1533 os << "\\screen_font_roman \"" << roman_font_name
1536 case RC_SCREEN_FONT_ROMAN_FOUNDRY:
1537 if (ignore_system_lyxrc ||
1538 roman_font_foundry != system_lyxrc.roman_font_foundry) {
1539 os << "\\screen_font_roman_foundry \"" << roman_font_foundry
1542 case RC_SCREEN_FONT_SANS:
1543 if (ignore_system_lyxrc ||
1544 sans_font_name != system_lyxrc.sans_font_name) {
1545 os << "\\screen_font_sans \"" << sans_font_name
1548 case RC_SCREEN_FONT_SANS_FOUNDRY:
1549 if (ignore_system_lyxrc ||
1550 sans_font_foundry != system_lyxrc.sans_font_foundry) {
1551 os << "\\screen_font_sans_foundry \"" << sans_font_foundry
1554 case RC_SCREEN_FONT_TYPEWRITER:
1555 if (ignore_system_lyxrc ||
1556 typewriter_font_name != system_lyxrc.typewriter_font_name) {
1557 os << "\\screen_font_typewriter \""
1558 << typewriter_font_name << "\"\n";
1560 case RC_SCREEN_FONT_TYPEWRITER_FOUNDRY:
1561 if (ignore_system_lyxrc ||
1562 typewriter_font_foundry != system_lyxrc.typewriter_font_foundry) {
1563 os << "\\screen_font_typewriter_foundry \""
1564 << typewriter_font_foundry << "\"\n";
1567 case RC_SCREEN_FONT_SCALABLE:
1568 if (ignore_system_lyxrc ||
1569 use_scalable_fonts != system_lyxrc.use_scalable_fonts) {
1570 os << "\\screen_font_scalable "
1571 << convert<string>(use_scalable_fonts)
1574 case RC_SCREEN_FONT_ENCODING:
1575 if (ignore_system_lyxrc ||
1576 font_norm != system_lyxrc.font_norm) {
1577 os << "\\screen_font_encoding \"" << font_norm
1580 case RC_SCREEN_FONT_SIZES:
1581 if (ignore_system_lyxrc ||
1582 font_sizes[LyXFont::SIZE_TINY]
1583 != system_lyxrc.font_sizes[LyXFont::SIZE_TINY] ||
1584 font_sizes[LyXFont::SIZE_SCRIPT]
1585 != system_lyxrc.font_sizes[LyXFont::SIZE_SCRIPT] ||
1586 font_sizes[LyXFont::SIZE_FOOTNOTE]
1587 != system_lyxrc.font_sizes[LyXFont::SIZE_FOOTNOTE] ||
1588 font_sizes[LyXFont::SIZE_SMALL]
1589 != system_lyxrc.font_sizes[LyXFont::SIZE_SMALL] ||
1590 font_sizes[LyXFont::SIZE_NORMAL]
1591 != system_lyxrc.font_sizes[LyXFont::SIZE_NORMAL] ||
1592 font_sizes[LyXFont::SIZE_LARGE]
1593 != system_lyxrc.font_sizes[LyXFont::SIZE_LARGE] ||
1594 font_sizes[LyXFont::SIZE_LARGER]
1595 != system_lyxrc.font_sizes[LyXFont::SIZE_LARGER] ||
1596 font_sizes[LyXFont::SIZE_LARGEST]
1597 != system_lyxrc.font_sizes[LyXFont::SIZE_LARGEST] ||
1598 font_sizes[LyXFont::SIZE_HUGE]
1599 != system_lyxrc.font_sizes[LyXFont::SIZE_HUGE] ||
1600 font_sizes[LyXFont::SIZE_HUGER]
1601 != system_lyxrc.font_sizes[LyXFont::SIZE_HUGER]) {
1602 os.setf(ios::fixed);
1604 os << "\\screen_font_sizes"
1605 << ' ' << font_sizes[LyXFont::SIZE_TINY]
1606 << ' ' << font_sizes[LyXFont::SIZE_SCRIPT]
1607 << ' ' << font_sizes[LyXFont::SIZE_FOOTNOTE]
1608 << ' ' << font_sizes[LyXFont::SIZE_SMALL]
1609 << ' ' << font_sizes[LyXFont::SIZE_NORMAL]
1610 << ' ' << font_sizes[LyXFont::SIZE_LARGE]
1611 << ' ' << font_sizes[LyXFont::SIZE_LARGER]
1612 << ' ' << font_sizes[LyXFont::SIZE_LARGEST]
1613 << ' ' << font_sizes[LyXFont::SIZE_HUGE]
1614 << ' ' << font_sizes[LyXFont::SIZE_HUGER]
1619 << "# COLOR SECTION ###################################\n"
1623 for (int i = 0; i < LColor::ignore; ++i) {
1624 LColor::color lc = static_cast<LColor::color>(i);
1626 string const col(lcolor.getX11Name(lc));
1627 if (ignore_system_lyxrc ||
1628 col != system_lcolor.getX11Name(lc)) {
1629 os << "\\set_color \""
1630 << lcolor.getLyXName(lc) << "\" \""
1636 << "# PRINTER SECTION ###################################\n"
1640 if (ignore_system_lyxrc ||
1641 printer != system_lyxrc.printer) {
1642 os << "\\printer \"" << printer << "\"\n";
1644 case RC_PRINT_ADAPTOUTPUT:
1645 if (ignore_system_lyxrc ||
1646 print_adapt_output != system_lyxrc.print_adapt_output) {
1647 os << "\\print_adapt_output "
1648 << convert<string>(print_adapt_output)
1651 case RC_PRINT_COMMAND:
1652 if (ignore_system_lyxrc ||
1653 print_command != system_lyxrc.print_command) {
1654 os << "\\print_command \"" << print_command << "\"\n";
1656 case RC_PRINTEXSTRAOPTIONS:
1657 if (ignore_system_lyxrc ||
1658 print_extra_options != system_lyxrc.print_extra_options) {
1659 os << "\\print_extra_options \"" << print_extra_options
1662 case RC_PRINTSPOOL_COMMAND:
1663 if (ignore_system_lyxrc ||
1664 print_spool_command != system_lyxrc.print_spool_command) {
1665 os << "\\print_spool_command \"" << print_spool_command
1668 case RC_PRINTSPOOL_PRINTERPREFIX:
1669 if (ignore_system_lyxrc ||
1670 print_spool_printerprefix
1671 != system_lyxrc.print_spool_printerprefix) {
1672 os << "\\print_spool_printerprefix \""
1673 << print_spool_printerprefix << "\"\n";
1675 case RC_PRINTEVENPAGEFLAG:
1676 if (ignore_system_lyxrc ||
1677 print_evenpage_flag != system_lyxrc.print_evenpage_flag) {
1678 os << "\\print_evenpage_flag \"" << print_evenpage_flag
1681 case RC_PRINTODDPAGEFLAG:
1682 if (ignore_system_lyxrc ||
1683 print_oddpage_flag != system_lyxrc.print_oddpage_flag) {
1684 os << "\\print_oddpage_flag \"" << print_oddpage_flag
1687 case RC_PRINTREVERSEFLAG:
1688 if (ignore_system_lyxrc ||
1689 print_reverse_flag != system_lyxrc.print_reverse_flag) {
1690 os << "\\print_reverse_flag \"" << print_reverse_flag
1693 case RC_PRINTLANDSCAPEFLAG:
1694 if (ignore_system_lyxrc ||
1695 print_landscape_flag != system_lyxrc.print_landscape_flag) {
1696 os << "\\print_landscape_flag \"" << print_landscape_flag
1699 case RC_PRINTPAGERANGEFLAG:
1700 if (ignore_system_lyxrc ||
1701 print_pagerange_flag != system_lyxrc.print_pagerange_flag) {
1702 os << "\\print_pagerange_flag \"" << print_pagerange_flag
1705 case RC_PRINTCOPIESFLAG:
1706 if (ignore_system_lyxrc ||
1707 print_copies_flag != system_lyxrc.print_copies_flag) {
1708 os << "\\print_copies_flag \"" << print_copies_flag
1711 case RC_PRINTCOLLCOPIESFLAG:
1712 if (ignore_system_lyxrc ||
1713 print_collcopies_flag
1714 != system_lyxrc.print_collcopies_flag) {
1715 os << "\\print_collcopies_flag \""
1716 << print_collcopies_flag
1719 case RC_PRINTPAPERFLAG:
1720 if (ignore_system_lyxrc ||
1721 print_paper_flag != system_lyxrc.print_paper_flag) {
1722 os << "\\print_paper_flag \"" << print_paper_flag
1725 case RC_PRINTPAPERDIMENSIONFLAG:
1726 if (ignore_system_lyxrc ||
1727 print_paper_dimension_flag
1728 != system_lyxrc.print_paper_dimension_flag) {
1729 os << "\\print_paper_dimension_flag \""
1730 << print_paper_dimension_flag << "\"\n";
1732 case RC_PRINTTOPRINTER:
1733 if (ignore_system_lyxrc ||
1734 print_to_printer != system_lyxrc.print_to_printer) {
1735 os << "\\print_to_printer \"" << print_to_printer
1738 case RC_PRINTTOFILE:
1739 if (ignore_system_lyxrc ||
1740 print_to_file != system_lyxrc.print_to_file) {
1741 string const path = os::external_path(print_to_file);
1742 os << "\\print_to_file \"" << path << "\"\n";
1744 case RC_PRINTFILEEXTENSION:
1745 if (ignore_system_lyxrc ||
1746 print_file_extension != system_lyxrc.print_file_extension) {
1747 os << "\\print_file_extension \""
1748 << print_file_extension
1753 << "# EXPORT SECTION ####################################\n"
1756 case RC_CUSTOM_EXPORT_COMMAND:
1757 if (ignore_system_lyxrc ||
1758 custom_export_command
1759 != system_lyxrc.custom_export_command) {
1760 os << "\\custom_export_command \""
1761 << custom_export_command
1764 case RC_CUSTOM_EXPORT_FORMAT:
1765 if (ignore_system_lyxrc ||
1766 custom_export_format
1767 != system_lyxrc.custom_export_format) {
1768 os << "\\custom_export_format \"" << custom_export_format
1773 << "# TEX SECTION #######################################\n"
1776 case RC_FONT_ENCODING:
1777 if (ignore_system_lyxrc ||
1778 fontenc != system_lyxrc.fontenc) {
1779 os << "\\font_encoding \"" << fontenc << "\"\n";
1783 << "# FILE SECTION ######################################\n"
1786 case RC_DOCUMENTPATH:
1787 if (ignore_system_lyxrc ||
1788 document_path != system_lyxrc.document_path) {
1789 string const path = os::external_path(document_path);
1790 os << "\\document_path \"" << path << "\"\n";
1792 case RC_USELASTFILEPOS:
1793 if (ignore_system_lyxrc ||
1794 use_lastfilepos != system_lyxrc.use_lastfilepos) {
1795 os << "\\use_lastfilepos " << convert<string>(use_lastfilepos)
1798 case RC_LOADSESSION:
1799 if (ignore_system_lyxrc ||
1800 load_session != system_lyxrc.load_session) {
1801 os << "\\load_session " << convert<string>(load_session)
1804 case RC_NUMLASTFILES:
1805 if (ignore_system_lyxrc ||
1806 num_lastfiles != system_lyxrc.num_lastfiles) {
1807 os << "\\num_lastfiles " << num_lastfiles << '\n';
1809 case RC_CHECKLASTFILES:
1810 if (ignore_system_lyxrc ||
1811 check_lastfiles != system_lyxrc.check_lastfiles) {
1812 os << "\\check_lastfiles " << convert<string>(check_lastfiles)
1815 case RC_TEMPLATEPATH:
1816 if (ignore_system_lyxrc ||
1817 template_path != system_lyxrc.template_path) {
1818 string const path = os::external_path(template_path);
1819 os << "\\template_path \"" << path << "\"\n";
1821 case RC_TEMPDIRPATH:
1822 if (ignore_system_lyxrc ||
1823 tempdir_path != system_lyxrc.tempdir_path) {
1824 string const path = os::external_path(tempdir_path);
1825 os << "\\tempdir_path \"" << path << "\"\n";
1829 case RC_ASCII_LINELEN:
1830 if (ignore_system_lyxrc ||
1831 ascii_linelen != system_lyxrc.ascii_linelen) {
1832 os << "\\ascii_linelen " << ascii_linelen << '\n';
1834 case RC_MAKE_BACKUP:
1835 if (ignore_system_lyxrc ||
1836 make_backup != system_lyxrc.make_backup) {
1837 os << "\\make_backup " << convert<string>(make_backup) << '\n';
1839 case RC_BACKUPDIR_PATH:
1840 if (ignore_system_lyxrc ||
1841 backupdir_path != system_lyxrc.backupdir_path) {
1842 string const path = os::external_path(backupdir_path);
1843 os << "\\backupdir_path \"" << path << "\"\n";
1847 << "# ASCII EXPORT SECTION ##############################\n"
1850 case RC_ASCIIROFF_COMMAND:
1851 if (ignore_system_lyxrc ||
1852 ascii_roff_command != system_lyxrc.ascii_roff_command) {
1853 os << "\\ascii_roff_command \"" << ascii_roff_command
1858 << "# SPELLCHECKER SECTION ##############################\n"
1860 case RC_USE_SPELL_LIB:
1861 if (ignore_system_lyxrc ||
1862 use_spell_lib != system_lyxrc.use_spell_lib) {
1863 os << "\\use_spell_lib " << convert<string>(use_spell_lib) << '\n';
1865 case RC_SPELL_COMMAND:
1866 if (ignore_system_lyxrc ||
1867 isp_command != system_lyxrc.isp_command) {
1868 os << "\\spell_command \"" << isp_command << "\"\n";
1870 case RC_ACCEPT_COMPOUND:
1871 if (ignore_system_lyxrc ||
1872 isp_accept_compound != system_lyxrc.isp_accept_compound) {
1873 os << "\\accept_compound " << convert<string>(isp_accept_compound)
1876 case RC_USE_ALT_LANG:
1877 if (ignore_system_lyxrc ||
1878 isp_use_alt_lang != system_lyxrc.isp_use_alt_lang) {
1879 os << "\\use_alt_language " << convert<string>(isp_use_alt_lang)
1883 if (ignore_system_lyxrc ||
1884 isp_alt_lang != system_lyxrc.isp_alt_lang) {
1885 os << "\\alternate_language \"" << isp_alt_lang
1888 case RC_USE_ESC_CHARS:
1889 if (ignore_system_lyxrc ||
1890 isp_use_esc_chars != system_lyxrc.isp_use_esc_chars) {
1891 os << "\\use_escape_chars " << convert<string>(isp_use_esc_chars)
1895 if (ignore_system_lyxrc ||
1896 isp_esc_chars != system_lyxrc.isp_esc_chars) {
1897 os << "\\escape_chars \"" << isp_esc_chars << "\"\n";
1899 case RC_USE_PERS_DICT:
1900 if (ignore_system_lyxrc ||
1901 isp_use_pers_dict != system_lyxrc.isp_use_pers_dict) {
1902 os << "\\use_personal_dictionary "
1903 << convert<string>(isp_use_pers_dict)
1907 if (isp_pers_dict != system_lyxrc.isp_pers_dict) {
1908 string const path = os::external_path(isp_pers_dict);
1909 os << "\\personal_dictionary \"" << path << "\"\n";
1911 case RC_USE_INP_ENC:
1912 if (ignore_system_lyxrc ||
1913 isp_use_input_encoding
1914 != system_lyxrc.isp_use_input_encoding) {
1915 os << "\\use_input_encoding "
1916 << convert<string>(isp_use_input_encoding)
1921 << "# LANGUAGE SUPPORT SECTION ##########################\n"
1924 case RC_RTL_SUPPORT:
1925 if (ignore_system_lyxrc ||
1926 rtl_support != system_lyxrc.rtl_support) {
1927 os << "\\rtl " << convert<string>(rtl_support) << '\n';
1929 case RC_LANGUAGE_PACKAGE:
1930 if (ignore_system_lyxrc ||
1931 language_package != system_lyxrc.language_package) {
1932 os << "\\language_package \"" << language_package
1935 case RC_LANGUAGE_GLOBAL_OPTIONS:
1936 if (ignore_system_lyxrc ||
1937 language_global_options
1938 != system_lyxrc.language_global_options) {
1939 os << "\\language_global_options \""
1940 << convert<string>(language_global_options)
1943 case RC_LANGUAGE_USE_BABEL:
1944 if (ignore_system_lyxrc ||
1945 language_use_babel != system_lyxrc.language_use_babel) {
1946 os << "\\language_use_babel \""
1947 << convert<string>(language_use_babel)
1950 case RC_LANGUAGE_COMMAND_BEGIN:
1951 if (ignore_system_lyxrc ||
1952 language_command_begin
1953 != system_lyxrc.language_command_begin) {
1954 os << "\\language_command_begin \""
1955 << language_command_begin
1958 case RC_LANGUAGE_COMMAND_END:
1959 if (ignore_system_lyxrc ||
1960 language_command_end
1961 != system_lyxrc.language_command_end) {
1962 os << "\\language_command_end \"" << language_command_end
1965 case RC_LANGUAGE_COMMAND_LOCAL:
1966 if (ignore_system_lyxrc ||
1967 language_command_local
1968 != system_lyxrc.language_command_local) {
1969 os << "\\language_command_local \""
1970 << language_command_local
1973 case RC_LANGUAGE_AUTO_BEGIN:
1974 if (ignore_system_lyxrc ||
1975 language_auto_begin != system_lyxrc.language_auto_begin) {
1976 os << "\\language_auto_begin "
1977 << convert<string>(language_auto_begin) << '\n';
1979 case RC_LANGUAGE_AUTO_END:
1980 if (ignore_system_lyxrc ||
1981 language_auto_end != system_lyxrc.language_auto_end) {
1982 os << "\\language_auto_end "
1983 << convert<string>(language_auto_end) << '\n';
1985 case RC_MARK_FOREIGN_LANGUAGE:
1986 if (ignore_system_lyxrc ||
1987 mark_foreign_language
1988 != system_lyxrc.mark_foreign_language) {
1989 os << "\\mark_foreign_language " <<
1990 convert<string>(mark_foreign_language) << '\n';
1994 << "# 2nd MISC SUPPORT SECTION ##########################\n"
1997 case RC_AUTO_NUMBER:
1998 if (ignore_system_lyxrc ||
1999 auto_number != system_lyxrc.auto_number) {
2000 os << "\\auto_number " << convert<string>(auto_number) << '\n';
2002 case RC_DEFAULT_LANGUAGE:
2003 if (ignore_system_lyxrc ||
2004 default_language != system_lyxrc.default_language) {
2005 os << "\\default_language " << default_language << '\n';
2009 << "# FORMATS SECTION ##########################\n"
2013 // New/modified formats
2014 for (Formats::const_iterator cit = formats.begin();
2015 cit != formats.end(); ++cit) {
2016 Format const * format =
2017 system_formats.getFormat(cit->name());
2019 format->extension() != cit->extension() ||
2020 format->prettyname() != cit->prettyname() ||
2021 format->shortcut() != cit->shortcut() ||
2022 format->viewer() != cit->viewer() ||
2023 format->editor() != cit->editor() ||
2024 format->documentFormat() != cit->documentFormat() ||
2025 format->vectorFormat() != cit->vectorFormat()) {
2026 os << "\\format \"" << cit->name() << "\" \""
2027 << cit->extension() << "\" \""
2028 << cit->prettyname() << "\" \""
2029 << cit->shortcut() << "\" \""
2030 << cit->viewer() << "\" \""
2031 << cit->editor() << "\" \"";
2032 std::vector<string> flags;
2033 if (cit->documentFormat())
2034 flags.push_back("document");
2035 if (cit->vectorFormat())
2036 flags.push_back("vector");
2037 os << support::getStringFromVector(flags);
2042 // Look for deleted formats
2043 for (Formats::const_iterator cit = system_formats.begin();
2044 cit != system_formats.end(); ++cit)
2045 if (!formats.getFormat(cit->name()))
2046 os << "\\format \"" << cit->name()
2047 << "\" \"\" \"\" \"\" \"\" \"\" \"\"\n";
2052 << "# CONVERTERS SECTION ##########################\n"
2056 // Look for new converters
2057 for (Converters::const_iterator cit = converters.begin();
2058 cit != converters.end(); ++cit) {
2059 Converter const * converter =
2060 system_converters.getConverter(cit->from,
2063 converter->command != cit->command ||
2064 converter->flags != cit->flags)
2065 os << "\\converter \"" << cit->from << "\" \""
2066 << cit->to << "\" \""
2067 << cit->command << "\" \""
2068 << cit->flags << "\"\n";
2071 // New/modifed converters
2072 for (Converters::const_iterator cit = system_converters.begin();
2073 cit != system_converters.end(); ++cit)
2074 if (!converters.getConverter(cit->from, cit->to))
2075 os << "\\converter \"" << cit->from
2076 << "\" \"" << cit->to << "\" \"\" \"\"\n";
2080 << "# COPIERS SECTION ##########################\n"
2083 // Look for new movers
2084 Movers::iterator const sysbegin = system_movers.begin();
2085 Movers::iterator const sysend = system_movers.end();
2087 for (Movers::iterator it = movers.begin(), end = movers.end();
2089 Movers::iterator const sysit =
2090 std::find_if(sysbegin, sysend, SameMover(*it));
2091 if (sysit == sysend) {
2092 std::string const & fmt = it->first;
2093 std::string const & command =
2094 it->second.command();
2096 os << "\\copier " << fmt
2097 << " \"" << command << "\"\n";
2101 // We don't actually delete SpecialisedMover(s) from the
2102 // map, just clear their 'command', so there's no need
2103 // to test for anything else.
2109 void LyXRC::set_font_norm_type()
2111 if (font_norm == "iso10646-1")
2112 font_norm_type = ISO_10646_1;
2113 else if (font_norm == "iso8859-1")
2114 font_norm_type = ISO_8859_1;
2115 else if (font_norm == "iso8859-3")
2116 font_norm_type = ISO_8859_3;
2117 else if (font_norm == "iso8859-4")
2118 font_norm_type = ISO_8859_4;
2119 else if (font_norm == "iso8859-6.8x")
2120 font_norm_type = ISO_8859_6_8;
2121 else if (font_norm == "iso8859-9")
2122 font_norm_type = ISO_8859_9;
2123 else if (font_norm == "iso8859-15")
2124 font_norm_type = ISO_8859_15;
2126 font_norm_type = OTHER_ENCODING;
2131 string const LyXRC::getDescription(LyXRCTags tag)
2136 case RC_ACCEPT_COMPOUND:
2137 str = _("Consider run-together words, such as \"diskdrive\" for \"disk drive\", as legal words?");
2141 case RC_USE_ALT_LANG:
2142 str = _("Specify an alternate language. The default is to use the language of the document.");
2145 case RC_ASCIIROFF_COMMAND:
2146 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.");
2149 case RC_ASCII_LINELEN:
2150 str = _("This is the maximum line length of an exported text file (LaTeX, SGML or plain text).");
2153 case RC_AUTOREGIONDELETE:
2154 str = _("De-select if you don't want the current selection to be replaced automatically by what you type.");
2157 case RC_AUTORESET_OPTIONS:
2158 str = _("De-select if you don't want the class options to be reset to defaults after class change.");
2162 str = _("The time interval between auto-saves (in seconds). 0 means no auto-save.");
2165 case RC_AUTO_NUMBER:
2168 case RC_BACKUPDIR_PATH:
2169 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.");
2172 case RC_BIBTEX_COMMAND:
2173 str = _("Define the options of bibtex (cf. man bibtex) or select an alternative compiler (e.g. mlbibtex or bibulus).");
2177 str = _("Keybindings file. Can either specify an absolute path, or LyX will look in its global and local bind/ directories.");
2180 case RC_CHECKLASTFILES:
2181 str = _("Select to check whether the lastfiles still exist.");
2184 case RC_CHKTEX_COMMAND:
2185 str = _("Define how to run chktex. E.g. \"chktex -n11 -n1 -n3 -n6 -n9 -22 -n25 -n30 -n38\" Refer to the ChkTeX documentation.");
2194 case RC_CURSOR_FOLLOWS_SCROLLBAR:
2195 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.");
2198 case RC_CUSTOM_EXPORT_COMMAND:
2201 case RC_CUSTOM_EXPORT_FORMAT:
2204 case RC_DATE_INSERT_FORMAT:
2205 //xgettext:no-c-format
2206 str = _("This accepts the normal strftime formats; see man strftime for full details. E.g.\"%A, %e. %B %Y\".");
2209 case RC_DEFAULT_LANGUAGE:
2210 str = _("New documents will be assigned this language.");
2213 case RC_DEFAULT_PAPERSIZE:
2214 str = _("Specify the default paper size.");
2217 case RC_DIALOGS_ICONIFY_WITH_MAIN:
2218 str = _("Iconify the dialogs when the main window is iconified. (Affects only dialogs shown after the change has been made.)");
2221 case RC_DISPLAY_GRAPHICS:
2222 str = _("Select how LyX will display any graphics.");
2225 case RC_DOCUMENTPATH:
2226 str = _("The default path for your documents. An empty value selects the directory LyX was started from.");
2230 case RC_USE_ESC_CHARS:
2231 str = _("Specify additional chars that can be part of a word.");
2234 case RC_FONT_ENCODING:
2235 str = _("The font encoding used for the LaTeX2e fontenc package. T1 is highly recommended for non-English languages.");
2241 case RC_INDEX_COMMAND:
2242 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\".");
2249 case RC_KBMAP_PRIMARY:
2250 case RC_KBMAP_SECONDARY:
2251 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.");
2254 case RC_LABEL_INIT_LENGTH:
2255 str = _("Maximum number of words in the initialization string for a new label");
2258 case RC_LANGUAGE_AUTO_BEGIN:
2259 str = _("Select if a language switching command is needed at the beginning of the document.");
2262 case RC_LANGUAGE_AUTO_END:
2263 str = _("Select if a language switching command is needed at the end of the document.");
2266 case RC_LANGUAGE_COMMAND_BEGIN:
2267 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.");
2270 case RC_LANGUAGE_COMMAND_END:
2271 str = _("The LaTeX command for changing back to the language of the document.");
2274 case RC_LANGUAGE_COMMAND_LOCAL:
2275 str = _("The LaTeX command for local changing of the language.");
2278 case RC_LANGUAGE_GLOBAL_OPTIONS:
2279 str = _("De-select if you don't want the language(s) used as an argument to \\documentclass.");
2282 case RC_LANGUAGE_PACKAGE:
2283 str = _("The LaTeX command for loading the language package. E.g. \"\\usepackage{babel}\", \"\\usepackage{omega}\".");
2286 case RC_LANGUAGE_USE_BABEL:
2287 str = _("De-select if you don't want babel to be used when the language of the document is the default language.");
2290 case RC_USELASTFILEPOS:
2291 str = _("De-select if you do not want LyX to scroll to saved position.");
2294 case RC_LOADSESSION:
2295 str = _("De-select to prevent loading files opened from the last lyx session.");
2298 case RC_MAKE_BACKUP:
2299 str = _("De-select if you don't want LyX to create backup files.");
2302 case RC_MARK_FOREIGN_LANGUAGE:
2303 str = _("Select to control the highlighting of words with a language foreign to that of the document.");
2306 case RC_NUMLASTFILES:
2307 str = bformat(_("Maximal number of lastfiles. Up to %1$d can appear in the file menu."),
2311 case RC_PATH_PREFIX:
2312 str = _("Specify those directories which should be "
2313 "prepended to the PATH environment variable. "
2314 "Use the OS native format.");
2318 case RC_USE_PERS_DICT:
2319 str = _("Specify an alternate personal dictionary file. E.g. \".ispell_english\".");
2322 case RC_POPUP_BOLD_FONT:
2323 str = _("The bold font in the dialogs.");
2326 case RC_POPUP_FONT_ENCODING:
2327 str = _("The encoding for the menu/popups fonts.");
2330 case RC_POPUP_NORMAL_FONT:
2331 str = _("The normal font in the dialogs.");
2335 str = _("Shows a typeset preview of things such as math");
2338 case RC_PREVIEW_HASHED_LABELS:
2339 str = _("Previewed equations will have \"(#)\" labels rather than numbered ones");
2342 case RC_PREVIEW_SCALE_FACTOR:
2343 str = _("Scale the preview size to suit.");
2346 case RC_PRINTCOLLCOPIESFLAG:
2347 str = _("The option for specifying whether the copies should be collated.");
2350 case RC_PRINTCOPIESFLAG:
2351 str = _("The option for specifying the number of copies to print.");
2355 str = _("The default printer to print on. If none is specified, LyX will use the environment variable PRINTER.");
2358 case RC_PRINTEVENPAGEFLAG:
2359 str = _("The option to print only even pages.");
2362 case RC_PRINTEXSTRAOPTIONS:
2363 str = _("Extra options to pass to printing program after everything else, but before the filename of the DVI file to be printed.");
2366 case RC_PRINTFILEEXTENSION:
2367 str = _("Extension of printer program output file. Usually \".ps\".");
2370 case RC_PRINTLANDSCAPEFLAG:
2371 str = _("The option to print out in landscape.");
2374 case RC_PRINTODDPAGEFLAG:
2375 str = _("The option to print only odd pages.");
2378 case RC_PRINTPAGERANGEFLAG:
2379 str = _("The option for specifying a comma-separated list of pages to print.");
2382 case RC_PRINTPAPERDIMENSIONFLAG:
2383 str = _("Option to specify the dimensions of the print paper.");
2386 case RC_PRINTPAPERFLAG:
2387 str = _("The option to specify paper type.");
2390 case RC_PRINTREVERSEFLAG:
2391 str = _("The option to reverse the order of the pages printed.");
2394 case RC_PRINTSPOOL_COMMAND:
2395 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.");
2398 case RC_PRINTSPOOL_PRINTERPREFIX:
2399 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.");
2402 case RC_PRINTTOFILE:
2403 str = _("Option to pass to the print program to print to a file.");
2406 case RC_PRINTTOPRINTER:
2407 str = _("Option to pass to the print program to print on a specific printer.");
2410 case RC_PRINT_ADAPTOUTPUT:
2411 str = _("Select for LyX to pass the name of the destination printer to your print command.");
2414 case RC_PRINT_COMMAND:
2415 str = _("Your favorite print program, e.g. \"dvips\", \"dvilj4\".");
2418 case RC_RTL_SUPPORT:
2419 str = _("Select to enable support of right-to-left languages (e.g. Hebrew, Arabic).");
2423 str = _("DPI (dots per inch) of your monitor is auto-detected by LyX. If that goes wrong, override the setting here.");
2426 case RC_SCREEN_FONT_ENCODING:
2427 str = _("The encoding for the screen fonts.");
2430 case RC_SCREEN_FONT_ROMAN:
2431 case RC_SCREEN_FONT_SANS:
2432 case RC_SCREEN_FONT_TYPEWRITER:
2433 str = _("The screen fonts used to display the text while editing.");
2436 case RC_SCREEN_FONT_ROMAN_FOUNDRY:
2437 case RC_SCREEN_FONT_SANS_FOUNDRY:
2438 case RC_SCREEN_FONT_TYPEWRITER_FOUNDRY:
2441 case RC_SCREEN_FONT_SCALABLE:
2442 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.");
2445 case RC_SCREEN_FONT_SIZES:
2446 str = _("The font sizes used for calculating the scaling of the screen fonts.");
2449 case RC_SCREEN_ZOOM:
2450 //xgettext:no-c-format
2451 str = _("The zoom percentage for screen fonts. A setting of 100% will make the fonts roughly the same size as on paper.");
2454 case RC_SCREEN_GEOMETRY_HEIGHT:
2455 case RC_SCREEN_GEOMETRY_WIDTH:
2456 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).");
2459 case RC_SCREEN_GEOMETRY_XYSAVED:
2460 str = _("Allow session manager to save and restore windows position.");
2464 str = _("This starts the lyxserver. The pipes get an additional extension \".in\" and \".out\". Only for advanced users.");
2470 case RC_SHOW_BANNER:
2471 str = _("De-select if you don't want the startup banner.");
2474 case RC_SPELL_COMMAND:
2475 str = _("What command runs the spellchecker?");
2478 case RC_TEMPDIRPATH:
2479 str = _("LyX will place its temporary directories in this path. They will be deleted when you quit LyX.");
2482 case RC_TEMPLATEPATH:
2483 str = _("The path that LyX will set when offering to choose a template. An empty value selects the directory LyX was started from.");
2486 case RC_TEX_ALLOWS_SPACES:
2489 case RC_TEX_EXPECTS_WINDOWS_PATHS:
2493 str = _("The UI (user interface) file. Can either specify an absolute path, or LyX will look in its global and local ui/ directories.");
2505 case RC_USE_INP_ENC:
2506 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.");
2509 case RC_USE_SPELL_LIB:
2512 case RC_VIEWDVI_PAPEROPTION:
2513 _("Specify the paper command to DVI viewer (leave empty or use \"-paper\")");
2528 // The global instance
2531 // The global copy of the system lyxrc entries (everything except preferences)