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();
1056 || token(command, ' ', 0) == "none") {
1057 converters.erase(from, to);
1059 converters.add(from, to, command, flags);
1063 // compatibility with versions older than 1.4.0 only
1065 string format, command;
1067 format = lexrc.getString();
1070 command = lexrc.getString();
1072 formats.setViewer(format, command);
1076 string format, extension, prettyname, shortcut;
1078 format = lexrc.getString();
1081 extension = lexrc.getString();
1084 prettyname = lexrc.getString();
1087 shortcut = lexrc.getString();
1089 string viewer, editor;
1091 viewer = lexrc.getString();
1093 editor = lexrc.getString();
1094 // The only supported flag for now is "document".
1095 // More flags could be added in the future.
1096 // Therefore we use tokenPos below to read the flag.
1098 // Hack to ensure compatibility with versions older
1100 int le = lexrc.lex();
1101 if (le != LyXLex::LEX_FEOF && le != LyXLex::LEX_UNDEF) {
1102 flags = lexrc.getString();
1103 if (le != LyXLex::LEX_DATA) {
1104 // We have got a known token.
1105 // Therefore this is an old style
1106 // format definition without
1108 lexrc.pushToken(flags);
1112 bool const document =
1113 (tokenPos(flags, ',', "document") >= 0);
1114 if (!flags.empty() && flags != "document")
1115 lyxerr << "Ignoring flags other than "
1116 "`document' in `" << flags
1117 << "' for format `" << format << "'."
1119 if (prettyname.empty()) {
1120 if (converters.formatIsUsed(format)) {
1121 lyxerr << "Can't delete format "
1124 formats.erase(format);
1127 formats.add(format, extension, prettyname,
1128 shortcut, viewer, editor, document);
1132 case RC_DEFAULT_LANGUAGE:
1134 default_language = lexrc.getString();
1138 case RC_LABEL_INIT_LENGTH:
1140 label_init_length = lexrc.getInteger();
1144 case RC_SHOW_BANNER:
1146 show_banner = lexrc.getBool();
1152 string const tmp = lexrc.getString();
1153 if (tmp == "true" || tmp == "on")
1154 preview = PREVIEW_ON;
1155 else if (tmp == "no_math")
1156 preview = PREVIEW_NO_MATH;
1158 preview = PREVIEW_OFF;
1159 if (tmp != "false" && tmp != "off")
1160 lyxerr << "Unrecognized "
1162 << tmp << '\n' << endl;
1167 case RC_PREVIEW_HASHED_LABELS:
1169 preview_hashed_labels = lexrc.getBool();
1173 case RC_PREVIEW_SCALE_FACTOR:
1175 preview_scale_factor = lexrc.getString();
1181 user_name = lexrc.getString();
1186 user_email = lexrc.getString();
1189 case RC_PATH_PREFIX:
1191 path_prefix = lexrc.getString();
1194 case RC_LAST: break; // this is just a dummy
1198 /// Update converters data-structures
1199 converters.update(formats);
1200 converters.buildGraph();
1206 void LyXRC::write(string const & filename, bool ignore_system_lyxrc) const
1208 ofstream ofs(filename.c_str());
1210 write(ofs, ignore_system_lyxrc);
1214 void LyXRC::print() const
1216 if (lyxerr.debugging())
1217 write(lyxerr, false);
1225 typedef std::pair<std::string, SpecialisedMover> Data;
1227 SameMover(Data const & comparison)
1228 : comparison_(comparison) {}
1230 bool operator()(Data const & data) const
1232 return data.first == comparison_.first &&
1233 data.second.command() == comparison_.second.command();
1241 void LyXRC::write(ostream & os, bool ignore_system_lyxrc) const
1243 os << "### This file is part of\n"
1244 << "### ========================================================\n"
1245 << "### LyX, The Document Processor\n"
1247 << "### Copyright 1995 Matthias Ettrich\n"
1248 << "### Copyright 1995-2001 The LyX Team.\n"
1250 << "### ========================================================\n"
1252 << "# This file is written by LyX, if you want to make your own\n"
1253 << "# modifications you should do them from inside LyX and save\n"
1256 // Why the switch you might ask. It is a trick to ensure that all
1257 // the elements in the LyXRCTags enum is handled. As you can see
1258 // there are no breaks at all. So it is just a huge fall-through.
1259 // The nice thing is that we will get a warning from the compiler
1260 // if we forget an element.
1261 LyXRCTags tag = RC_LAST;
1265 // input/include files are not done here
1267 if (ignore_system_lyxrc ||
1268 bind_file != system_lyxrc.bind_file) {
1269 string const path = os::external_path(bind_file);
1270 os << "\\bind_file \"" << path << "\"\n";
1276 << "# MISC SECTION ######################################\n"
1279 // bind files are not done here.
1281 case RC_PATH_PREFIX:
1282 if (ignore_system_lyxrc ||
1283 path_prefix != system_lyxrc.path_prefix) {
1284 os << "\\path_prefix \"" << path_prefix << "\"\n";
1288 if (ignore_system_lyxrc ||
1289 ui_file != system_lyxrc.ui_file) {
1290 string const path = os::external_path(ui_file);
1291 os << "\\ui_file \"" << path << "\"\n";
1293 case RC_AUTOREGIONDELETE:
1294 if (ignore_system_lyxrc ||
1295 auto_region_delete != system_lyxrc.auto_region_delete) {
1296 os << "# Set to false to inhibit automatic replacement of\n"
1297 << "# the current selection.\n"
1298 << "\\auto_region_delete " << convert<string>(auto_region_delete)
1301 case RC_AUTORESET_OPTIONS:
1302 if (ignore_system_lyxrc ||
1303 auto_reset_options != system_lyxrc.auto_reset_options) {
1304 os << "# Set to false to inhibit automatic reset of\n"
1305 << "# the class options to defaults on class change.\n"
1306 << "\\auto_reset_options "
1307 << convert<string>(auto_reset_options)
1311 if (ignore_system_lyxrc ||
1312 autosave != system_lyxrc.autosave) {
1313 os << "# The time interval between auto-saves in seconds.\n"
1314 << "\\autosave " << autosave << '\n';
1316 case RC_DISPLAY_GRAPHICS:
1317 if (ignore_system_lyxrc ||
1318 display_graphics != system_lyxrc.display_graphics) {
1319 os << "# Display graphics within LyX\n"
1320 << "# monochrome|grayscale|color|none\n"
1321 << "\\display_graphics "
1322 << lyx::graphics::displayTranslator().find(display_graphics)
1326 case RC_VIEWDVI_PAPEROPTION:
1327 if (ignore_system_lyxrc ||
1328 view_dvi_paper_option
1329 != system_lyxrc.view_dvi_paper_option) {
1330 os << "# Options used to specify paper size to the\n"
1331 << "# view_dvi_command (e.g. -paper)\n"
1332 << "\\view_dvi_paper_option \""
1333 << view_dvi_paper_option << "\"\n";
1335 case RC_DEFAULT_PAPERSIZE:
1336 if (ignore_system_lyxrc ||
1337 default_papersize != system_lyxrc.default_papersize) {
1338 os << "# The default papersize to use.\n"
1339 << "\\default_papersize \"";
1340 switch (default_papersize) {
1342 os << "default"; break;
1343 case PAPER_USLETTER:
1344 os << "usletter"; break;
1346 os << "legal"; break;
1347 case PAPER_USEXECUTIVE:
1348 os << "executive"; break;
1359 case PAPER_B4: break;
1363 case RC_CHKTEX_COMMAND:
1364 if (ignore_system_lyxrc ||
1365 chktex_command != system_lyxrc.chktex_command) {
1366 os << "\\chktex_command \"" << chktex_command << "\"\n";
1368 case RC_BIBTEX_COMMAND:
1369 if (ignore_system_lyxrc ||
1370 bibtex_command != system_lyxrc.bibtex_command) {
1371 os << "\\bibtex_command \"" << bibtex_command << "\"\n";
1373 case RC_INDEX_COMMAND:
1374 if (ignore_system_lyxrc ||
1375 index_command != system_lyxrc.index_command) {
1376 os << "\\index_command \"" << index_command << "\"\n";
1378 case RC_CYGWIN_PATH_FIX:
1379 if (ignore_system_lyxrc ||
1380 cygwin_path_fix != system_lyxrc.cygwin_path_fix) {
1381 os << "\\cygwin_path_fix_needed "
1382 << convert<string>(cygwin_path_fix) << '\n';
1384 case RC_TEX_ALLOWS_SPACES:
1385 if (tex_allows_spaces != system_lyxrc.tex_allows_spaces) {
1386 os << "\\tex_allows_spaces "
1387 << convert<string>(tex_allows_spaces) << '\n';
1390 if (ignore_system_lyxrc ||
1391 use_kbmap != system_lyxrc.use_kbmap) {
1392 os << "\\kbmap " << convert<string>(use_kbmap) << '\n';
1394 case RC_KBMAP_PRIMARY:
1395 if (ignore_system_lyxrc ||
1396 primary_kbmap != system_lyxrc.primary_kbmap) {
1397 string const path = os::external_path(primary_kbmap);
1398 os << "\\kbmap_primary \"" << path << "\"\n";
1400 case RC_KBMAP_SECONDARY:
1401 if (ignore_system_lyxrc ||
1402 secondary_kbmap != system_lyxrc.secondary_kbmap) {
1403 string const path = os::external_path(secondary_kbmap);
1404 os << "\\kbmap_secondary \"" << path << "\"\n";
1407 if (ignore_system_lyxrc ||
1408 lyxpipes != system_lyxrc.lyxpipes) {
1409 string const path = os::external_path(lyxpipes);
1410 os << "\\serverpipe \"" << path << "\"\n";
1412 case RC_DATE_INSERT_FORMAT:
1413 if (ignore_system_lyxrc ||
1414 date_insert_format != system_lyxrc.date_insert_format) {
1415 os << "\\date_insert_format \"" << date_insert_format
1418 case RC_LABEL_INIT_LENGTH:
1419 if (ignore_system_lyxrc ||
1420 label_init_length != system_lyxrc.label_init_length) {
1421 os << "\\label_init_length " << label_init_length
1426 os << "\\user_name \"" << user_name << "\"\n";
1429 os << "\\user_email \"" << user_email << "\"\n";
1431 case RC_SHOW_BANNER:
1432 if (ignore_system_lyxrc ||
1433 show_banner != system_lyxrc.show_banner) {
1434 os << "\\show_banner " << convert<string>(show_banner) << '\n';
1438 if (ignore_system_lyxrc ||
1439 preview != system_lyxrc.preview) {
1445 case PREVIEW_NO_MATH:
1452 os << "\\preview " << status << '\n';
1455 case RC_PREVIEW_HASHED_LABELS:
1456 if (ignore_system_lyxrc ||
1457 preview_hashed_labels !=
1458 system_lyxrc.preview_hashed_labels) {
1459 os << "\\preview_hashed_labels "
1460 << convert<string>(preview_hashed_labels) << '\n';
1463 case RC_PREVIEW_SCALE_FACTOR:
1464 if (ignore_system_lyxrc ||
1465 preview_scale_factor != system_lyxrc.preview_scale_factor) {
1466 os << "\\preview_scale_factor "
1467 << preview_scale_factor << '\n';
1471 << "# SCREEN & FONTS SECTION ############################\n"
1474 case RC_POPUP_NORMAL_FONT:
1475 if (ignore_system_lyxrc ||
1476 popup_normal_font != system_lyxrc.popup_normal_font) {
1477 os << "\\popup_normal_font \"" << popup_normal_font
1480 case RC_POPUP_BOLD_FONT:
1481 if (ignore_system_lyxrc ||
1482 popup_bold_font != system_lyxrc.popup_bold_font) {
1483 os << "\\popup_bold_font \"" << popup_bold_font
1486 case RC_POPUP_FONT_ENCODING:
1487 if (ignore_system_lyxrc ||
1488 popup_font_encoding != system_lyxrc.popup_font_encoding) {
1489 os << "\\popup_font_encoding \"" << popup_font_encoding
1493 if (ignore_system_lyxrc ||
1494 dpi != system_lyxrc.dpi) {
1495 os << "\\screen_dpi " << dpi << '\n';
1497 case RC_SCREEN_ZOOM:
1498 if (ignore_system_lyxrc ||
1499 zoom != system_lyxrc.zoom) {
1500 os << "\\screen_zoom " << zoom << '\n';
1502 case RC_SCREEN_GEOMETRY_HEIGHT:
1503 if (ignore_system_lyxrc ||
1504 geometry_height != system_lyxrc.geometry_height) {
1505 os << "\\screen_geometry_height " << geometry_height
1508 case RC_SCREEN_GEOMETRY_WIDTH:
1509 if (ignore_system_lyxrc ||
1510 geometry_width != system_lyxrc.geometry_width) {
1511 os << "\\screen_geometry_width " << geometry_width
1514 case RC_SCREEN_GEOMETRY_XYSAVED:
1515 if (ignore_system_lyxrc ||
1516 geometry_xysaved != system_lyxrc.geometry_xysaved) {
1517 os << "\\screen_geometry_xysaved " << convert<string>(geometry_xysaved)
1521 if (ignore_system_lyxrc ||
1522 wheel_jump != system_lyxrc.wheel_jump) {
1523 os << "\\wheel_jump " << wheel_jump << '\n';
1525 case RC_CURSOR_FOLLOWS_SCROLLBAR:
1526 if (ignore_system_lyxrc ||
1527 cursor_follows_scrollbar
1528 != system_lyxrc.cursor_follows_scrollbar) {
1529 os << "\\cursor_follows_scrollbar "
1530 << convert<string>(cursor_follows_scrollbar) << '\n';
1532 case RC_DIALOGS_ICONIFY_WITH_MAIN:
1533 if (ignore_system_lyxrc ||
1534 dialogs_iconify_with_main
1535 != system_lyxrc.dialogs_iconify_with_main) {
1536 os << "\\dialogs_iconify_with_main "
1537 << convert<string>(dialogs_iconify_with_main) << '\n';
1539 case RC_SCREEN_FONT_ROMAN:
1540 if (ignore_system_lyxrc ||
1541 roman_font_name != system_lyxrc.roman_font_name) {
1542 os << "\\screen_font_roman \"" << roman_font_name
1545 case RC_SCREEN_FONT_ROMAN_FOUNDRY:
1546 if (ignore_system_lyxrc ||
1547 roman_font_foundry != system_lyxrc.roman_font_foundry) {
1548 os << "\\screen_font_roman_foundry \"" << roman_font_foundry
1551 case RC_SCREEN_FONT_SANS:
1552 if (ignore_system_lyxrc ||
1553 sans_font_name != system_lyxrc.sans_font_name) {
1554 os << "\\screen_font_sans \"" << sans_font_name
1557 case RC_SCREEN_FONT_SANS_FOUNDRY:
1558 if (ignore_system_lyxrc ||
1559 sans_font_foundry != system_lyxrc.sans_font_foundry) {
1560 os << "\\screen_font_sans_foundry \"" << sans_font_foundry
1563 case RC_SCREEN_FONT_TYPEWRITER:
1564 if (ignore_system_lyxrc ||
1565 typewriter_font_name != system_lyxrc.typewriter_font_name) {
1566 os << "\\screen_font_typewriter \""
1567 << typewriter_font_name << "\"\n";
1569 case RC_SCREEN_FONT_TYPEWRITER_FOUNDRY:
1570 if (ignore_system_lyxrc ||
1571 typewriter_font_foundry != system_lyxrc.typewriter_font_foundry) {
1572 os << "\\screen_font_typewriter_foundry \""
1573 << typewriter_font_foundry << "\"\n";
1576 case RC_SCREEN_FONT_SCALABLE:
1577 if (ignore_system_lyxrc ||
1578 use_scalable_fonts != system_lyxrc.use_scalable_fonts) {
1579 os << "\\screen_font_scalable "
1580 << convert<string>(use_scalable_fonts)
1583 case RC_SCREEN_FONT_ENCODING:
1584 if (ignore_system_lyxrc ||
1585 font_norm != system_lyxrc.font_norm) {
1586 os << "\\screen_font_encoding \"" << font_norm
1589 case RC_SCREEN_FONT_SIZES:
1590 if (ignore_system_lyxrc ||
1591 font_sizes[LyXFont::SIZE_TINY]
1592 != system_lyxrc.font_sizes[LyXFont::SIZE_TINY] ||
1593 font_sizes[LyXFont::SIZE_SCRIPT]
1594 != system_lyxrc.font_sizes[LyXFont::SIZE_SCRIPT] ||
1595 font_sizes[LyXFont::SIZE_FOOTNOTE]
1596 != system_lyxrc.font_sizes[LyXFont::SIZE_FOOTNOTE] ||
1597 font_sizes[LyXFont::SIZE_SMALL]
1598 != system_lyxrc.font_sizes[LyXFont::SIZE_SMALL] ||
1599 font_sizes[LyXFont::SIZE_NORMAL]
1600 != system_lyxrc.font_sizes[LyXFont::SIZE_NORMAL] ||
1601 font_sizes[LyXFont::SIZE_LARGE]
1602 != system_lyxrc.font_sizes[LyXFont::SIZE_LARGE] ||
1603 font_sizes[LyXFont::SIZE_LARGER]
1604 != system_lyxrc.font_sizes[LyXFont::SIZE_LARGER] ||
1605 font_sizes[LyXFont::SIZE_LARGEST]
1606 != system_lyxrc.font_sizes[LyXFont::SIZE_LARGEST] ||
1607 font_sizes[LyXFont::SIZE_HUGE]
1608 != system_lyxrc.font_sizes[LyXFont::SIZE_HUGE] ||
1609 font_sizes[LyXFont::SIZE_HUGER]
1610 != system_lyxrc.font_sizes[LyXFont::SIZE_HUGER]) {
1611 os.setf(ios::fixed);
1613 os << "\\screen_font_sizes"
1614 << ' ' << font_sizes[LyXFont::SIZE_TINY]
1615 << ' ' << font_sizes[LyXFont::SIZE_SCRIPT]
1616 << ' ' << font_sizes[LyXFont::SIZE_FOOTNOTE]
1617 << ' ' << font_sizes[LyXFont::SIZE_SMALL]
1618 << ' ' << font_sizes[LyXFont::SIZE_NORMAL]
1619 << ' ' << font_sizes[LyXFont::SIZE_LARGE]
1620 << ' ' << font_sizes[LyXFont::SIZE_LARGER]
1621 << ' ' << font_sizes[LyXFont::SIZE_LARGEST]
1622 << ' ' << font_sizes[LyXFont::SIZE_HUGE]
1623 << ' ' << font_sizes[LyXFont::SIZE_HUGER]
1628 << "# COLOR SECTION ###################################\n"
1632 for (int i = 0; i < LColor::ignore; ++i) {
1633 LColor::color lc = static_cast<LColor::color>(i);
1635 string const col(lcolor.getX11Name(lc));
1636 if (ignore_system_lyxrc ||
1637 col != system_lcolor.getX11Name(lc)) {
1638 os << "\\set_color \""
1639 << lcolor.getLyXName(lc) << "\" \""
1645 << "# PRINTER SECTION ###################################\n"
1649 if (ignore_system_lyxrc ||
1650 printer != system_lyxrc.printer) {
1651 os << "\\printer \"" << printer << "\"\n";
1653 case RC_PRINT_ADAPTOUTPUT:
1654 if (ignore_system_lyxrc ||
1655 print_adapt_output != system_lyxrc.print_adapt_output) {
1656 os << "\\print_adapt_output "
1657 << convert<string>(print_adapt_output)
1660 case RC_PRINT_COMMAND:
1661 if (ignore_system_lyxrc ||
1662 print_command != system_lyxrc.print_command) {
1663 os << "\\print_command \"" << print_command << "\"\n";
1665 case RC_PRINTEXSTRAOPTIONS:
1666 if (ignore_system_lyxrc ||
1667 print_extra_options != system_lyxrc.print_extra_options) {
1668 os << "\\print_extra_options \"" << print_extra_options
1671 case RC_PRINTSPOOL_COMMAND:
1672 if (ignore_system_lyxrc ||
1673 print_spool_command != system_lyxrc.print_spool_command) {
1674 os << "\\print_spool_command \"" << print_spool_command
1677 case RC_PRINTSPOOL_PRINTERPREFIX:
1678 if (ignore_system_lyxrc ||
1679 print_spool_printerprefix
1680 != system_lyxrc.print_spool_printerprefix) {
1681 os << "\\print_spool_printerprefix \""
1682 << print_spool_printerprefix << "\"\n";
1684 case RC_PRINTEVENPAGEFLAG:
1685 if (ignore_system_lyxrc ||
1686 print_evenpage_flag != system_lyxrc.print_evenpage_flag) {
1687 os << "\\print_evenpage_flag \"" << print_evenpage_flag
1690 case RC_PRINTODDPAGEFLAG:
1691 if (ignore_system_lyxrc ||
1692 print_oddpage_flag != system_lyxrc.print_oddpage_flag) {
1693 os << "\\print_oddpage_flag \"" << print_oddpage_flag
1696 case RC_PRINTREVERSEFLAG:
1697 if (ignore_system_lyxrc ||
1698 print_reverse_flag != system_lyxrc.print_reverse_flag) {
1699 os << "\\print_reverse_flag \"" << print_reverse_flag
1702 case RC_PRINTLANDSCAPEFLAG:
1703 if (ignore_system_lyxrc ||
1704 print_landscape_flag != system_lyxrc.print_landscape_flag) {
1705 os << "\\print_landscape_flag \"" << print_landscape_flag
1708 case RC_PRINTPAGERANGEFLAG:
1709 if (ignore_system_lyxrc ||
1710 print_pagerange_flag != system_lyxrc.print_pagerange_flag) {
1711 os << "\\print_pagerange_flag \"" << print_pagerange_flag
1714 case RC_PRINTCOPIESFLAG:
1715 if (ignore_system_lyxrc ||
1716 print_copies_flag != system_lyxrc.print_copies_flag) {
1717 os << "\\print_copies_flag \"" << print_copies_flag
1720 case RC_PRINTCOLLCOPIESFLAG:
1721 if (ignore_system_lyxrc ||
1722 print_collcopies_flag
1723 != system_lyxrc.print_collcopies_flag) {
1724 os << "\\print_collcopies_flag \""
1725 << print_collcopies_flag
1728 case RC_PRINTPAPERFLAG:
1729 if (ignore_system_lyxrc ||
1730 print_paper_flag != system_lyxrc.print_paper_flag) {
1731 os << "\\print_paper_flag \"" << print_paper_flag
1734 case RC_PRINTPAPERDIMENSIONFLAG:
1735 if (ignore_system_lyxrc ||
1736 print_paper_dimension_flag
1737 != system_lyxrc.print_paper_dimension_flag) {
1738 os << "\\print_paper_dimension_flag \""
1739 << print_paper_dimension_flag << "\"\n";
1741 case RC_PRINTTOPRINTER:
1742 if (ignore_system_lyxrc ||
1743 print_to_printer != system_lyxrc.print_to_printer) {
1744 os << "\\print_to_printer \"" << print_to_printer
1747 case RC_PRINTTOFILE:
1748 if (ignore_system_lyxrc ||
1749 print_to_file != system_lyxrc.print_to_file) {
1750 string const path = os::external_path(print_to_file);
1751 os << "\\print_to_file \"" << path << "\"\n";
1753 case RC_PRINTFILEEXTENSION:
1754 if (ignore_system_lyxrc ||
1755 print_file_extension != system_lyxrc.print_file_extension) {
1756 os << "\\print_file_extension \""
1757 << print_file_extension
1762 << "# EXPORT SECTION ####################################\n"
1765 case RC_CUSTOM_EXPORT_COMMAND:
1766 if (ignore_system_lyxrc ||
1767 custom_export_command
1768 != system_lyxrc.custom_export_command) {
1769 os << "\\custom_export_command \""
1770 << custom_export_command
1773 case RC_CUSTOM_EXPORT_FORMAT:
1774 if (ignore_system_lyxrc ||
1775 custom_export_format
1776 != system_lyxrc.custom_export_format) {
1777 os << "\\custom_export_format \"" << custom_export_format
1782 << "# TEX SECTION #######################################\n"
1785 case RC_FONT_ENCODING:
1786 if (ignore_system_lyxrc ||
1787 fontenc != system_lyxrc.fontenc) {
1788 os << "\\font_encoding \"" << fontenc << "\"\n";
1792 << "# FILE SECTION ######################################\n"
1795 case RC_DOCUMENTPATH:
1796 if (ignore_system_lyxrc ||
1797 document_path != system_lyxrc.document_path) {
1798 string const path = os::external_path(document_path);
1799 os << "\\document_path \"" << path << "\"\n";
1801 case RC_USELASTFILEPOS:
1802 if (ignore_system_lyxrc ||
1803 use_lastfilepos != system_lyxrc.use_lastfilepos) {
1804 os << "\\use_lastfilepos " << convert<string>(use_lastfilepos)
1807 case RC_LOADSESSION:
1808 if (ignore_system_lyxrc ||
1809 load_session != system_lyxrc.load_session) {
1810 os << "\\load_session " << convert<string>(load_session)
1813 case RC_NUMLASTFILES:
1814 if (ignore_system_lyxrc ||
1815 num_lastfiles != system_lyxrc.num_lastfiles) {
1816 os << "\\num_lastfiles " << num_lastfiles << '\n';
1818 case RC_CHECKLASTFILES:
1819 if (ignore_system_lyxrc ||
1820 check_lastfiles != system_lyxrc.check_lastfiles) {
1821 os << "\\check_lastfiles " << convert<string>(check_lastfiles)
1824 case RC_TEMPLATEPATH:
1825 if (ignore_system_lyxrc ||
1826 template_path != system_lyxrc.template_path) {
1827 string const path = os::external_path(template_path);
1828 os << "\\template_path \"" << path << "\"\n";
1830 case RC_TEMPDIRPATH:
1831 if (ignore_system_lyxrc ||
1832 tempdir_path != system_lyxrc.tempdir_path) {
1833 string const path = os::external_path(tempdir_path);
1834 os << "\\tempdir_path \"" << path << "\"\n";
1838 case RC_ASCII_LINELEN:
1839 if (ignore_system_lyxrc ||
1840 ascii_linelen != system_lyxrc.ascii_linelen) {
1841 os << "\\ascii_linelen " << ascii_linelen << '\n';
1843 case RC_MAKE_BACKUP:
1844 if (ignore_system_lyxrc ||
1845 make_backup != system_lyxrc.make_backup) {
1846 os << "\\make_backup " << convert<string>(make_backup) << '\n';
1848 case RC_BACKUPDIR_PATH:
1849 if (ignore_system_lyxrc ||
1850 backupdir_path != system_lyxrc.backupdir_path) {
1851 string const path = os::external_path(backupdir_path);
1852 os << "\\backupdir_path \"" << path << "\"\n";
1856 << "# ASCII EXPORT SECTION ##############################\n"
1859 case RC_ASCIIROFF_COMMAND:
1860 if (ignore_system_lyxrc ||
1861 ascii_roff_command != system_lyxrc.ascii_roff_command) {
1862 os << "\\ascii_roff_command \"" << ascii_roff_command
1867 << "# SPELLCHECKER SECTION ##############################\n"
1869 case RC_USE_SPELL_LIB:
1870 if (ignore_system_lyxrc ||
1871 use_spell_lib != system_lyxrc.use_spell_lib) {
1872 os << "\\use_spell_lib " << convert<string>(use_spell_lib) << '\n';
1874 case RC_SPELL_COMMAND:
1875 if (ignore_system_lyxrc ||
1876 isp_command != system_lyxrc.isp_command) {
1877 os << "\\spell_command \"" << isp_command << "\"\n";
1879 case RC_ACCEPT_COMPOUND:
1880 if (ignore_system_lyxrc ||
1881 isp_accept_compound != system_lyxrc.isp_accept_compound) {
1882 os << "\\accept_compound " << convert<string>(isp_accept_compound)
1885 case RC_USE_ALT_LANG:
1886 if (ignore_system_lyxrc ||
1887 isp_use_alt_lang != system_lyxrc.isp_use_alt_lang) {
1888 os << "\\use_alt_language " << convert<string>(isp_use_alt_lang)
1892 if (ignore_system_lyxrc ||
1893 isp_alt_lang != system_lyxrc.isp_alt_lang) {
1894 os << "\\alternate_language \"" << isp_alt_lang
1897 case RC_USE_ESC_CHARS:
1898 if (ignore_system_lyxrc ||
1899 isp_use_esc_chars != system_lyxrc.isp_use_esc_chars) {
1900 os << "\\use_escape_chars " << convert<string>(isp_use_esc_chars)
1904 if (ignore_system_lyxrc ||
1905 isp_esc_chars != system_lyxrc.isp_esc_chars) {
1906 os << "\\escape_chars \"" << isp_esc_chars << "\"\n";
1908 case RC_USE_PERS_DICT:
1909 if (ignore_system_lyxrc ||
1910 isp_use_pers_dict != system_lyxrc.isp_use_pers_dict) {
1911 os << "\\use_personal_dictionary "
1912 << convert<string>(isp_use_pers_dict)
1916 if (isp_pers_dict != system_lyxrc.isp_pers_dict) {
1917 string const path = os::external_path(isp_pers_dict);
1918 os << "\\personal_dictionary \"" << path << "\"\n";
1920 case RC_USE_INP_ENC:
1921 if (ignore_system_lyxrc ||
1922 isp_use_input_encoding
1923 != system_lyxrc.isp_use_input_encoding) {
1924 os << "\\use_input_encoding "
1925 << convert<string>(isp_use_input_encoding)
1930 << "# LANGUAGE SUPPORT SECTION ##########################\n"
1933 case RC_RTL_SUPPORT:
1934 if (ignore_system_lyxrc ||
1935 rtl_support != system_lyxrc.rtl_support) {
1936 os << "\\rtl " << convert<string>(rtl_support) << '\n';
1938 case RC_LANGUAGE_PACKAGE:
1939 if (ignore_system_lyxrc ||
1940 language_package != system_lyxrc.language_package) {
1941 os << "\\language_package \"" << language_package
1944 case RC_LANGUAGE_GLOBAL_OPTIONS:
1945 if (ignore_system_lyxrc ||
1946 language_global_options
1947 != system_lyxrc.language_global_options) {
1948 os << "\\language_global_options \""
1949 << convert<string>(language_global_options)
1952 case RC_LANGUAGE_USE_BABEL:
1953 if (ignore_system_lyxrc ||
1954 language_use_babel != system_lyxrc.language_use_babel) {
1955 os << "\\language_use_babel \""
1956 << convert<string>(language_use_babel)
1959 case RC_LANGUAGE_COMMAND_BEGIN:
1960 if (ignore_system_lyxrc ||
1961 language_command_begin
1962 != system_lyxrc.language_command_begin) {
1963 os << "\\language_command_begin \""
1964 << language_command_begin
1967 case RC_LANGUAGE_COMMAND_END:
1968 if (ignore_system_lyxrc ||
1969 language_command_end
1970 != system_lyxrc.language_command_end) {
1971 os << "\\language_command_end \"" << language_command_end
1974 case RC_LANGUAGE_COMMAND_LOCAL:
1975 if (ignore_system_lyxrc ||
1976 language_command_local
1977 != system_lyxrc.language_command_local) {
1978 os << "\\language_command_local \""
1979 << language_command_local
1982 case RC_LANGUAGE_AUTO_BEGIN:
1983 if (ignore_system_lyxrc ||
1984 language_auto_begin != system_lyxrc.language_auto_begin) {
1985 os << "\\language_auto_begin "
1986 << convert<string>(language_auto_begin) << '\n';
1988 case RC_LANGUAGE_AUTO_END:
1989 if (ignore_system_lyxrc ||
1990 language_auto_end != system_lyxrc.language_auto_end) {
1991 os << "\\language_auto_end "
1992 << convert<string>(language_auto_end) << '\n';
1994 case RC_MARK_FOREIGN_LANGUAGE:
1995 if (ignore_system_lyxrc ||
1996 mark_foreign_language
1997 != system_lyxrc.mark_foreign_language) {
1998 os << "\\mark_foreign_language " <<
1999 convert<string>(mark_foreign_language) << '\n';
2003 << "# 2nd MISC SUPPORT SECTION ##########################\n"
2006 case RC_AUTO_NUMBER:
2007 if (ignore_system_lyxrc ||
2008 auto_number != system_lyxrc.auto_number) {
2009 os << "\\auto_number " << convert<string>(auto_number) << '\n';
2011 case RC_DEFAULT_LANGUAGE:
2012 if (ignore_system_lyxrc ||
2013 default_language != system_lyxrc.default_language) {
2014 os << "\\default_language " << default_language << '\n';
2018 << "# FORMATS SECTION ##########################\n"
2022 // New/modified formats
2023 for (Formats::const_iterator cit = formats.begin();
2024 cit != formats.end(); ++cit) {
2025 Format const * format =
2026 system_formats.getFormat(cit->name());
2028 format->extension() != cit->extension() ||
2029 format->prettyname() != cit->prettyname() ||
2030 format->shortcut() != cit->shortcut() ||
2031 format->viewer() != cit->viewer() ||
2032 format->editor() != cit->editor() ||
2033 format->documentFormat() != cit->documentFormat()) {
2034 os << "\\format \"" << cit->name() << "\" \""
2035 << cit->extension() << "\" \""
2036 << cit->prettyname() << "\" \""
2037 << cit->shortcut() << "\" \""
2038 << cit->viewer() << "\" \""
2039 << cit->editor() << "\" \"";
2040 if (cit->documentFormat())
2046 // Look for deleted formats
2047 for (Formats::const_iterator cit = system_formats.begin();
2048 cit != system_formats.end(); ++cit)
2049 if (!formats.getFormat(cit->name()))
2050 os << "\\format \"" << cit->name()
2051 << "\" \"\" \"\" \"\" \"\" \"\" \"\"\n";
2056 << "# CONVERTERS SECTION ##########################\n"
2060 // Look for new converters
2061 for (Converters::const_iterator cit = converters.begin();
2062 cit != converters.end(); ++cit) {
2063 Converter const * converter =
2064 system_converters.getConverter(cit->from,
2067 converter->command != cit->command ||
2068 converter->flags != cit->flags)
2069 os << "\\converter \"" << cit->from << "\" \""
2070 << cit->to << "\" \""
2071 << cit->command << "\" \""
2072 << cit->flags << "\"\n";
2075 // New/modifed converters
2076 for (Converters::const_iterator cit = system_converters.begin();
2077 cit != system_converters.end(); ++cit)
2078 if (!converters.getConverter(cit->from, cit->to))
2079 os << "\\converter \"" << cit->from
2080 << "\" \"" << cit->to << "\" \"\" \"\"\n";
2084 << "# COPIERS SECTION ##########################\n"
2087 // Look for new movers
2088 Movers::iterator const sysbegin = system_movers.begin();
2089 Movers::iterator const sysend = system_movers.end();
2091 for (Movers::iterator it = movers.begin(), end = movers.end();
2093 Movers::iterator const sysit =
2094 std::find_if(sysbegin, sysend, SameMover(*it));
2095 if (sysit == sysend) {
2096 std::string const & fmt = it->first;
2097 std::string const & command =
2098 it->second.command();
2100 os << "\\copier " << fmt
2101 << " \"" << command << "\"\n";
2105 // We don't actually delete SpecialisedMover(s) from the
2106 // map, just clear their 'command', so there's no need
2107 // to test for anything else.
2113 void LyXRC::set_font_norm_type()
2115 if (font_norm == "iso10646-1")
2116 font_norm_type = ISO_10646_1;
2117 else if (font_norm == "iso8859-1")
2118 font_norm_type = ISO_8859_1;
2119 else if (font_norm == "iso8859-3")
2120 font_norm_type = ISO_8859_3;
2121 else if (font_norm == "iso8859-4")
2122 font_norm_type = ISO_8859_4;
2123 else if (font_norm == "iso8859-6.8x")
2124 font_norm_type = ISO_8859_6_8;
2125 else if (font_norm == "iso8859-9")
2126 font_norm_type = ISO_8859_9;
2127 else if (font_norm == "iso8859-15")
2128 font_norm_type = ISO_8859_15;
2130 font_norm_type = OTHER_ENCODING;
2134 string const LyXRC::getDescription(LyXRCTags tag)
2139 case RC_ACCEPT_COMPOUND:
2140 str = _("Consider run-together words, such as \"diskdrive\" for \"disk drive\", as legal words?");
2144 case RC_USE_ALT_LANG:
2145 str = _("Specify an alternate language. The default is to use the language of the document.");
2148 case RC_ASCIIROFF_COMMAND:
2149 str = _("Use to define an external program to render tables in plain text output. E.g. \"groff -t -Tlatin1 $$FName\" where $$FName is the input file. If \"none\" is specified, an internal routine is used.");
2152 case RC_ASCII_LINELEN:
2153 str = _("This is the maximum line length of an exported text file (LaTeX, SGML or plain text).");
2156 case RC_AUTOREGIONDELETE:
2157 str = _("De-select if you don't want the current selection to be replaced automatically by what you type.");
2160 case RC_AUTORESET_OPTIONS:
2161 str = _("De-select if you don't want the class options to be reset to defaults after class change.");
2165 str = _("The time interval between auto-saves (in seconds). 0 means no auto-save.");
2168 case RC_AUTO_NUMBER:
2171 case RC_BACKUPDIR_PATH:
2172 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.");
2175 case RC_BIBTEX_COMMAND:
2176 str = _("Define the options of bibtex (cf. man bibtex) or select an alternative compiler (e.g. mlbibtex or bibulus).");
2180 str = _("Keybindings file. Can either specify an absolute path, or LyX will look in its global and local bind/ directories.");
2183 case RC_CHECKLASTFILES:
2184 str = _("Select to check whether the lastfiles still exist.");
2187 case RC_CHKTEX_COMMAND:
2188 str = _("Define how to run chktex. E.g. \"chktex -n11 -n1 -n3 -n6 -n9 -22 -n25 -n30 -n38\" Refer to the ChkTeX documentation.");
2197 case RC_CURSOR_FOLLOWS_SCROLLBAR:
2198 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.");
2201 case RC_CUSTOM_EXPORT_COMMAND:
2204 case RC_CUSTOM_EXPORT_FORMAT:
2207 case RC_CYGWIN_PATH_FIX:
2210 case RC_DATE_INSERT_FORMAT:
2211 //xgettext:no-c-format
2212 str = _("This accepts the normal strftime formats; see man strftime for full details. E.g.\"%A, %e. %B %Y\".");
2215 case RC_DEFAULT_LANGUAGE:
2216 str = _("New documents will be assigned this language.");
2219 case RC_DEFAULT_PAPERSIZE:
2220 str = _("Specify the default paper size.");
2223 case RC_DIALOGS_ICONIFY_WITH_MAIN:
2224 str = _("Iconify the dialogs when the main window is iconified. (Affects only dialogs shown after the change has been made.)");
2227 case RC_DISPLAY_GRAPHICS:
2228 str = _("Select how LyX will display any graphics.");
2231 case RC_DOCUMENTPATH:
2232 str = _("The default path for your documents. An empty value selects the directory LyX was started from.");
2236 case RC_USE_ESC_CHARS:
2237 str = _("Specify additional chars that can be part of a word.");
2240 case RC_FONT_ENCODING:
2241 str = _("The font encoding used for the LaTeX2e fontenc package. T1 is highly recommended for non-English languages.");
2247 case RC_INDEX_COMMAND:
2248 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\".");
2255 case RC_KBMAP_PRIMARY:
2256 case RC_KBMAP_SECONDARY:
2257 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.");
2260 case RC_LABEL_INIT_LENGTH:
2261 str = _("Maximum number of words in the initialization string for a new label");
2264 case RC_LANGUAGE_AUTO_BEGIN:
2265 str = _("Select if a language switching command is needed at the beginning of the document.");
2268 case RC_LANGUAGE_AUTO_END:
2269 str = _("Select if a language switching command is needed at the end of the document.");
2272 case RC_LANGUAGE_COMMAND_BEGIN:
2273 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.");
2276 case RC_LANGUAGE_COMMAND_END:
2277 str = _("The LaTeX command for changing back to the language of the document.");
2280 case RC_LANGUAGE_COMMAND_LOCAL:
2281 str = _("The LaTeX command for local changing of the language.");
2284 case RC_LANGUAGE_GLOBAL_OPTIONS:
2285 str = _("De-select if you don't want the language(s) used as an argument to \\documentclass.");
2288 case RC_LANGUAGE_PACKAGE:
2289 str = _("The LaTeX command for loading the language package. E.g. \"\\usepackage{babel}\", \"\\usepackage{omega}\".");
2292 case RC_LANGUAGE_USE_BABEL:
2293 str = _("De-select if you don't want babel to be used when the language of the document is the default language.");
2296 case RC_USELASTFILEPOS:
2297 str = _("De-select if you do not want LyX to scroll to saved position.");
2300 case RC_LOADSESSION:
2301 str = _("De-select to prevent loading files opened from the last lyx session.");
2304 case RC_MAKE_BACKUP:
2305 str = _("De-select if you don't want LyX to create backup files.");
2308 case RC_MARK_FOREIGN_LANGUAGE:
2309 str = _("Select to control the highlighting of words with a language foreign to that of the document.");
2312 case RC_NUMLASTFILES:
2313 str = bformat(_("Maximal number of lastfiles. Up to %1$d can appear in the file menu."), maxlastfiles);
2316 case RC_PATH_PREFIX:
2317 str = _("Specify those directories which should be "
2318 "prepended to the PATH environment variable. "
2319 "Use the OS native format.");
2323 case RC_USE_PERS_DICT:
2324 str = _("Specify an alternate personal dictionary file. E.g. \".ispell_english\".");
2327 case RC_POPUP_BOLD_FONT:
2328 str = _("The bold font in the dialogs.");
2331 case RC_POPUP_FONT_ENCODING:
2332 str = _("The encoding for the menu/popups fonts.");
2335 case RC_POPUP_NORMAL_FONT:
2336 str = _("The normal font in the dialogs.");
2340 str = _("Shows a typeset preview of things such as math");
2343 case RC_PREVIEW_HASHED_LABELS:
2344 str = _("Previewed equations will have \"(#)\" labels rather than numbered ones");
2347 case RC_PREVIEW_SCALE_FACTOR:
2348 str = _("Scale the preview size to suit.");
2351 case RC_PRINTCOLLCOPIESFLAG:
2352 str = _("The option for specifying whether the copies should be collated.");
2355 case RC_PRINTCOPIESFLAG:
2356 str = _("The option for specifying the number of copies to print.");
2360 str = _("The default printer to print on. If none is specified, LyX will use the environment variable PRINTER.");
2363 case RC_PRINTEVENPAGEFLAG:
2364 str = _("The option to print only even pages.");
2367 case RC_PRINTEXSTRAOPTIONS:
2368 str = _("Extra options to pass to printing program after everything else, but before the filename of the DVI file to be printed.");
2371 case RC_PRINTFILEEXTENSION:
2372 str = _("Extension of printer program output file. Usually \".ps\".");
2375 case RC_PRINTLANDSCAPEFLAG:
2376 str = _("The option to print out in landscape.");
2379 case RC_PRINTODDPAGEFLAG:
2380 str = _("The option to print only odd pages.");
2383 case RC_PRINTPAGERANGEFLAG:
2384 str = _("The option for specifying a comma-separated list of pages to print.");
2387 case RC_PRINTPAPERDIMENSIONFLAG:
2388 str = _("Option to specify the dimensions of the print paper.");
2391 case RC_PRINTPAPERFLAG:
2392 str = _("The option to specify paper type.");
2395 case RC_PRINTREVERSEFLAG:
2396 str = _("The option to reverse the order of the pages printed.");
2399 case RC_PRINTSPOOL_COMMAND:
2400 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.");
2403 case RC_PRINTSPOOL_PRINTERPREFIX:
2404 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.");
2407 case RC_PRINTTOFILE:
2408 str = _("Option to pass to the print program to print to a file.");
2411 case RC_PRINTTOPRINTER:
2412 str = _("Option to pass to the print program to print on a specific printer.");
2415 case RC_PRINT_ADAPTOUTPUT:
2416 str = _("Select for LyX to pass the name of the destination printer to your print command.");
2419 case RC_PRINT_COMMAND:
2420 str = _("Your favorite print program, e.g. \"dvips\", \"dvilj4\".");
2423 case RC_RTL_SUPPORT:
2424 str = _("Select to enable support of right-to-left languages (e.g. Hebrew, Arabic).");
2428 str = _("DPI (dots per inch) of your monitor is auto-detected by LyX. If that goes wrong, override the setting here.");
2431 case RC_SCREEN_FONT_ENCODING:
2432 str = _("The encoding for the screen fonts.");
2435 case RC_SCREEN_FONT_ROMAN:
2436 case RC_SCREEN_FONT_SANS:
2437 case RC_SCREEN_FONT_TYPEWRITER:
2438 str = _("The screen fonts used to display the text while editing.");
2441 case RC_SCREEN_FONT_ROMAN_FOUNDRY:
2442 case RC_SCREEN_FONT_SANS_FOUNDRY:
2443 case RC_SCREEN_FONT_TYPEWRITER_FOUNDRY:
2446 case RC_SCREEN_FONT_SCALABLE:
2447 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.");
2450 case RC_SCREEN_FONT_SIZES:
2451 str = _("The font sizes used for calculating the scaling of the screen fonts.");
2454 case RC_SCREEN_ZOOM:
2455 //xgettext:no-c-format
2456 str = _("The zoom percentage for screen fonts. A setting of 100% will make the fonts roughly the same size as on paper.");
2459 case RC_SCREEN_GEOMETRY_HEIGHT:
2460 case RC_SCREEN_GEOMETRY_WIDTH:
2461 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).");
2464 case RC_SCREEN_GEOMETRY_XYSAVED:
2465 str = _("Allow session manager to save and restore windows position.");
2469 str = _("This starts the lyxserver. The pipes get an additional extension \".in\" and \".out\". Only for advanced users.");
2475 case RC_SHOW_BANNER:
2476 str = _("De-select if you don't want the startup banner.");
2479 case RC_SPELL_COMMAND:
2480 str = _("What command runs the spellchecker?");
2483 case RC_TEMPDIRPATH:
2484 str = _("LyX will place its temporary directories in this path. They will be deleted when you quit LyX.");
2487 case RC_TEMPLATEPATH:
2488 str = _("The path that LyX will set when offering to choose a template. An empty value selects the directory LyX was started from.");
2491 case RC_TEX_ALLOWS_SPACES:
2495 str = _("The UI (user interface) file. Can either specify an absolute path, or LyX will look in its global and local ui/ directories.");
2507 case RC_USE_INP_ENC:
2508 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.");
2511 case RC_USE_SPELL_LIB:
2514 case RC_VIEWDVI_PAPEROPTION:
2515 str = _("Specify the paper command to DVI viewer (leave empty or use \"-paper\")");
2522 str = _("The number of lines that are scrolled by mice with wheels or five button mice.");
2532 // The global instance
2535 // The global copy of the system lyxrc entries (everything except preferences)