3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
6 * \author Lars Gullik Bjønnes
7 * \author Jean-Marc Lasgouttes
8 * \author Angus Leeming
10 * \author André Pönitz
14 * Full author contact details are available in file CREDITS.
25 #include "converter.h"
34 #include "graphics/GraphicsTypes.h"
36 #include "support/convert.h"
37 #include "support/environment.h"
38 #include "support/filetools.h"
39 #include "support/lstrings.h"
40 #include "support/os.h"
41 #include "support/userinfo.h"
43 namespace os = lyx::support::os;
45 using lyx::support::ascii_lowercase;
46 using lyx::support::bformat;
47 using lyx::support::expandPath;
48 using lyx::support::getEnv;
49 using lyx::support::libFileSearch;
50 using lyx::support::token;
51 using lyx::support::tokenPos;
64 // when adding something to this array keep it sorted!
65 keyword_item lyxrcTags[] = {
66 { "\\accept_compound", LyXRC::RC_ACCEPT_COMPOUND },
67 { "\\alternate_language", LyXRC::RC_ALT_LANG },
68 { "\\ascii_linelen", LyXRC::RC_ASCII_LINELEN },
69 { "\\ascii_roff_command", LyXRC::RC_ASCIIROFF_COMMAND },
70 { "\\auto_number", LyXRC::RC_AUTO_NUMBER },
71 { "\\auto_region_delete", LyXRC::RC_AUTOREGIONDELETE },
72 { "\\auto_reset_options", LyXRC::RC_AUTORESET_OPTIONS },
73 { "\\autosave", LyXRC::RC_AUTOSAVE },
74 { "\\backupdir_path", LyXRC::RC_BACKUPDIR_PATH },
75 { "\\bibtex_command", LyXRC::RC_BIBTEX_COMMAND },
76 { "\\bind_file", LyXRC::RC_BINDFILE },
77 { "\\check_lastfiles", LyXRC::RC_CHECKLASTFILES },
78 { "\\chktex_command", LyXRC::RC_CHKTEX_COMMAND },
79 { "\\converter", LyXRC::RC_CONVERTER },
80 { "\\copier", LyXRC::RC_COPIER },
81 { "\\cursor_follows_scrollbar", LyXRC::RC_CURSOR_FOLLOWS_SCROLLBAR },
82 { "\\custom_export_command", LyXRC::RC_CUSTOM_EXPORT_COMMAND },
83 { "\\custom_export_format", LyXRC::RC_CUSTOM_EXPORT_FORMAT },
84 { "\\cygwin_path_fix_needed", LyXRC::RC_CYGWIN_PATH_FIX },
85 { "\\date_insert_format", LyXRC::RC_DATE_INSERT_FORMAT },
86 { "\\default_language", LyXRC::RC_DEFAULT_LANGUAGE },
87 { "\\default_papersize", LyXRC::RC_DEFAULT_PAPERSIZE },
88 { "\\dialogs_iconify_with_main", LyXRC::RC_DIALOGS_ICONIFY_WITH_MAIN },
89 { "\\display_graphics", LyXRC::RC_DISPLAY_GRAPHICS },
90 { "\\document_path", LyXRC::RC_DOCUMENTPATH },
91 { "\\escape_chars", LyXRC::RC_ESC_CHARS },
92 { "\\font_encoding", LyXRC::RC_FONT_ENCODING },
93 { "\\format", LyXRC::RC_FORMAT },
94 { "\\index_command", LyXRC::RC_INDEX_COMMAND },
95 { "\\input", LyXRC::RC_INPUT },
96 { "\\kbmap", LyXRC::RC_KBMAP },
97 { "\\kbmap_primary", LyXRC::RC_KBMAP_PRIMARY },
98 { "\\kbmap_secondary", LyXRC::RC_KBMAP_SECONDARY },
99 { "\\label_init_length", LyXRC::RC_LABEL_INIT_LENGTH },
100 { "\\language_auto_begin", LyXRC::RC_LANGUAGE_AUTO_BEGIN },
101 { "\\language_auto_end", LyXRC::RC_LANGUAGE_AUTO_END },
102 { "\\language_command_begin", LyXRC::RC_LANGUAGE_COMMAND_BEGIN },
103 { "\\language_command_end", LyXRC::RC_LANGUAGE_COMMAND_END },
104 { "\\language_command_local", LyXRC::RC_LANGUAGE_COMMAND_LOCAL },
105 { "\\language_global_options", LyXRC::RC_LANGUAGE_GLOBAL_OPTIONS },
106 { "\\language_package", LyXRC::RC_LANGUAGE_PACKAGE },
107 { "\\language_use_babel", LyXRC::RC_LANGUAGE_USE_BABEL },
108 { "\\load_session", LyXRC::RC_LOADSESSION },
109 { "\\make_backup", LyXRC::RC_MAKE_BACKUP },
110 { "\\mark_foreign_language", LyXRC::RC_MARK_FOREIGN_LANGUAGE },
111 { "\\num_lastfiles", LyXRC::RC_NUMLASTFILES },
112 { "\\path_prefix", LyXRC::RC_PATH_PREFIX },
113 { "\\personal_dictionary", LyXRC::RC_PERS_DICT },
114 { "\\popup_bold_font", LyXRC::RC_POPUP_BOLD_FONT },
115 { "\\popup_font_encoding", LyXRC::RC_POPUP_FONT_ENCODING },
116 { "\\popup_normal_font", LyXRC::RC_POPUP_NORMAL_FONT },
117 { "\\preview", LyXRC::RC_PREVIEW },
118 { "\\preview_hashed_labels", LyXRC::RC_PREVIEW_HASHED_LABELS },
119 { "\\preview_scale_factor", LyXRC::RC_PREVIEW_SCALE_FACTOR },
120 { "\\print_adapt_output", LyXRC::RC_PRINT_ADAPTOUTPUT },
121 { "\\print_collcopies_flag", LyXRC::RC_PRINTCOLLCOPIESFLAG },
122 { "\\print_command", LyXRC::RC_PRINT_COMMAND },
123 { "\\print_copies_flag", LyXRC::RC_PRINTCOPIESFLAG },
124 { "\\print_evenpage_flag", LyXRC::RC_PRINTEVENPAGEFLAG },
125 { "\\print_extra_options", LyXRC::RC_PRINTEXSTRAOPTIONS },
126 { "\\print_file_extension", LyXRC::RC_PRINTFILEEXTENSION },
127 { "\\print_landscape_flag", LyXRC::RC_PRINTLANDSCAPEFLAG },
128 { "\\print_oddpage_flag", LyXRC::RC_PRINTODDPAGEFLAG },
129 { "\\print_pagerange_flag", LyXRC::RC_PRINTPAGERANGEFLAG },
130 { "\\print_paper_dimension_flag", LyXRC::RC_PRINTPAPERDIMENSIONFLAG },
131 { "\\print_paper_flag", LyXRC::RC_PRINTPAPERFLAG },
132 { "\\print_reverse_flag", LyXRC::RC_PRINTREVERSEFLAG },
133 { "\\print_spool_command", LyXRC::RC_PRINTSPOOL_COMMAND },
134 { "\\print_spool_printerprefix", LyXRC::RC_PRINTSPOOL_PRINTERPREFIX },
135 { "\\print_to_file", LyXRC::RC_PRINTTOFILE },
136 { "\\print_to_printer", LyXRC::RC_PRINTTOPRINTER },
137 { "\\printer", LyXRC::RC_PRINTER },
138 { "\\rtl", LyXRC::RC_RTL_SUPPORT },
139 { "\\screen_dpi", LyXRC::RC_SCREEN_DPI },
140 { "\\screen_font_encoding", LyXRC::RC_SCREEN_FONT_ENCODING },
141 // compatibility with versions older than 1.2.0 only Angus 10 Jan 2002
142 { "\\screen_font_encoding_menu", LyXRC::RC_POPUP_FONT_ENCODING },
143 // compatibility with versions older than 1.2.0 only Angus 10 Jan 2002
144 { "\\screen_font_menu", LyXRC::RC_POPUP_BOLD_FONT },
145 // compatibility with versions older than 1.2.0 only Angus 10 Jan 2002
146 { "\\screen_font_popup", LyXRC::RC_POPUP_NORMAL_FONT },
147 { "\\screen_font_roman", LyXRC::RC_SCREEN_FONT_ROMAN },
148 { "\\screen_font_roman_foundry", LyXRC::RC_SCREEN_FONT_ROMAN_FOUNDRY },
149 { "\\screen_font_sans", LyXRC::RC_SCREEN_FONT_SANS },
150 { "\\screen_font_sans_foundry", LyXRC::RC_SCREEN_FONT_SANS_FOUNDRY },
151 { "\\screen_font_scalable", LyXRC::RC_SCREEN_FONT_SCALABLE },
152 { "\\screen_font_sizes", LyXRC::RC_SCREEN_FONT_SIZES },
153 { "\\screen_font_typewriter", LyXRC::RC_SCREEN_FONT_TYPEWRITER },
154 { "\\screen_font_typewriter_foundry", LyXRC::RC_SCREEN_FONT_TYPEWRITER_FOUNDRY },
155 { "\\screen_geometry_height", LyXRC::RC_SCREEN_GEOMETRY_HEIGHT },
156 { "\\screen_geometry_width", LyXRC::RC_SCREEN_GEOMETRY_WIDTH },
157 { "\\screen_geometry_xysaved", LyXRC::RC_SCREEN_GEOMETRY_XYSAVED },
158 { "\\screen_zoom", LyXRC::RC_SCREEN_ZOOM },
159 { "\\serverpipe", LyXRC::RC_SERVERPIPE },
160 { "\\set_color", LyXRC::RC_SET_COLOR },
161 { "\\show_banner", LyXRC::RC_SHOW_BANNER },
162 { "\\spell_command", LyXRC::RC_SPELL_COMMAND },
163 { "\\tempdir_path", LyXRC::RC_TEMPDIRPATH },
164 { "\\template_path", LyXRC::RC_TEMPLATEPATH },
165 { "\\tex_allows_spaces", LyXRC::RC_TEX_ALLOWS_SPACES },
166 { "\\ui_file", LyXRC::RC_UIFILE },
167 { "\\use_alt_language", LyXRC::RC_USE_ALT_LANG },
168 { "\\use_escape_chars", LyXRC::RC_USE_ESC_CHARS },
169 { "\\use_input_encoding", LyXRC::RC_USE_INP_ENC },
170 { "\\use_lastfilepos", LyXRC::RC_USELASTFILEPOS },
171 { "\\use_personal_dictionary", LyXRC::RC_USE_PERS_DICT },
172 // compatibility with versions older than 1.4.0 only
173 { "\\use_pspell", LyXRC::RC_USE_SPELL_LIB },
174 { "\\use_spell_lib", LyXRC::RC_USE_SPELL_LIB },
175 // compatibility with versions older than 1.4.0 only
176 { "\\use_tempdir", LyXRC::RC_USETEMPDIR },
177 { "\\user_email", LyXRC::RC_USER_EMAIL },
178 { "\\user_name", LyXRC::RC_USER_NAME },
179 { "\\view_dvi_paper_option", LyXRC::RC_VIEWDVI_PAPEROPTION },
180 // compatibility with versions older than 1.4.0 only
181 { "\\viewer" ,LyXRC::RC_VIEWER},
182 { "\\wheel_jump", LyXRC::RC_WHEEL_JUMP }
185 const int lyxrcCount = sizeof(lyxrcTags) / sizeof(keyword_item);
196 void LyXRC::setDefaults() {
199 // Get printer from the environment. If fail, use default "",
200 // assuming that everything is set up correctly.
201 printer = getEnv("PRINTER");
202 print_adapt_output = false;
203 print_command = "dvips";
204 print_evenpage_flag = "-B";
205 print_oddpage_flag = "-A";
206 print_pagerange_flag = "-pp";
207 print_copies_flag = "-c";
208 print_collcopies_flag = "-C";
209 print_reverse_flag = "-r";
210 print_landscape_flag = "-t landscape";
211 print_to_printer = "-P";
212 print_to_file = "-o ";
213 print_file_extension = ".ps";
214 print_paper_flag = "-t";
215 print_paper_dimension_flag = "-T";
216 document_path.erase();
217 view_dvi_paper_option.erase();
218 default_papersize = PAPER_DEFAULT;
219 custom_export_format = "ps";
220 chktex_command = "chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38";
221 bibtex_command = "bibtex";
223 index_command = "makeindex -c -q";
225 // Because a screen typically is wider than a piece of paper:
229 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 = lyx::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 cygwin_path_fix = false;
284 tex_allows_spaces = false;
285 date_insert_format = "%A, %e %B %Y";
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 = lyx::support::user_name();
295 user_email = lyx::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 = lyx::graphics::displayTranslator().find(lexrc.getString());
401 case RC_CYGWIN_PATH_FIX:
403 cygwin_path_fix = 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();
662 wheel_jump = lexrc.getInteger();
666 case RC_SCREEN_FONT_SIZES:
668 font_sizes[LyXFont::SIZE_TINY] =
672 font_sizes[LyXFont::SIZE_SCRIPT] =
676 font_sizes[LyXFont::SIZE_FOOTNOTE] =
680 font_sizes[LyXFont::SIZE_SMALL] =
684 font_sizes[LyXFont::SIZE_NORMAL] =
688 font_sizes[LyXFont::SIZE_LARGE] =
692 font_sizes[LyXFont::SIZE_LARGER] =
696 font_sizes[LyXFont::SIZE_LARGEST] =
700 font_sizes[LyXFont::SIZE_HUGE] =
704 font_sizes[LyXFont::SIZE_HUGER] =
709 case RC_SCREEN_FONT_SCALABLE:
711 use_scalable_fonts = lexrc.getBool();
717 autosave = lexrc.getInteger();
721 case RC_DOCUMENTPATH:
723 document_path = os::internal_path(lexrc.getString());
724 document_path = expandPath(document_path);
728 case RC_TEMPLATEPATH:
730 template_path = os::internal_path(lexrc.getString());
731 template_path = expandPath(template_path);
737 tempdir_path = os::internal_path(lexrc.getString());
738 tempdir_path = expandPath(tempdir_path);
744 lyxerr << "Ignoring obsolete use_tempdir flag." << endl;
748 case RC_USELASTFILEPOS:
750 use_lastfilepos = lexrc.getBool();
756 load_session = lexrc.getBool();
760 case RC_NUMLASTFILES:
762 num_lastfiles = lexrc.getInteger();
766 case RC_CHECKLASTFILES:
768 check_lastfiles = lexrc.getBool();
772 case RC_SCREEN_FONT_ROMAN:
774 roman_font_name = lexrc.getString();
775 oldFontFormat(roman_font_name,
780 case RC_SCREEN_FONT_SANS:
782 sans_font_name = lexrc.getString();
783 oldFontFormat(sans_font_name, sans_font_foundry);
787 case RC_SCREEN_FONT_TYPEWRITER:
789 typewriter_font_name = lexrc.getString();
790 oldFontFormat(typewriter_font_name,
791 typewriter_font_foundry);
795 case RC_SCREEN_FONT_ROMAN_FOUNDRY:
797 roman_font_foundry = lexrc.getString();
801 case RC_SCREEN_FONT_SANS_FOUNDRY:
803 sans_font_foundry = lexrc.getString();
807 case RC_SCREEN_FONT_TYPEWRITER_FOUNDRY:
809 typewriter_font_foundry = lexrc.getString();
813 case RC_SCREEN_FONT_ENCODING:
815 font_norm = lexrc.getString();
816 set_font_norm_type();
820 case RC_POPUP_BOLD_FONT:
822 popup_bold_font = lexrc.getString();
826 case RC_POPUP_NORMAL_FONT:
828 popup_normal_font = lexrc.getString();
832 case RC_POPUP_FONT_ENCODING:
834 popup_font_encoding = lexrc.getString();
840 string lyx_name, x11_name;
843 lyx_name = lexrc.getString();
845 lexrc.printError("Missing color tag.");
850 x11_name = lexrc.getString();
852 lexrc.printError("Missing color name for color: `$$Token'");
856 LColor::color const col =
857 lcolor.getFromLyXName(lyx_name);
858 if (col == LColor::none ||
859 col == LColor::inherit ||
860 col == LColor::ignore)
863 if (!lcolor.setColor(col, x11_name)) {
864 lyxerr << "Bad lyxrc set_color for "
870 case RC_AUTOREGIONDELETE:
871 // Auto region delete defaults to true
873 auto_region_delete = lexrc.getBool();
879 lyxpipes = os::internal_path(lexrc.getString());
880 lyxpipes = expandPath(lyxpipes);
884 case RC_CURSOR_FOLLOWS_SCROLLBAR:
886 cursor_follows_scrollbar = lexrc.getBool();
890 case RC_DIALOGS_ICONIFY_WITH_MAIN:
892 dialogs_iconify_with_main = lexrc.getBool();
896 case RC_ASCIIROFF_COMMAND:
898 ascii_roff_command = lexrc.getString();
901 case RC_ASCII_LINELEN:
903 ascii_linelen = lexrc.getInteger();
906 // Spellchecker settings:
907 case RC_USE_SPELL_LIB:
909 use_spell_lib = lexrc.getBool();
912 case RC_SPELL_COMMAND:
914 isp_command = lexrc.getString();
917 case RC_ACCEPT_COMPOUND:
919 isp_accept_compound = lexrc.getBool();
924 isp_use_input_encoding = lexrc.getBool();
927 case RC_USE_ALT_LANG:
929 isp_use_alt_lang = lexrc.getBool();
932 case RC_USE_PERS_DICT:
934 isp_use_pers_dict = lexrc.getBool();
937 case RC_USE_ESC_CHARS:
939 isp_use_esc_chars = lexrc.getBool();
944 isp_alt_lang = lexrc.getString();
949 isp_pers_dict = os::internal_path(lexrc.getString());
954 isp_esc_chars = lexrc.getString();
959 make_backup = lexrc.getBool();
962 case RC_BACKUPDIR_PATH:
964 backupdir_path = os::internal_path(lexrc.getString());
965 backupdir_path = expandPath(backupdir_path);
968 case RC_DATE_INSERT_FORMAT:
970 date_insert_format = lexrc.getString();
973 case RC_LANGUAGE_PACKAGE:
975 language_package = lexrc.getString();
978 case RC_LANGUAGE_AUTO_BEGIN:
980 language_auto_begin = lexrc.getBool();
983 case RC_LANGUAGE_AUTO_END:
985 language_auto_end = lexrc.getBool();
988 case RC_LANGUAGE_GLOBAL_OPTIONS:
990 language_global_options = lexrc.getBool();
993 case RC_LANGUAGE_USE_BABEL:
995 language_use_babel = lexrc.getBool();
998 case RC_LANGUAGE_COMMAND_BEGIN:
1000 language_command_begin = lexrc.getString();
1003 case RC_LANGUAGE_COMMAND_END:
1005 language_command_end = lexrc.getString();
1008 case RC_LANGUAGE_COMMAND_LOCAL:
1010 language_command_local = lexrc.getString();
1013 case RC_RTL_SUPPORT:
1015 rtl_support = lexrc.getBool();
1018 case RC_AUTO_NUMBER:
1020 auto_number = lexrc.getBool();
1023 case RC_MARK_FOREIGN_LANGUAGE:
1025 mark_foreign_language = lexrc.getBool();
1030 string fmt, command;
1032 fmt = lexrc.getString();
1035 command = lexrc.getString();
1037 movers.set(fmt, command);
1041 case RC_CONVERTER: {
1042 string from, to, command, flags;
1044 from = lexrc.getString();
1047 to = lexrc.getString();
1050 command = lexrc.getString();
1053 flags = lexrc.getString();
1055 if (command.empty()) {
1056 converters.erase(from, to);
1058 converters.add(from, to, command, flags);
1062 // compatibility with versions older than 1.4.0 only
1064 string format, command;
1066 format = lexrc.getString();
1069 command = lexrc.getString();
1071 formats.setViewer(format, command);
1075 string format, extension, prettyname, shortcut;
1077 format = lexrc.getString();
1080 extension = lexrc.getString();
1083 prettyname = lexrc.getString();
1086 shortcut = lexrc.getString();
1088 string viewer, editor;
1090 viewer = lexrc.getString();
1092 editor = lexrc.getString();
1093 // The only supported flag for now is "document".
1094 // More flags could be added in the future.
1095 // Therefore we use tokenPos below to read the flag.
1097 // Hack to ensure compatibility with versions older
1099 int le = lexrc.lex();
1100 if (le != LyXLex::LEX_FEOF && le != LyXLex::LEX_UNDEF) {
1101 flags = lexrc.getString();
1102 if (le != LyXLex::LEX_DATA) {
1103 // We have got a known token.
1104 // Therefore this is an old style
1105 // format definition without
1107 lexrc.pushToken(flags);
1111 bool const document =
1112 (tokenPos(flags, ',', "document") >= 0);
1113 if (!flags.empty() && flags != "document")
1114 lyxerr << "Ignoring flags other than "
1115 "`document' in `" << flags
1116 << "' for format `" << format << "'."
1118 if (prettyname.empty()) {
1119 if (converters.formatIsUsed(format)) {
1120 lyxerr << "Can't delete format "
1123 formats.erase(format);
1126 formats.add(format, extension, prettyname,
1127 shortcut, viewer, editor, document);
1131 case RC_DEFAULT_LANGUAGE:
1133 default_language = lexrc.getString();
1137 case RC_LABEL_INIT_LENGTH:
1139 label_init_length = lexrc.getInteger();
1143 case RC_SHOW_BANNER:
1145 show_banner = lexrc.getBool();
1151 string const tmp = lexrc.getString();
1152 if (tmp == "true" || tmp == "on")
1153 preview = PREVIEW_ON;
1154 else if (tmp == "no_math")
1155 preview = PREVIEW_NO_MATH;
1157 preview = PREVIEW_OFF;
1158 if (tmp != "false" && tmp != "off")
1159 lyxerr << "Unrecognized "
1161 << tmp << '\n' << endl;
1166 case RC_PREVIEW_HASHED_LABELS:
1168 preview_hashed_labels = lexrc.getBool();
1172 case RC_PREVIEW_SCALE_FACTOR:
1174 preview_scale_factor = lexrc.getString();
1180 user_name = lexrc.getString();
1185 user_email = lexrc.getString();
1188 case RC_PATH_PREFIX:
1190 path_prefix = lexrc.getString();
1193 case RC_LAST: break; // this is just a dummy
1197 /// Update converters data-structures
1198 converters.update(formats);
1199 converters.buildGraph();
1205 void LyXRC::write(string const & filename, bool ignore_system_lyxrc) const
1207 ofstream ofs(filename.c_str());
1209 write(ofs, ignore_system_lyxrc);
1213 void LyXRC::print() const
1215 if (lyxerr.debugging())
1216 write(lyxerr, false);
1224 typedef std::pair<std::string, SpecialisedMover> Data;
1226 SameMover(Data const & comparison)
1227 : comparison_(comparison) {}
1229 bool operator()(Data const & data) const
1231 return data.first == comparison_.first &&
1232 data.second.command() == comparison_.second.command();
1240 void LyXRC::write(ostream & os, bool ignore_system_lyxrc) const
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-2001 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.
1260 LyXRCTags tag = RC_LAST;
1264 // input/include files are not done here
1266 if (ignore_system_lyxrc ||
1267 bind_file != system_lyxrc.bind_file) {
1268 string const path = os::external_path(bind_file);
1269 os << "\\bind_file \"" << path << "\"\n";
1275 << "# MISC SECTION ######################################\n"
1278 // bind files are not done here.
1280 case RC_PATH_PREFIX:
1281 if (ignore_system_lyxrc ||
1282 path_prefix != system_lyxrc.path_prefix) {
1283 os << "\\path_prefix \"" << path_prefix << "\"\n";
1287 if (ignore_system_lyxrc ||
1288 ui_file != system_lyxrc.ui_file) {
1289 string const path = os::external_path(ui_file);
1290 os << "\\ui_file \"" << path << "\"\n";
1292 case RC_AUTOREGIONDELETE:
1293 if (ignore_system_lyxrc ||
1294 auto_region_delete != system_lyxrc.auto_region_delete) {
1295 os << "# Set to false to inhibit automatic replacement of\n"
1296 << "# the current selection.\n"
1297 << "\\auto_region_delete " << convert<string>(auto_region_delete)
1300 case RC_AUTORESET_OPTIONS:
1301 if (ignore_system_lyxrc ||
1302 auto_reset_options != system_lyxrc.auto_reset_options) {
1303 os << "# Set to false to inhibit automatic reset of\n"
1304 << "# the class options to defaults on class change.\n"
1305 << "\\auto_reset_options "
1306 << convert<string>(auto_reset_options)
1310 if (ignore_system_lyxrc ||
1311 autosave != system_lyxrc.autosave) {
1312 os << "# The time interval between auto-saves in seconds.\n"
1313 << "\\autosave " << autosave << '\n';
1315 case RC_DISPLAY_GRAPHICS:
1316 if (ignore_system_lyxrc ||
1317 display_graphics != system_lyxrc.display_graphics) {
1318 os << "# Display graphics within LyX\n"
1319 << "# monochrome|grayscale|color|none\n"
1320 << "\\display_graphics "
1321 << lyx::graphics::displayTranslator().find(display_graphics)
1325 case RC_VIEWDVI_PAPEROPTION:
1326 if (ignore_system_lyxrc ||
1327 view_dvi_paper_option
1328 != system_lyxrc.view_dvi_paper_option) {
1329 os << "# Options used to specify paper size to the\n"
1330 << "# view_dvi_command (e.g. -paper)\n"
1331 << "\\view_dvi_paper_option \""
1332 << view_dvi_paper_option << "\"\n";
1334 case RC_DEFAULT_PAPERSIZE:
1335 if (ignore_system_lyxrc ||
1336 default_papersize != system_lyxrc.default_papersize) {
1337 os << "# The default papersize to use.\n"
1338 << "\\default_papersize \"";
1339 switch (default_papersize) {
1341 os << "default"; break;
1342 case PAPER_USLETTER:
1343 os << "usletter"; break;
1345 os << "legal"; break;
1346 case PAPER_USEXECUTIVE:
1347 os << "executive"; break;
1358 case PAPER_B4: break;
1362 case RC_CHKTEX_COMMAND:
1363 if (ignore_system_lyxrc ||
1364 chktex_command != system_lyxrc.chktex_command) {
1365 os << "\\chktex_command \"" << chktex_command << "\"\n";
1367 case RC_BIBTEX_COMMAND:
1368 if (ignore_system_lyxrc ||
1369 bibtex_command != system_lyxrc.bibtex_command) {
1370 os << "\\bibtex_command \"" << bibtex_command << "\"\n";
1372 case RC_INDEX_COMMAND:
1373 if (ignore_system_lyxrc ||
1374 index_command != system_lyxrc.index_command) {
1375 os << "\\index_command \"" << index_command << "\"\n";
1377 case RC_CYGWIN_PATH_FIX:
1378 if (ignore_system_lyxrc ||
1379 cygwin_path_fix != system_lyxrc.cygwin_path_fix) {
1380 os << "\\cygwin_path_fix_needed "
1381 << convert<string>(cygwin_path_fix) << '\n';
1383 case RC_TEX_ALLOWS_SPACES:
1384 if (tex_allows_spaces != system_lyxrc.tex_allows_spaces) {
1385 os << "\\tex_allows_spaces "
1386 << convert<string>(tex_allows_spaces) << '\n';
1389 if (ignore_system_lyxrc ||
1390 use_kbmap != system_lyxrc.use_kbmap) {
1391 os << "\\kbmap " << convert<string>(use_kbmap) << '\n';
1393 case RC_KBMAP_PRIMARY:
1394 if (ignore_system_lyxrc ||
1395 primary_kbmap != system_lyxrc.primary_kbmap) {
1396 string const path = os::external_path(primary_kbmap);
1397 os << "\\kbmap_primary \"" << path << "\"\n";
1399 case RC_KBMAP_SECONDARY:
1400 if (ignore_system_lyxrc ||
1401 secondary_kbmap != system_lyxrc.secondary_kbmap) {
1402 string const path = os::external_path(secondary_kbmap);
1403 os << "\\kbmap_secondary \"" << path << "\"\n";
1406 if (ignore_system_lyxrc ||
1407 lyxpipes != system_lyxrc.lyxpipes) {
1408 string const path = os::external_path(lyxpipes);
1409 os << "\\serverpipe \"" << path << "\"\n";
1411 case RC_DATE_INSERT_FORMAT:
1412 if (ignore_system_lyxrc ||
1413 date_insert_format != system_lyxrc.date_insert_format) {
1414 os << "\\date_insert_format \"" << date_insert_format
1417 case RC_LABEL_INIT_LENGTH:
1418 if (ignore_system_lyxrc ||
1419 label_init_length != system_lyxrc.label_init_length) {
1420 os << "\\label_init_length " << label_init_length
1425 os << "\\user_name \"" << user_name << "\"\n";
1428 os << "\\user_email \"" << user_email << "\"\n";
1430 case RC_SHOW_BANNER:
1431 if (ignore_system_lyxrc ||
1432 show_banner != system_lyxrc.show_banner) {
1433 os << "\\show_banner " << convert<string>(show_banner) << '\n';
1437 if (ignore_system_lyxrc ||
1438 preview != system_lyxrc.preview) {
1444 case PREVIEW_NO_MATH:
1451 os << "\\preview " << status << '\n';
1454 case RC_PREVIEW_HASHED_LABELS:
1455 if (ignore_system_lyxrc ||
1456 preview_hashed_labels !=
1457 system_lyxrc.preview_hashed_labels) {
1458 os << "\\preview_hashed_labels "
1459 << convert<string>(preview_hashed_labels) << '\n';
1462 case RC_PREVIEW_SCALE_FACTOR:
1463 if (ignore_system_lyxrc ||
1464 preview_scale_factor != system_lyxrc.preview_scale_factor) {
1465 os << "\\preview_scale_factor "
1466 << preview_scale_factor << '\n';
1470 << "# SCREEN & FONTS SECTION ############################\n"
1473 case RC_POPUP_NORMAL_FONT:
1474 if (ignore_system_lyxrc ||
1475 popup_normal_font != system_lyxrc.popup_normal_font) {
1476 os << "\\popup_normal_font \"" << popup_normal_font
1479 case RC_POPUP_BOLD_FONT:
1480 if (ignore_system_lyxrc ||
1481 popup_bold_font != system_lyxrc.popup_bold_font) {
1482 os << "\\popup_bold_font \"" << popup_bold_font
1485 case RC_POPUP_FONT_ENCODING:
1486 if (ignore_system_lyxrc ||
1487 popup_font_encoding != system_lyxrc.popup_font_encoding) {
1488 os << "\\popup_font_encoding \"" << popup_font_encoding
1492 if (ignore_system_lyxrc ||
1493 dpi != system_lyxrc.dpi) {
1494 os << "\\screen_dpi " << dpi << '\n';
1496 case RC_SCREEN_ZOOM:
1497 if (ignore_system_lyxrc ||
1498 zoom != system_lyxrc.zoom) {
1499 os << "\\screen_zoom " << zoom << '\n';
1501 case RC_SCREEN_GEOMETRY_HEIGHT:
1502 if (ignore_system_lyxrc ||
1503 geometry_height != system_lyxrc.geometry_height) {
1504 os << "\\screen_geometry_height " << geometry_height
1507 case RC_SCREEN_GEOMETRY_WIDTH:
1508 if (ignore_system_lyxrc ||
1509 geometry_width != system_lyxrc.geometry_width) {
1510 os << "\\screen_geometry_width " << geometry_width
1513 case RC_SCREEN_GEOMETRY_XYSAVED:
1514 if (ignore_system_lyxrc ||
1515 geometry_xysaved != system_lyxrc.geometry_xysaved) {
1516 os << "\\screen_geometry_xysaved " << convert<string>(geometry_xysaved)
1520 if (ignore_system_lyxrc ||
1521 wheel_jump != system_lyxrc.wheel_jump) {
1522 os << "\\wheel_jump " << wheel_jump << '\n';
1524 case RC_CURSOR_FOLLOWS_SCROLLBAR:
1525 if (ignore_system_lyxrc ||
1526 cursor_follows_scrollbar
1527 != system_lyxrc.cursor_follows_scrollbar) {
1528 os << "\\cursor_follows_scrollbar "
1529 << convert<string>(cursor_follows_scrollbar) << '\n';
1531 case RC_DIALOGS_ICONIFY_WITH_MAIN:
1532 if (ignore_system_lyxrc ||
1533 dialogs_iconify_with_main
1534 != system_lyxrc.dialogs_iconify_with_main) {
1535 os << "\\dialogs_iconify_with_main "
1536 << convert<string>(dialogs_iconify_with_main) << '\n';
1538 case RC_SCREEN_FONT_ROMAN:
1539 if (ignore_system_lyxrc ||
1540 roman_font_name != system_lyxrc.roman_font_name) {
1541 os << "\\screen_font_roman \"" << roman_font_name
1544 case RC_SCREEN_FONT_ROMAN_FOUNDRY:
1545 if (ignore_system_lyxrc ||
1546 roman_font_foundry != system_lyxrc.roman_font_foundry) {
1547 os << "\\screen_font_roman_foundry \"" << roman_font_foundry
1550 case RC_SCREEN_FONT_SANS:
1551 if (ignore_system_lyxrc ||
1552 sans_font_name != system_lyxrc.sans_font_name) {
1553 os << "\\screen_font_sans \"" << sans_font_name
1556 case RC_SCREEN_FONT_SANS_FOUNDRY:
1557 if (ignore_system_lyxrc ||
1558 sans_font_foundry != system_lyxrc.sans_font_foundry) {
1559 os << "\\screen_font_sans_foundry \"" << sans_font_foundry
1562 case RC_SCREEN_FONT_TYPEWRITER:
1563 if (ignore_system_lyxrc ||
1564 typewriter_font_name != system_lyxrc.typewriter_font_name) {
1565 os << "\\screen_font_typewriter \""
1566 << typewriter_font_name << "\"\n";
1568 case RC_SCREEN_FONT_TYPEWRITER_FOUNDRY:
1569 if (ignore_system_lyxrc ||
1570 typewriter_font_foundry != system_lyxrc.typewriter_font_foundry) {
1571 os << "\\screen_font_typewriter_foundry \""
1572 << typewriter_font_foundry << "\"\n";
1575 case RC_SCREEN_FONT_SCALABLE:
1576 if (ignore_system_lyxrc ||
1577 use_scalable_fonts != system_lyxrc.use_scalable_fonts) {
1578 os << "\\screen_font_scalable "
1579 << convert<string>(use_scalable_fonts)
1582 case RC_SCREEN_FONT_ENCODING:
1583 if (ignore_system_lyxrc ||
1584 font_norm != system_lyxrc.font_norm) {
1585 os << "\\screen_font_encoding \"" << font_norm
1588 case RC_SCREEN_FONT_SIZES:
1589 if (ignore_system_lyxrc ||
1590 font_sizes[LyXFont::SIZE_TINY]
1591 != system_lyxrc.font_sizes[LyXFont::SIZE_TINY] ||
1592 font_sizes[LyXFont::SIZE_SCRIPT]
1593 != system_lyxrc.font_sizes[LyXFont::SIZE_SCRIPT] ||
1594 font_sizes[LyXFont::SIZE_FOOTNOTE]
1595 != system_lyxrc.font_sizes[LyXFont::SIZE_FOOTNOTE] ||
1596 font_sizes[LyXFont::SIZE_SMALL]
1597 != system_lyxrc.font_sizes[LyXFont::SIZE_SMALL] ||
1598 font_sizes[LyXFont::SIZE_NORMAL]
1599 != system_lyxrc.font_sizes[LyXFont::SIZE_NORMAL] ||
1600 font_sizes[LyXFont::SIZE_LARGE]
1601 != system_lyxrc.font_sizes[LyXFont::SIZE_LARGE] ||
1602 font_sizes[LyXFont::SIZE_LARGER]
1603 != system_lyxrc.font_sizes[LyXFont::SIZE_LARGER] ||
1604 font_sizes[LyXFont::SIZE_LARGEST]
1605 != system_lyxrc.font_sizes[LyXFont::SIZE_LARGEST] ||
1606 font_sizes[LyXFont::SIZE_HUGE]
1607 != system_lyxrc.font_sizes[LyXFont::SIZE_HUGE] ||
1608 font_sizes[LyXFont::SIZE_HUGER]
1609 != system_lyxrc.font_sizes[LyXFont::SIZE_HUGER]) {
1610 os.setf(ios::fixed);
1612 os << "\\screen_font_sizes"
1613 << ' ' << font_sizes[LyXFont::SIZE_TINY]
1614 << ' ' << font_sizes[LyXFont::SIZE_SCRIPT]
1615 << ' ' << font_sizes[LyXFont::SIZE_FOOTNOTE]
1616 << ' ' << font_sizes[LyXFont::SIZE_SMALL]
1617 << ' ' << font_sizes[LyXFont::SIZE_NORMAL]
1618 << ' ' << font_sizes[LyXFont::SIZE_LARGE]
1619 << ' ' << font_sizes[LyXFont::SIZE_LARGER]
1620 << ' ' << font_sizes[LyXFont::SIZE_LARGEST]
1621 << ' ' << font_sizes[LyXFont::SIZE_HUGE]
1622 << ' ' << font_sizes[LyXFont::SIZE_HUGER]
1627 << "# COLOR SECTION ###################################\n"
1631 for (int i = 0; i < LColor::ignore; ++i) {
1632 LColor::color lc = static_cast<LColor::color>(i);
1634 string const col(lcolor.getX11Name(lc));
1635 if (ignore_system_lyxrc ||
1636 col != system_lcolor.getX11Name(lc)) {
1637 os << "\\set_color \""
1638 << lcolor.getLyXName(lc) << "\" \""
1644 << "# PRINTER SECTION ###################################\n"
1648 if (ignore_system_lyxrc ||
1649 printer != system_lyxrc.printer) {
1650 os << "\\printer \"" << printer << "\"\n";
1652 case RC_PRINT_ADAPTOUTPUT:
1653 if (ignore_system_lyxrc ||
1654 print_adapt_output != system_lyxrc.print_adapt_output) {
1655 os << "\\print_adapt_output "
1656 << convert<string>(print_adapt_output)
1659 case RC_PRINT_COMMAND:
1660 if (ignore_system_lyxrc ||
1661 print_command != system_lyxrc.print_command) {
1662 os << "\\print_command \"" << print_command << "\"\n";
1664 case RC_PRINTEXSTRAOPTIONS:
1665 if (ignore_system_lyxrc ||
1666 print_extra_options != system_lyxrc.print_extra_options) {
1667 os << "\\print_extra_options \"" << print_extra_options
1670 case RC_PRINTSPOOL_COMMAND:
1671 if (ignore_system_lyxrc ||
1672 print_spool_command != system_lyxrc.print_spool_command) {
1673 os << "\\print_spool_command \"" << print_spool_command
1676 case RC_PRINTSPOOL_PRINTERPREFIX:
1677 if (ignore_system_lyxrc ||
1678 print_spool_printerprefix
1679 != system_lyxrc.print_spool_printerprefix) {
1680 os << "\\print_spool_printerprefix \""
1681 << print_spool_printerprefix << "\"\n";
1683 case RC_PRINTEVENPAGEFLAG:
1684 if (ignore_system_lyxrc ||
1685 print_evenpage_flag != system_lyxrc.print_evenpage_flag) {
1686 os << "\\print_evenpage_flag \"" << print_evenpage_flag
1689 case RC_PRINTODDPAGEFLAG:
1690 if (ignore_system_lyxrc ||
1691 print_oddpage_flag != system_lyxrc.print_oddpage_flag) {
1692 os << "\\print_oddpage_flag \"" << print_oddpage_flag
1695 case RC_PRINTREVERSEFLAG:
1696 if (ignore_system_lyxrc ||
1697 print_reverse_flag != system_lyxrc.print_reverse_flag) {
1698 os << "\\print_reverse_flag \"" << print_reverse_flag
1701 case RC_PRINTLANDSCAPEFLAG:
1702 if (ignore_system_lyxrc ||
1703 print_landscape_flag != system_lyxrc.print_landscape_flag) {
1704 os << "\\print_landscape_flag \"" << print_landscape_flag
1707 case RC_PRINTPAGERANGEFLAG:
1708 if (ignore_system_lyxrc ||
1709 print_pagerange_flag != system_lyxrc.print_pagerange_flag) {
1710 os << "\\print_pagerange_flag \"" << print_pagerange_flag
1713 case RC_PRINTCOPIESFLAG:
1714 if (ignore_system_lyxrc ||
1715 print_copies_flag != system_lyxrc.print_copies_flag) {
1716 os << "\\print_copies_flag \"" << print_copies_flag
1719 case RC_PRINTCOLLCOPIESFLAG:
1720 if (ignore_system_lyxrc ||
1721 print_collcopies_flag
1722 != system_lyxrc.print_collcopies_flag) {
1723 os << "\\print_collcopies_flag \""
1724 << print_collcopies_flag
1727 case RC_PRINTPAPERFLAG:
1728 if (ignore_system_lyxrc ||
1729 print_paper_flag != system_lyxrc.print_paper_flag) {
1730 os << "\\print_paper_flag \"" << print_paper_flag
1733 case RC_PRINTPAPERDIMENSIONFLAG:
1734 if (ignore_system_lyxrc ||
1735 print_paper_dimension_flag
1736 != system_lyxrc.print_paper_dimension_flag) {
1737 os << "\\print_paper_dimension_flag \""
1738 << print_paper_dimension_flag << "\"\n";
1740 case RC_PRINTTOPRINTER:
1741 if (ignore_system_lyxrc ||
1742 print_to_printer != system_lyxrc.print_to_printer) {
1743 os << "\\print_to_printer \"" << print_to_printer
1746 case RC_PRINTTOFILE:
1747 if (ignore_system_lyxrc ||
1748 print_to_file != system_lyxrc.print_to_file) {
1749 string const path = os::external_path(print_to_file);
1750 os << "\\print_to_file \"" << path << "\"\n";
1752 case RC_PRINTFILEEXTENSION:
1753 if (ignore_system_lyxrc ||
1754 print_file_extension != system_lyxrc.print_file_extension) {
1755 os << "\\print_file_extension \""
1756 << print_file_extension
1761 << "# EXPORT SECTION ####################################\n"
1764 case RC_CUSTOM_EXPORT_COMMAND:
1765 if (ignore_system_lyxrc ||
1766 custom_export_command
1767 != system_lyxrc.custom_export_command) {
1768 os << "\\custom_export_command \""
1769 << custom_export_command
1772 case RC_CUSTOM_EXPORT_FORMAT:
1773 if (ignore_system_lyxrc ||
1774 custom_export_format
1775 != system_lyxrc.custom_export_format) {
1776 os << "\\custom_export_format \"" << custom_export_format
1781 << "# TEX SECTION #######################################\n"
1784 case RC_FONT_ENCODING:
1785 if (ignore_system_lyxrc ||
1786 fontenc != system_lyxrc.fontenc) {
1787 os << "\\font_encoding \"" << fontenc << "\"\n";
1791 << "# FILE SECTION ######################################\n"
1794 case RC_DOCUMENTPATH:
1795 if (ignore_system_lyxrc ||
1796 document_path != system_lyxrc.document_path) {
1797 string const path = os::external_path(document_path);
1798 os << "\\document_path \"" << path << "\"\n";
1800 case RC_USELASTFILEPOS:
1801 if (ignore_system_lyxrc ||
1802 use_lastfilepos != system_lyxrc.use_lastfilepos) {
1803 os << "\\use_lastfilepos " << convert<string>(use_lastfilepos)
1806 case RC_LOADSESSION:
1807 if (ignore_system_lyxrc ||
1808 load_session != system_lyxrc.load_session) {
1809 os << "\\load_session " << convert<string>(load_session)
1812 case RC_NUMLASTFILES:
1813 if (ignore_system_lyxrc ||
1814 num_lastfiles != system_lyxrc.num_lastfiles) {
1815 os << "\\num_lastfiles " << num_lastfiles << '\n';
1817 case RC_CHECKLASTFILES:
1818 if (ignore_system_lyxrc ||
1819 check_lastfiles != system_lyxrc.check_lastfiles) {
1820 os << "\\check_lastfiles " << convert<string>(check_lastfiles)
1823 case RC_TEMPLATEPATH:
1824 if (ignore_system_lyxrc ||
1825 template_path != system_lyxrc.template_path) {
1826 string const path = os::external_path(template_path);
1827 os << "\\template_path \"" << path << "\"\n";
1829 case RC_TEMPDIRPATH:
1830 if (ignore_system_lyxrc ||
1831 tempdir_path != system_lyxrc.tempdir_path) {
1832 string const path = os::external_path(tempdir_path);
1833 os << "\\tempdir_path \"" << path << "\"\n";
1837 case RC_ASCII_LINELEN:
1838 if (ignore_system_lyxrc ||
1839 ascii_linelen != system_lyxrc.ascii_linelen) {
1840 os << "\\ascii_linelen " << ascii_linelen << '\n';
1842 case RC_MAKE_BACKUP:
1843 if (ignore_system_lyxrc ||
1844 make_backup != system_lyxrc.make_backup) {
1845 os << "\\make_backup " << convert<string>(make_backup) << '\n';
1847 case RC_BACKUPDIR_PATH:
1848 if (ignore_system_lyxrc ||
1849 backupdir_path != system_lyxrc.backupdir_path) {
1850 string const path = os::external_path(backupdir_path);
1851 os << "\\backupdir_path \"" << path << "\"\n";
1855 << "# ASCII EXPORT SECTION ##############################\n"
1858 case RC_ASCIIROFF_COMMAND:
1859 if (ignore_system_lyxrc ||
1860 ascii_roff_command != system_lyxrc.ascii_roff_command) {
1861 os << "\\ascii_roff_command \"" << ascii_roff_command
1866 << "# SPELLCHECKER SECTION ##############################\n"
1868 case RC_USE_SPELL_LIB:
1869 if (ignore_system_lyxrc ||
1870 use_spell_lib != system_lyxrc.use_spell_lib) {
1871 os << "\\use_spell_lib " << convert<string>(use_spell_lib) << '\n';
1873 case RC_SPELL_COMMAND:
1874 if (ignore_system_lyxrc ||
1875 isp_command != system_lyxrc.isp_command) {
1876 os << "\\spell_command \"" << isp_command << "\"\n";
1878 case RC_ACCEPT_COMPOUND:
1879 if (ignore_system_lyxrc ||
1880 isp_accept_compound != system_lyxrc.isp_accept_compound) {
1881 os << "\\accept_compound " << convert<string>(isp_accept_compound)
1884 case RC_USE_ALT_LANG:
1885 if (ignore_system_lyxrc ||
1886 isp_use_alt_lang != system_lyxrc.isp_use_alt_lang) {
1887 os << "\\use_alt_language " << convert<string>(isp_use_alt_lang)
1891 if (ignore_system_lyxrc ||
1892 isp_alt_lang != system_lyxrc.isp_alt_lang) {
1893 os << "\\alternate_language \"" << isp_alt_lang
1896 case RC_USE_ESC_CHARS:
1897 if (ignore_system_lyxrc ||
1898 isp_use_esc_chars != system_lyxrc.isp_use_esc_chars) {
1899 os << "\\use_escape_chars " << convert<string>(isp_use_esc_chars)
1903 if (ignore_system_lyxrc ||
1904 isp_esc_chars != system_lyxrc.isp_esc_chars) {
1905 os << "\\escape_chars \"" << isp_esc_chars << "\"\n";
1907 case RC_USE_PERS_DICT:
1908 if (ignore_system_lyxrc ||
1909 isp_use_pers_dict != system_lyxrc.isp_use_pers_dict) {
1910 os << "\\use_personal_dictionary "
1911 << convert<string>(isp_use_pers_dict)
1915 if (isp_pers_dict != system_lyxrc.isp_pers_dict) {
1916 string const path = os::external_path(isp_pers_dict);
1917 os << "\\personal_dictionary \"" << path << "\"\n";
1919 case RC_USE_INP_ENC:
1920 if (ignore_system_lyxrc ||
1921 isp_use_input_encoding
1922 != system_lyxrc.isp_use_input_encoding) {
1923 os << "\\use_input_encoding "
1924 << convert<string>(isp_use_input_encoding)
1929 << "# LANGUAGE SUPPORT SECTION ##########################\n"
1932 case RC_RTL_SUPPORT:
1933 if (ignore_system_lyxrc ||
1934 rtl_support != system_lyxrc.rtl_support) {
1935 os << "\\rtl " << convert<string>(rtl_support) << '\n';
1937 case RC_LANGUAGE_PACKAGE:
1938 if (ignore_system_lyxrc ||
1939 language_package != system_lyxrc.language_package) {
1940 os << "\\language_package \"" << language_package
1943 case RC_LANGUAGE_GLOBAL_OPTIONS:
1944 if (ignore_system_lyxrc ||
1945 language_global_options
1946 != system_lyxrc.language_global_options) {
1947 os << "\\language_global_options \""
1948 << convert<string>(language_global_options)
1951 case RC_LANGUAGE_USE_BABEL:
1952 if (ignore_system_lyxrc ||
1953 language_use_babel != system_lyxrc.language_use_babel) {
1954 os << "\\language_use_babel \""
1955 << convert<string>(language_use_babel)
1958 case RC_LANGUAGE_COMMAND_BEGIN:
1959 if (ignore_system_lyxrc ||
1960 language_command_begin
1961 != system_lyxrc.language_command_begin) {
1962 os << "\\language_command_begin \""
1963 << language_command_begin
1966 case RC_LANGUAGE_COMMAND_END:
1967 if (ignore_system_lyxrc ||
1968 language_command_end
1969 != system_lyxrc.language_command_end) {
1970 os << "\\language_command_end \"" << language_command_end
1973 case RC_LANGUAGE_COMMAND_LOCAL:
1974 if (ignore_system_lyxrc ||
1975 language_command_local
1976 != system_lyxrc.language_command_local) {
1977 os << "\\language_command_local \""
1978 << language_command_local
1981 case RC_LANGUAGE_AUTO_BEGIN:
1982 if (ignore_system_lyxrc ||
1983 language_auto_begin != system_lyxrc.language_auto_begin) {
1984 os << "\\language_auto_begin "
1985 << convert<string>(language_auto_begin) << '\n';
1987 case RC_LANGUAGE_AUTO_END:
1988 if (ignore_system_lyxrc ||
1989 language_auto_end != system_lyxrc.language_auto_end) {
1990 os << "\\language_auto_end "
1991 << convert<string>(language_auto_end) << '\n';
1993 case RC_MARK_FOREIGN_LANGUAGE:
1994 if (ignore_system_lyxrc ||
1995 mark_foreign_language
1996 != system_lyxrc.mark_foreign_language) {
1997 os << "\\mark_foreign_language " <<
1998 convert<string>(mark_foreign_language) << '\n';
2002 << "# 2nd MISC SUPPORT SECTION ##########################\n"
2005 case RC_AUTO_NUMBER:
2006 if (ignore_system_lyxrc ||
2007 auto_number != system_lyxrc.auto_number) {
2008 os << "\\auto_number " << convert<string>(auto_number) << '\n';
2010 case RC_DEFAULT_LANGUAGE:
2011 if (ignore_system_lyxrc ||
2012 default_language != system_lyxrc.default_language) {
2013 os << "\\default_language " << default_language << '\n';
2017 << "# FORMATS SECTION ##########################\n"
2021 // New/modified formats
2022 for (Formats::const_iterator cit = formats.begin();
2023 cit != formats.end(); ++cit) {
2024 Format const * format =
2025 system_formats.getFormat(cit->name());
2027 format->extension() != cit->extension() ||
2028 format->prettyname() != cit->prettyname() ||
2029 format->shortcut() != cit->shortcut() ||
2030 format->viewer() != cit->viewer() ||
2031 format->editor() != cit->editor() ||
2032 format->documentFormat() != cit->documentFormat()) {
2033 os << "\\format \"" << cit->name() << "\" \""
2034 << cit->extension() << "\" \""
2035 << cit->prettyname() << "\" \""
2036 << cit->shortcut() << "\" \""
2037 << cit->viewer() << "\" \""
2038 << cit->editor() << "\" \"";
2039 if (cit->documentFormat())
2045 // Look for deleted formats
2046 for (Formats::const_iterator cit = system_formats.begin();
2047 cit != system_formats.end(); ++cit)
2048 if (!formats.getFormat(cit->name()))
2049 os << "\\format \"" << cit->name()
2050 << "\" \"\" \"\" \"\" \"\" \"\" \"\"\n";
2055 << "# CONVERTERS SECTION ##########################\n"
2059 // Look for new converters
2060 for (Converters::const_iterator cit = converters.begin();
2061 cit != converters.end(); ++cit) {
2062 Converter const * converter =
2063 system_converters.getConverter(cit->from,
2066 converter->command != cit->command ||
2067 converter->flags != cit->flags)
2068 os << "\\converter \"" << cit->from << "\" \""
2069 << cit->to << "\" \""
2070 << cit->command << "\" \""
2071 << cit->flags << "\"\n";
2074 // New/modifed converters
2075 for (Converters::const_iterator cit = system_converters.begin();
2076 cit != system_converters.end(); ++cit)
2077 if (!converters.getConverter(cit->from, cit->to))
2078 os << "\\converter \"" << cit->from
2079 << "\" \"" << cit->to << "\" \"\" \"\"\n";
2083 << "# COPIERS SECTION ##########################\n"
2086 // Look for new movers
2087 Movers::iterator const sysbegin = system_movers.begin();
2088 Movers::iterator const sysend = system_movers.end();
2090 for (Movers::iterator it = movers.begin(), end = movers.end();
2092 Movers::iterator const sysit =
2093 std::find_if(sysbegin, sysend, SameMover(*it));
2094 if (sysit == sysend) {
2095 std::string const & fmt = it->first;
2096 std::string const & command =
2097 it->second.command();
2099 os << "\\copier " << fmt
2100 << " \"" << command << "\"\n";
2104 // We don't actually delete SpecialisedMover(s) from the
2105 // map, just clear their 'command', so there's no need
2106 // to test for anything else.
2112 void LyXRC::set_font_norm_type()
2114 if (font_norm == "iso10646-1")
2115 font_norm_type = ISO_10646_1;
2116 else if (font_norm == "iso8859-1")
2117 font_norm_type = ISO_8859_1;
2118 else if (font_norm == "iso8859-3")
2119 font_norm_type = ISO_8859_3;
2120 else if (font_norm == "iso8859-4")
2121 font_norm_type = ISO_8859_4;
2122 else if (font_norm == "iso8859-6.8x")
2123 font_norm_type = ISO_8859_6_8;
2124 else if (font_norm == "iso8859-9")
2125 font_norm_type = ISO_8859_9;
2126 else if (font_norm == "iso8859-15")
2127 font_norm_type = ISO_8859_15;
2129 font_norm_type = OTHER_ENCODING;
2133 string const LyXRC::getDescription(LyXRCTags tag)
2138 case RC_ACCEPT_COMPOUND:
2139 str = _("Consider run-together words, such as \"diskdrive\" for \"disk drive\", as legal words?");
2143 case RC_USE_ALT_LANG:
2144 str = _("Specify an alternate language. The default is to use the language of the document.");
2147 case RC_ASCIIROFF_COMMAND:
2148 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.");
2151 case RC_ASCII_LINELEN:
2152 str = _("This is the maximum line length of an exported text file (LaTeX, SGML or plain text).");
2155 case RC_AUTOREGIONDELETE:
2156 str = _("De-select if you don't want the current selection to be replaced automatically by what you type.");
2159 case RC_AUTORESET_OPTIONS:
2160 str = _("De-select if you don't want the class options to be reset to defaults after class change.");
2164 str = _("The time interval between auto-saves (in seconds). 0 means no auto-save.");
2167 case RC_AUTO_NUMBER:
2170 case RC_BACKUPDIR_PATH:
2171 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.");
2174 case RC_BIBTEX_COMMAND:
2175 str = _("Define the options of bibtex (cf. man bibtex) or select an alternative compiler (e.g. mlbibtex or bibulus).");
2179 str = _("Keybindings file. Can either specify an absolute path, or LyX will look in its global and local bind/ directories.");
2182 case RC_CHECKLASTFILES:
2183 str = _("Select to check whether the lastfiles still exist.");
2186 case RC_CHKTEX_COMMAND:
2187 str = _("Define how to run chktex. E.g. \"chktex -n11 -n1 -n3 -n6 -n9 -22 -n25 -n30 -n38\" Refer to the ChkTeX documentation.");
2196 case RC_CURSOR_FOLLOWS_SCROLLBAR:
2197 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.");
2200 case RC_CUSTOM_EXPORT_COMMAND:
2203 case RC_CUSTOM_EXPORT_FORMAT:
2206 case RC_CYGWIN_PATH_FIX:
2209 case RC_DATE_INSERT_FORMAT:
2210 //xgettext:no-c-format
2211 str = _("This accepts the normal strftime formats; see man strftime for full details. E.g.\"%A, %e. %B %Y\".");
2214 case RC_DEFAULT_LANGUAGE:
2215 str = _("New documents will be assigned this language.");
2218 case RC_DEFAULT_PAPERSIZE:
2219 str = _("Specify the default paper size.");
2222 case RC_DIALOGS_ICONIFY_WITH_MAIN:
2223 str = _("Iconify the dialogs when the main window is iconified. (Affects only dialogs shown after the change has been made.)");
2226 case RC_DISPLAY_GRAPHICS:
2227 str = _("Select how LyX will display any graphics.");
2230 case RC_DOCUMENTPATH:
2231 str = _("The default path for your documents. An empty value selects the directory LyX was started from.");
2235 case RC_USE_ESC_CHARS:
2236 str = _("Specify additional chars that can be part of a word.");
2239 case RC_FONT_ENCODING:
2240 str = _("The font encoding used for the LaTeX2e fontenc package. T1 is highly recommended for non-English languages.");
2246 case RC_INDEX_COMMAND:
2247 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\".");
2254 case RC_KBMAP_PRIMARY:
2255 case RC_KBMAP_SECONDARY:
2256 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.");
2259 case RC_LABEL_INIT_LENGTH:
2260 str = _("Maximum number of words in the initialization string for a new label");
2263 case RC_LANGUAGE_AUTO_BEGIN:
2264 str = _("Select if a language switching command is needed at the beginning of the document.");
2267 case RC_LANGUAGE_AUTO_END:
2268 str = _("Select if a language switching command is needed at the end of the document.");
2271 case RC_LANGUAGE_COMMAND_BEGIN:
2272 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.");
2275 case RC_LANGUAGE_COMMAND_END:
2276 str = _("The LaTeX command for changing back to the language of the document.");
2279 case RC_LANGUAGE_COMMAND_LOCAL:
2280 str = _("The LaTeX command for local changing of the language.");
2283 case RC_LANGUAGE_GLOBAL_OPTIONS:
2284 str = _("De-select if you don't want the language(s) used as an argument to \\documentclass.");
2287 case RC_LANGUAGE_PACKAGE:
2288 str = _("The LaTeX command for loading the language package. E.g. \"\\usepackage{babel}\", \"\\usepackage{omega}\".");
2291 case RC_LANGUAGE_USE_BABEL:
2292 str = _("De-select if you don't want babel to be used when the language of the document is the default language.");
2295 case RC_USELASTFILEPOS:
2296 str = _("De-select if you do not want LyX to scroll to saved position.");
2299 case RC_LOADSESSION:
2300 str = _("De-select to prevent loading files opened from the last lyx session.");
2303 case RC_MAKE_BACKUP:
2304 str = _("De-select if you don't want LyX to create backup files.");
2307 case RC_MARK_FOREIGN_LANGUAGE:
2308 str = _("Select to control the highlighting of words with a language foreign to that of the document.");
2311 case RC_NUMLASTFILES:
2312 str = bformat(_("Maximal number of lastfiles. Up to %1$d can appear in the file menu."), maxlastfiles);
2315 case RC_PATH_PREFIX:
2316 str = _("Specify those directories which should be "
2317 "prepended to the PATH environment variable. "
2318 "Use the OS native format.");
2322 case RC_USE_PERS_DICT:
2323 str = _("Specify an alternate personal dictionary file. E.g. \".ispell_english\".");
2326 case RC_POPUP_BOLD_FONT:
2327 str = _("The bold font in the dialogs.");
2330 case RC_POPUP_FONT_ENCODING:
2331 str = _("The encoding for the menu/popups fonts.");
2334 case RC_POPUP_NORMAL_FONT:
2335 str = _("The normal font in the dialogs.");
2339 str = _("Shows a typeset preview of things such as math");
2342 case RC_PREVIEW_HASHED_LABELS:
2343 str = _("Previewed equations will have \"(#)\" labels rather than numbered ones");
2346 case RC_PREVIEW_SCALE_FACTOR:
2347 str = _("Scale the preview size to suit.");
2350 case RC_PRINTCOLLCOPIESFLAG:
2351 str = _("The option for specifying whether the copies should be collated.");
2354 case RC_PRINTCOPIESFLAG:
2355 str = _("The option for specifying the number of copies to print.");
2359 str = _("The default printer to print on. If none is specified, LyX will use the environment variable PRINTER.");
2362 case RC_PRINTEVENPAGEFLAG:
2363 str = _("The option to print only even pages.");
2366 case RC_PRINTEXSTRAOPTIONS:
2367 str = _("Extra options to pass to printing program after everything else, but before the filename of the DVI file to be printed.");
2370 case RC_PRINTFILEEXTENSION:
2371 str = _("Extension of printer program output file. Usually \".ps\".");
2374 case RC_PRINTLANDSCAPEFLAG:
2375 str = _("The option to print out in landscape.");
2378 case RC_PRINTODDPAGEFLAG:
2379 str = _("The option to print only odd pages.");
2382 case RC_PRINTPAGERANGEFLAG:
2383 str = _("The option for specifying a comma-separated list of pages to print.");
2386 case RC_PRINTPAPERDIMENSIONFLAG:
2387 str = _("Option to specify the dimensions of the print paper.");
2390 case RC_PRINTPAPERFLAG:
2391 str = _("The option to specify paper type.");
2394 case RC_PRINTREVERSEFLAG:
2395 str = _("The option to reverse the order of the pages printed.");
2398 case RC_PRINTSPOOL_COMMAND:
2399 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.");
2402 case RC_PRINTSPOOL_PRINTERPREFIX:
2403 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.");
2406 case RC_PRINTTOFILE:
2407 str = _("Option to pass to the print program to print to a file.");
2410 case RC_PRINTTOPRINTER:
2411 str = _("Option to pass to the print program to print on a specific printer.");
2414 case RC_PRINT_ADAPTOUTPUT:
2415 str = _("Select for LyX to pass the name of the destination printer to your print command.");
2418 case RC_PRINT_COMMAND:
2419 str = _("Your favorite print program, e.g. \"dvips\", \"dvilj4\".");
2422 case RC_RTL_SUPPORT:
2423 str = _("Select to enable support of right-to-left languages (e.g. Hebrew, Arabic).");
2427 str = _("DPI (dots per inch) of your monitor is auto-detected by LyX. If that goes wrong, override the setting here.");
2430 case RC_SCREEN_FONT_ENCODING:
2431 str = _("The encoding for the screen fonts.");
2434 case RC_SCREEN_FONT_ROMAN:
2435 case RC_SCREEN_FONT_SANS:
2436 case RC_SCREEN_FONT_TYPEWRITER:
2437 str = _("The screen fonts used to display the text while editing.");
2440 case RC_SCREEN_FONT_ROMAN_FOUNDRY:
2441 case RC_SCREEN_FONT_SANS_FOUNDRY:
2442 case RC_SCREEN_FONT_TYPEWRITER_FOUNDRY:
2445 case RC_SCREEN_FONT_SCALABLE:
2446 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.");
2449 case RC_SCREEN_FONT_SIZES:
2450 str = _("The font sizes used for calculating the scaling of the screen fonts.");
2453 case RC_SCREEN_ZOOM:
2454 //xgettext:no-c-format
2455 str = _("The zoom percentage for screen fonts. A setting of 100% will make the fonts roughly the same size as on paper.");
2458 case RC_SCREEN_GEOMETRY_HEIGHT:
2459 case RC_SCREEN_GEOMETRY_WIDTH:
2460 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).");
2463 case RC_SCREEN_GEOMETRY_XYSAVED:
2464 str = _("Allow session manager to save and restore windows position.");
2468 str = _("This starts the lyxserver. The pipes get an additional extension \".in\" and \".out\". Only for advanced users.");
2474 case RC_SHOW_BANNER:
2475 str = _("De-select if you don't want the startup banner.");
2478 case RC_SPELL_COMMAND:
2479 str = _("What command runs the spellchecker?");
2482 case RC_TEMPDIRPATH:
2483 str = _("LyX will place its temporary directories in this path. They will be deleted when you quit LyX.");
2486 case RC_TEMPLATEPATH:
2487 str = _("The path that LyX will set when offering to choose a template. An empty value selects the directory LyX was started from.");
2490 case RC_TEX_ALLOWS_SPACES:
2494 str = _("The UI (user interface) file. Can either specify an absolute path, or LyX will look in its global and local ui/ directories.");
2506 case RC_USE_INP_ENC:
2507 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.");
2510 case RC_USE_SPELL_LIB:
2513 case RC_VIEWDVI_PAPEROPTION:
2514 str = _("Specify the paper command to DVI viewer (leave empty or use \"-paper\")");
2521 str = _("The number of lines that are scrolled by mice with wheels or five button mice.");
2531 // The global instance
2534 // The global copy of the system lyxrc entries (everything except preferences)