3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
6 * \author Lars Gullik Bjønnes
7 * \author Jean-Marc Lasgouttes
8 * \author Angus Leeming
10 * \author André Pönitz
14 * Full author contact details are available in file CREDITS.
25 #include "converter.h"
34 #include "graphics/GraphicsTypes.h"
36 #include "support/convert.h"
37 #include "support/environment.h"
38 #include "support/filetools.h"
39 #include "support/lstrings.h"
40 #include "support/os.h"
41 #include "support/userinfo.h"
46 namespace os = support::os;
48 using support::ascii_lowercase;
49 using support::bformat;
50 using support::expandPath;
51 using support::FileName;
52 using support::getEnv;
53 using support::libFileSearch;
67 // when adding something to this array keep it sorted!
68 keyword_item lyxrcTags[] = {
69 { "\\accept_compound", LyXRC::RC_ACCEPT_COMPOUND },
70 { "\\alternate_language", LyXRC::RC_ALT_LANG },
71 { "\\auto_number", LyXRC::RC_AUTO_NUMBER },
72 { "\\auto_region_delete", LyXRC::RC_AUTOREGIONDELETE },
73 { "\\auto_reset_options", LyXRC::RC_AUTORESET_OPTIONS },
74 { "\\autosave", LyXRC::RC_AUTOSAVE },
75 { "\\backupdir_path", LyXRC::RC_BACKUPDIR_PATH },
76 { "\\bibtex_command", LyXRC::RC_BIBTEX_COMMAND },
77 { "\\bind_file", LyXRC::RC_BINDFILE },
78 { "\\check_lastfiles", LyXRC::RC_CHECKLASTFILES },
79 { "\\chktex_command", LyXRC::RC_CHKTEX_COMMAND },
80 { "\\converter", LyXRC::RC_CONVERTER },
81 { "\\converter_cache_maxage", LyXRC::RC_CONVERTER_CACHE_MAXAGE },
82 { "\\copier", LyXRC::RC_COPIER },
83 { "\\cursor_follows_scrollbar", LyXRC::RC_CURSOR_FOLLOWS_SCROLLBAR },
84 { "\\custom_export_command", LyXRC::RC_CUSTOM_EXPORT_COMMAND },
85 { "\\custom_export_format", LyXRC::RC_CUSTOM_EXPORT_FORMAT },
86 { "\\date_insert_format", LyXRC::RC_DATE_INSERT_FORMAT },
87 { "\\default_language", LyXRC::RC_DEFAULT_LANGUAGE },
88 { "\\default_papersize", LyXRC::RC_DEFAULT_PAPERSIZE },
89 { "\\dialogs_iconify_with_main", LyXRC::RC_DIALOGS_ICONIFY_WITH_MAIN },
90 { "\\display_graphics", LyXRC::RC_DISPLAY_GRAPHICS },
91 { "\\document_path", LyXRC::RC_DOCUMENTPATH },
92 { "\\escape_chars", LyXRC::RC_ESC_CHARS },
93 { "\\font_encoding", LyXRC::RC_FONT_ENCODING },
94 { "\\format", LyXRC::RC_FORMAT },
95 { "\\index_command", LyXRC::RC_INDEX_COMMAND },
96 { "\\input", LyXRC::RC_INPUT },
97 { "\\kbmap", LyXRC::RC_KBMAP },
98 { "\\kbmap_primary", LyXRC::RC_KBMAP_PRIMARY },
99 { "\\kbmap_secondary", LyXRC::RC_KBMAP_SECONDARY },
100 { "\\label_init_length", LyXRC::RC_LABEL_INIT_LENGTH },
101 { "\\language_auto_begin", LyXRC::RC_LANGUAGE_AUTO_BEGIN },
102 { "\\language_auto_end", LyXRC::RC_LANGUAGE_AUTO_END },
103 { "\\language_command_begin", LyXRC::RC_LANGUAGE_COMMAND_BEGIN },
104 { "\\language_command_end", LyXRC::RC_LANGUAGE_COMMAND_END },
105 { "\\language_command_local", LyXRC::RC_LANGUAGE_COMMAND_LOCAL },
106 { "\\language_global_options", LyXRC::RC_LANGUAGE_GLOBAL_OPTIONS },
107 { "\\language_package", LyXRC::RC_LANGUAGE_PACKAGE },
108 { "\\language_use_babel", LyXRC::RC_LANGUAGE_USE_BABEL },
109 { "\\load_session", LyXRC::RC_LOADSESSION },
110 { "\\make_backup", LyXRC::RC_MAKE_BACKUP },
111 { "\\mark_foreign_language", LyXRC::RC_MARK_FOREIGN_LANGUAGE },
112 { "\\num_lastfiles", LyXRC::RC_NUMLASTFILES },
113 { "\\path_prefix", LyXRC::RC_PATH_PREFIX },
114 { "\\personal_dictionary", LyXRC::RC_PERS_DICT },
115 { "\\plaintext_linelen", LyXRC::RC_PLAINTEXT_LINELEN },
116 { "\\plaintext_roff_command", LyXRC::RC_PLAINTEXT_ROFF_COMMAND },
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 { "\\screen_font_roman", LyXRC::RC_SCREEN_FONT_ROMAN },
142 { "\\screen_font_roman_foundry", LyXRC::RC_SCREEN_FONT_ROMAN_FOUNDRY },
143 { "\\screen_font_sans", LyXRC::RC_SCREEN_FONT_SANS },
144 { "\\screen_font_sans_foundry", LyXRC::RC_SCREEN_FONT_SANS_FOUNDRY },
145 { "\\screen_font_scalable", LyXRC::RC_SCREEN_FONT_SCALABLE },
146 { "\\screen_font_sizes", LyXRC::RC_SCREEN_FONT_SIZES },
147 { "\\screen_font_typewriter", LyXRC::RC_SCREEN_FONT_TYPEWRITER },
148 { "\\screen_font_typewriter_foundry", LyXRC::RC_SCREEN_FONT_TYPEWRITER_FOUNDRY },
149 { "\\screen_geometry_height", LyXRC::RC_SCREEN_GEOMETRY_HEIGHT },
150 { "\\screen_geometry_width", LyXRC::RC_SCREEN_GEOMETRY_WIDTH },
151 { "\\screen_geometry_xysaved", LyXRC::RC_SCREEN_GEOMETRY_XYSAVED },
152 { "\\screen_zoom", LyXRC::RC_SCREEN_ZOOM },
153 { "\\serverpipe", LyXRC::RC_SERVERPIPE },
154 { "\\set_color", LyXRC::RC_SET_COLOR },
155 { "\\show_banner", LyXRC::RC_SHOW_BANNER },
156 { "\\spell_command", LyXRC::RC_SPELL_COMMAND },
157 { "\\tempdir_path", LyXRC::RC_TEMPDIRPATH },
158 { "\\template_path", LyXRC::RC_TEMPLATEPATH },
159 { "\\tex_allows_spaces", LyXRC::RC_TEX_ALLOWS_SPACES },
160 { "\\tex_expects_windows_paths", LyXRC::RC_TEX_EXPECTS_WINDOWS_PATHS },
161 { "\\ui_file", LyXRC::RC_UIFILE },
162 { "\\use_alt_language", LyXRC::RC_USE_ALT_LANG },
163 { "\\use_converter_cache", LyXRC::RC_USE_CONVERTER_CACHE },
164 { "\\use_escape_chars", LyXRC::RC_USE_ESC_CHARS },
165 { "\\use_input_encoding", LyXRC::RC_USE_INP_ENC },
166 { "\\use_lastfilepos", LyXRC::RC_USELASTFILEPOS },
167 { "\\use_personal_dictionary", LyXRC::RC_USE_PERS_DICT },
168 // compatibility with versions older than 1.4.0 only
169 { "\\use_pspell", LyXRC::RC_USE_SPELL_LIB },
170 { "\\use_spell_lib", LyXRC::RC_USE_SPELL_LIB },
171 // compatibility with versions older than 1.4.0 only
172 { "\\use_tempdir", LyXRC::RC_USETEMPDIR },
173 { "\\user_email", LyXRC::RC_USER_EMAIL },
174 { "\\user_name", LyXRC::RC_USER_NAME },
175 { "\\view_dvi_paper_option", LyXRC::RC_VIEWDVI_PAPEROPTION },
176 // compatibility with versions older than 1.4.0 only
177 { "\\viewer" ,LyXRC::RC_VIEWER}
180 const int lyxrcCount = sizeof(lyxrcTags) / sizeof(keyword_item);
191 void LyXRC::setDefaults() {
194 // Get printer from the environment. If fail, use default "",
195 // assuming that everything is set up correctly.
196 printer = getEnv("PRINTER");
197 print_adapt_output = false;
198 print_command = "dvips";
199 print_evenpage_flag = "-B";
200 print_oddpage_flag = "-A";
201 print_pagerange_flag = "-pp";
202 print_copies_flag = "-c";
203 print_collcopies_flag = "-C";
204 print_reverse_flag = "-r";
205 print_landscape_flag = "-t landscape";
206 print_to_printer = "-P";
207 print_to_file = "-o ";
208 print_file_extension = ".ps";
209 print_paper_flag = "-t";
210 print_paper_dimension_flag = "-T";
211 document_path.erase();
212 view_dvi_paper_option.erase();
213 default_papersize = PAPER_DEFAULT;
214 custom_export_format = "ps";
215 chktex_command = "chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38";
216 bibtex_command = "bibtex";
218 index_command = "makeindex -c -q";
220 // Because a screen typically is wider than a piece of paper:
224 geometry_xysaved = true;
225 // Default LaTeX font size:
226 font_sizes[LyXFont::SIZE_TINY] = "5.0";
227 font_sizes[LyXFont::SIZE_SCRIPT] = "7.0";
228 font_sizes[LyXFont::SIZE_FOOTNOTE] = "8.0";
229 font_sizes[LyXFont::SIZE_SMALL] = "9.0";
230 font_sizes[LyXFont::SIZE_NORMAL] = "10.0";
231 font_sizes[LyXFont::SIZE_LARGE] = "12.0";
232 font_sizes[LyXFont::SIZE_LARGER] = "14.4";
233 font_sizes[LyXFont::SIZE_LARGEST] = "17.26";
234 font_sizes[LyXFont::SIZE_HUGE] = "20.74";
235 font_sizes[LyXFont::SIZE_HUGER] = "24.88";
236 use_scalable_fonts = true;
237 roman_font_name = "";
239 typewriter_font_name = "";
240 font_norm = "iso8859-1";
241 font_norm_type = ISO_8859_1;
243 auto_region_delete = true;
244 auto_reset_options = false;
245 plaintext_linelen = 65;
246 num_lastfiles = maxlastfiles;
247 check_lastfiles = true;
248 use_lastfilepos = true;
249 load_session = false;
251 backupdir_path.erase();
252 display_graphics = graphics::ColorDisplay;
253 // Spellchecker settings:
254 use_spell_lib = true;
255 isp_command = "ispell";
256 isp_accept_compound = false;
257 isp_use_input_encoding = false;
258 isp_use_alt_lang = false;
259 isp_use_pers_dict = false;
260 isp_use_esc_chars = false;
264 mark_foreign_language = true;
265 language_auto_begin = true;
266 language_auto_end = true;
267 language_global_options = true;
268 language_use_babel = true;
269 language_package = "\\usepackage{babel}";
270 language_command_begin = "\\selectlanguage{$$lang}";
271 language_command_local = "\\foreignlanguage{$$lang}{";
272 default_language = "english";
274 windows_style_tex_paths = false;
275 tex_allows_spaces = false;
276 date_insert_format = "%x";
277 cursor_follows_scrollbar = false;
278 dialogs_iconify_with_main = false;
279 label_init_length = 3;
280 preview = PREVIEW_OFF;
281 preview_hashed_labels = false;
282 preview_scale_factor = "0.9";
283 use_converter_cache = false;
284 converter_cache_maxage = 6 * 30 * 24 * 3600; // 6 months
286 user_name = to_utf8(support::user_name());
288 user_email = to_utf8(support::user_email());
294 void oldFontFormat(string & family, string & foundry)
296 if (family.empty() || family[0] != '-')
298 foundry = token(family, '-', 1);
299 family = token(family, '-', 2);
307 int LyXRC::read(FileName const & filename)
309 LyXLex lexrc(lyxrcTags, lyxrcCount);
310 if (lyxerr.debugging(Debug::PARSER))
311 lexrc.printTable(lyxerr);
313 lexrc.setFile(filename);
314 if (!lexrc.isOK()) return -2;
316 lyxerr[Debug::LYXRC] << "Reading '" << filename << "'..." << endl;
322 int LyXRC::read(std::istream & is)
324 LyXLex lexrc(lyxrcTags, lyxrcCount);
325 if (lyxerr.debugging(Debug::PARSER))
326 lexrc.printTable(lyxerr);
329 if (!lexrc.isOK()) return -2;
331 lyxerr[Debug::LYXRC] << "Reading istream..." << endl;
337 int LyXRC::read(LyXLex & lexrc)
339 if (!lexrc.isOK()) return -2;
341 while (lexrc.isOK()) {
342 // By using two switches we take advantage of the compiler
343 // telling us if we have missed a LyXRCTags element in
344 // the second switch.
345 // Note that this also shows a problem with LyXLex since it
346 // helps us avoid taking advantage of the strictness of the
349 int le = lexrc.lex();
351 case LyXLex::LEX_UNDEF:
352 lexrc.printError("Unknown tag `$$Token'");
354 case LyXLex::LEX_FEOF:
358 switch (static_cast<LyXRCTags>(le)) {
359 case RC_INPUT: // Include file
362 libFileSearch(string(),
365 lexrc.printError("Error reading "
366 "included file: " + tmp.absFilename());
372 bind_file = os::internal_path(lexrc.getString());
378 ui_file = os::internal_path(lexrc.getString());
382 case RC_AUTORESET_OPTIONS:
384 auto_reset_options = lexrc.getBool();
388 case RC_DISPLAY_GRAPHICS:
390 display_graphics = graphics::displayTranslator().find(lexrc.getString());
394 case RC_TEX_EXPECTS_WINDOWS_PATHS:
396 windows_style_tex_paths = lexrc.getBool();
400 case RC_TEX_ALLOWS_SPACES:
402 tex_allows_spaces = lexrc.getBool();
408 use_kbmap = lexrc.getBool();
412 case RC_KBMAP_PRIMARY:
414 string const kmap(os::internal_path(lexrc.getString()));
417 } else if (!libFileSearch("kbd", kmap,
419 primary_kbmap = kmap;
421 lexrc.printError("LyX: Keymap `$$Token' not found");
426 case RC_KBMAP_SECONDARY:
428 string const kmap(os::internal_path(lexrc.getString()));
431 } else if (!libFileSearch("kbd", kmap,
433 secondary_kbmap = kmap;
435 lexrc.printError("LyX: Keymap `$$Token' not found");
440 case RC_FONT_ENCODING:
442 fontenc = lexrc.getString();
448 printer = lexrc.getString();
452 case RC_PRINT_COMMAND:
454 print_command = lexrc.getString();
458 case RC_PRINTEVENPAGEFLAG:
460 print_evenpage_flag = lexrc.getString();
464 case RC_PRINTODDPAGEFLAG:
466 print_oddpage_flag = lexrc.getString();
470 case RC_PRINTPAGERANGEFLAG:
472 print_pagerange_flag = lexrc.getString();
476 case RC_PRINTCOPIESFLAG:
478 print_copies_flag = lexrc.getString();
482 case RC_PRINTCOLLCOPIESFLAG:
484 print_collcopies_flag = lexrc.getString();
488 case RC_PRINTREVERSEFLAG:
490 print_reverse_flag = lexrc.getString();
494 case RC_PRINTLANDSCAPEFLAG:
496 print_landscape_flag = lexrc.getString();
500 case RC_PRINTTOPRINTER:
502 print_to_printer = lexrc.getString();
506 case RC_PRINT_ADAPTOUTPUT:
508 print_adapt_output = lexrc.getBool();
514 print_to_file = os::internal_path(lexrc.getString());
518 case RC_PRINTFILEEXTENSION:
520 print_file_extension = lexrc.getString();
524 case RC_PRINTEXSTRAOPTIONS:
526 print_extra_options = lexrc.getString();
530 case RC_PRINTSPOOL_COMMAND:
532 print_spool_command = lexrc.getString();
536 case RC_PRINTSPOOL_PRINTERPREFIX:
538 print_spool_printerprefix = lexrc.getString();
542 case RC_PRINTPAPERDIMENSIONFLAG:
544 print_paper_dimension_flag = lexrc.getString();
548 case RC_PRINTPAPERFLAG:
550 print_paper_flag = lexrc.getString();
554 case RC_CUSTOM_EXPORT_COMMAND:
556 custom_export_command = lexrc.getString();
560 case RC_CUSTOM_EXPORT_FORMAT:
562 custom_export_format = lexrc.getString();
566 case RC_DEFAULT_PAPERSIZE:
569 ascii_lowercase(lexrc.getString());
570 if (size == "usletter")
573 else if (size == "legal")
576 else if (size == "executive")
579 else if (size == "a3")
582 else if (size == "a4")
585 else if (size == "a5")
588 else if (size == "b5")
591 else if (size == "default")
597 case RC_VIEWDVI_PAPEROPTION:
599 view_dvi_paper_option = lexrc.getString();
601 view_dvi_paper_option.erase();
605 case RC_CHKTEX_COMMAND:
607 chktex_command = lexrc.getString();
611 case RC_BIBTEX_COMMAND:
613 bibtex_command = lexrc.getString();
617 case RC_INDEX_COMMAND:
619 index_command = lexrc.getString();
625 dpi = lexrc.getInteger();
631 zoom = lexrc.getInteger();
635 case RC_SCREEN_GEOMETRY_HEIGHT:
637 geometry_height = lexrc.getInteger();
641 case RC_SCREEN_GEOMETRY_WIDTH:
643 geometry_width = lexrc.getInteger();
647 case RC_SCREEN_GEOMETRY_XYSAVED:
649 geometry_xysaved = lexrc.getBool();
653 case RC_SCREEN_FONT_SIZES:
655 font_sizes[LyXFont::SIZE_TINY] =
659 font_sizes[LyXFont::SIZE_SCRIPT] =
663 font_sizes[LyXFont::SIZE_FOOTNOTE] =
667 font_sizes[LyXFont::SIZE_SMALL] =
671 font_sizes[LyXFont::SIZE_NORMAL] =
675 font_sizes[LyXFont::SIZE_LARGE] =
679 font_sizes[LyXFont::SIZE_LARGER] =
683 font_sizes[LyXFont::SIZE_LARGEST] =
687 font_sizes[LyXFont::SIZE_HUGE] =
691 font_sizes[LyXFont::SIZE_HUGER] =
696 case RC_SCREEN_FONT_SCALABLE:
698 use_scalable_fonts = lexrc.getBool();
704 autosave = lexrc.getInteger();
708 case RC_DOCUMENTPATH:
710 document_path = os::internal_path(lexrc.getString());
711 document_path = expandPath(document_path);
715 case RC_TEMPLATEPATH:
717 template_path = os::internal_path(lexrc.getString());
718 template_path = expandPath(template_path);
724 tempdir_path = os::internal_path(lexrc.getString());
725 tempdir_path = expandPath(tempdir_path);
731 lyxerr << "Ignoring obsolete use_tempdir flag." << endl;
735 case RC_USELASTFILEPOS:
737 use_lastfilepos = lexrc.getBool();
743 load_session = lexrc.getBool();
747 case RC_NUMLASTFILES:
749 num_lastfiles = lexrc.getInteger();
753 case RC_CHECKLASTFILES:
755 check_lastfiles = lexrc.getBool();
759 case RC_SCREEN_FONT_ROMAN:
761 roman_font_name = lexrc.getString();
762 oldFontFormat(roman_font_name,
767 case RC_SCREEN_FONT_SANS:
769 sans_font_name = lexrc.getString();
770 oldFontFormat(sans_font_name, sans_font_foundry);
774 case RC_SCREEN_FONT_TYPEWRITER:
776 typewriter_font_name = lexrc.getString();
777 oldFontFormat(typewriter_font_name,
778 typewriter_font_foundry);
782 case RC_SCREEN_FONT_ROMAN_FOUNDRY:
784 roman_font_foundry = lexrc.getString();
788 case RC_SCREEN_FONT_SANS_FOUNDRY:
790 sans_font_foundry = lexrc.getString();
794 case RC_SCREEN_FONT_TYPEWRITER_FOUNDRY:
796 typewriter_font_foundry = lexrc.getString();
800 case RC_SCREEN_FONT_ENCODING:
802 font_norm = lexrc.getString();
803 set_font_norm_type();
809 string lyx_name, x11_name;
812 lyx_name = lexrc.getString();
814 lexrc.printError("Missing color tag.");
819 x11_name = lexrc.getString();
821 lexrc.printError("Missing color name for color: `$$Token'");
825 LColor::color const col =
826 lcolor.getFromLyXName(lyx_name);
827 if (col == LColor::none ||
828 col == LColor::inherit ||
829 col == LColor::ignore)
832 if (!lcolor.setColor(col, x11_name)) {
833 lyxerr << "Bad lyxrc set_color for "
839 case RC_AUTOREGIONDELETE:
840 // Auto region delete defaults to true
842 auto_region_delete = lexrc.getBool();
848 lyxpipes = os::internal_path(lexrc.getString());
849 lyxpipes = expandPath(lyxpipes);
853 case RC_CURSOR_FOLLOWS_SCROLLBAR:
855 cursor_follows_scrollbar = lexrc.getBool();
859 case RC_DIALOGS_ICONIFY_WITH_MAIN:
861 dialogs_iconify_with_main = lexrc.getBool();
865 case RC_PLAINTEXT_ROFF_COMMAND:
867 plaintext_roff_command = lexrc.getString();
870 case RC_PLAINTEXT_LINELEN:
872 plaintext_linelen = lexrc.getInteger();
875 // Spellchecker settings:
876 case RC_USE_SPELL_LIB:
878 use_spell_lib = lexrc.getBool();
881 case RC_SPELL_COMMAND:
883 isp_command = lexrc.getString();
886 case RC_ACCEPT_COMPOUND:
888 isp_accept_compound = lexrc.getBool();
893 isp_use_input_encoding = lexrc.getBool();
896 case RC_USE_ALT_LANG:
898 isp_use_alt_lang = lexrc.getBool();
901 case RC_USE_PERS_DICT:
903 isp_use_pers_dict = lexrc.getBool();
906 case RC_USE_ESC_CHARS:
908 isp_use_esc_chars = lexrc.getBool();
913 isp_alt_lang = lexrc.getString();
918 isp_pers_dict = os::internal_path(lexrc.getString());
923 isp_esc_chars = lexrc.getString();
928 make_backup = lexrc.getBool();
931 case RC_BACKUPDIR_PATH:
933 backupdir_path = os::internal_path(lexrc.getString());
934 backupdir_path = expandPath(backupdir_path);
937 case RC_DATE_INSERT_FORMAT:
939 date_insert_format = lexrc.getString();
942 case RC_LANGUAGE_PACKAGE:
944 language_package = lexrc.getString();
947 case RC_LANGUAGE_AUTO_BEGIN:
949 language_auto_begin = lexrc.getBool();
952 case RC_LANGUAGE_AUTO_END:
954 language_auto_end = lexrc.getBool();
957 case RC_LANGUAGE_GLOBAL_OPTIONS:
959 language_global_options = lexrc.getBool();
962 case RC_LANGUAGE_USE_BABEL:
964 language_use_babel = lexrc.getBool();
967 case RC_LANGUAGE_COMMAND_BEGIN:
969 language_command_begin = lexrc.getString();
972 case RC_LANGUAGE_COMMAND_END:
974 language_command_end = lexrc.getString();
977 case RC_LANGUAGE_COMMAND_LOCAL:
979 language_command_local = lexrc.getString();
984 rtl_support = lexrc.getBool();
989 auto_number = lexrc.getBool();
992 case RC_MARK_FOREIGN_LANGUAGE:
994 mark_foreign_language = lexrc.getBool();
1001 fmt = lexrc.getString();
1004 command = lexrc.getString();
1006 setMover(fmt, command);
1010 case RC_CONVERTER: {
1011 string from, to, command, flags;
1013 from = lexrc.getString();
1016 to = lexrc.getString();
1019 command = lexrc.getString();
1022 flags = lexrc.getString();
1024 if (command.empty()) {
1025 theConverters().erase(from, to);
1027 theConverters().add(from, to, command, flags);
1031 // compatibility with versions older than 1.4.0 only
1033 string format, command;
1035 format = lexrc.getString();
1038 command = lexrc.getString();
1040 formats.setViewer(format, command);
1044 string format, extension, prettyname, shortcut;
1046 format = lexrc.getString();
1049 extension = lexrc.getString();
1052 prettyname = lexrc.getString();
1055 shortcut = lexrc.getString();
1057 string viewer, editor;
1059 viewer = lexrc.getString();
1061 editor = lexrc.getString();
1063 // Hack to ensure compatibility with versions older
1065 int le = lexrc.lex();
1066 if (le != LyXLex::LEX_FEOF && le != LyXLex::LEX_UNDEF) {
1067 flags = lexrc.getString();
1068 if (le != LyXLex::LEX_DATA) {
1069 // We have got a known token.
1070 // Therefore this is an old style
1071 // format definition without
1073 lexrc.pushToken(flags);
1077 int flgs = Format::none;
1078 while (!flags.empty()) {
1080 flags = support::split(flags, flag, ',');
1081 if (flag == "document")
1082 flgs |= Format::document;
1083 else if (flag == "vector")
1084 flgs |= Format::vector;
1086 lyxerr << "Ignoring unknown flag `"
1087 << flag << "' for format `"
1088 << format << "'." << endl;
1090 if (prettyname.empty()) {
1091 if (theConverters().formatIsUsed(format)) {
1092 lyxerr << "Can't delete format "
1095 formats.erase(format);
1098 formats.add(format, extension, prettyname,
1099 shortcut, viewer, editor, flgs);
1103 case RC_DEFAULT_LANGUAGE:
1105 default_language = lexrc.getString();
1109 case RC_LABEL_INIT_LENGTH:
1111 label_init_length = lexrc.getInteger();
1115 case RC_SHOW_BANNER:
1117 show_banner = lexrc.getBool();
1123 string const tmp = lexrc.getString();
1124 if (tmp == "true" || tmp == "on")
1125 preview = PREVIEW_ON;
1126 else if (tmp == "no_math")
1127 preview = PREVIEW_NO_MATH;
1129 preview = PREVIEW_OFF;
1130 if (tmp != "false" && tmp != "off")
1131 lyxerr << "Unrecognized "
1133 << tmp << '\n' << endl;
1138 case RC_PREVIEW_HASHED_LABELS:
1140 preview_hashed_labels = lexrc.getBool();
1144 case RC_PREVIEW_SCALE_FACTOR:
1146 preview_scale_factor = lexrc.getString();
1152 user_name = lexrc.getString();
1157 user_email = lexrc.getString();
1160 case RC_PATH_PREFIX:
1162 path_prefix = lexrc.getString();
1165 case RC_USE_CONVERTER_CACHE:
1167 use_converter_cache = lexrc.getBool();
1170 case RC_CONVERTER_CACHE_MAXAGE:
1172 converter_cache_maxage =
1173 convert<unsigned int>(lexrc.getString());
1176 case RC_LAST: break; // this is just a dummy
1180 /// Update converters data-structures
1181 theConverters().update(formats);
1182 theConverters().buildGraph();
1188 void LyXRC::write(FileName const & filename, bool ignore_system_lyxrc) const
1190 ofstream ofs(filename.toFilesystemEncoding().c_str());
1192 write(ofs, ignore_system_lyxrc);
1196 void LyXRC::print() const
1198 if (lyxerr.debugging())
1199 write(lyxerr, false);
1207 typedef std::pair<std::string, SpecialisedMover> Data;
1209 SameMover(Data const & comparison)
1210 : comparison_(comparison) {}
1212 bool operator()(Data const & data) const
1214 return data.first == comparison_.first &&
1215 data.second.command() == comparison_.second.command();
1223 void LyXRC::write(ostream & os, bool ignore_system_lyxrc) const
1225 os << "### This file is part of\n"
1226 << "### ========================================================\n"
1227 << "### LyX, The Document Processor\n"
1229 << "### Copyright 1995 Matthias Ettrich\n"
1230 << "### Copyright 1995-2001 The LyX Team.\n"
1232 << "### ========================================================\n"
1234 << "# This file is written by LyX, if you want to make your own\n"
1235 << "# modifications you should do them from inside LyX and save\n"
1238 // Why the switch you might ask. It is a trick to ensure that all
1239 // the elements in the LyXRCTags enum is handled. As you can see
1240 // there are no breaks at all. So it is just a huge fall-through.
1241 // The nice thing is that we will get a warning from the compiler
1242 // if we forget an element.
1243 LyXRCTags tag = RC_LAST;
1247 // input/include files are not done here
1249 if (ignore_system_lyxrc ||
1250 bind_file != system_lyxrc.bind_file) {
1251 string const path = os::external_path(bind_file);
1252 os << "\\bind_file \"" << path << "\"\n";
1258 << "# MISC SECTION ######################################\n"
1261 // bind files are not done here.
1263 case RC_PATH_PREFIX:
1264 if (ignore_system_lyxrc ||
1265 path_prefix != system_lyxrc.path_prefix) {
1266 os << "\\path_prefix \"" << path_prefix << "\"\n";
1270 if (ignore_system_lyxrc ||
1271 ui_file != system_lyxrc.ui_file) {
1272 string const path = os::external_path(ui_file);
1273 os << "\\ui_file \"" << path << "\"\n";
1275 case RC_AUTOREGIONDELETE:
1276 if (ignore_system_lyxrc ||
1277 auto_region_delete != system_lyxrc.auto_region_delete) {
1278 os << "# Set to false to inhibit automatic replacement of\n"
1279 << "# the current selection.\n"
1280 << "\\auto_region_delete " << convert<string>(auto_region_delete)
1283 case RC_AUTORESET_OPTIONS:
1284 if (ignore_system_lyxrc ||
1285 auto_reset_options != system_lyxrc.auto_reset_options) {
1286 os << "# Set to false to inhibit automatic reset of\n"
1287 << "# the class options to defaults on class change.\n"
1288 << "\\auto_reset_options "
1289 << convert<string>(auto_reset_options)
1293 if (ignore_system_lyxrc ||
1294 autosave != system_lyxrc.autosave) {
1295 os << "# The time interval between auto-saves in seconds.\n"
1296 << "\\autosave " << autosave << '\n';
1298 case RC_DISPLAY_GRAPHICS:
1299 if (ignore_system_lyxrc ||
1300 display_graphics != system_lyxrc.display_graphics) {
1301 os << "# Display graphics within LyX\n"
1302 << "# monochrome|grayscale|color|none\n"
1303 << "\\display_graphics "
1304 << graphics::displayTranslator().find(display_graphics)
1308 case RC_VIEWDVI_PAPEROPTION:
1309 if (ignore_system_lyxrc ||
1310 view_dvi_paper_option
1311 != system_lyxrc.view_dvi_paper_option) {
1312 os << "# Options used to specify paper size to the\n"
1313 << "# view_dvi_command (e.g. -paper)\n"
1314 << "\\view_dvi_paper_option \""
1315 << view_dvi_paper_option << "\"\n";
1317 case RC_DEFAULT_PAPERSIZE:
1318 if (ignore_system_lyxrc ||
1319 default_papersize != system_lyxrc.default_papersize) {
1320 os << "# The default papersize to use.\n"
1321 << "\\default_papersize \"";
1322 switch (default_papersize) {
1324 os << "default"; break;
1325 case PAPER_USLETTER:
1326 os << "usletter"; break;
1328 os << "legal"; break;
1329 case PAPER_USEXECUTIVE:
1330 os << "executive"; break;
1341 case PAPER_B4: break;
1345 case RC_CHKTEX_COMMAND:
1346 if (ignore_system_lyxrc ||
1347 chktex_command != system_lyxrc.chktex_command) {
1348 os << "\\chktex_command \"" << chktex_command << "\"\n";
1350 case RC_BIBTEX_COMMAND:
1351 if (ignore_system_lyxrc ||
1352 bibtex_command != system_lyxrc.bibtex_command) {
1353 os << "\\bibtex_command \"" << bibtex_command << "\"\n";
1355 case RC_INDEX_COMMAND:
1356 if (ignore_system_lyxrc ||
1357 index_command != system_lyxrc.index_command) {
1358 os << "\\index_command \"" << index_command << "\"\n";
1360 case RC_TEX_EXPECTS_WINDOWS_PATHS:
1361 if (ignore_system_lyxrc ||
1362 windows_style_tex_paths != system_lyxrc.windows_style_tex_paths) {
1363 os << "\\tex_expects_windows_paths "
1364 << convert<string>(windows_style_tex_paths) << '\n';
1366 case RC_TEX_ALLOWS_SPACES:
1367 if (tex_allows_spaces != system_lyxrc.tex_allows_spaces) {
1368 os << "\\tex_allows_spaces "
1369 << convert<string>(tex_allows_spaces) << '\n';
1372 if (ignore_system_lyxrc ||
1373 use_kbmap != system_lyxrc.use_kbmap) {
1374 os << "\\kbmap " << convert<string>(use_kbmap) << '\n';
1376 case RC_KBMAP_PRIMARY:
1377 if (ignore_system_lyxrc ||
1378 primary_kbmap != system_lyxrc.primary_kbmap) {
1379 string const path = os::external_path(primary_kbmap);
1380 os << "\\kbmap_primary \"" << path << "\"\n";
1382 case RC_KBMAP_SECONDARY:
1383 if (ignore_system_lyxrc ||
1384 secondary_kbmap != system_lyxrc.secondary_kbmap) {
1385 string const path = os::external_path(secondary_kbmap);
1386 os << "\\kbmap_secondary \"" << path << "\"\n";
1389 if (ignore_system_lyxrc ||
1390 lyxpipes != system_lyxrc.lyxpipes) {
1391 string const path = os::external_path(lyxpipes);
1392 os << "\\serverpipe \"" << path << "\"\n";
1394 case RC_DATE_INSERT_FORMAT:
1395 if (ignore_system_lyxrc ||
1396 date_insert_format != system_lyxrc.date_insert_format) {
1397 os << "\\date_insert_format \"" << date_insert_format
1400 case RC_LABEL_INIT_LENGTH:
1401 if (ignore_system_lyxrc ||
1402 label_init_length != system_lyxrc.label_init_length) {
1403 os << "\\label_init_length " << label_init_length
1408 os << "\\user_name \"" << user_name << "\"\n";
1411 os << "\\user_email \"" << user_email << "\"\n";
1413 case RC_SHOW_BANNER:
1414 if (ignore_system_lyxrc ||
1415 show_banner != system_lyxrc.show_banner) {
1416 os << "\\show_banner " << convert<string>(show_banner) << '\n';
1420 if (ignore_system_lyxrc ||
1421 preview != system_lyxrc.preview) {
1427 case PREVIEW_NO_MATH:
1434 os << "\\preview " << status << '\n';
1437 case RC_PREVIEW_HASHED_LABELS:
1438 if (ignore_system_lyxrc ||
1439 preview_hashed_labels !=
1440 system_lyxrc.preview_hashed_labels) {
1441 os << "\\preview_hashed_labels "
1442 << convert<string>(preview_hashed_labels) << '\n';
1445 case RC_PREVIEW_SCALE_FACTOR:
1446 if (ignore_system_lyxrc ||
1447 preview_scale_factor != system_lyxrc.preview_scale_factor) {
1448 os << "\\preview_scale_factor "
1449 << preview_scale_factor << '\n';
1452 case RC_USE_CONVERTER_CACHE:
1453 if (ignore_system_lyxrc ||
1454 use_converter_cache != system_lyxrc.use_converter_cache) {
1455 os << "\\use_converter_cache "
1456 << convert<string>(use_converter_cache) << '\n';
1459 case RC_CONVERTER_CACHE_MAXAGE:
1460 if (ignore_system_lyxrc ||
1461 converter_cache_maxage != system_lyxrc.converter_cache_maxage) {
1462 os << "\\converter_cache_maxage "
1463 << converter_cache_maxage << '\n';
1467 << "# SCREEN & FONTS SECTION ############################\n"
1471 if (ignore_system_lyxrc ||
1472 dpi != system_lyxrc.dpi) {
1473 os << "\\screen_dpi " << dpi << '\n';
1475 case RC_SCREEN_ZOOM:
1476 if (ignore_system_lyxrc ||
1477 zoom != system_lyxrc.zoom) {
1478 os << "\\screen_zoom " << zoom << '\n';
1480 case RC_SCREEN_GEOMETRY_HEIGHT:
1481 if (ignore_system_lyxrc ||
1482 geometry_height != system_lyxrc.geometry_height) {
1483 os << "\\screen_geometry_height " << geometry_height
1486 case RC_SCREEN_GEOMETRY_WIDTH:
1487 if (ignore_system_lyxrc ||
1488 geometry_width != system_lyxrc.geometry_width) {
1489 os << "\\screen_geometry_width " << geometry_width
1492 case RC_SCREEN_GEOMETRY_XYSAVED:
1493 if (ignore_system_lyxrc ||
1494 geometry_xysaved != system_lyxrc.geometry_xysaved) {
1495 os << "\\screen_geometry_xysaved " << convert<string>(geometry_xysaved)
1498 case RC_CURSOR_FOLLOWS_SCROLLBAR:
1499 if (ignore_system_lyxrc ||
1500 cursor_follows_scrollbar
1501 != system_lyxrc.cursor_follows_scrollbar) {
1502 os << "\\cursor_follows_scrollbar "
1503 << convert<string>(cursor_follows_scrollbar) << '\n';
1505 case RC_DIALOGS_ICONIFY_WITH_MAIN:
1506 if (ignore_system_lyxrc ||
1507 dialogs_iconify_with_main
1508 != system_lyxrc.dialogs_iconify_with_main) {
1509 os << "\\dialogs_iconify_with_main "
1510 << convert<string>(dialogs_iconify_with_main) << '\n';
1512 case RC_SCREEN_FONT_ROMAN:
1513 if (ignore_system_lyxrc ||
1514 roman_font_name != system_lyxrc.roman_font_name) {
1515 os << "\\screen_font_roman \"" << roman_font_name
1518 case RC_SCREEN_FONT_ROMAN_FOUNDRY:
1519 if (ignore_system_lyxrc ||
1520 roman_font_foundry != system_lyxrc.roman_font_foundry) {
1521 os << "\\screen_font_roman_foundry \"" << roman_font_foundry
1524 case RC_SCREEN_FONT_SANS:
1525 if (ignore_system_lyxrc ||
1526 sans_font_name != system_lyxrc.sans_font_name) {
1527 os << "\\screen_font_sans \"" << sans_font_name
1530 case RC_SCREEN_FONT_SANS_FOUNDRY:
1531 if (ignore_system_lyxrc ||
1532 sans_font_foundry != system_lyxrc.sans_font_foundry) {
1533 os << "\\screen_font_sans_foundry \"" << sans_font_foundry
1536 case RC_SCREEN_FONT_TYPEWRITER:
1537 if (ignore_system_lyxrc ||
1538 typewriter_font_name != system_lyxrc.typewriter_font_name) {
1539 os << "\\screen_font_typewriter \""
1540 << typewriter_font_name << "\"\n";
1542 case RC_SCREEN_FONT_TYPEWRITER_FOUNDRY:
1543 if (ignore_system_lyxrc ||
1544 typewriter_font_foundry != system_lyxrc.typewriter_font_foundry) {
1545 os << "\\screen_font_typewriter_foundry \""
1546 << typewriter_font_foundry << "\"\n";
1549 case RC_SCREEN_FONT_SCALABLE:
1550 if (ignore_system_lyxrc ||
1551 use_scalable_fonts != system_lyxrc.use_scalable_fonts) {
1552 os << "\\screen_font_scalable "
1553 << convert<string>(use_scalable_fonts)
1556 case RC_SCREEN_FONT_ENCODING:
1557 if (ignore_system_lyxrc ||
1558 font_norm != system_lyxrc.font_norm) {
1559 os << "\\screen_font_encoding \"" << font_norm
1562 case RC_SCREEN_FONT_SIZES:
1563 if (ignore_system_lyxrc ||
1564 font_sizes[LyXFont::SIZE_TINY]
1565 != system_lyxrc.font_sizes[LyXFont::SIZE_TINY] ||
1566 font_sizes[LyXFont::SIZE_SCRIPT]
1567 != system_lyxrc.font_sizes[LyXFont::SIZE_SCRIPT] ||
1568 font_sizes[LyXFont::SIZE_FOOTNOTE]
1569 != system_lyxrc.font_sizes[LyXFont::SIZE_FOOTNOTE] ||
1570 font_sizes[LyXFont::SIZE_SMALL]
1571 != system_lyxrc.font_sizes[LyXFont::SIZE_SMALL] ||
1572 font_sizes[LyXFont::SIZE_NORMAL]
1573 != system_lyxrc.font_sizes[LyXFont::SIZE_NORMAL] ||
1574 font_sizes[LyXFont::SIZE_LARGE]
1575 != system_lyxrc.font_sizes[LyXFont::SIZE_LARGE] ||
1576 font_sizes[LyXFont::SIZE_LARGER]
1577 != system_lyxrc.font_sizes[LyXFont::SIZE_LARGER] ||
1578 font_sizes[LyXFont::SIZE_LARGEST]
1579 != system_lyxrc.font_sizes[LyXFont::SIZE_LARGEST] ||
1580 font_sizes[LyXFont::SIZE_HUGE]
1581 != system_lyxrc.font_sizes[LyXFont::SIZE_HUGE] ||
1582 font_sizes[LyXFont::SIZE_HUGER]
1583 != system_lyxrc.font_sizes[LyXFont::SIZE_HUGER]) {
1584 os.setf(ios::fixed);
1586 os << "\\screen_font_sizes"
1587 << ' ' << font_sizes[LyXFont::SIZE_TINY]
1588 << ' ' << font_sizes[LyXFont::SIZE_SCRIPT]
1589 << ' ' << font_sizes[LyXFont::SIZE_FOOTNOTE]
1590 << ' ' << font_sizes[LyXFont::SIZE_SMALL]
1591 << ' ' << font_sizes[LyXFont::SIZE_NORMAL]
1592 << ' ' << font_sizes[LyXFont::SIZE_LARGE]
1593 << ' ' << font_sizes[LyXFont::SIZE_LARGER]
1594 << ' ' << font_sizes[LyXFont::SIZE_LARGEST]
1595 << ' ' << font_sizes[LyXFont::SIZE_HUGE]
1596 << ' ' << font_sizes[LyXFont::SIZE_HUGER]
1601 << "# COLOR SECTION ###################################\n"
1605 for (int i = 0; i < LColor::ignore; ++i) {
1606 LColor::color lc = static_cast<LColor::color>(i);
1608 string const col(lcolor.getX11Name(lc));
1609 if (ignore_system_lyxrc ||
1610 col != system_lcolor.getX11Name(lc)) {
1611 os << "\\set_color \""
1612 << lcolor.getLyXName(lc) << "\" \""
1618 << "# PRINTER SECTION ###################################\n"
1622 if (ignore_system_lyxrc ||
1623 printer != system_lyxrc.printer) {
1624 os << "\\printer \"" << printer << "\"\n";
1626 case RC_PRINT_ADAPTOUTPUT:
1627 if (ignore_system_lyxrc ||
1628 print_adapt_output != system_lyxrc.print_adapt_output) {
1629 os << "\\print_adapt_output "
1630 << convert<string>(print_adapt_output)
1633 case RC_PRINT_COMMAND:
1634 if (ignore_system_lyxrc ||
1635 print_command != system_lyxrc.print_command) {
1636 os << "\\print_command \"" << print_command << "\"\n";
1638 case RC_PRINTEXSTRAOPTIONS:
1639 if (ignore_system_lyxrc ||
1640 print_extra_options != system_lyxrc.print_extra_options) {
1641 os << "\\print_extra_options \"" << print_extra_options
1644 case RC_PRINTSPOOL_COMMAND:
1645 if (ignore_system_lyxrc ||
1646 print_spool_command != system_lyxrc.print_spool_command) {
1647 os << "\\print_spool_command \"" << print_spool_command
1650 case RC_PRINTSPOOL_PRINTERPREFIX:
1651 if (ignore_system_lyxrc ||
1652 print_spool_printerprefix
1653 != system_lyxrc.print_spool_printerprefix) {
1654 os << "\\print_spool_printerprefix \""
1655 << print_spool_printerprefix << "\"\n";
1657 case RC_PRINTEVENPAGEFLAG:
1658 if (ignore_system_lyxrc ||
1659 print_evenpage_flag != system_lyxrc.print_evenpage_flag) {
1660 os << "\\print_evenpage_flag \"" << print_evenpage_flag
1663 case RC_PRINTODDPAGEFLAG:
1664 if (ignore_system_lyxrc ||
1665 print_oddpage_flag != system_lyxrc.print_oddpage_flag) {
1666 os << "\\print_oddpage_flag \"" << print_oddpage_flag
1669 case RC_PRINTREVERSEFLAG:
1670 if (ignore_system_lyxrc ||
1671 print_reverse_flag != system_lyxrc.print_reverse_flag) {
1672 os << "\\print_reverse_flag \"" << print_reverse_flag
1675 case RC_PRINTLANDSCAPEFLAG:
1676 if (ignore_system_lyxrc ||
1677 print_landscape_flag != system_lyxrc.print_landscape_flag) {
1678 os << "\\print_landscape_flag \"" << print_landscape_flag
1681 case RC_PRINTPAGERANGEFLAG:
1682 if (ignore_system_lyxrc ||
1683 print_pagerange_flag != system_lyxrc.print_pagerange_flag) {
1684 os << "\\print_pagerange_flag \"" << print_pagerange_flag
1687 case RC_PRINTCOPIESFLAG:
1688 if (ignore_system_lyxrc ||
1689 print_copies_flag != system_lyxrc.print_copies_flag) {
1690 os << "\\print_copies_flag \"" << print_copies_flag
1693 case RC_PRINTCOLLCOPIESFLAG:
1694 if (ignore_system_lyxrc ||
1695 print_collcopies_flag
1696 != system_lyxrc.print_collcopies_flag) {
1697 os << "\\print_collcopies_flag \""
1698 << print_collcopies_flag
1701 case RC_PRINTPAPERFLAG:
1702 if (ignore_system_lyxrc ||
1703 print_paper_flag != system_lyxrc.print_paper_flag) {
1704 os << "\\print_paper_flag \"" << print_paper_flag
1707 case RC_PRINTPAPERDIMENSIONFLAG:
1708 if (ignore_system_lyxrc ||
1709 print_paper_dimension_flag
1710 != system_lyxrc.print_paper_dimension_flag) {
1711 os << "\\print_paper_dimension_flag \""
1712 << print_paper_dimension_flag << "\"\n";
1714 case RC_PRINTTOPRINTER:
1715 if (ignore_system_lyxrc ||
1716 print_to_printer != system_lyxrc.print_to_printer) {
1717 os << "\\print_to_printer \"" << print_to_printer
1720 case RC_PRINTTOFILE:
1721 if (ignore_system_lyxrc ||
1722 print_to_file != system_lyxrc.print_to_file) {
1723 string const path = os::external_path(print_to_file);
1724 os << "\\print_to_file \"" << path << "\"\n";
1726 case RC_PRINTFILEEXTENSION:
1727 if (ignore_system_lyxrc ||
1728 print_file_extension != system_lyxrc.print_file_extension) {
1729 os << "\\print_file_extension \""
1730 << print_file_extension
1735 << "# EXPORT SECTION ####################################\n"
1738 case RC_CUSTOM_EXPORT_COMMAND:
1739 if (ignore_system_lyxrc ||
1740 custom_export_command
1741 != system_lyxrc.custom_export_command) {
1742 os << "\\custom_export_command \""
1743 << custom_export_command
1746 case RC_CUSTOM_EXPORT_FORMAT:
1747 if (ignore_system_lyxrc ||
1748 custom_export_format
1749 != system_lyxrc.custom_export_format) {
1750 os << "\\custom_export_format \"" << custom_export_format
1755 << "# TEX SECTION #######################################\n"
1758 case RC_FONT_ENCODING:
1759 if (ignore_system_lyxrc ||
1760 fontenc != system_lyxrc.fontenc) {
1761 os << "\\font_encoding \"" << fontenc << "\"\n";
1765 << "# FILE SECTION ######################################\n"
1768 case RC_DOCUMENTPATH:
1769 if (ignore_system_lyxrc ||
1770 document_path != system_lyxrc.document_path) {
1771 string const path = os::external_path(document_path);
1772 os << "\\document_path \"" << path << "\"\n";
1774 case RC_USELASTFILEPOS:
1775 if (ignore_system_lyxrc ||
1776 use_lastfilepos != system_lyxrc.use_lastfilepos) {
1777 os << "\\use_lastfilepos " << convert<string>(use_lastfilepos)
1780 case RC_LOADSESSION:
1781 if (ignore_system_lyxrc ||
1782 load_session != system_lyxrc.load_session) {
1783 os << "\\load_session " << convert<string>(load_session)
1786 case RC_NUMLASTFILES:
1787 if (ignore_system_lyxrc ||
1788 num_lastfiles != system_lyxrc.num_lastfiles) {
1789 os << "\\num_lastfiles " << num_lastfiles << '\n';
1791 case RC_CHECKLASTFILES:
1792 if (ignore_system_lyxrc ||
1793 check_lastfiles != system_lyxrc.check_lastfiles) {
1794 os << "\\check_lastfiles " << convert<string>(check_lastfiles)
1797 case RC_TEMPLATEPATH:
1798 if (ignore_system_lyxrc ||
1799 template_path != system_lyxrc.template_path) {
1800 string const path = os::external_path(template_path);
1801 os << "\\template_path \"" << path << "\"\n";
1803 case RC_TEMPDIRPATH:
1804 if (ignore_system_lyxrc ||
1805 tempdir_path != system_lyxrc.tempdir_path) {
1806 string const path = os::external_path(tempdir_path);
1807 os << "\\tempdir_path \"" << path << "\"\n";
1811 case RC_PLAINTEXT_LINELEN:
1812 if (ignore_system_lyxrc ||
1813 plaintext_linelen != system_lyxrc.plaintext_linelen) {
1814 os << "\\plaintext_linelen " << plaintext_linelen << '\n';
1816 case RC_MAKE_BACKUP:
1817 if (ignore_system_lyxrc ||
1818 make_backup != system_lyxrc.make_backup) {
1819 os << "\\make_backup " << convert<string>(make_backup) << '\n';
1821 case RC_BACKUPDIR_PATH:
1822 if (ignore_system_lyxrc ||
1823 backupdir_path != system_lyxrc.backupdir_path) {
1824 string const path = os::external_path(backupdir_path);
1825 os << "\\backupdir_path \"" << path << "\"\n";
1829 << "# PLAIN TEXT EXPORT SECTION ##############################\n"
1832 case RC_PLAINTEXT_ROFF_COMMAND:
1833 if (ignore_system_lyxrc ||
1834 plaintext_roff_command != system_lyxrc.plaintext_roff_command) {
1835 os << "\\plaintext_roff_command \"" << plaintext_roff_command
1840 << "# SPELLCHECKER SECTION ##############################\n"
1842 case RC_USE_SPELL_LIB:
1843 if (ignore_system_lyxrc ||
1844 use_spell_lib != system_lyxrc.use_spell_lib) {
1845 os << "\\use_spell_lib " << convert<string>(use_spell_lib) << '\n';
1847 case RC_SPELL_COMMAND:
1848 if (ignore_system_lyxrc ||
1849 isp_command != system_lyxrc.isp_command) {
1850 os << "\\spell_command \"" << isp_command << "\"\n";
1852 case RC_ACCEPT_COMPOUND:
1853 if (ignore_system_lyxrc ||
1854 isp_accept_compound != system_lyxrc.isp_accept_compound) {
1855 os << "\\accept_compound " << convert<string>(isp_accept_compound)
1858 case RC_USE_ALT_LANG:
1859 if (ignore_system_lyxrc ||
1860 isp_use_alt_lang != system_lyxrc.isp_use_alt_lang) {
1861 os << "\\use_alt_language " << convert<string>(isp_use_alt_lang)
1865 if (ignore_system_lyxrc ||
1866 isp_alt_lang != system_lyxrc.isp_alt_lang) {
1867 os << "\\alternate_language \"" << isp_alt_lang
1870 case RC_USE_ESC_CHARS:
1871 if (ignore_system_lyxrc ||
1872 isp_use_esc_chars != system_lyxrc.isp_use_esc_chars) {
1873 os << "\\use_escape_chars " << convert<string>(isp_use_esc_chars)
1877 if (ignore_system_lyxrc ||
1878 isp_esc_chars != system_lyxrc.isp_esc_chars) {
1879 os << "\\escape_chars \"" << isp_esc_chars << "\"\n";
1881 case RC_USE_PERS_DICT:
1882 if (ignore_system_lyxrc ||
1883 isp_use_pers_dict != system_lyxrc.isp_use_pers_dict) {
1884 os << "\\use_personal_dictionary "
1885 << convert<string>(isp_use_pers_dict)
1889 if (isp_pers_dict != system_lyxrc.isp_pers_dict) {
1890 string const path = os::external_path(isp_pers_dict);
1891 os << "\\personal_dictionary \"" << path << "\"\n";
1893 case RC_USE_INP_ENC:
1894 if (ignore_system_lyxrc ||
1895 isp_use_input_encoding
1896 != system_lyxrc.isp_use_input_encoding) {
1897 os << "\\use_input_encoding "
1898 << convert<string>(isp_use_input_encoding)
1903 << "# LANGUAGE SUPPORT SECTION ##########################\n"
1906 case RC_RTL_SUPPORT:
1907 if (ignore_system_lyxrc ||
1908 rtl_support != system_lyxrc.rtl_support) {
1909 os << "\\rtl " << convert<string>(rtl_support) << '\n';
1911 case RC_LANGUAGE_PACKAGE:
1912 if (ignore_system_lyxrc ||
1913 language_package != system_lyxrc.language_package) {
1914 os << "\\language_package \"" << language_package
1917 case RC_LANGUAGE_GLOBAL_OPTIONS:
1918 if (ignore_system_lyxrc ||
1919 language_global_options
1920 != system_lyxrc.language_global_options) {
1921 os << "\\language_global_options \""
1922 << convert<string>(language_global_options)
1925 case RC_LANGUAGE_USE_BABEL:
1926 if (ignore_system_lyxrc ||
1927 language_use_babel != system_lyxrc.language_use_babel) {
1928 os << "\\language_use_babel \""
1929 << convert<string>(language_use_babel)
1932 case RC_LANGUAGE_COMMAND_BEGIN:
1933 if (ignore_system_lyxrc ||
1934 language_command_begin
1935 != system_lyxrc.language_command_begin) {
1936 os << "\\language_command_begin \""
1937 << language_command_begin
1940 case RC_LANGUAGE_COMMAND_END:
1941 if (ignore_system_lyxrc ||
1942 language_command_end
1943 != system_lyxrc.language_command_end) {
1944 os << "\\language_command_end \"" << language_command_end
1947 case RC_LANGUAGE_COMMAND_LOCAL:
1948 if (ignore_system_lyxrc ||
1949 language_command_local
1950 != system_lyxrc.language_command_local) {
1951 os << "\\language_command_local \""
1952 << language_command_local
1955 case RC_LANGUAGE_AUTO_BEGIN:
1956 if (ignore_system_lyxrc ||
1957 language_auto_begin != system_lyxrc.language_auto_begin) {
1958 os << "\\language_auto_begin "
1959 << convert<string>(language_auto_begin) << '\n';
1961 case RC_LANGUAGE_AUTO_END:
1962 if (ignore_system_lyxrc ||
1963 language_auto_end != system_lyxrc.language_auto_end) {
1964 os << "\\language_auto_end "
1965 << convert<string>(language_auto_end) << '\n';
1967 case RC_MARK_FOREIGN_LANGUAGE:
1968 if (ignore_system_lyxrc ||
1969 mark_foreign_language
1970 != system_lyxrc.mark_foreign_language) {
1971 os << "\\mark_foreign_language " <<
1972 convert<string>(mark_foreign_language) << '\n';
1976 << "# 2nd MISC SUPPORT SECTION ##########################\n"
1979 case RC_AUTO_NUMBER:
1980 if (ignore_system_lyxrc ||
1981 auto_number != system_lyxrc.auto_number) {
1982 os << "\\auto_number " << convert<string>(auto_number) << '\n';
1984 case RC_DEFAULT_LANGUAGE:
1985 if (ignore_system_lyxrc ||
1986 default_language != system_lyxrc.default_language) {
1987 os << "\\default_language " << default_language << '\n';
1991 << "# FORMATS SECTION ##########################\n"
1995 // New/modified formats
1996 for (Formats::const_iterator cit = formats.begin();
1997 cit != formats.end(); ++cit) {
1998 Format const * format =
1999 system_formats.getFormat(cit->name());
2001 format->extension() != cit->extension() ||
2002 format->prettyname() != cit->prettyname() ||
2003 format->shortcut() != cit->shortcut() ||
2004 format->viewer() != cit->viewer() ||
2005 format->editor() != cit->editor() ||
2006 format->documentFormat() != cit->documentFormat() ||
2007 format->vectorFormat() != cit->vectorFormat()) {
2008 os << "\\format \"" << cit->name() << "\" \""
2009 << cit->extension() << "\" \""
2010 << cit->prettyname() << "\" \""
2011 << cit->shortcut() << "\" \""
2012 << cit->viewer() << "\" \""
2013 << cit->editor() << "\" \"";
2014 std::vector<string> flags;
2015 if (cit->documentFormat())
2016 flags.push_back("document");
2017 if (cit->vectorFormat())
2018 flags.push_back("vector");
2019 os << support::getStringFromVector(flags);
2024 // Look for deleted formats
2025 for (Formats::const_iterator cit = system_formats.begin();
2026 cit != system_formats.end(); ++cit)
2027 if (!formats.getFormat(cit->name()))
2028 os << "\\format \"" << cit->name()
2029 << "\" \"\" \"\" \"\" \"\" \"\" \"\"\n";
2034 << "# CONVERTERS SECTION ##########################\n"
2038 // Look for new converters
2039 for (Converters::const_iterator cit = theConverters().begin();
2040 cit != theConverters().end(); ++cit) {
2041 Converter const * converter =
2042 theSystemConverters().getConverter(cit->from,
2045 converter->command != cit->command ||
2046 converter->flags != cit->flags)
2047 os << "\\converter \"" << cit->from << "\" \""
2048 << cit->to << "\" \""
2049 << cit->command << "\" \""
2050 << cit->flags << "\"\n";
2053 // New/modifed converters
2054 for (Converters::const_iterator cit = theSystemConverters().begin();
2055 cit != theSystemConverters().end(); ++cit)
2056 if (!theConverters().getConverter(cit->from, cit->to))
2057 os << "\\converter \"" << cit->from
2058 << "\" \"" << cit->to << "\" \"\" \"\"\n";
2062 << "# COPIERS SECTION ##########################\n"
2065 // Look for new movers
2066 Movers::const_iterator const sysbegin = theSystemMovers().begin();
2067 Movers::const_iterator const sysend = theSystemMovers().end();
2068 Movers::const_iterator it = theMovers().begin();
2069 Movers::const_iterator end = theMovers().end();
2071 for (; it != end; ++it) {
2072 Movers::const_iterator const sysit =
2073 std::find_if(sysbegin, sysend, SameMover(*it));
2074 if (sysit == sysend) {
2075 std::string const & fmt = it->first;
2076 std::string const & command =
2077 it->second.command();
2079 os << "\\copier " << fmt
2080 << " \"" << command << "\"\n";
2084 // We don't actually delete SpecialisedMover(s) from the
2085 // map, just clear their 'command', so there's no need
2086 // to test for anything else.
2092 void LyXRC::set_font_norm_type()
2094 if (font_norm == "iso10646-1")
2095 font_norm_type = ISO_10646_1;
2096 else if (font_norm == "iso8859-1")
2097 font_norm_type = ISO_8859_1;
2098 else if (font_norm == "iso8859-3")
2099 font_norm_type = ISO_8859_3;
2100 else if (font_norm == "iso8859-4")
2101 font_norm_type = ISO_8859_4;
2102 else if (font_norm == "iso8859-6.8x")
2103 font_norm_type = ISO_8859_6_8;
2104 else if (font_norm == "iso8859-9")
2105 font_norm_type = ISO_8859_9;
2106 else if (font_norm == "iso8859-15")
2107 font_norm_type = ISO_8859_15;
2109 font_norm_type = OTHER_ENCODING;
2114 string const LyXRC::getDescription(LyXRCTags tag)
2119 case RC_ACCEPT_COMPOUND:
2120 str = _("Consider run-together words, such as \"diskdrive\" for \"disk drive\", as legal words?");
2124 case RC_USE_ALT_LANG:
2125 str = _("Specify an alternate language. The default is to use the language of the document.");
2128 case RC_PLAINTEXT_ROFF_COMMAND:
2129 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.");
2132 case RC_PLAINTEXT_LINELEN:
2133 str = _("The maximum line length of exported plain text/LaTeX/SGML files. If set to 0, paragraphs are output in a single line; if the line length is > 0, paragraphs are separated by a blank line.");
2136 case RC_AUTOREGIONDELETE:
2137 str = _("De-select if you don't want the current selection to be replaced automatically by what you type.");
2140 case RC_AUTORESET_OPTIONS:
2141 str = _("De-select if you don't want the class options to be reset to defaults after class change.");
2145 str = _("The time interval between auto-saves (in seconds). 0 means no auto-save.");
2148 case RC_AUTO_NUMBER:
2151 case RC_BACKUPDIR_PATH:
2152 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.");
2155 case RC_BIBTEX_COMMAND:
2156 str = _("Define the options of bibtex (cf. man bibtex) or select an alternative compiler (e.g. mlbibtex or bibulus).");
2160 str = _("Keybindings file. Can either specify an absolute path, or LyX will look in its global and local bind/ directories.");
2163 case RC_CHECKLASTFILES:
2164 str = _("Select to check whether the lastfiles still exist.");
2167 case RC_CHKTEX_COMMAND:
2168 str = _("Define how to run chktex. E.g. \"chktex -n11 -n1 -n3 -n6 -n9 -22 -n25 -n30 -n38\" Refer to the ChkTeX documentation.");
2177 case RC_CURSOR_FOLLOWS_SCROLLBAR:
2178 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.");
2181 case RC_CUSTOM_EXPORT_COMMAND:
2184 case RC_CUSTOM_EXPORT_FORMAT:
2187 case RC_DATE_INSERT_FORMAT:
2188 //xgettext:no-c-format
2189 str = _("This accepts the normal strftime formats; see man strftime for full details. E.g.\"%A, %e. %B %Y\".");
2192 case RC_DEFAULT_LANGUAGE:
2193 str = _("New documents will be assigned this language.");
2196 case RC_DEFAULT_PAPERSIZE:
2197 str = _("Specify the default paper size.");
2200 case RC_DIALOGS_ICONIFY_WITH_MAIN:
2201 str = _("Iconify the dialogs when the main window is iconified. (Affects only dialogs shown after the change has been made.)");
2204 case RC_DISPLAY_GRAPHICS:
2205 str = _("Select how LyX will display any graphics.");
2208 case RC_DOCUMENTPATH:
2209 str = _("The default path for your documents. An empty value selects the directory LyX was started from.");
2213 case RC_USE_ESC_CHARS:
2214 str = _("Specify additional chars that can be part of a word.");
2217 case RC_FONT_ENCODING:
2218 str = _("The font encoding used for the LaTeX2e fontenc package. T1 is highly recommended for non-English languages.");
2224 case RC_INDEX_COMMAND:
2225 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\".");
2232 case RC_KBMAP_PRIMARY:
2233 case RC_KBMAP_SECONDARY:
2234 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.");
2237 case RC_LABEL_INIT_LENGTH:
2238 str = _("Maximum number of words in the initialization string for a new label");
2241 case RC_LANGUAGE_AUTO_BEGIN:
2242 str = _("Select if a language switching command is needed at the beginning of the document.");
2245 case RC_LANGUAGE_AUTO_END:
2246 str = _("Select if a language switching command is needed at the end of the document.");
2249 case RC_LANGUAGE_COMMAND_BEGIN:
2250 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.");
2253 case RC_LANGUAGE_COMMAND_END:
2254 str = _("The LaTeX command for changing back to the language of the document.");
2257 case RC_LANGUAGE_COMMAND_LOCAL:
2258 str = _("The LaTeX command for local changing of the language.");
2261 case RC_LANGUAGE_GLOBAL_OPTIONS:
2262 str = _("De-select if you don't want the language(s) used as an argument to \\documentclass.");
2265 case RC_LANGUAGE_PACKAGE:
2266 str = _("The LaTeX command for loading the language package. E.g. \"\\usepackage{babel}\", \"\\usepackage{omega}\".");
2269 case RC_LANGUAGE_USE_BABEL:
2270 str = _("De-select if you don't want babel to be used when the language of the document is the default language.");
2273 case RC_USELASTFILEPOS:
2274 str = _("De-select if you do not want LyX to scroll to saved position.");
2277 case RC_LOADSESSION:
2278 str = _("De-select to prevent loading files opened from the last lyx session.");
2281 case RC_MAKE_BACKUP:
2282 str = _("De-select if you don't want LyX to create backup files.");
2285 case RC_MARK_FOREIGN_LANGUAGE:
2286 str = _("Select to control the highlighting of words with a language foreign to that of the document.");
2289 case RC_NUMLASTFILES:
2290 str = bformat(_("Maximal number of lastfiles. Up to %1$d can appear in the file menu."),
2294 case RC_PATH_PREFIX:
2295 str = _("Specify those directories which should be "
2296 "prepended to the PATH environment variable. "
2297 "Use the OS native format.");
2301 case RC_USE_PERS_DICT:
2302 str = _("Specify an alternate personal dictionary file. E.g. \".ispell_english\".");
2306 str = _("Shows a typeset preview of things such as math");
2309 case RC_PREVIEW_HASHED_LABELS:
2310 str = _("Previewed equations will have \"(#)\" labels rather than numbered ones");
2313 case RC_PREVIEW_SCALE_FACTOR:
2314 str = _("Scale the preview size to suit.");
2317 case RC_PRINTCOLLCOPIESFLAG:
2318 str = _("The option for specifying whether the copies should be collated.");
2321 case RC_PRINTCOPIESFLAG:
2322 str = _("The option for specifying the number of copies to print.");
2326 str = _("The default printer to print on. If none is specified, LyX will use the environment variable PRINTER.");
2329 case RC_PRINTEVENPAGEFLAG:
2330 str = _("The option to print only even pages.");
2333 case RC_PRINTEXSTRAOPTIONS:
2334 str = _("Extra options to pass to printing program after everything else, but before the filename of the DVI file to be printed.");
2337 case RC_PRINTFILEEXTENSION:
2338 str = _("Extension of printer program output file. Usually \".ps\".");
2341 case RC_PRINTLANDSCAPEFLAG:
2342 str = _("The option to print out in landscape.");
2345 case RC_PRINTODDPAGEFLAG:
2346 str = _("The option to print only odd pages.");
2349 case RC_PRINTPAGERANGEFLAG:
2350 str = _("The option for specifying a comma-separated list of pages to print.");
2353 case RC_PRINTPAPERDIMENSIONFLAG:
2354 str = _("Option to specify the dimensions of the print paper.");
2357 case RC_PRINTPAPERFLAG:
2358 str = _("The option to specify paper type.");
2361 case RC_PRINTREVERSEFLAG:
2362 str = _("The option to reverse the order of the pages printed.");
2365 case RC_PRINTSPOOL_COMMAND:
2366 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.");
2369 case RC_PRINTSPOOL_PRINTERPREFIX:
2370 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.");
2373 case RC_PRINTTOFILE:
2374 str = _("Option to pass to the print program to print to a file.");
2377 case RC_PRINTTOPRINTER:
2378 str = _("Option to pass to the print program to print on a specific printer.");
2381 case RC_PRINT_ADAPTOUTPUT:
2382 str = _("Select for LyX to pass the name of the destination printer to your print command.");
2385 case RC_PRINT_COMMAND:
2386 str = _("Your favorite print program, e.g. \"dvips\", \"dvilj4\".");
2389 case RC_RTL_SUPPORT:
2390 str = _("Select to enable support of right-to-left languages (e.g. Hebrew, Arabic).");
2394 str = _("DPI (dots per inch) of your monitor is auto-detected by LyX. If that goes wrong, override the setting here.");
2397 case RC_SCREEN_FONT_ENCODING:
2398 str = _("The encoding for the screen fonts.");
2401 case RC_SCREEN_FONT_ROMAN:
2402 case RC_SCREEN_FONT_SANS:
2403 case RC_SCREEN_FONT_TYPEWRITER:
2404 str = _("The screen fonts used to display the text while editing.");
2407 case RC_SCREEN_FONT_ROMAN_FOUNDRY:
2408 case RC_SCREEN_FONT_SANS_FOUNDRY:
2409 case RC_SCREEN_FONT_TYPEWRITER_FOUNDRY:
2412 case RC_SCREEN_FONT_SCALABLE:
2413 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.");
2416 case RC_SCREEN_FONT_SIZES:
2417 str = _("The font sizes used for calculating the scaling of the screen fonts.");
2420 case RC_SCREEN_ZOOM:
2421 //xgettext:no-c-format
2422 str = _("The zoom percentage for screen fonts. A setting of 100% will make the fonts roughly the same size as on paper.");
2425 case RC_SCREEN_GEOMETRY_HEIGHT:
2426 case RC_SCREEN_GEOMETRY_WIDTH:
2427 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).");
2430 case RC_SCREEN_GEOMETRY_XYSAVED:
2431 str = _("Allow session manager to save and restore windows position.");
2435 str = _("This starts the lyxserver. The pipes get an additional extension \".in\" and \".out\". Only for advanced users.");
2441 case RC_SHOW_BANNER:
2442 str = _("De-select if you don't want the startup banner.");
2445 case RC_SPELL_COMMAND:
2446 str = _("What command runs the spellchecker?");
2449 case RC_TEMPDIRPATH:
2450 str = _("LyX will place its temporary directories in this path. They will be deleted when you quit LyX.");
2453 case RC_TEMPLATEPATH:
2454 str = _("The path that LyX will set when offering to choose a template. An empty value selects the directory LyX was started from.");
2457 case RC_TEX_ALLOWS_SPACES:
2460 case RC_TEX_EXPECTS_WINDOWS_PATHS:
2464 str = _("The UI (user interface) file. Can either specify an absolute path, or LyX will look in its global and local ui/ directories.");
2476 case RC_USE_INP_ENC:
2477 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.");
2480 case RC_USE_SPELL_LIB:
2483 case RC_VIEWDVI_PAPEROPTION:
2484 _("Specify the paper command to DVI viewer (leave empty or use \"-paper\")");
2499 // The global instance
2502 // The global copy of the system lyxrc entries (everything except preferences)