3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
6 * \author Lars Gullik Bjønnes
7 * \author Jean-Marc Lasgouttes
8 * \author Angus Leeming
10 * \author André Pönitz
14 * Full author contact details are available in file CREDITS.
24 #include "support/debug.h"
26 #include "Converter.h"
28 #include "support/gettext.h"
31 #include "FontEnums.h"
34 #include "graphics/GraphicsTypes.h"
36 #include "support/convert.h"
37 #include "support/environment.h"
38 #include "support/filetools.h"
39 #include "support/lstrings.h"
40 #include "support/os.h"
41 #include "support/userinfo.h"
44 using namespace lyx::support;
48 namespace os = support::os;
52 // when adding something to this array keep it sorted!
53 keyword_item lyxrcTags[] = {
54 { "\\accept_compound", LyXRC::RC_ACCEPT_COMPOUND },
55 { "\\allow_geometry_session", LyXRC::RC_GEOMETRY_SESSION },
56 { "\\alternate_language", LyXRC::RC_ALT_LANG },
57 { "\\auto_number", LyXRC::RC_AUTO_NUMBER },
58 { "\\auto_region_delete", LyXRC::RC_AUTOREGIONDELETE },
59 { "\\auto_reset_options", LyXRC::RC_AUTORESET_OPTIONS },
60 { "\\autosave", LyXRC::RC_AUTOSAVE },
61 { "\\backupdir_path", LyXRC::RC_BACKUPDIR_PATH },
62 { "\\bibtex_command", LyXRC::RC_BIBTEX_COMMAND },
63 { "\\bind_file", LyXRC::RC_BINDFILE },
64 { "\\check_lastfiles", LyXRC::RC_CHECKLASTFILES },
65 { "\\chktex_command", LyXRC::RC_CHKTEX_COMMAND },
66 { "\\converter", LyXRC::RC_CONVERTER },
67 { "\\converter_cache_maxage", LyXRC::RC_CONVERTER_CACHE_MAXAGE },
68 { "\\copier", LyXRC::RC_COPIER },
69 { "\\cursor_follows_scrollbar", LyXRC::RC_CURSOR_FOLLOWS_SCROLLBAR },
70 { "\\custom_export_command", LyXRC::RC_CUSTOM_EXPORT_COMMAND },
71 { "\\custom_export_format", LyXRC::RC_CUSTOM_EXPORT_FORMAT },
72 { "\\date_insert_format", LyXRC::RC_DATE_INSERT_FORMAT },
73 { "\\def_file", LyXRC::RC_DEFFILE },
74 { "\\default_language", LyXRC::RC_DEFAULT_LANGUAGE },
75 { "\\default_papersize", LyXRC::RC_DEFAULT_PAPERSIZE },
76 { "\\dialogs_iconify_with_main", LyXRC::RC_DIALOGS_ICONIFY_WITH_MAIN },
77 { "\\display_graphics", LyXRC::RC_DISPLAY_GRAPHICS },
78 { "\\document_path", LyXRC::RC_DOCUMENTPATH },
79 { "\\escape_chars", LyXRC::RC_ESC_CHARS },
80 { "\\example_path", LyXRC::RC_EXAMPLEPATH },
81 { "\\font_encoding", LyXRC::RC_FONT_ENCODING },
82 { "\\format", LyXRC::RC_FORMAT },
83 { "\\index_command", LyXRC::RC_INDEX_COMMAND },
84 { "\\input", LyXRC::RC_INPUT },
85 { "\\kbmap", LyXRC::RC_KBMAP },
86 { "\\kbmap_primary", LyXRC::RC_KBMAP_PRIMARY },
87 { "\\kbmap_secondary", LyXRC::RC_KBMAP_SECONDARY },
88 { "\\label_init_length", LyXRC::RC_LABEL_INIT_LENGTH },
89 { "\\language_auto_begin", LyXRC::RC_LANGUAGE_AUTO_BEGIN },
90 { "\\language_auto_end", LyXRC::RC_LANGUAGE_AUTO_END },
91 { "\\language_command_begin", LyXRC::RC_LANGUAGE_COMMAND_BEGIN },
92 { "\\language_command_end", LyXRC::RC_LANGUAGE_COMMAND_END },
93 { "\\language_command_local", LyXRC::RC_LANGUAGE_COMMAND_LOCAL },
94 { "\\language_global_options", LyXRC::RC_LANGUAGE_GLOBAL_OPTIONS },
95 { "\\language_package", LyXRC::RC_LANGUAGE_PACKAGE },
96 { "\\language_use_babel", LyXRC::RC_LANGUAGE_USE_BABEL },
97 { "\\load_session", LyXRC::RC_LOADSESSION },
98 { "\\macro_edit_style", LyXRC::RC_MACRO_EDIT_STYLE },
99 { "\\make_backup", LyXRC::RC_MAKE_BACKUP },
100 { "\\mark_foreign_language", LyXRC::RC_MARK_FOREIGN_LANGUAGE },
101 { "\\num_lastfiles", LyXRC::RC_NUMLASTFILES },
102 { "\\path_prefix", LyXRC::RC_PATH_PREFIX },
103 { "\\personal_dictionary", LyXRC::RC_PERS_DICT },
104 { "\\plaintext_linelen", LyXRC::RC_PLAINTEXT_LINELEN },
105 { "\\plaintext_roff_command", LyXRC::RC_PLAINTEXT_ROFF_COMMAND },
106 { "\\preview", LyXRC::RC_PREVIEW },
107 { "\\preview_hashed_labels", LyXRC::RC_PREVIEW_HASHED_LABELS },
108 { "\\preview_scale_factor", LyXRC::RC_PREVIEW_SCALE_FACTOR },
109 { "\\print_adapt_output", LyXRC::RC_PRINT_ADAPTOUTPUT },
110 { "\\print_collcopies_flag", LyXRC::RC_PRINTCOLLCOPIESFLAG },
111 { "\\print_command", LyXRC::RC_PRINT_COMMAND },
112 { "\\print_copies_flag", LyXRC::RC_PRINTCOPIESFLAG },
113 { "\\print_evenpage_flag", LyXRC::RC_PRINTEVENPAGEFLAG },
114 { "\\print_extra_options", LyXRC::RC_PRINTEXSTRAOPTIONS },
115 { "\\print_file_extension", LyXRC::RC_PRINTFILEEXTENSION },
116 { "\\print_landscape_flag", LyXRC::RC_PRINTLANDSCAPEFLAG },
117 { "\\print_oddpage_flag", LyXRC::RC_PRINTODDPAGEFLAG },
118 { "\\print_pagerange_flag", LyXRC::RC_PRINTPAGERANGEFLAG },
119 { "\\print_paper_dimension_flag", LyXRC::RC_PRINTPAPERDIMENSIONFLAG },
120 { "\\print_paper_flag", LyXRC::RC_PRINTPAPERFLAG },
121 { "\\print_reverse_flag", LyXRC::RC_PRINTREVERSEFLAG },
122 { "\\print_spool_command", LyXRC::RC_PRINTSPOOL_COMMAND },
123 { "\\print_spool_printerprefix", LyXRC::RC_PRINTSPOOL_PRINTERPREFIX },
124 { "\\print_to_file", LyXRC::RC_PRINTTOFILE },
125 { "\\print_to_printer", LyXRC::RC_PRINTTOPRINTER },
126 { "\\printer", LyXRC::RC_PRINTER },
127 { "\\rtl", LyXRC::RC_RTL_SUPPORT },
128 { "\\screen_dpi", LyXRC::RC_SCREEN_DPI },
129 { "\\screen_font_roman", LyXRC::RC_SCREEN_FONT_ROMAN },
130 { "\\screen_font_roman_foundry", LyXRC::RC_SCREEN_FONT_ROMAN_FOUNDRY },
131 { "\\screen_font_sans", LyXRC::RC_SCREEN_FONT_SANS },
132 { "\\screen_font_sans_foundry", LyXRC::RC_SCREEN_FONT_SANS_FOUNDRY },
133 { "\\screen_font_scalable", LyXRC::RC_SCREEN_FONT_SCALABLE },
134 { "\\screen_font_sizes", LyXRC::RC_SCREEN_FONT_SIZES },
135 { "\\screen_font_typewriter", LyXRC::RC_SCREEN_FONT_TYPEWRITER },
136 { "\\screen_font_typewriter_foundry", LyXRC::RC_SCREEN_FONT_TYPEWRITER_FOUNDRY },
137 { "\\screen_zoom", LyXRC::RC_SCREEN_ZOOM },
138 { "\\serverpipe", LyXRC::RC_SERVERPIPE },
139 { "\\set_color", LyXRC::RC_SET_COLOR },
140 { "\\show_banner", LyXRC::RC_SHOW_BANNER },
141 { "\\sort_layouts", LyXRC::RC_SORT_LAYOUTS },
142 { "\\spell_command", LyXRC::RC_SPELL_COMMAND },
143 { "\\tempdir_path", LyXRC::RC_TEMPDIRPATH },
144 { "\\template_path", LyXRC::RC_TEMPLATEPATH },
145 { "\\tex_allows_spaces", LyXRC::RC_TEX_ALLOWS_SPACES },
146 { "\\tex_expects_windows_paths", LyXRC::RC_TEX_EXPECTS_WINDOWS_PATHS },
147 { "\\ui_file", LyXRC::RC_UIFILE },
148 { "\\use_alt_language", LyXRC::RC_USE_ALT_LANG },
149 { "\\use_converter_cache", LyXRC::RC_USE_CONVERTER_CACHE },
150 { "\\use_escape_chars", LyXRC::RC_USE_ESC_CHARS },
151 { "\\use_input_encoding", LyXRC::RC_USE_INP_ENC },
152 { "\\use_lastfilepos", LyXRC::RC_USELASTFILEPOS },
153 { "\\use_personal_dictionary", LyXRC::RC_USE_PERS_DICT },
154 { "\\use_pixmap_cache", LyXRC::RC_USE_PIXMAP_CACHE },
155 // compatibility with versions older than 1.4.0 only
156 { "\\use_pspell", LyXRC::RC_USE_SPELL_LIB },
157 { "\\use_spell_lib", LyXRC::RC_USE_SPELL_LIB },
158 // compatibility with versions older than 1.4.0 only
159 { "\\use_tempdir", LyXRC::RC_USETEMPDIR },
160 { "\\use_tooltip", LyXRC::RC_USE_TOOLTIP },
161 { "\\user_email", LyXRC::RC_USER_EMAIL },
162 { "\\user_name", LyXRC::RC_USER_NAME },
163 { "\\view_dvi_paper_option", LyXRC::RC_VIEWDVI_PAPEROPTION },
164 // compatibility with versions older than 1.4.0 only
165 { "\\viewer", LyXRC::RC_VIEWER}
168 const int lyxrcCount = sizeof(lyxrcTags) / sizeof(keyword_item);
179 void LyXRC::setDefaults() {
181 def_file = "default";
183 // Get printer from the environment. If fail, use default "",
184 // assuming that everything is set up correctly.
185 printer = getEnv("PRINTER");
186 print_adapt_output = false;
187 print_command = "dvips";
188 print_evenpage_flag = "-B";
189 print_oddpage_flag = "-A";
190 print_pagerange_flag = "-pp";
191 print_copies_flag = "-c";
192 print_collcopies_flag = "-C";
193 print_reverse_flag = "-r";
194 print_landscape_flag = "-t landscape";
195 print_to_printer = "-P";
196 print_to_file = "-o ";
197 print_file_extension = ".ps";
198 print_paper_flag = "-t";
199 print_paper_dimension_flag = "-T";
200 document_path.erase();
201 view_dvi_paper_option.erase();
202 default_papersize = PAPER_DEFAULT;
203 custom_export_format = "ps";
204 chktex_command = "chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38";
205 bibtex_command = "bibtex";
207 index_command = "makeindex -c -q";
209 // Because a screen typically is wider than a piece of paper:
211 allow_geometry_session = true;
212 // Default LaTeX font size:
213 font_sizes[FONT_SIZE_TINY] = "5.0";
214 font_sizes[FONT_SIZE_SCRIPT] = "7.0";
215 font_sizes[FONT_SIZE_FOOTNOTE] = "8.0";
216 font_sizes[FONT_SIZE_SMALL] = "9.0";
217 font_sizes[FONT_SIZE_NORMAL] = "10.0";
218 font_sizes[FONT_SIZE_LARGE] = "12.0";
219 font_sizes[FONT_SIZE_LARGER] = "14.4";
220 font_sizes[FONT_SIZE_LARGEST] = "17.26";
221 font_sizes[FONT_SIZE_HUGE] = "20.74";
222 font_sizes[FONT_SIZE_HUGER] = "24.88";
223 use_scalable_fonts = true;
224 roman_font_name = "";
226 typewriter_font_name = "";
228 auto_region_delete = true;
229 auto_reset_options = false;
230 plaintext_linelen = 65;
231 num_lastfiles = maxlastfiles;
232 check_lastfiles = true;
233 use_lastfilepos = true;
234 load_session = false;
236 backupdir_path.erase();
237 display_graphics = graphics::ColorDisplay;
238 // Spellchecker settings:
239 use_spell_lib = true;
240 isp_command = "ispell";
241 isp_accept_compound = false;
242 isp_use_input_encoding = false;
243 isp_use_alt_lang = false;
244 isp_use_pers_dict = false;
245 isp_use_esc_chars = false;
249 mark_foreign_language = true;
250 language_auto_begin = true;
251 language_auto_end = true;
252 language_global_options = true;
253 language_use_babel = true;
254 language_package = "\\usepackage{babel}";
255 language_command_begin = "\\selectlanguage{$$lang}";
256 language_command_local = "\\foreignlanguage{$$lang}{";
257 sort_layouts = false;
258 default_language = "english";
260 windows_style_tex_paths = false;
261 tex_allows_spaces = false;
262 date_insert_format = "%x";
263 cursor_follows_scrollbar = false;
264 macro_edit_style = MACRO_EDIT_INLINE_BOX;
265 dialogs_iconify_with_main = false;
266 label_init_length = 3;
267 preview = PREVIEW_OFF;
268 preview_hashed_labels = false;
269 preview_scale_factor = "0.9";
270 use_converter_cache = true;
272 use_pixmap_cache = false;
273 converter_cache_maxage = 6 * 30 * 24 * 3600; // 6 months
275 user_name = to_utf8(support::user_name());
277 user_email = to_utf8(support::user_email());
283 void oldFontFormat(string & family, string & foundry)
285 if (family.empty() || family[0] != '-')
287 foundry = token(family, '-', 1);
288 family = token(family, '-', 2);
296 int LyXRC::read(FileName const & filename)
298 Lexer lexrc(lyxrcTags, lyxrcCount);
299 if (lyxerr.debugging(Debug::PARSER))
300 lexrc.printTable(lyxerr);
302 lexrc.setFile(filename);
303 if (!lexrc.isOK()) return -2;
305 LYXERR(Debug::LYXRC, "Reading '" << filename << "'...");
311 int LyXRC::read(istream & is)
313 Lexer lexrc(lyxrcTags, lyxrcCount);
314 if (lyxerr.debugging(Debug::PARSER))
315 lexrc.printTable(lyxerr);
318 if (!lexrc.isOK()) return -2;
320 LYXERR(Debug::LYXRC, "Reading istream...");
326 int LyXRC::read(Lexer & lexrc)
328 if (!lexrc.isOK()) return -2;
330 while (lexrc.isOK()) {
331 // By using two switches we take advantage of the compiler
332 // telling us if we have missed a LyXRCTags element in
333 // the second switch.
334 // Note that this also shows a problem with Lexer since it
335 // helps us avoid taking advantage of the strictness of the
338 int le = lexrc.lex();
340 case Lexer::LEX_UNDEF:
341 lexrc.printError("Unknown tag `$$Token'");
343 case Lexer::LEX_FEOF:
347 switch (static_cast<LyXRCTags>(le)) {
348 case RC_INPUT: // Include file
351 libFileSearch(string(),
354 lexrc.printError("Error reading "
355 "included file: " + tmp.absFilename());
361 bind_file = os::internal_path(lexrc.getString());
367 def_file = os::internal_path(lexrc.getString());
373 ui_file = os::internal_path(lexrc.getString());
377 case RC_AUTORESET_OPTIONS:
379 auto_reset_options = lexrc.getBool();
383 case RC_DISPLAY_GRAPHICS:
385 display_graphics = graphics::displayTranslator().find(lexrc.getString());
389 case RC_TEX_EXPECTS_WINDOWS_PATHS:
391 windows_style_tex_paths = lexrc.getBool();
395 case RC_TEX_ALLOWS_SPACES:
397 tex_allows_spaces = lexrc.getBool();
403 use_kbmap = lexrc.getBool();
407 case RC_KBMAP_PRIMARY:
409 string const kmap(os::internal_path(lexrc.getString()));
412 } else if (!libFileSearch("kbd", kmap,
414 primary_kbmap = kmap;
416 lexrc.printError("LyX: Keymap `$$Token' not found");
421 case RC_KBMAP_SECONDARY:
423 string const kmap(os::internal_path(lexrc.getString()));
426 } else if (!libFileSearch("kbd", kmap,
428 secondary_kbmap = kmap;
430 lexrc.printError("LyX: Keymap `$$Token' not found");
435 case RC_FONT_ENCODING:
437 fontenc = lexrc.getString();
443 printer = lexrc.getString();
447 case RC_PRINT_COMMAND:
449 print_command = lexrc.getString();
453 case RC_PRINTEVENPAGEFLAG:
455 print_evenpage_flag = lexrc.getString();
459 case RC_PRINTODDPAGEFLAG:
461 print_oddpage_flag = lexrc.getString();
465 case RC_PRINTPAGERANGEFLAG:
467 print_pagerange_flag = lexrc.getString();
471 case RC_PRINTCOPIESFLAG:
473 print_copies_flag = lexrc.getString();
477 case RC_PRINTCOLLCOPIESFLAG:
479 print_collcopies_flag = lexrc.getString();
483 case RC_PRINTREVERSEFLAG:
485 print_reverse_flag = lexrc.getString();
489 case RC_PRINTLANDSCAPEFLAG:
491 print_landscape_flag = lexrc.getString();
495 case RC_PRINTTOPRINTER:
497 print_to_printer = lexrc.getString();
501 case RC_PRINT_ADAPTOUTPUT:
503 print_adapt_output = lexrc.getBool();
509 print_to_file = os::internal_path(lexrc.getString());
513 case RC_PRINTFILEEXTENSION:
515 print_file_extension = lexrc.getString();
519 case RC_PRINTEXSTRAOPTIONS:
521 print_extra_options = lexrc.getString();
525 case RC_PRINTSPOOL_COMMAND:
527 print_spool_command = lexrc.getString();
531 case RC_PRINTSPOOL_PRINTERPREFIX:
533 print_spool_printerprefix = lexrc.getString();
537 case RC_PRINTPAPERDIMENSIONFLAG:
539 print_paper_dimension_flag = lexrc.getString();
543 case RC_PRINTPAPERFLAG:
545 print_paper_flag = lexrc.getString();
549 case RC_CUSTOM_EXPORT_COMMAND:
551 custom_export_command = lexrc.getString();
555 case RC_CUSTOM_EXPORT_FORMAT:
557 custom_export_format = lexrc.getString();
561 case RC_DEFAULT_PAPERSIZE:
564 ascii_lowercase(lexrc.getString());
565 if (size == "usletter")
568 else if (size == "legal")
571 else if (size == "executive")
574 else if (size == "a3")
577 else if (size == "a4")
580 else if (size == "a5")
583 else if (size == "b5")
586 else if (size == "default")
592 case RC_VIEWDVI_PAPEROPTION:
594 view_dvi_paper_option = lexrc.getString();
596 view_dvi_paper_option.erase();
600 case RC_CHKTEX_COMMAND:
602 chktex_command = lexrc.getString();
606 case RC_BIBTEX_COMMAND:
608 bibtex_command = lexrc.getString();
612 case RC_INDEX_COMMAND:
614 index_command = lexrc.getString();
620 dpi = lexrc.getInteger();
626 zoom = lexrc.getInteger();
630 case RC_GEOMETRY_SESSION:
632 allow_geometry_session = lexrc.getBool();
636 case RC_SCREEN_FONT_SIZES:
638 font_sizes[FONT_SIZE_TINY] =
642 font_sizes[FONT_SIZE_SCRIPT] =
646 font_sizes[FONT_SIZE_FOOTNOTE] =
650 font_sizes[FONT_SIZE_SMALL] =
654 font_sizes[FONT_SIZE_NORMAL] =
658 font_sizes[FONT_SIZE_LARGE] =
662 font_sizes[FONT_SIZE_LARGER] =
666 font_sizes[FONT_SIZE_LARGEST] =
670 font_sizes[FONT_SIZE_HUGE] =
674 font_sizes[FONT_SIZE_HUGER] =
679 case RC_SCREEN_FONT_SCALABLE:
681 use_scalable_fonts = lexrc.getBool();
687 autosave = lexrc.getInteger();
691 case RC_DOCUMENTPATH:
693 document_path = os::internal_path(lexrc.getString());
694 document_path = expandPath(document_path);
700 example_path = os::internal_path(lexrc.getString());
701 example_path = expandPath(example_path);
705 case RC_TEMPLATEPATH:
707 template_path = os::internal_path(lexrc.getString());
708 template_path = expandPath(template_path);
714 tempdir_path = os::internal_path(lexrc.getString());
715 tempdir_path = expandPath(tempdir_path);
721 lyxerr << "Ignoring obsolete use_tempdir flag." << endl;
725 case RC_USELASTFILEPOS:
727 use_lastfilepos = lexrc.getBool();
733 load_session = lexrc.getBool();
737 case RC_NUMLASTFILES:
739 num_lastfiles = lexrc.getInteger();
743 case RC_CHECKLASTFILES:
745 check_lastfiles = lexrc.getBool();
749 case RC_SCREEN_FONT_ROMAN:
751 roman_font_name = lexrc.getString();
752 oldFontFormat(roman_font_name,
757 case RC_SCREEN_FONT_SANS:
759 sans_font_name = lexrc.getString();
760 oldFontFormat(sans_font_name, sans_font_foundry);
764 case RC_SCREEN_FONT_TYPEWRITER:
766 typewriter_font_name = lexrc.getString();
767 oldFontFormat(typewriter_font_name,
768 typewriter_font_foundry);
772 case RC_SCREEN_FONT_ROMAN_FOUNDRY:
774 roman_font_foundry = lexrc.getString();
778 case RC_SCREEN_FONT_SANS_FOUNDRY:
780 sans_font_foundry = lexrc.getString();
784 case RC_SCREEN_FONT_TYPEWRITER_FOUNDRY:
786 typewriter_font_foundry = lexrc.getString();
792 string lyx_name, x11_name;
795 lyx_name = lexrc.getString();
797 lexrc.printError("Missing color tag.");
802 x11_name = lexrc.getString();
804 lexrc.printError("Missing color name for color: `$$Token'");
808 ColorCode const col =
809 lcolor.getFromLyXName(lyx_name);
810 if (col == Color_none ||
811 col == Color_inherit ||
815 if (!lcolor.setColor(col, x11_name)) {
816 lyxerr << "Bad lyxrc set_color for "
822 case RC_AUTOREGIONDELETE:
823 // Auto region delete defaults to true
825 auto_region_delete = lexrc.getBool();
831 lyxpipes = os::internal_path(lexrc.getString());
832 lyxpipes = expandPath(lyxpipes);
836 case RC_CURSOR_FOLLOWS_SCROLLBAR:
838 cursor_follows_scrollbar = lexrc.getBool();
842 case RC_MACRO_EDIT_STYLE:
844 switch (lexrc.getInteger()) {
845 case 0: macro_edit_style = MACRO_EDIT_INLINE_BOX; break;
846 case 1: macro_edit_style = MACRO_EDIT_INLINE; break;
847 case 2: macro_edit_style = MACRO_EDIT_LIST; break;
852 case RC_DIALOGS_ICONIFY_WITH_MAIN:
854 dialogs_iconify_with_main = lexrc.getBool();
858 case RC_PLAINTEXT_ROFF_COMMAND:
860 plaintext_roff_command = lexrc.getString();
863 case RC_PLAINTEXT_LINELEN:
865 plaintext_linelen = lexrc.getInteger();
868 // Spellchecker settings:
869 case RC_USE_SPELL_LIB:
871 use_spell_lib = lexrc.getBool();
874 case RC_SPELL_COMMAND:
876 isp_command = lexrc.getString();
879 case RC_ACCEPT_COMPOUND:
881 isp_accept_compound = lexrc.getBool();
886 isp_use_input_encoding = lexrc.getBool();
889 case RC_USE_ALT_LANG:
891 isp_use_alt_lang = lexrc.getBool();
894 case RC_USE_PERS_DICT:
896 isp_use_pers_dict = lexrc.getBool();
901 use_tooltip = lexrc.getBool();
904 case RC_USE_PIXMAP_CACHE:
906 use_pixmap_cache = lexrc.getBool();
909 case RC_USE_ESC_CHARS:
911 isp_use_esc_chars = lexrc.getBool();
916 isp_alt_lang = lexrc.getString();
921 isp_pers_dict = os::internal_path(lexrc.getString());
926 isp_esc_chars = lexrc.getString();
931 make_backup = lexrc.getBool();
934 case RC_BACKUPDIR_PATH:
936 backupdir_path = os::internal_path(lexrc.getString());
937 backupdir_path = expandPath(backupdir_path);
940 case RC_DATE_INSERT_FORMAT:
942 date_insert_format = lexrc.getString();
945 case RC_LANGUAGE_PACKAGE:
947 language_package = lexrc.getString();
950 case RC_LANGUAGE_AUTO_BEGIN:
952 language_auto_begin = lexrc.getBool();
955 case RC_LANGUAGE_AUTO_END:
957 language_auto_end = lexrc.getBool();
960 case RC_LANGUAGE_GLOBAL_OPTIONS:
962 language_global_options = lexrc.getBool();
965 case RC_LANGUAGE_USE_BABEL:
967 language_use_babel = lexrc.getBool();
970 case RC_LANGUAGE_COMMAND_BEGIN:
972 language_command_begin = lexrc.getString();
975 case RC_LANGUAGE_COMMAND_END:
977 language_command_end = lexrc.getString();
980 case RC_LANGUAGE_COMMAND_LOCAL:
982 language_command_local = lexrc.getString();
987 rtl_support = lexrc.getBool();
992 auto_number = lexrc.getBool();
995 case RC_MARK_FOREIGN_LANGUAGE:
997 mark_foreign_language = lexrc.getBool();
1002 string fmt, command;
1004 fmt = lexrc.getString();
1007 command = lexrc.getString();
1009 setMover(fmt, command);
1013 case RC_CONVERTER: {
1014 string from, to, command, flags;
1016 from = lexrc.getString();
1019 to = lexrc.getString();
1022 command = lexrc.getString();
1025 flags = lexrc.getString();
1027 if (command.empty()) {
1028 theConverters().erase(from, to);
1030 theConverters().add(from, to, command, flags);
1034 // compatibility with versions older than 1.4.0 only
1036 string format, command;
1038 format = lexrc.getString();
1041 command = lexrc.getString();
1043 formats.setViewer(format, command);
1047 string format, extension, prettyname, shortcut;
1049 format = lexrc.getString();
1052 extension = lexrc.getString();
1055 prettyname = lexrc.getString();
1058 shortcut = lexrc.getString();
1060 string viewer, editor;
1062 viewer = lexrc.getString();
1064 editor = lexrc.getString();
1066 // Hack to ensure compatibility with versions older
1068 int le = lexrc.lex();
1069 if (le != Lexer::LEX_FEOF && le != Lexer::LEX_UNDEF) {
1070 flags = lexrc.getString();
1071 if (le != Lexer::LEX_DATA) {
1072 // We have got a known token.
1073 // Therefore this is an old style
1074 // format definition without
1076 lexrc.pushToken(flags);
1080 int flgs = Format::none;
1081 while (!flags.empty()) {
1083 flags = split(flags, flag, ',');
1084 if (flag == "document")
1085 flgs |= Format::document;
1086 else if (flag == "vector")
1087 flgs |= Format::vector;
1089 lyxerr << "Ignoring unknown flag `"
1090 << flag << "' for format `"
1091 << format << "'." << endl;
1093 if (prettyname.empty()) {
1094 if (theConverters().formatIsUsed(format)) {
1095 lyxerr << "Can't delete format "
1098 formats.erase(format);
1101 formats.add(format, extension, prettyname,
1102 shortcut, viewer, editor, flgs);
1106 case RC_DEFAULT_LANGUAGE:
1108 default_language = lexrc.getString();
1112 case RC_LABEL_INIT_LENGTH:
1114 label_init_length = lexrc.getInteger();
1118 case RC_SHOW_BANNER:
1120 show_banner = lexrc.getBool();
1126 string const tmp = lexrc.getString();
1127 if (tmp == "true" || tmp == "on")
1128 preview = PREVIEW_ON;
1129 else if (tmp == "no_math")
1130 preview = PREVIEW_NO_MATH;
1132 preview = PREVIEW_OFF;
1133 if (tmp != "false" && tmp != "off")
1134 lyxerr << "Unrecognized "
1136 << tmp << '\n' << endl;
1141 case RC_PREVIEW_HASHED_LABELS:
1143 preview_hashed_labels = lexrc.getBool();
1147 case RC_PREVIEW_SCALE_FACTOR:
1149 preview_scale_factor = lexrc.getString();
1155 user_name = lexrc.getString();
1160 user_email = lexrc.getString();
1163 case RC_PATH_PREFIX:
1165 path_prefix = lexrc.getString();
1168 case RC_USE_CONVERTER_CACHE:
1170 use_converter_cache = lexrc.getBool();
1173 case RC_CONVERTER_CACHE_MAXAGE:
1175 converter_cache_maxage =
1176 convert<unsigned int>(lexrc.getString());
1179 case RC_SORT_LAYOUTS:
1181 sort_layouts = lexrc.getBool();
1184 case RC_LAST: break; // this is just a dummy
1188 /// Update converters data-structures
1189 theConverters().update(formats);
1190 theConverters().buildGraph();
1196 void LyXRC::write(FileName const & filename, bool ignore_system_lyxrc) const
1198 ofstream ofs(filename.toFilesystemEncoding().c_str());
1200 write(ofs, ignore_system_lyxrc);
1204 void LyXRC::print() const
1206 if (lyxerr.debugging())
1207 write(lyxerr, false);
1215 typedef pair<string, SpecialisedMover> Data;
1217 SameMover(Data const & comparison)
1218 : comparison_(comparison) {}
1220 bool operator()(Data const & data) const
1222 return data.first == comparison_.first &&
1223 data.second.command() == comparison_.second.command();
1231 void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) const
1233 LyXRCTags tag = RC_LAST;
1235 if (!name.empty()) {
1236 for (int i = 0; i != lyxrcCount; ++i)
1237 if ("\\" + name == lyxrcTags[i].tag)
1238 tag = static_cast<LyXRCTags>(lyxrcTags[i].code);
1242 os << "### This file is part of\n"
1243 << "### ========================================================\n"
1244 << "### LyX, The Document Processor\n"
1246 << "### Copyright 1995 Matthias Ettrich\n"
1247 << "### Copyright 1995-2007 The LyX Team.\n"
1249 << "### ========================================================\n"
1251 << "# This file is written by LyX, if you want to make your own\n"
1252 << "# modifications you should do them from inside LyX and save\n"
1255 // Why the switch you might ask. It is a trick to ensure that all
1256 // the elements in the LyXRCTags enum is handled. As you can see
1257 // there are no breaks at all. So it is just a huge fall-through.
1258 // The nice thing is that we will get a warning from the compiler
1259 // if we forget an element.
1263 // input/include files are not done here
1265 if (ignore_system_lyxrc ||
1266 bind_file != system_lyxrc.bind_file) {
1267 string const path = os::external_path(bind_file);
1268 os << "\\bind_file \"" << path << "\"\n";
1274 if (ignore_system_lyxrc ||
1275 def_file != system_lyxrc.def_file) {
1276 string const path = os::external_path(def_file);
1277 os << "\\def_file \"" << path << "\"\n";
1286 << "# MISC SECTION ######################################\n"
1288 // bind files are not done here.
1290 case RC_PATH_PREFIX:
1291 if (ignore_system_lyxrc ||
1292 path_prefix != system_lyxrc.path_prefix) {
1293 os << "\\path_prefix \"" << path_prefix << "\"\n";
1298 if (ignore_system_lyxrc ||
1299 ui_file != system_lyxrc.ui_file) {
1300 string const path = os::external_path(ui_file);
1301 os << "\\ui_file \"" << path << "\"\n";
1305 case RC_AUTOREGIONDELETE:
1306 if (ignore_system_lyxrc ||
1307 auto_region_delete != system_lyxrc.auto_region_delete) {
1308 os << "# Set to false to inhibit automatic replacement of\n"
1309 << "# the current selection.\n"
1310 << "\\auto_region_delete " << convert<string>(auto_region_delete)
1315 case RC_AUTORESET_OPTIONS:
1316 if (ignore_system_lyxrc ||
1317 auto_reset_options != system_lyxrc.auto_reset_options) {
1318 os << "# Set to false to inhibit automatic reset of\n"
1319 << "# the class options to defaults on class change.\n"
1320 << "\\auto_reset_options "
1321 << convert<string>(auto_reset_options)
1327 if (ignore_system_lyxrc ||
1328 autosave != system_lyxrc.autosave) {
1329 os << "# The time interval between auto-saves in seconds.\n"
1330 << "\\autosave " << autosave << '\n';
1334 case RC_DISPLAY_GRAPHICS:
1335 if (ignore_system_lyxrc ||
1336 display_graphics != system_lyxrc.display_graphics) {
1337 os << "# Display graphics within LyX\n"
1338 << "# monochrome|grayscale|color|none\n"
1339 << "\\display_graphics "
1340 << graphics::displayTranslator().find(
1341 graphics::DisplayType(display_graphics))
1346 case RC_SORT_LAYOUTS:
1347 if (ignore_system_lyxrc ||
1348 sort_layouts != system_lyxrc.sort_layouts) {
1349 os << "# Sort layouts alphabetically.\n"
1350 << "\\sort_layouts " << convert<string>(sort_layouts) << '\n';
1354 case RC_VIEWDVI_PAPEROPTION:
1355 if (ignore_system_lyxrc ||
1356 view_dvi_paper_option
1357 != system_lyxrc.view_dvi_paper_option) {
1358 os << "# Options used to specify paper size to the\n"
1359 << "# view_dvi_command (e.g. -paper)\n"
1360 << "\\view_dvi_paper_option \""
1361 << view_dvi_paper_option << "\"\n";
1365 case RC_DEFAULT_PAPERSIZE:
1366 if (ignore_system_lyxrc ||
1367 default_papersize != system_lyxrc.default_papersize) {
1368 os << "# The default papersize to use.\n"
1369 << "\\default_papersize \"";
1370 switch (default_papersize) {
1372 os << "default"; break;
1373 case PAPER_USLETTER:
1374 os << "usletter"; break;
1376 os << "legal"; break;
1377 case PAPER_USEXECUTIVE:
1378 os << "executive"; break;
1389 case PAPER_B4: break;
1395 case RC_CHKTEX_COMMAND:
1396 if (ignore_system_lyxrc ||
1397 chktex_command != system_lyxrc.chktex_command) {
1398 os << "\\chktex_command \"" << chktex_command << "\"\n";
1402 case RC_BIBTEX_COMMAND:
1403 if (ignore_system_lyxrc ||
1404 bibtex_command != system_lyxrc.bibtex_command) {
1405 os << "\\bibtex_command \"" << bibtex_command << "\"\n";
1409 case RC_INDEX_COMMAND:
1410 if (ignore_system_lyxrc ||
1411 index_command != system_lyxrc.index_command) {
1412 os << "\\index_command \"" << index_command << "\"\n";
1416 case RC_TEX_EXPECTS_WINDOWS_PATHS:
1417 if (ignore_system_lyxrc ||
1418 windows_style_tex_paths != system_lyxrc.windows_style_tex_paths) {
1419 os << "\\tex_expects_windows_paths "
1420 << convert<string>(windows_style_tex_paths) << '\n';
1424 case RC_TEX_ALLOWS_SPACES:
1425 if (tex_allows_spaces != system_lyxrc.tex_allows_spaces) {
1426 os << "\\tex_allows_spaces "
1427 << convert<string>(tex_allows_spaces) << '\n';
1432 if (ignore_system_lyxrc ||
1433 use_kbmap != system_lyxrc.use_kbmap) {
1434 os << "\\kbmap " << convert<string>(use_kbmap) << '\n';
1438 case RC_KBMAP_PRIMARY:
1439 if (ignore_system_lyxrc ||
1440 primary_kbmap != system_lyxrc.primary_kbmap) {
1441 string const path = os::external_path(primary_kbmap);
1442 os << "\\kbmap_primary \"" << path << "\"\n";
1446 case RC_KBMAP_SECONDARY:
1447 if (ignore_system_lyxrc ||
1448 secondary_kbmap != system_lyxrc.secondary_kbmap) {
1449 string const path = os::external_path(secondary_kbmap);
1450 os << "\\kbmap_secondary \"" << path << "\"\n";
1455 if (ignore_system_lyxrc ||
1456 lyxpipes != system_lyxrc.lyxpipes) {
1457 string const path = os::external_path(lyxpipes);
1458 os << "\\serverpipe \"" << path << "\"\n";
1462 case RC_DATE_INSERT_FORMAT:
1463 if (ignore_system_lyxrc ||
1464 date_insert_format != system_lyxrc.date_insert_format) {
1465 os << "\\date_insert_format \"" << date_insert_format
1470 case RC_LABEL_INIT_LENGTH:
1471 if (ignore_system_lyxrc ||
1472 label_init_length != system_lyxrc.label_init_length) {
1473 os << "\\label_init_length " << label_init_length
1480 os << "\\user_name \"" << user_name << "\"\n";
1485 os << "\\user_email \"" << user_email << "\"\n";
1489 case RC_SHOW_BANNER:
1490 if (ignore_system_lyxrc ||
1491 show_banner != system_lyxrc.show_banner) {
1492 os << "\\show_banner " << convert<string>(show_banner) << '\n';
1498 if (ignore_system_lyxrc ||
1499 preview != system_lyxrc.preview) {
1505 case PREVIEW_NO_MATH:
1512 os << "\\preview " << status << '\n';
1517 case RC_PREVIEW_HASHED_LABELS:
1518 if (ignore_system_lyxrc ||
1519 preview_hashed_labels !=
1520 system_lyxrc.preview_hashed_labels) {
1521 os << "\\preview_hashed_labels "
1522 << convert<string>(preview_hashed_labels) << '\n';
1527 case RC_PREVIEW_SCALE_FACTOR:
1528 if (ignore_system_lyxrc ||
1529 preview_scale_factor != system_lyxrc.preview_scale_factor) {
1530 os << "\\preview_scale_factor "
1531 << preview_scale_factor << '\n';
1536 case RC_USE_CONVERTER_CACHE:
1537 if (ignore_system_lyxrc ||
1538 use_converter_cache != system_lyxrc.use_converter_cache) {
1539 os << "\\use_converter_cache "
1540 << convert<string>(use_converter_cache) << '\n';
1545 case RC_CONVERTER_CACHE_MAXAGE:
1546 if (ignore_system_lyxrc ||
1547 converter_cache_maxage != system_lyxrc.converter_cache_maxage) {
1548 os << "\\converter_cache_maxage "
1549 << converter_cache_maxage << '\n';
1555 << "# SCREEN & FONTS SECTION ############################\n"
1559 if (ignore_system_lyxrc ||
1560 dpi != system_lyxrc.dpi) {
1561 os << "\\screen_dpi " << dpi << '\n';
1565 case RC_SCREEN_ZOOM:
1566 if (ignore_system_lyxrc ||
1567 zoom != system_lyxrc.zoom) {
1568 os << "\\screen_zoom " << zoom << '\n';
1572 case RC_GEOMETRY_SESSION:
1573 if (ignore_system_lyxrc ||
1574 allow_geometry_session != system_lyxrc.allow_geometry_session) {
1575 os << "\\allow_geometry_session " << convert<string>(allow_geometry_session)
1580 case RC_CURSOR_FOLLOWS_SCROLLBAR:
1581 if (ignore_system_lyxrc ||
1582 cursor_follows_scrollbar
1583 != system_lyxrc.cursor_follows_scrollbar) {
1584 os << "\\cursor_follows_scrollbar "
1585 << convert<string>(cursor_follows_scrollbar) << '\n';
1589 case RC_MACRO_EDIT_STYLE:
1590 if (ignore_system_lyxrc ||
1592 != system_lyxrc.macro_edit_style) {
1593 os << "\\macro_edit_style ";
1594 switch (macro_edit_style) {
1595 case MACRO_EDIT_INLINE_BOX: os << "0\n"; break;
1596 case MACRO_EDIT_INLINE: os << "1\n"; break;
1597 case MACRO_EDIT_LIST: os << "2\n"; break;
1602 case RC_DIALOGS_ICONIFY_WITH_MAIN:
1603 if (ignore_system_lyxrc ||
1604 dialogs_iconify_with_main
1605 != system_lyxrc.dialogs_iconify_with_main) {
1606 os << "\\dialogs_iconify_with_main "
1607 << convert<string>(dialogs_iconify_with_main) << '\n';
1611 case RC_SCREEN_FONT_ROMAN:
1612 if (ignore_system_lyxrc ||
1613 roman_font_name != system_lyxrc.roman_font_name) {
1614 os << "\\screen_font_roman \"" << roman_font_name
1619 case RC_SCREEN_FONT_ROMAN_FOUNDRY:
1620 if (ignore_system_lyxrc ||
1621 roman_font_foundry != system_lyxrc.roman_font_foundry) {
1622 os << "\\screen_font_roman_foundry \"" << roman_font_foundry
1627 case RC_SCREEN_FONT_SANS:
1628 if (ignore_system_lyxrc ||
1629 sans_font_name != system_lyxrc.sans_font_name) {
1630 os << "\\screen_font_sans \"" << sans_font_name
1635 case RC_SCREEN_FONT_SANS_FOUNDRY:
1636 if (ignore_system_lyxrc ||
1637 sans_font_foundry != system_lyxrc.sans_font_foundry) {
1638 os << "\\screen_font_sans_foundry \"" << sans_font_foundry
1643 case RC_SCREEN_FONT_TYPEWRITER:
1644 if (ignore_system_lyxrc ||
1645 typewriter_font_name != system_lyxrc.typewriter_font_name) {
1646 os << "\\screen_font_typewriter \""
1647 << typewriter_font_name << "\"\n";
1651 case RC_SCREEN_FONT_TYPEWRITER_FOUNDRY:
1652 if (ignore_system_lyxrc ||
1653 typewriter_font_foundry != system_lyxrc.typewriter_font_foundry) {
1654 os << "\\screen_font_typewriter_foundry \""
1655 << typewriter_font_foundry << "\"\n";
1660 case RC_SCREEN_FONT_SCALABLE:
1661 if (ignore_system_lyxrc ||
1662 use_scalable_fonts != system_lyxrc.use_scalable_fonts) {
1663 os << "\\screen_font_scalable "
1664 << convert<string>(use_scalable_fonts)
1669 case RC_SCREEN_FONT_SIZES:
1670 if (ignore_system_lyxrc ||
1671 font_sizes[FONT_SIZE_TINY]
1672 != system_lyxrc.font_sizes[FONT_SIZE_TINY] ||
1673 font_sizes[FONT_SIZE_SCRIPT]
1674 != system_lyxrc.font_sizes[FONT_SIZE_SCRIPT] ||
1675 font_sizes[FONT_SIZE_FOOTNOTE]
1676 != system_lyxrc.font_sizes[FONT_SIZE_FOOTNOTE] ||
1677 font_sizes[FONT_SIZE_SMALL]
1678 != system_lyxrc.font_sizes[FONT_SIZE_SMALL] ||
1679 font_sizes[FONT_SIZE_NORMAL]
1680 != system_lyxrc.font_sizes[FONT_SIZE_NORMAL] ||
1681 font_sizes[FONT_SIZE_LARGE]
1682 != system_lyxrc.font_sizes[FONT_SIZE_LARGE] ||
1683 font_sizes[FONT_SIZE_LARGER]
1684 != system_lyxrc.font_sizes[FONT_SIZE_LARGER] ||
1685 font_sizes[FONT_SIZE_LARGEST]
1686 != system_lyxrc.font_sizes[FONT_SIZE_LARGEST] ||
1687 font_sizes[FONT_SIZE_HUGE]
1688 != system_lyxrc.font_sizes[FONT_SIZE_HUGE] ||
1689 font_sizes[FONT_SIZE_HUGER]
1690 != system_lyxrc.font_sizes[FONT_SIZE_HUGER]) {
1691 os.setf(ios::fixed);
1693 os << "\\screen_font_sizes"
1694 << ' ' << font_sizes[FONT_SIZE_TINY]
1695 << ' ' << font_sizes[FONT_SIZE_SCRIPT]
1696 << ' ' << font_sizes[FONT_SIZE_FOOTNOTE]
1697 << ' ' << font_sizes[FONT_SIZE_SMALL]
1698 << ' ' << font_sizes[FONT_SIZE_NORMAL]
1699 << ' ' << font_sizes[FONT_SIZE_LARGE]
1700 << ' ' << font_sizes[FONT_SIZE_LARGER]
1701 << ' ' << font_sizes[FONT_SIZE_LARGEST]
1702 << ' ' << font_sizes[FONT_SIZE_HUGE]
1703 << ' ' << font_sizes[FONT_SIZE_HUGER]
1710 << "# COLOR SECTION ###################################\n"
1714 for (int i = 0; i < Color_ignore; ++i) {
1715 ColorCode lc = static_cast<ColorCode>(i);
1717 string const col(lcolor.getX11Name(lc));
1718 if (ignore_system_lyxrc ||
1719 col != system_lcolor.getX11Name(lc)) {
1720 os << "\\set_color \""
1721 << lcolor.getLyXName(lc) << "\" \""
1729 << "# PRINTER SECTION ###################################\n"
1733 if (ignore_system_lyxrc ||
1734 printer != system_lyxrc.printer) {
1735 os << "\\printer \"" << printer << "\"\n";
1739 case RC_PRINT_ADAPTOUTPUT:
1740 if (ignore_system_lyxrc ||
1741 print_adapt_output != system_lyxrc.print_adapt_output) {
1742 os << "\\print_adapt_output "
1743 << convert<string>(print_adapt_output)
1748 case RC_PRINT_COMMAND:
1749 if (ignore_system_lyxrc ||
1750 print_command != system_lyxrc.print_command) {
1751 os << "\\print_command \"" << print_command << "\"\n";
1755 case RC_PRINTEXSTRAOPTIONS:
1756 if (ignore_system_lyxrc ||
1757 print_extra_options != system_lyxrc.print_extra_options) {
1758 os << "\\print_extra_options \"" << print_extra_options
1763 case RC_PRINTSPOOL_COMMAND:
1764 if (ignore_system_lyxrc ||
1765 print_spool_command != system_lyxrc.print_spool_command) {
1766 os << "\\print_spool_command \"" << print_spool_command
1771 case RC_PRINTSPOOL_PRINTERPREFIX:
1772 if (ignore_system_lyxrc ||
1773 print_spool_printerprefix
1774 != system_lyxrc.print_spool_printerprefix) {
1775 os << "\\print_spool_printerprefix \""
1776 << print_spool_printerprefix << "\"\n";
1780 case RC_PRINTEVENPAGEFLAG:
1781 if (ignore_system_lyxrc ||
1782 print_evenpage_flag != system_lyxrc.print_evenpage_flag) {
1783 os << "\\print_evenpage_flag \"" << print_evenpage_flag
1788 case RC_PRINTODDPAGEFLAG:
1789 if (ignore_system_lyxrc ||
1790 print_oddpage_flag != system_lyxrc.print_oddpage_flag) {
1791 os << "\\print_oddpage_flag \"" << print_oddpage_flag
1796 case RC_PRINTREVERSEFLAG:
1797 if (ignore_system_lyxrc ||
1798 print_reverse_flag != system_lyxrc.print_reverse_flag) {
1799 os << "\\print_reverse_flag \"" << print_reverse_flag
1804 case RC_PRINTLANDSCAPEFLAG:
1805 if (ignore_system_lyxrc ||
1806 print_landscape_flag != system_lyxrc.print_landscape_flag) {
1807 os << "\\print_landscape_flag \"" << print_landscape_flag
1812 case RC_PRINTPAGERANGEFLAG:
1813 if (ignore_system_lyxrc ||
1814 print_pagerange_flag != system_lyxrc.print_pagerange_flag) {
1815 os << "\\print_pagerange_flag \"" << print_pagerange_flag
1820 case RC_PRINTCOPIESFLAG:
1821 if (ignore_system_lyxrc ||
1822 print_copies_flag != system_lyxrc.print_copies_flag) {
1823 os << "\\print_copies_flag \"" << print_copies_flag
1828 case RC_PRINTCOLLCOPIESFLAG:
1829 if (ignore_system_lyxrc ||
1830 print_collcopies_flag
1831 != system_lyxrc.print_collcopies_flag) {
1832 os << "\\print_collcopies_flag \""
1833 << print_collcopies_flag
1838 case RC_PRINTPAPERFLAG:
1839 if (ignore_system_lyxrc ||
1840 print_paper_flag != system_lyxrc.print_paper_flag) {
1841 os << "\\print_paper_flag \"" << print_paper_flag
1846 case RC_PRINTPAPERDIMENSIONFLAG:
1847 if (ignore_system_lyxrc ||
1848 print_paper_dimension_flag
1849 != system_lyxrc.print_paper_dimension_flag) {
1850 os << "\\print_paper_dimension_flag \""
1851 << print_paper_dimension_flag << "\"\n";
1855 case RC_PRINTTOPRINTER:
1856 if (ignore_system_lyxrc ||
1857 print_to_printer != system_lyxrc.print_to_printer) {
1858 os << "\\print_to_printer \"" << print_to_printer
1863 case RC_PRINTTOFILE:
1864 if (ignore_system_lyxrc ||
1865 print_to_file != system_lyxrc.print_to_file) {
1866 string const path = os::external_path(print_to_file);
1867 os << "\\print_to_file \"" << path << "\"\n";
1871 case RC_PRINTFILEEXTENSION:
1872 if (ignore_system_lyxrc ||
1873 print_file_extension != system_lyxrc.print_file_extension) {
1874 os << "\\print_file_extension \""
1875 << print_file_extension
1882 << "# EXPORT SECTION ####################################\n"
1885 case RC_CUSTOM_EXPORT_COMMAND:
1886 if (ignore_system_lyxrc ||
1887 custom_export_command
1888 != system_lyxrc.custom_export_command) {
1889 os << "\\custom_export_command \""
1890 << custom_export_command
1895 case RC_CUSTOM_EXPORT_FORMAT:
1896 if (ignore_system_lyxrc ||
1897 custom_export_format
1898 != system_lyxrc.custom_export_format) {
1899 os << "\\custom_export_format \"" << custom_export_format
1906 << "# TEX SECTION #######################################\n"
1909 case RC_FONT_ENCODING:
1910 if (ignore_system_lyxrc ||
1911 fontenc != system_lyxrc.fontenc) {
1912 os << "\\font_encoding \"" << fontenc << "\"\n";
1918 << "# FILE SECTION ######################################\n"
1921 case RC_DOCUMENTPATH:
1922 if (ignore_system_lyxrc ||
1923 document_path != system_lyxrc.document_path) {
1924 string const path = os::external_path(document_path);
1925 os << "\\document_path \"" << path << "\"\n";
1929 case RC_USELASTFILEPOS:
1930 if (ignore_system_lyxrc ||
1931 use_lastfilepos != system_lyxrc.use_lastfilepos) {
1932 os << "\\use_lastfilepos " << convert<string>(use_lastfilepos)
1937 case RC_LOADSESSION:
1938 if (ignore_system_lyxrc ||
1939 load_session != system_lyxrc.load_session) {
1940 os << "\\load_session " << convert<string>(load_session)
1945 case RC_NUMLASTFILES:
1946 if (ignore_system_lyxrc ||
1947 num_lastfiles != system_lyxrc.num_lastfiles) {
1948 os << "\\num_lastfiles " << num_lastfiles << '\n';
1952 case RC_CHECKLASTFILES:
1953 if (ignore_system_lyxrc ||
1954 check_lastfiles != system_lyxrc.check_lastfiles) {
1955 os << "\\check_lastfiles " << convert<string>(check_lastfiles)
1960 case RC_EXAMPLEPATH:
1961 if (ignore_system_lyxrc ||
1962 example_path != system_lyxrc.example_path) {
1963 string const path = os::external_path(example_path);
1964 os << "\\example_path \"" << path << "\"\n";
1968 case RC_TEMPLATEPATH:
1969 if (ignore_system_lyxrc ||
1970 template_path != system_lyxrc.template_path) {
1971 string const path = os::external_path(template_path);
1972 os << "\\template_path \"" << path << "\"\n";
1976 case RC_TEMPDIRPATH:
1977 if (ignore_system_lyxrc ||
1978 tempdir_path != system_lyxrc.tempdir_path) {
1979 string const path = os::external_path(tempdir_path);
1980 os << "\\tempdir_path \"" << path << "\"\n";
1988 case RC_PLAINTEXT_LINELEN:
1989 if (ignore_system_lyxrc ||
1990 plaintext_linelen != system_lyxrc.plaintext_linelen) {
1991 os << "\\plaintext_linelen " << plaintext_linelen << '\n';
1995 case RC_MAKE_BACKUP:
1996 if (ignore_system_lyxrc ||
1997 make_backup != system_lyxrc.make_backup) {
1998 os << "\\make_backup " << convert<string>(make_backup) << '\n';
2002 case RC_BACKUPDIR_PATH:
2003 if (ignore_system_lyxrc ||
2004 backupdir_path != system_lyxrc.backupdir_path) {
2005 string const path = os::external_path(backupdir_path);
2006 os << "\\backupdir_path \"" << path << "\"\n";
2012 << "# PLAIN TEXT EXPORT SECTION ##############################\n"
2015 case RC_PLAINTEXT_ROFF_COMMAND:
2016 if (ignore_system_lyxrc ||
2017 plaintext_roff_command != system_lyxrc.plaintext_roff_command) {
2018 os << "\\plaintext_roff_command \"" << plaintext_roff_command
2025 << "# SPELLCHECKER SECTION ##############################\n"
2027 case RC_USE_SPELL_LIB:
2028 if (ignore_system_lyxrc ||
2029 use_spell_lib != system_lyxrc.use_spell_lib) {
2030 os << "\\use_spell_lib " << convert<string>(use_spell_lib) << '\n';
2034 case RC_SPELL_COMMAND:
2035 if (ignore_system_lyxrc ||
2036 isp_command != system_lyxrc.isp_command) {
2037 os << "\\spell_command \"" << isp_command << "\"\n";
2041 case RC_ACCEPT_COMPOUND:
2042 if (ignore_system_lyxrc ||
2043 isp_accept_compound != system_lyxrc.isp_accept_compound) {
2044 os << "\\accept_compound " << convert<string>(isp_accept_compound)
2049 case RC_USE_ALT_LANG:
2050 if (ignore_system_lyxrc ||
2051 isp_use_alt_lang != system_lyxrc.isp_use_alt_lang) {
2052 os << "\\use_alt_language " << convert<string>(isp_use_alt_lang)
2058 if (ignore_system_lyxrc ||
2059 isp_alt_lang != system_lyxrc.isp_alt_lang) {
2060 os << "\\alternate_language \"" << isp_alt_lang
2065 case RC_USE_ESC_CHARS:
2066 if (ignore_system_lyxrc ||
2067 isp_use_esc_chars != system_lyxrc.isp_use_esc_chars) {
2068 os << "\\use_escape_chars " << convert<string>(isp_use_esc_chars)
2074 if (ignore_system_lyxrc ||
2075 isp_esc_chars != system_lyxrc.isp_esc_chars) {
2076 os << "\\escape_chars \"" << isp_esc_chars << "\"\n";
2080 case RC_USE_PERS_DICT:
2081 if (ignore_system_lyxrc ||
2082 isp_use_pers_dict != system_lyxrc.isp_use_pers_dict) {
2083 os << "\\use_personal_dictionary "
2084 << convert<string>(isp_use_pers_dict)
2089 case RC_USE_TOOLTIP:
2090 if (ignore_system_lyxrc ||
2091 use_tooltip != system_lyxrc.use_tooltip) {
2092 os << "\\use_tooltip "
2093 << convert<string>(use_tooltip)
2096 case RC_USE_PIXMAP_CACHE:
2097 if (ignore_system_lyxrc ||
2098 use_pixmap_cache != system_lyxrc.use_pixmap_cache) {
2099 os << "\\use_pixmap_cache "
2100 << convert<string>(use_pixmap_cache)
2104 if (isp_pers_dict != system_lyxrc.isp_pers_dict) {
2105 string const path = os::external_path(isp_pers_dict);
2106 os << "\\personal_dictionary \"" << path << "\"\n";
2110 case RC_USE_INP_ENC:
2111 if (ignore_system_lyxrc ||
2112 isp_use_input_encoding
2113 != system_lyxrc.isp_use_input_encoding) {
2114 os << "\\use_input_encoding "
2115 << convert<string>(isp_use_input_encoding)
2122 << "# LANGUAGE SUPPORT SECTION ##########################\n"
2125 case RC_RTL_SUPPORT:
2126 if (ignore_system_lyxrc ||
2127 rtl_support != system_lyxrc.rtl_support) {
2128 os << "\\rtl " << convert<string>(rtl_support) << '\n';
2132 case RC_LANGUAGE_PACKAGE:
2133 if (ignore_system_lyxrc ||
2134 language_package != system_lyxrc.language_package) {
2135 os << "\\language_package \"" << language_package
2140 case RC_LANGUAGE_GLOBAL_OPTIONS:
2141 if (ignore_system_lyxrc ||
2142 language_global_options
2143 != system_lyxrc.language_global_options) {
2144 os << "\\language_global_options \""
2145 << convert<string>(language_global_options)
2150 case RC_LANGUAGE_USE_BABEL:
2151 if (ignore_system_lyxrc ||
2152 language_use_babel != system_lyxrc.language_use_babel) {
2153 os << "\\language_use_babel \""
2154 << convert<string>(language_use_babel)
2159 case RC_LANGUAGE_COMMAND_BEGIN:
2160 if (ignore_system_lyxrc ||
2161 language_command_begin
2162 != system_lyxrc.language_command_begin) {
2163 os << "\\language_command_begin \""
2164 << language_command_begin
2169 case RC_LANGUAGE_COMMAND_END:
2170 if (ignore_system_lyxrc ||
2171 language_command_end
2172 != system_lyxrc.language_command_end) {
2173 os << "\\language_command_end \"" << language_command_end
2178 case RC_LANGUAGE_COMMAND_LOCAL:
2179 if (ignore_system_lyxrc ||
2180 language_command_local
2181 != system_lyxrc.language_command_local) {
2182 os << "\\language_command_local \""
2183 << language_command_local
2188 case RC_LANGUAGE_AUTO_BEGIN:
2189 if (ignore_system_lyxrc ||
2190 language_auto_begin != system_lyxrc.language_auto_begin) {
2191 os << "\\language_auto_begin "
2192 << convert<string>(language_auto_begin) << '\n';
2196 case RC_LANGUAGE_AUTO_END:
2197 if (ignore_system_lyxrc ||
2198 language_auto_end != system_lyxrc.language_auto_end) {
2199 os << "\\language_auto_end "
2200 << convert<string>(language_auto_end) << '\n';
2204 case RC_MARK_FOREIGN_LANGUAGE:
2205 if (ignore_system_lyxrc ||
2206 mark_foreign_language
2207 != system_lyxrc.mark_foreign_language) {
2208 os << "\\mark_foreign_language " <<
2209 convert<string>(mark_foreign_language) << '\n';
2215 << "# 2nd MISC SUPPORT SECTION ##########################\n"
2218 case RC_AUTO_NUMBER:
2219 if (ignore_system_lyxrc ||
2220 auto_number != system_lyxrc.auto_number) {
2221 os << "\\auto_number " << convert<string>(auto_number) << '\n';
2225 case RC_DEFAULT_LANGUAGE:
2226 if (ignore_system_lyxrc ||
2227 default_language != system_lyxrc.default_language) {
2228 os << "\\default_language " << default_language << '\n';
2234 << "# FORMATS SECTION ##########################\n"
2238 // New/modified formats
2239 for (Formats::const_iterator cit = formats.begin();
2240 cit != formats.end(); ++cit) {
2241 Format const * format =
2242 system_formats.getFormat(cit->name());
2244 format->extension() != cit->extension() ||
2245 format->prettyname() != cit->prettyname() ||
2246 format->shortcut() != cit->shortcut() ||
2247 format->viewer() != cit->viewer() ||
2248 format->editor() != cit->editor() ||
2249 format->documentFormat() != cit->documentFormat() ||
2250 format->vectorFormat() != cit->vectorFormat()) {
2251 os << "\\format \"" << cit->name() << "\" \""
2252 << cit->extension() << "\" \""
2253 << cit->prettyname() << "\" \""
2254 << cit->shortcut() << "\" \""
2255 << cit->viewer() << "\" \""
2256 << cit->editor() << "\" \"";
2257 vector<string> flags;
2258 if (cit->documentFormat())
2259 flags.push_back("document");
2260 if (cit->vectorFormat())
2261 flags.push_back("vector");
2262 os << getStringFromVector(flags);
2267 // Look for deleted formats
2268 for (Formats::const_iterator cit = system_formats.begin();
2269 cit != system_formats.end(); ++cit)
2270 if (!formats.getFormat(cit->name()))
2271 os << "\\format \"" << cit->name()
2272 << "\" \"\" \"\" \"\" \"\" \"\" \"\"\n";
2281 << "# CONVERTERS SECTION ##########################\n"
2285 // Look for new converters
2286 for (Converters::const_iterator cit = theConverters().begin();
2287 cit != theConverters().end(); ++cit) {
2288 Converter const * converter =
2289 theSystemConverters().getConverter(cit->from,
2292 converter->command != cit->command ||
2293 converter->flags != cit->flags)
2294 os << "\\converter \"" << cit->from << "\" \""
2295 << cit->to << "\" \""
2296 << cit->command << "\" \""
2297 << cit->flags << "\"\n";
2300 // New/modifed converters
2301 for (Converters::const_iterator cit = theSystemConverters().begin();
2302 cit != theSystemConverters().end(); ++cit)
2303 if (!theConverters().getConverter(cit->from, cit->to))
2304 os << "\\converter \"" << cit->from
2305 << "\" \"" << cit->to << "\" \"\" \"\"\n";
2312 << "# COPIERS SECTION ##########################\n"
2315 // Look for new movers
2316 Movers::const_iterator const sysbegin = theSystemMovers().begin();
2317 Movers::const_iterator const sysend = theSystemMovers().end();
2318 Movers::const_iterator it = theMovers().begin();
2319 Movers::const_iterator end = theMovers().end();
2321 for (; it != end; ++it) {
2322 Movers::const_iterator const sysit =
2323 find_if(sysbegin, sysend, SameMover(*it));
2324 if (sysit == sysend) {
2325 string const & fmt = it->first;
2326 string const & command =
2327 it->second.command();
2329 os << "\\copier " << fmt
2330 << " \"" << command << "\"\n";
2336 // We don't actually delete SpecialisedMover(s) from the
2337 // map, just clear their 'command', so there's no need
2338 // to test for anything else.
2346 string const LyXRC::getDescription(LyXRCTags tag)
2351 case RC_ACCEPT_COMPOUND:
2352 str = _("Consider run-together words, such as \"diskdrive\" for \"disk drive\", as legal words?");
2356 case RC_USE_ALT_LANG:
2357 str = _("Specify an alternate language. The default is to use the language of the document.");
2360 case RC_PLAINTEXT_ROFF_COMMAND:
2361 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.");
2364 case RC_PLAINTEXT_LINELEN:
2365 str = _("The maximum line length of exported plain text/LaTeX/SGML files. If set to 0, paragraphs are output in a single line; if the line length is > 0, paragraphs are separated by a blank line.");
2368 case RC_AUTOREGIONDELETE:
2369 str = _("De-select if you don't want the current selection to be replaced automatically by what you type.");
2372 case RC_AUTORESET_OPTIONS:
2373 str = _("De-select if you don't want the class options to be reset to defaults after class change.");
2377 str = _("The time interval between auto-saves (in seconds). 0 means no auto-save.");
2380 case RC_AUTO_NUMBER:
2383 case RC_BACKUPDIR_PATH:
2384 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.");
2387 case RC_BIBTEX_COMMAND:
2388 str = _("Define the options of bibtex (cf. man bibtex) or select an alternative compiler (e.g. mlbibtex or bibulus).");
2392 str = _("Keybindings file. Can either specify an absolute path, or LyX will look in its global and local bind/ directories.");
2395 case RC_CHECKLASTFILES:
2396 str = _("Select to check whether the lastfiles still exist.");
2399 case RC_CHKTEX_COMMAND:
2400 str = _("Define how to run chktex. E.g. \"chktex -n11 -n1 -n3 -n6 -n9 -22 -n25 -n30 -n38\" Refer to the ChkTeX documentation.");
2409 case RC_CURSOR_FOLLOWS_SCROLLBAR:
2410 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.");
2413 case RC_SHOW_MACRO_LABEL:
2414 str = _("Show a small box around a Math Macro with the macro name when the cursor is inside.");
2417 case RC_CUSTOM_EXPORT_COMMAND:
2420 case RC_CUSTOM_EXPORT_FORMAT:
2423 case RC_DATE_INSERT_FORMAT:
2424 //xgettext:no-c-format
2425 str = _("This accepts the normal strftime formats; see man strftime for full details. E.g.\"%A, %e. %B %Y\".");
2429 str = _("Command definition file. Can either specify an absolute path, or LyX will look in its global and local commands/ directories.");
2432 case RC_DEFAULT_LANGUAGE:
2433 str = _("New documents will be assigned this language.");
2436 case RC_DEFAULT_PAPERSIZE:
2437 str = _("Specify the default paper size.");
2440 case RC_DIALOGS_ICONIFY_WITH_MAIN:
2441 str = _("Iconify the dialogs when the main window is iconified. (Affects only dialogs shown after the change has been made.)");
2444 case RC_DISPLAY_GRAPHICS:
2445 str = _("Select how LyX will display any graphics.");
2448 case RC_DOCUMENTPATH:
2449 str = _("The default path for your documents. An empty value selects the directory LyX was started from.");
2453 case RC_USE_ESC_CHARS:
2454 str = _("Specify additional chars that can be part of a word.");
2457 case RC_EXAMPLEPATH:
2458 str = _("The path that LyX will set when offering to choose an example. An empty value selects the directory LyX was started from.");
2461 case RC_FONT_ENCODING:
2462 str = _("The font encoding used for the LaTeX2e fontenc package. T1 is highly recommended for non-English languages.");
2468 case RC_INDEX_COMMAND:
2469 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\".");
2476 case RC_KBMAP_PRIMARY:
2477 case RC_KBMAP_SECONDARY:
2478 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.");
2481 case RC_LABEL_INIT_LENGTH:
2482 str = _("Maximum number of words in the initialization string for a new label");
2485 case RC_LANGUAGE_AUTO_BEGIN:
2486 str = _("Select if a language switching command is needed at the beginning of the document.");
2489 case RC_LANGUAGE_AUTO_END:
2490 str = _("Select if a language switching command is needed at the end of the document.");
2493 case RC_LANGUAGE_COMMAND_BEGIN:
2494 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.");
2497 case RC_LANGUAGE_COMMAND_END:
2498 str = _("The LaTeX command for changing back to the language of the document.");
2501 case RC_LANGUAGE_COMMAND_LOCAL:
2502 str = _("The LaTeX command for local changing of the language.");
2505 case RC_LANGUAGE_GLOBAL_OPTIONS:
2506 str = _("De-select if you don't want the language(s) used as an argument to \\documentclass.");
2509 case RC_LANGUAGE_PACKAGE:
2510 str = _("The LaTeX command for loading the language package. E.g. \"\\usepackage{babel}\", \"\\usepackage{omega}\".");
2513 case RC_LANGUAGE_USE_BABEL:
2514 str = _("De-select if you don't want babel to be used when the language of the document is the default language.");
2517 case RC_USELASTFILEPOS:
2518 str = _("De-select if you do not want LyX to scroll to saved position.");
2521 case RC_LOADSESSION:
2522 str = _("De-select to prevent loading files opened from the last LyX session.");
2525 case RC_MAKE_BACKUP:
2526 str = _("De-select if you don't want LyX to create backup files.");
2529 case RC_MARK_FOREIGN_LANGUAGE:
2530 str = _("Select to control the highlighting of words with a language foreign to that of the document.");
2533 case RC_NUMLASTFILES:
2534 str = bformat(_("Maximal number of lastfiles. Up to %1$d can appear in the file menu."),
2538 case RC_PATH_PREFIX:
2539 str = _("Specify those directories which should be "
2540 "prepended to the PATH environment variable. "
2541 "Use the OS native format.");
2545 case RC_USE_PERS_DICT:
2546 str = _("Specify an alternate personal dictionary file. E.g. \".ispell_english\".");
2550 str = _("Shows a typeset preview of things such as math");
2553 case RC_PREVIEW_HASHED_LABELS:
2554 str = _("Previewed equations will have \"(#)\" labels rather than numbered ones");
2557 case RC_PREVIEW_SCALE_FACTOR:
2558 str = _("Scale the preview size to suit.");
2561 case RC_PRINTCOLLCOPIESFLAG:
2562 str = _("The option for specifying whether the copies should be collated.");
2565 case RC_PRINTCOPIESFLAG:
2566 str = _("The option for specifying the number of copies to print.");
2570 str = _("The default printer to print on. If none is specified, LyX will use the environment variable PRINTER.");
2573 case RC_PRINTEVENPAGEFLAG:
2574 str = _("The option to print only even pages.");
2577 case RC_PRINTEXSTRAOPTIONS:
2578 str = _("Extra options to pass to printing program after everything else, but before the filename of the DVI file to be printed.");
2581 case RC_PRINTFILEEXTENSION:
2582 str = _("Extension of printer program output file. Usually \".ps\".");
2585 case RC_PRINTLANDSCAPEFLAG:
2586 str = _("The option to print out in landscape.");
2589 case RC_PRINTODDPAGEFLAG:
2590 str = _("The option to print only odd pages.");
2593 case RC_PRINTPAGERANGEFLAG:
2594 str = _("The option for specifying a comma-separated list of pages to print.");
2597 case RC_PRINTPAPERDIMENSIONFLAG:
2598 str = _("Option to specify the dimensions of the print paper.");
2601 case RC_PRINTPAPERFLAG:
2602 str = _("The option to specify paper type.");
2605 case RC_PRINTREVERSEFLAG:
2606 str = _("The option to reverse the order of the pages printed.");
2609 case RC_PRINTSPOOL_COMMAND:
2610 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.");
2613 case RC_PRINTSPOOL_PRINTERPREFIX:
2614 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.");
2617 case RC_PRINTTOFILE:
2618 str = _("Option to pass to the print program to print to a file.");
2621 case RC_PRINTTOPRINTER:
2622 str = _("Option to pass to the print program to print on a specific printer.");
2625 case RC_PRINT_ADAPTOUTPUT:
2626 str = _("Select for LyX to pass the name of the destination printer to your print command.");
2629 case RC_PRINT_COMMAND:
2630 str = _("Your favorite print program, e.g. \"dvips\", \"dvilj4\".");
2633 case RC_RTL_SUPPORT:
2634 str = _("Select to enable support of right-to-left languages (e.g. Hebrew, Arabic).");
2638 str = _("DPI (dots per inch) of your monitor is auto-detected by LyX. If that goes wrong, override the setting here.");
2641 case RC_SCREEN_FONT_ROMAN:
2642 case RC_SCREEN_FONT_SANS:
2643 case RC_SCREEN_FONT_TYPEWRITER:
2644 str = _("The screen fonts used to display the text while editing.");
2647 case RC_SCREEN_FONT_ROMAN_FOUNDRY:
2648 case RC_SCREEN_FONT_SANS_FOUNDRY:
2649 case RC_SCREEN_FONT_TYPEWRITER_FOUNDRY:
2652 case RC_SCREEN_FONT_SCALABLE:
2653 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.");
2656 case RC_SCREEN_FONT_SIZES:
2657 str = _("The font sizes used for calculating the scaling of the screen fonts.");
2660 case RC_SCREEN_ZOOM:
2661 //xgettext:no-c-format
2662 str = _("The zoom percentage for screen fonts. A setting of 100% will make the fonts roughly the same size as on paper.");
2665 case RC_GEOMETRY_SESSION:
2666 str = _("Allow session manager to save and restore windows geometry.");
2670 str = _("This starts the lyxserver. The pipes get an additional extension \".in\" and \".out\". Only for advanced users.");
2676 case RC_SHOW_BANNER:
2677 str = _("De-select if you don't want the startup banner.");
2680 case RC_SPELL_COMMAND:
2681 str = _("What command runs the spellchecker?");
2684 case RC_TEMPDIRPATH:
2685 str = _("LyX will place its temporary directories in this path. They will be deleted when you quit LyX.");
2688 case RC_TEMPLATEPATH:
2689 str = _("The path that LyX will set when offering to choose a template. An empty value selects the directory LyX was started from.");
2692 case RC_TEX_ALLOWS_SPACES:
2695 case RC_TEX_EXPECTS_WINDOWS_PATHS:
2699 str = _("The UI (user interface) file. Can either specify an absolute path, or LyX will look in its global and local ui/ directories.");
2711 case RC_USE_INP_ENC:
2712 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.");
2715 case RC_USE_TOOLTIP:
2716 str = _("Enable the automatic appearance of tool tips in the work area.");
2719 case RC_USE_PIXMAP_CACHE:
2720 str = _("Enable the pixmap cache that might improve performance on Mac and Windows.");
2723 case RC_USE_SPELL_LIB:
2726 case RC_VIEWDVI_PAPEROPTION:
2727 _("Specify the paper command to DVI viewer (leave empty or use \"-paper\")");
2742 // The global instance
2745 // The global copy of the system lyxrc entries (everything except preferences)