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.
26 #include "Converter.h"
31 #include "FontEnums.h"
34 #include "graphics/GraphicsTypes.h"
36 #include "support/convert.h"
37 #include "support/environment.h"
38 #include "support/filetools.h"
39 #include "support/lstrings.h"
40 #include "support/os.h"
41 #include "support/userinfo.h"
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 { "\\def_file", LyXRC::RC_DEFFILE },
88 { "\\default_language", LyXRC::RC_DEFAULT_LANGUAGE },
89 { "\\default_papersize", LyXRC::RC_DEFAULT_PAPERSIZE },
90 { "\\dialogs_iconify_with_main", LyXRC::RC_DIALOGS_ICONIFY_WITH_MAIN },
91 { "\\display_graphics", LyXRC::RC_DISPLAY_GRAPHICS },
92 { "\\document_path", LyXRC::RC_DOCUMENTPATH },
93 { "\\escape_chars", LyXRC::RC_ESC_CHARS },
94 { "\\font_encoding", LyXRC::RC_FONT_ENCODING },
95 { "\\format", LyXRC::RC_FORMAT },
96 { "\\index_command", LyXRC::RC_INDEX_COMMAND },
97 { "\\input", LyXRC::RC_INPUT },
98 { "\\kbmap", LyXRC::RC_KBMAP },
99 { "\\kbmap_primary", LyXRC::RC_KBMAP_PRIMARY },
100 { "\\kbmap_secondary", LyXRC::RC_KBMAP_SECONDARY },
101 { "\\label_init_length", LyXRC::RC_LABEL_INIT_LENGTH },
102 { "\\language_auto_begin", LyXRC::RC_LANGUAGE_AUTO_BEGIN },
103 { "\\language_auto_end", LyXRC::RC_LANGUAGE_AUTO_END },
104 { "\\language_command_begin", LyXRC::RC_LANGUAGE_COMMAND_BEGIN },
105 { "\\language_command_end", LyXRC::RC_LANGUAGE_COMMAND_END },
106 { "\\language_command_local", LyXRC::RC_LANGUAGE_COMMAND_LOCAL },
107 { "\\language_global_options", LyXRC::RC_LANGUAGE_GLOBAL_OPTIONS },
108 { "\\language_package", LyXRC::RC_LANGUAGE_PACKAGE },
109 { "\\language_use_babel", LyXRC::RC_LANGUAGE_USE_BABEL },
110 { "\\load_session", LyXRC::RC_LOADSESSION },
111 { "\\make_backup", LyXRC::RC_MAKE_BACKUP },
112 { "\\mark_foreign_language", LyXRC::RC_MARK_FOREIGN_LANGUAGE },
113 { "\\num_lastfiles", LyXRC::RC_NUMLASTFILES },
114 { "\\path_prefix", LyXRC::RC_PATH_PREFIX },
115 { "\\personal_dictionary", LyXRC::RC_PERS_DICT },
116 { "\\plaintext_linelen", LyXRC::RC_PLAINTEXT_LINELEN },
117 { "\\plaintext_roff_command", LyXRC::RC_PLAINTEXT_ROFF_COMMAND },
118 { "\\preview", LyXRC::RC_PREVIEW },
119 { "\\preview_hashed_labels", LyXRC::RC_PREVIEW_HASHED_LABELS },
120 { "\\preview_scale_factor", LyXRC::RC_PREVIEW_SCALE_FACTOR },
121 { "\\print_adapt_output", LyXRC::RC_PRINT_ADAPTOUTPUT },
122 { "\\print_collcopies_flag", LyXRC::RC_PRINTCOLLCOPIESFLAG },
123 { "\\print_command", LyXRC::RC_PRINT_COMMAND },
124 { "\\print_copies_flag", LyXRC::RC_PRINTCOPIESFLAG },
125 { "\\print_evenpage_flag", LyXRC::RC_PRINTEVENPAGEFLAG },
126 { "\\print_extra_options", LyXRC::RC_PRINTEXSTRAOPTIONS },
127 { "\\print_file_extension", LyXRC::RC_PRINTFILEEXTENSION },
128 { "\\print_landscape_flag", LyXRC::RC_PRINTLANDSCAPEFLAG },
129 { "\\print_oddpage_flag", LyXRC::RC_PRINTODDPAGEFLAG },
130 { "\\print_pagerange_flag", LyXRC::RC_PRINTPAGERANGEFLAG },
131 { "\\print_paper_dimension_flag", LyXRC::RC_PRINTPAPERDIMENSIONFLAG },
132 { "\\print_paper_flag", LyXRC::RC_PRINTPAPERFLAG },
133 { "\\print_reverse_flag", LyXRC::RC_PRINTREVERSEFLAG },
134 { "\\print_spool_command", LyXRC::RC_PRINTSPOOL_COMMAND },
135 { "\\print_spool_printerprefix", LyXRC::RC_PRINTSPOOL_PRINTERPREFIX },
136 { "\\print_to_file", LyXRC::RC_PRINTTOFILE },
137 { "\\print_to_printer", LyXRC::RC_PRINTTOPRINTER },
138 { "\\printer", LyXRC::RC_PRINTER },
139 { "\\rtl", LyXRC::RC_RTL_SUPPORT },
140 { "\\screen_dpi", LyXRC::RC_SCREEN_DPI },
141 { "\\screen_font_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 { "\\use_pixmap_cache", LyXRC::RC_USE_PIXMAP_CACHE },
169 // compatibility with versions older than 1.4.0 only
170 { "\\use_pspell", LyXRC::RC_USE_SPELL_LIB },
171 { "\\use_spell_lib", LyXRC::RC_USE_SPELL_LIB },
172 // compatibility with versions older than 1.4.0 only
173 { "\\use_tempdir", LyXRC::RC_USETEMPDIR },
174 { "\\user_email", LyXRC::RC_USER_EMAIL },
175 { "\\user_name", LyXRC::RC_USER_NAME },
176 { "\\view_dvi_paper_option", LyXRC::RC_VIEWDVI_PAPEROPTION },
177 // compatibility with versions older than 1.4.0 only
178 { "\\viewer" ,LyXRC::RC_VIEWER}
181 const int lyxrcCount = sizeof(lyxrcTags) / sizeof(keyword_item);
192 void LyXRC::setDefaults() {
194 def_file = "default";
196 // Get printer from the environment. If fail, use default "",
197 // assuming that everything is set up correctly.
198 printer = getEnv("PRINTER");
199 print_adapt_output = false;
200 print_command = "dvips";
201 print_evenpage_flag = "-B";
202 print_oddpage_flag = "-A";
203 print_pagerange_flag = "-pp";
204 print_copies_flag = "-c";
205 print_collcopies_flag = "-C";
206 print_reverse_flag = "-r";
207 print_landscape_flag = "-t landscape";
208 print_to_printer = "-P";
209 print_to_file = "-o ";
210 print_file_extension = ".ps";
211 print_paper_flag = "-t";
212 print_paper_dimension_flag = "-T";
213 document_path.erase();
214 view_dvi_paper_option.erase();
215 default_papersize = PAPER_DEFAULT;
216 custom_export_format = "ps";
217 chktex_command = "chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38";
218 bibtex_command = "bibtex";
220 index_command = "makeindex -c -q";
222 // Because a screen typically is wider than a piece of paper:
226 geometry_xysaved = true;
227 // Default LaTeX font size:
228 font_sizes[FONT_SIZE_TINY] = "5.0";
229 font_sizes[FONT_SIZE_SCRIPT] = "7.0";
230 font_sizes[FONT_SIZE_FOOTNOTE] = "8.0";
231 font_sizes[FONT_SIZE_SMALL] = "9.0";
232 font_sizes[FONT_SIZE_NORMAL] = "10.0";
233 font_sizes[FONT_SIZE_LARGE] = "12.0";
234 font_sizes[FONT_SIZE_LARGER] = "14.4";
235 font_sizes[FONT_SIZE_LARGEST] = "17.26";
236 font_sizes[FONT_SIZE_HUGE] = "20.74";
237 font_sizes[FONT_SIZE_HUGER] = "24.88";
238 use_scalable_fonts = true;
239 roman_font_name = "";
241 typewriter_font_name = "";
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 = true;
284 use_pixmap_cache = false;
285 converter_cache_maxage = 6 * 30 * 24 * 3600; // 6 months
287 user_name = to_utf8(support::user_name());
289 user_email = to_utf8(support::user_email());
295 void oldFontFormat(string & family, string & foundry)
297 if (family.empty() || family[0] != '-')
299 foundry = token(family, '-', 1);
300 family = token(family, '-', 2);
308 int LyXRC::read(FileName const & filename)
310 Lexer lexrc(lyxrcTags, lyxrcCount);
311 if (lyxerr.debugging(Debug::PARSER))
312 lexrc.printTable(lyxerr);
314 lexrc.setFile(filename);
315 if (!lexrc.isOK()) return -2;
317 LYXERR(Debug::LYXRC) << "Reading '" << filename << "'..." << endl;
323 int LyXRC::read(std::istream & is)
325 Lexer lexrc(lyxrcTags, lyxrcCount);
326 if (lyxerr.debugging(Debug::PARSER))
327 lexrc.printTable(lyxerr);
330 if (!lexrc.isOK()) return -2;
332 LYXERR(Debug::LYXRC) << "Reading istream..." << endl;
338 int LyXRC::read(Lexer & lexrc)
340 if (!lexrc.isOK()) return -2;
342 while (lexrc.isOK()) {
343 // By using two switches we take advantage of the compiler
344 // telling us if we have missed a LyXRCTags element in
345 // the second switch.
346 // Note that this also shows a problem with Lexer since it
347 // helps us avoid taking advantage of the strictness of the
350 int le = lexrc.lex();
352 case Lexer::LEX_UNDEF:
353 lexrc.printError("Unknown tag `$$Token'");
355 case Lexer::LEX_FEOF:
359 switch (static_cast<LyXRCTags>(le)) {
360 case RC_INPUT: // Include file
363 libFileSearch(string(),
366 lexrc.printError("Error reading "
367 "included file: " + tmp.absFilename());
373 bind_file = os::internal_path(lexrc.getString());
379 def_file = os::internal_path(lexrc.getString());
385 ui_file = os::internal_path(lexrc.getString());
389 case RC_AUTORESET_OPTIONS:
391 auto_reset_options = lexrc.getBool();
395 case RC_DISPLAY_GRAPHICS:
397 display_graphics = graphics::displayTranslator().find(lexrc.getString());
401 case RC_TEX_EXPECTS_WINDOWS_PATHS:
403 windows_style_tex_paths = lexrc.getBool();
407 case RC_TEX_ALLOWS_SPACES:
409 tex_allows_spaces = lexrc.getBool();
415 use_kbmap = lexrc.getBool();
419 case RC_KBMAP_PRIMARY:
421 string const kmap(os::internal_path(lexrc.getString()));
424 } else if (!libFileSearch("kbd", kmap,
426 primary_kbmap = kmap;
428 lexrc.printError("LyX: Keymap `$$Token' not found");
433 case RC_KBMAP_SECONDARY:
435 string const kmap(os::internal_path(lexrc.getString()));
438 } else if (!libFileSearch("kbd", kmap,
440 secondary_kbmap = kmap;
442 lexrc.printError("LyX: Keymap `$$Token' not found");
447 case RC_FONT_ENCODING:
449 fontenc = lexrc.getString();
455 printer = lexrc.getString();
459 case RC_PRINT_COMMAND:
461 print_command = lexrc.getString();
465 case RC_PRINTEVENPAGEFLAG:
467 print_evenpage_flag = lexrc.getString();
471 case RC_PRINTODDPAGEFLAG:
473 print_oddpage_flag = lexrc.getString();
477 case RC_PRINTPAGERANGEFLAG:
479 print_pagerange_flag = lexrc.getString();
483 case RC_PRINTCOPIESFLAG:
485 print_copies_flag = lexrc.getString();
489 case RC_PRINTCOLLCOPIESFLAG:
491 print_collcopies_flag = lexrc.getString();
495 case RC_PRINTREVERSEFLAG:
497 print_reverse_flag = lexrc.getString();
501 case RC_PRINTLANDSCAPEFLAG:
503 print_landscape_flag = lexrc.getString();
507 case RC_PRINTTOPRINTER:
509 print_to_printer = lexrc.getString();
513 case RC_PRINT_ADAPTOUTPUT:
515 print_adapt_output = lexrc.getBool();
521 print_to_file = os::internal_path(lexrc.getString());
525 case RC_PRINTFILEEXTENSION:
527 print_file_extension = lexrc.getString();
531 case RC_PRINTEXSTRAOPTIONS:
533 print_extra_options = lexrc.getString();
537 case RC_PRINTSPOOL_COMMAND:
539 print_spool_command = lexrc.getString();
543 case RC_PRINTSPOOL_PRINTERPREFIX:
545 print_spool_printerprefix = lexrc.getString();
549 case RC_PRINTPAPERDIMENSIONFLAG:
551 print_paper_dimension_flag = lexrc.getString();
555 case RC_PRINTPAPERFLAG:
557 print_paper_flag = lexrc.getString();
561 case RC_CUSTOM_EXPORT_COMMAND:
563 custom_export_command = lexrc.getString();
567 case RC_CUSTOM_EXPORT_FORMAT:
569 custom_export_format = lexrc.getString();
573 case RC_DEFAULT_PAPERSIZE:
576 ascii_lowercase(lexrc.getString());
577 if (size == "usletter")
580 else if (size == "legal")
583 else if (size == "executive")
586 else if (size == "a3")
589 else if (size == "a4")
592 else if (size == "a5")
595 else if (size == "b5")
598 else if (size == "default")
604 case RC_VIEWDVI_PAPEROPTION:
606 view_dvi_paper_option = lexrc.getString();
608 view_dvi_paper_option.erase();
612 case RC_CHKTEX_COMMAND:
614 chktex_command = lexrc.getString();
618 case RC_BIBTEX_COMMAND:
620 bibtex_command = lexrc.getString();
624 case RC_INDEX_COMMAND:
626 index_command = lexrc.getString();
632 dpi = lexrc.getInteger();
638 zoom = lexrc.getInteger();
642 case RC_SCREEN_GEOMETRY_HEIGHT:
644 geometry_height = lexrc.getInteger();
648 case RC_SCREEN_GEOMETRY_WIDTH:
650 geometry_width = lexrc.getInteger();
654 case RC_SCREEN_GEOMETRY_XYSAVED:
656 geometry_xysaved = lexrc.getBool();
660 case RC_SCREEN_FONT_SIZES:
662 font_sizes[FONT_SIZE_TINY] =
666 font_sizes[FONT_SIZE_SCRIPT] =
670 font_sizes[FONT_SIZE_FOOTNOTE] =
674 font_sizes[FONT_SIZE_SMALL] =
678 font_sizes[FONT_SIZE_NORMAL] =
682 font_sizes[FONT_SIZE_LARGE] =
686 font_sizes[FONT_SIZE_LARGER] =
690 font_sizes[FONT_SIZE_LARGEST] =
694 font_sizes[FONT_SIZE_HUGE] =
698 font_sizes[FONT_SIZE_HUGER] =
703 case RC_SCREEN_FONT_SCALABLE:
705 use_scalable_fonts = lexrc.getBool();
711 autosave = lexrc.getInteger();
715 case RC_DOCUMENTPATH:
717 document_path = os::internal_path(lexrc.getString());
718 document_path = expandPath(document_path);
722 case RC_TEMPLATEPATH:
724 template_path = os::internal_path(lexrc.getString());
725 template_path = expandPath(template_path);
731 tempdir_path = os::internal_path(lexrc.getString());
732 tempdir_path = expandPath(tempdir_path);
738 lyxerr << "Ignoring obsolete use_tempdir flag." << endl;
742 case RC_USELASTFILEPOS:
744 use_lastfilepos = lexrc.getBool();
750 load_session = lexrc.getBool();
754 case RC_NUMLASTFILES:
756 num_lastfiles = lexrc.getInteger();
760 case RC_CHECKLASTFILES:
762 check_lastfiles = lexrc.getBool();
766 case RC_SCREEN_FONT_ROMAN:
768 roman_font_name = lexrc.getString();
769 oldFontFormat(roman_font_name,
774 case RC_SCREEN_FONT_SANS:
776 sans_font_name = lexrc.getString();
777 oldFontFormat(sans_font_name, sans_font_foundry);
781 case RC_SCREEN_FONT_TYPEWRITER:
783 typewriter_font_name = lexrc.getString();
784 oldFontFormat(typewriter_font_name,
785 typewriter_font_foundry);
789 case RC_SCREEN_FONT_ROMAN_FOUNDRY:
791 roman_font_foundry = lexrc.getString();
795 case RC_SCREEN_FONT_SANS_FOUNDRY:
797 sans_font_foundry = lexrc.getString();
801 case RC_SCREEN_FONT_TYPEWRITER_FOUNDRY:
803 typewriter_font_foundry = lexrc.getString();
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 ColorCode const col =
826 lcolor.getFromLyXName(lyx_name);
827 if (col == Color_none ||
828 col == Color_inherit ||
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_PIXMAP_CACHE:
908 use_pixmap_cache = lexrc.getBool();
911 case RC_USE_ESC_CHARS:
913 isp_use_esc_chars = lexrc.getBool();
918 isp_alt_lang = lexrc.getString();
923 isp_pers_dict = os::internal_path(lexrc.getString());
928 isp_esc_chars = lexrc.getString();
933 make_backup = lexrc.getBool();
936 case RC_BACKUPDIR_PATH:
938 backupdir_path = os::internal_path(lexrc.getString());
939 backupdir_path = expandPath(backupdir_path);
942 case RC_DATE_INSERT_FORMAT:
944 date_insert_format = lexrc.getString();
947 case RC_LANGUAGE_PACKAGE:
949 language_package = lexrc.getString();
952 case RC_LANGUAGE_AUTO_BEGIN:
954 language_auto_begin = lexrc.getBool();
957 case RC_LANGUAGE_AUTO_END:
959 language_auto_end = lexrc.getBool();
962 case RC_LANGUAGE_GLOBAL_OPTIONS:
964 language_global_options = lexrc.getBool();
967 case RC_LANGUAGE_USE_BABEL:
969 language_use_babel = lexrc.getBool();
972 case RC_LANGUAGE_COMMAND_BEGIN:
974 language_command_begin = lexrc.getString();
977 case RC_LANGUAGE_COMMAND_END:
979 language_command_end = lexrc.getString();
982 case RC_LANGUAGE_COMMAND_LOCAL:
984 language_command_local = lexrc.getString();
989 rtl_support = lexrc.getBool();
994 auto_number = lexrc.getBool();
997 case RC_MARK_FOREIGN_LANGUAGE:
999 mark_foreign_language = lexrc.getBool();
1004 string fmt, command;
1006 fmt = lexrc.getString();
1009 command = lexrc.getString();
1011 setMover(fmt, command);
1015 case RC_CONVERTER: {
1016 string from, to, command, flags;
1018 from = lexrc.getString();
1021 to = lexrc.getString();
1024 command = lexrc.getString();
1027 flags = lexrc.getString();
1029 if (command.empty()) {
1030 theConverters().erase(from, to);
1032 theConverters().add(from, to, command, flags);
1036 // compatibility with versions older than 1.4.0 only
1038 string format, command;
1040 format = lexrc.getString();
1043 command = lexrc.getString();
1045 formats.setViewer(format, command);
1049 string format, extension, prettyname, shortcut;
1051 format = lexrc.getString();
1054 extension = lexrc.getString();
1057 prettyname = lexrc.getString();
1060 shortcut = lexrc.getString();
1062 string viewer, editor;
1064 viewer = lexrc.getString();
1066 editor = lexrc.getString();
1068 // Hack to ensure compatibility with versions older
1070 int le = lexrc.lex();
1071 if (le != Lexer::LEX_FEOF && le != Lexer::LEX_UNDEF) {
1072 flags = lexrc.getString();
1073 if (le != Lexer::LEX_DATA) {
1074 // We have got a known token.
1075 // Therefore this is an old style
1076 // format definition without
1078 lexrc.pushToken(flags);
1082 int flgs = Format::none;
1083 while (!flags.empty()) {
1085 flags = support::split(flags, flag, ',');
1086 if (flag == "document")
1087 flgs |= Format::document;
1088 else if (flag == "vector")
1089 flgs |= Format::vector;
1091 lyxerr << "Ignoring unknown flag `"
1092 << flag << "' for format `"
1093 << format << "'." << endl;
1095 if (prettyname.empty()) {
1096 if (theConverters().formatIsUsed(format)) {
1097 lyxerr << "Can't delete format "
1100 formats.erase(format);
1103 formats.add(format, extension, prettyname,
1104 shortcut, viewer, editor, flgs);
1108 case RC_DEFAULT_LANGUAGE:
1110 default_language = lexrc.getString();
1114 case RC_LABEL_INIT_LENGTH:
1116 label_init_length = lexrc.getInteger();
1120 case RC_SHOW_BANNER:
1122 show_banner = lexrc.getBool();
1128 string const tmp = lexrc.getString();
1129 if (tmp == "true" || tmp == "on")
1130 preview = PREVIEW_ON;
1131 else if (tmp == "no_math")
1132 preview = PREVIEW_NO_MATH;
1134 preview = PREVIEW_OFF;
1135 if (tmp != "false" && tmp != "off")
1136 lyxerr << "Unrecognized "
1138 << tmp << '\n' << endl;
1143 case RC_PREVIEW_HASHED_LABELS:
1145 preview_hashed_labels = lexrc.getBool();
1149 case RC_PREVIEW_SCALE_FACTOR:
1151 preview_scale_factor = lexrc.getString();
1157 user_name = lexrc.getString();
1162 user_email = lexrc.getString();
1165 case RC_PATH_PREFIX:
1167 path_prefix = lexrc.getString();
1170 case RC_USE_CONVERTER_CACHE:
1172 use_converter_cache = lexrc.getBool();
1175 case RC_CONVERTER_CACHE_MAXAGE:
1177 converter_cache_maxage =
1178 convert<unsigned int>(lexrc.getString());
1181 case RC_LAST: break; // this is just a dummy
1185 /// Update converters data-structures
1186 theConverters().update(formats);
1187 theConverters().buildGraph();
1193 void LyXRC::write(FileName const & filename, bool ignore_system_lyxrc) const
1195 ofstream ofs(filename.toFilesystemEncoding().c_str());
1197 write(ofs, ignore_system_lyxrc);
1201 void LyXRC::print() const
1203 if (lyxerr.debugging())
1204 write(lyxerr, false);
1212 typedef std::pair<std::string, SpecialisedMover> Data;
1214 SameMover(Data const & comparison)
1215 : comparison_(comparison) {}
1217 bool operator()(Data const & data) const
1219 return data.first == comparison_.first &&
1220 data.second.command() == comparison_.second.command();
1228 void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) const
1230 LyXRCTags tag = RC_LAST;
1232 if (!name.empty()) {
1233 for (int i = 0; i != lyxrcCount; ++i)
1234 if ("\\" + name == lyxrcTags[i].tag)
1235 tag = static_cast<LyXRCTags>(lyxrcTags[i].code);
1239 os << "### This file is part of\n"
1240 << "### ========================================================\n"
1241 << "### LyX, The Document Processor\n"
1243 << "### Copyright 1995 Matthias Ettrich\n"
1244 << "### Copyright 1995-2007 The LyX Team.\n"
1246 << "### ========================================================\n"
1248 << "# This file is written by LyX, if you want to make your own\n"
1249 << "# modifications you should do them from inside LyX and save\n"
1252 // Why the switch you might ask. It is a trick to ensure that all
1253 // the elements in the LyXRCTags enum is handled. As you can see
1254 // there are no breaks at all. So it is just a huge fall-through.
1255 // The nice thing is that we will get a warning from the compiler
1256 // if we forget an element.
1260 // input/include files are not done here
1262 if (ignore_system_lyxrc ||
1263 bind_file != system_lyxrc.bind_file) {
1264 string const path = os::external_path(bind_file);
1265 os << "\\bind_file \"" << path << "\"\n";
1271 if (ignore_system_lyxrc ||
1272 def_file != system_lyxrc.def_file) {
1273 string const path = os::external_path(def_file);
1274 os << "\\def_file \"" << path << "\"\n";
1283 << "# MISC SECTION ######################################\n"
1285 // bind files are not done here.
1287 case RC_PATH_PREFIX:
1288 if (ignore_system_lyxrc ||
1289 path_prefix != system_lyxrc.path_prefix) {
1290 os << "\\path_prefix \"" << path_prefix << "\"\n";
1295 if (ignore_system_lyxrc ||
1296 ui_file != system_lyxrc.ui_file) {
1297 string const path = os::external_path(ui_file);
1298 os << "\\ui_file \"" << path << "\"\n";
1302 case RC_AUTOREGIONDELETE:
1303 if (ignore_system_lyxrc ||
1304 auto_region_delete != system_lyxrc.auto_region_delete) {
1305 os << "# Set to false to inhibit automatic replacement of\n"
1306 << "# the current selection.\n"
1307 << "\\auto_region_delete " << convert<string>(auto_region_delete)
1312 case RC_AUTORESET_OPTIONS:
1313 if (ignore_system_lyxrc ||
1314 auto_reset_options != system_lyxrc.auto_reset_options) {
1315 os << "# Set to false to inhibit automatic reset of\n"
1316 << "# the class options to defaults on class change.\n"
1317 << "\\auto_reset_options "
1318 << convert<string>(auto_reset_options)
1324 if (ignore_system_lyxrc ||
1325 autosave != system_lyxrc.autosave) {
1326 os << "# The time interval between auto-saves in seconds.\n"
1327 << "\\autosave " << autosave << '\n';
1331 case RC_DISPLAY_GRAPHICS:
1332 if (ignore_system_lyxrc ||
1333 display_graphics != system_lyxrc.display_graphics) {
1334 os << "# Display graphics within LyX\n"
1335 << "# monochrome|grayscale|color|none\n"
1336 << "\\display_graphics "
1337 << graphics::displayTranslator().find(
1338 graphics::DisplayType(display_graphics))
1344 case RC_VIEWDVI_PAPEROPTION:
1345 if (ignore_system_lyxrc ||
1346 view_dvi_paper_option
1347 != system_lyxrc.view_dvi_paper_option) {
1348 os << "# Options used to specify paper size to the\n"
1349 << "# view_dvi_command (e.g. -paper)\n"
1350 << "\\view_dvi_paper_option \""
1351 << view_dvi_paper_option << "\"\n";
1355 case RC_DEFAULT_PAPERSIZE:
1356 if (ignore_system_lyxrc ||
1357 default_papersize != system_lyxrc.default_papersize) {
1358 os << "# The default papersize to use.\n"
1359 << "\\default_papersize \"";
1360 switch (default_papersize) {
1362 os << "default"; break;
1363 case PAPER_USLETTER:
1364 os << "usletter"; break;
1366 os << "legal"; break;
1367 case PAPER_USEXECUTIVE:
1368 os << "executive"; break;
1379 case PAPER_B4: break;
1385 case RC_CHKTEX_COMMAND:
1386 if (ignore_system_lyxrc ||
1387 chktex_command != system_lyxrc.chktex_command) {
1388 os << "\\chktex_command \"" << chktex_command << "\"\n";
1392 case RC_BIBTEX_COMMAND:
1393 if (ignore_system_lyxrc ||
1394 bibtex_command != system_lyxrc.bibtex_command) {
1395 os << "\\bibtex_command \"" << bibtex_command << "\"\n";
1399 case RC_INDEX_COMMAND:
1400 if (ignore_system_lyxrc ||
1401 index_command != system_lyxrc.index_command) {
1402 os << "\\index_command \"" << index_command << "\"\n";
1406 case RC_TEX_EXPECTS_WINDOWS_PATHS:
1407 if (ignore_system_lyxrc ||
1408 windows_style_tex_paths != system_lyxrc.windows_style_tex_paths) {
1409 os << "\\tex_expects_windows_paths "
1410 << convert<string>(windows_style_tex_paths) << '\n';
1414 case RC_TEX_ALLOWS_SPACES:
1415 if (tex_allows_spaces != system_lyxrc.tex_allows_spaces) {
1416 os << "\\tex_allows_spaces "
1417 << convert<string>(tex_allows_spaces) << '\n';
1422 if (ignore_system_lyxrc ||
1423 use_kbmap != system_lyxrc.use_kbmap) {
1424 os << "\\kbmap " << convert<string>(use_kbmap) << '\n';
1428 case RC_KBMAP_PRIMARY:
1429 if (ignore_system_lyxrc ||
1430 primary_kbmap != system_lyxrc.primary_kbmap) {
1431 string const path = os::external_path(primary_kbmap);
1432 os << "\\kbmap_primary \"" << path << "\"\n";
1436 case RC_KBMAP_SECONDARY:
1437 if (ignore_system_lyxrc ||
1438 secondary_kbmap != system_lyxrc.secondary_kbmap) {
1439 string const path = os::external_path(secondary_kbmap);
1440 os << "\\kbmap_secondary \"" << path << "\"\n";
1445 if (ignore_system_lyxrc ||
1446 lyxpipes != system_lyxrc.lyxpipes) {
1447 string const path = os::external_path(lyxpipes);
1448 os << "\\serverpipe \"" << path << "\"\n";
1452 case RC_DATE_INSERT_FORMAT:
1453 if (ignore_system_lyxrc ||
1454 date_insert_format != system_lyxrc.date_insert_format) {
1455 os << "\\date_insert_format \"" << date_insert_format
1460 case RC_LABEL_INIT_LENGTH:
1461 if (ignore_system_lyxrc ||
1462 label_init_length != system_lyxrc.label_init_length) {
1463 os << "\\label_init_length " << label_init_length
1470 os << "\\user_name \"" << user_name << "\"\n";
1475 os << "\\user_email \"" << user_email << "\"\n";
1479 case RC_SHOW_BANNER:
1480 if (ignore_system_lyxrc ||
1481 show_banner != system_lyxrc.show_banner) {
1482 os << "\\show_banner " << convert<string>(show_banner) << '\n';
1488 if (ignore_system_lyxrc ||
1489 preview != system_lyxrc.preview) {
1495 case PREVIEW_NO_MATH:
1502 os << "\\preview " << status << '\n';
1507 case RC_PREVIEW_HASHED_LABELS:
1508 if (ignore_system_lyxrc ||
1509 preview_hashed_labels !=
1510 system_lyxrc.preview_hashed_labels) {
1511 os << "\\preview_hashed_labels "
1512 << convert<string>(preview_hashed_labels) << '\n';
1517 case RC_PREVIEW_SCALE_FACTOR:
1518 if (ignore_system_lyxrc ||
1519 preview_scale_factor != system_lyxrc.preview_scale_factor) {
1520 os << "\\preview_scale_factor "
1521 << preview_scale_factor << '\n';
1526 case RC_USE_CONVERTER_CACHE:
1527 if (ignore_system_lyxrc ||
1528 use_converter_cache != system_lyxrc.use_converter_cache) {
1529 os << "\\use_converter_cache "
1530 << convert<string>(use_converter_cache) << '\n';
1535 case RC_CONVERTER_CACHE_MAXAGE:
1536 if (ignore_system_lyxrc ||
1537 converter_cache_maxage != system_lyxrc.converter_cache_maxage) {
1538 os << "\\converter_cache_maxage "
1539 << converter_cache_maxage << '\n';
1545 << "# SCREEN & FONTS SECTION ############################\n"
1549 if (ignore_system_lyxrc ||
1550 dpi != system_lyxrc.dpi) {
1551 os << "\\screen_dpi " << dpi << '\n';
1555 case RC_SCREEN_ZOOM:
1556 if (ignore_system_lyxrc ||
1557 zoom != system_lyxrc.zoom) {
1558 os << "\\screen_zoom " << zoom << '\n';
1562 case RC_SCREEN_GEOMETRY_HEIGHT:
1563 if (ignore_system_lyxrc ||
1564 geometry_height != system_lyxrc.geometry_height) {
1565 os << "\\screen_geometry_height " << geometry_height
1570 case RC_SCREEN_GEOMETRY_WIDTH:
1571 if (ignore_system_lyxrc ||
1572 geometry_width != system_lyxrc.geometry_width) {
1573 os << "\\screen_geometry_width " << geometry_width
1578 case RC_SCREEN_GEOMETRY_XYSAVED:
1579 if (ignore_system_lyxrc ||
1580 geometry_xysaved != system_lyxrc.geometry_xysaved) {
1581 os << "\\screen_geometry_xysaved " << convert<string>(geometry_xysaved)
1586 case RC_CURSOR_FOLLOWS_SCROLLBAR:
1587 if (ignore_system_lyxrc ||
1588 cursor_follows_scrollbar
1589 != system_lyxrc.cursor_follows_scrollbar) {
1590 os << "\\cursor_follows_scrollbar "
1591 << convert<string>(cursor_follows_scrollbar) << '\n';
1595 case RC_DIALOGS_ICONIFY_WITH_MAIN:
1596 if (ignore_system_lyxrc ||
1597 dialogs_iconify_with_main
1598 != system_lyxrc.dialogs_iconify_with_main) {
1599 os << "\\dialogs_iconify_with_main "
1600 << convert<string>(dialogs_iconify_with_main) << '\n';
1604 case RC_SCREEN_FONT_ROMAN:
1605 if (ignore_system_lyxrc ||
1606 roman_font_name != system_lyxrc.roman_font_name) {
1607 os << "\\screen_font_roman \"" << roman_font_name
1612 case RC_SCREEN_FONT_ROMAN_FOUNDRY:
1613 if (ignore_system_lyxrc ||
1614 roman_font_foundry != system_lyxrc.roman_font_foundry) {
1615 os << "\\screen_font_roman_foundry \"" << roman_font_foundry
1620 case RC_SCREEN_FONT_SANS:
1621 if (ignore_system_lyxrc ||
1622 sans_font_name != system_lyxrc.sans_font_name) {
1623 os << "\\screen_font_sans \"" << sans_font_name
1628 case RC_SCREEN_FONT_SANS_FOUNDRY:
1629 if (ignore_system_lyxrc ||
1630 sans_font_foundry != system_lyxrc.sans_font_foundry) {
1631 os << "\\screen_font_sans_foundry \"" << sans_font_foundry
1636 case RC_SCREEN_FONT_TYPEWRITER:
1637 if (ignore_system_lyxrc ||
1638 typewriter_font_name != system_lyxrc.typewriter_font_name) {
1639 os << "\\screen_font_typewriter \""
1640 << typewriter_font_name << "\"\n";
1644 case RC_SCREEN_FONT_TYPEWRITER_FOUNDRY:
1645 if (ignore_system_lyxrc ||
1646 typewriter_font_foundry != system_lyxrc.typewriter_font_foundry) {
1647 os << "\\screen_font_typewriter_foundry \""
1648 << typewriter_font_foundry << "\"\n";
1653 case RC_SCREEN_FONT_SCALABLE:
1654 if (ignore_system_lyxrc ||
1655 use_scalable_fonts != system_lyxrc.use_scalable_fonts) {
1656 os << "\\screen_font_scalable "
1657 << convert<string>(use_scalable_fonts)
1662 case RC_SCREEN_FONT_SIZES:
1663 if (ignore_system_lyxrc ||
1664 font_sizes[FONT_SIZE_TINY]
1665 != system_lyxrc.font_sizes[FONT_SIZE_TINY] ||
1666 font_sizes[FONT_SIZE_SCRIPT]
1667 != system_lyxrc.font_sizes[FONT_SIZE_SCRIPT] ||
1668 font_sizes[FONT_SIZE_FOOTNOTE]
1669 != system_lyxrc.font_sizes[FONT_SIZE_FOOTNOTE] ||
1670 font_sizes[FONT_SIZE_SMALL]
1671 != system_lyxrc.font_sizes[FONT_SIZE_SMALL] ||
1672 font_sizes[FONT_SIZE_NORMAL]
1673 != system_lyxrc.font_sizes[FONT_SIZE_NORMAL] ||
1674 font_sizes[FONT_SIZE_LARGE]
1675 != system_lyxrc.font_sizes[FONT_SIZE_LARGE] ||
1676 font_sizes[FONT_SIZE_LARGER]
1677 != system_lyxrc.font_sizes[FONT_SIZE_LARGER] ||
1678 font_sizes[FONT_SIZE_LARGEST]
1679 != system_lyxrc.font_sizes[FONT_SIZE_LARGEST] ||
1680 font_sizes[FONT_SIZE_HUGE]
1681 != system_lyxrc.font_sizes[FONT_SIZE_HUGE] ||
1682 font_sizes[FONT_SIZE_HUGER]
1683 != system_lyxrc.font_sizes[FONT_SIZE_HUGER]) {
1684 os.setf(ios::fixed);
1686 os << "\\screen_font_sizes"
1687 << ' ' << font_sizes[FONT_SIZE_TINY]
1688 << ' ' << font_sizes[FONT_SIZE_SCRIPT]
1689 << ' ' << font_sizes[FONT_SIZE_FOOTNOTE]
1690 << ' ' << font_sizes[FONT_SIZE_SMALL]
1691 << ' ' << font_sizes[FONT_SIZE_NORMAL]
1692 << ' ' << font_sizes[FONT_SIZE_LARGE]
1693 << ' ' << font_sizes[FONT_SIZE_LARGER]
1694 << ' ' << font_sizes[FONT_SIZE_LARGEST]
1695 << ' ' << font_sizes[FONT_SIZE_HUGE]
1696 << ' ' << font_sizes[FONT_SIZE_HUGER]
1703 << "# COLOR SECTION ###################################\n"
1707 for (int i = 0; i < Color_ignore; ++i) {
1708 ColorCode lc = static_cast<ColorCode>(i);
1710 string const col(lcolor.getX11Name(lc));
1711 if (ignore_system_lyxrc ||
1712 col != system_lcolor.getX11Name(lc)) {
1713 os << "\\set_color \""
1714 << lcolor.getLyXName(lc) << "\" \""
1722 << "# PRINTER SECTION ###################################\n"
1726 if (ignore_system_lyxrc ||
1727 printer != system_lyxrc.printer) {
1728 os << "\\printer \"" << printer << "\"\n";
1732 case RC_PRINT_ADAPTOUTPUT:
1733 if (ignore_system_lyxrc ||
1734 print_adapt_output != system_lyxrc.print_adapt_output) {
1735 os << "\\print_adapt_output "
1736 << convert<string>(print_adapt_output)
1741 case RC_PRINT_COMMAND:
1742 if (ignore_system_lyxrc ||
1743 print_command != system_lyxrc.print_command) {
1744 os << "\\print_command \"" << print_command << "\"\n";
1748 case RC_PRINTEXSTRAOPTIONS:
1749 if (ignore_system_lyxrc ||
1750 print_extra_options != system_lyxrc.print_extra_options) {
1751 os << "\\print_extra_options \"" << print_extra_options
1756 case RC_PRINTSPOOL_COMMAND:
1757 if (ignore_system_lyxrc ||
1758 print_spool_command != system_lyxrc.print_spool_command) {
1759 os << "\\print_spool_command \"" << print_spool_command
1764 case RC_PRINTSPOOL_PRINTERPREFIX:
1765 if (ignore_system_lyxrc ||
1766 print_spool_printerprefix
1767 != system_lyxrc.print_spool_printerprefix) {
1768 os << "\\print_spool_printerprefix \""
1769 << print_spool_printerprefix << "\"\n";
1773 case RC_PRINTEVENPAGEFLAG:
1774 if (ignore_system_lyxrc ||
1775 print_evenpage_flag != system_lyxrc.print_evenpage_flag) {
1776 os << "\\print_evenpage_flag \"" << print_evenpage_flag
1781 case RC_PRINTODDPAGEFLAG:
1782 if (ignore_system_lyxrc ||
1783 print_oddpage_flag != system_lyxrc.print_oddpage_flag) {
1784 os << "\\print_oddpage_flag \"" << print_oddpage_flag
1789 case RC_PRINTREVERSEFLAG:
1790 if (ignore_system_lyxrc ||
1791 print_reverse_flag != system_lyxrc.print_reverse_flag) {
1792 os << "\\print_reverse_flag \"" << print_reverse_flag
1797 case RC_PRINTLANDSCAPEFLAG:
1798 if (ignore_system_lyxrc ||
1799 print_landscape_flag != system_lyxrc.print_landscape_flag) {
1800 os << "\\print_landscape_flag \"" << print_landscape_flag
1805 case RC_PRINTPAGERANGEFLAG:
1806 if (ignore_system_lyxrc ||
1807 print_pagerange_flag != system_lyxrc.print_pagerange_flag) {
1808 os << "\\print_pagerange_flag \"" << print_pagerange_flag
1813 case RC_PRINTCOPIESFLAG:
1814 if (ignore_system_lyxrc ||
1815 print_copies_flag != system_lyxrc.print_copies_flag) {
1816 os << "\\print_copies_flag \"" << print_copies_flag
1821 case RC_PRINTCOLLCOPIESFLAG:
1822 if (ignore_system_lyxrc ||
1823 print_collcopies_flag
1824 != system_lyxrc.print_collcopies_flag) {
1825 os << "\\print_collcopies_flag \""
1826 << print_collcopies_flag
1831 case RC_PRINTPAPERFLAG:
1832 if (ignore_system_lyxrc ||
1833 print_paper_flag != system_lyxrc.print_paper_flag) {
1834 os << "\\print_paper_flag \"" << print_paper_flag
1839 case RC_PRINTPAPERDIMENSIONFLAG:
1840 if (ignore_system_lyxrc ||
1841 print_paper_dimension_flag
1842 != system_lyxrc.print_paper_dimension_flag) {
1843 os << "\\print_paper_dimension_flag \""
1844 << print_paper_dimension_flag << "\"\n";
1848 case RC_PRINTTOPRINTER:
1849 if (ignore_system_lyxrc ||
1850 print_to_printer != system_lyxrc.print_to_printer) {
1851 os << "\\print_to_printer \"" << print_to_printer
1856 case RC_PRINTTOFILE:
1857 if (ignore_system_lyxrc ||
1858 print_to_file != system_lyxrc.print_to_file) {
1859 string const path = os::external_path(print_to_file);
1860 os << "\\print_to_file \"" << path << "\"\n";
1864 case RC_PRINTFILEEXTENSION:
1865 if (ignore_system_lyxrc ||
1866 print_file_extension != system_lyxrc.print_file_extension) {
1867 os << "\\print_file_extension \""
1868 << print_file_extension
1875 << "# EXPORT SECTION ####################################\n"
1878 case RC_CUSTOM_EXPORT_COMMAND:
1879 if (ignore_system_lyxrc ||
1880 custom_export_command
1881 != system_lyxrc.custom_export_command) {
1882 os << "\\custom_export_command \""
1883 << custom_export_command
1888 case RC_CUSTOM_EXPORT_FORMAT:
1889 if (ignore_system_lyxrc ||
1890 custom_export_format
1891 != system_lyxrc.custom_export_format) {
1892 os << "\\custom_export_format \"" << custom_export_format
1899 << "# TEX SECTION #######################################\n"
1902 case RC_FONT_ENCODING:
1903 if (ignore_system_lyxrc ||
1904 fontenc != system_lyxrc.fontenc) {
1905 os << "\\font_encoding \"" << fontenc << "\"\n";
1911 << "# FILE SECTION ######################################\n"
1914 case RC_DOCUMENTPATH:
1915 if (ignore_system_lyxrc ||
1916 document_path != system_lyxrc.document_path) {
1917 string const path = os::external_path(document_path);
1918 os << "\\document_path \"" << path << "\"\n";
1922 case RC_USELASTFILEPOS:
1923 if (ignore_system_lyxrc ||
1924 use_lastfilepos != system_lyxrc.use_lastfilepos) {
1925 os << "\\use_lastfilepos " << convert<string>(use_lastfilepos)
1930 case RC_LOADSESSION:
1931 if (ignore_system_lyxrc ||
1932 load_session != system_lyxrc.load_session) {
1933 os << "\\load_session " << convert<string>(load_session)
1938 case RC_NUMLASTFILES:
1939 if (ignore_system_lyxrc ||
1940 num_lastfiles != system_lyxrc.num_lastfiles) {
1941 os << "\\num_lastfiles " << num_lastfiles << '\n';
1945 case RC_CHECKLASTFILES:
1946 if (ignore_system_lyxrc ||
1947 check_lastfiles != system_lyxrc.check_lastfiles) {
1948 os << "\\check_lastfiles " << convert<string>(check_lastfiles)
1953 case RC_TEMPLATEPATH:
1954 if (ignore_system_lyxrc ||
1955 template_path != system_lyxrc.template_path) {
1956 string const path = os::external_path(template_path);
1957 os << "\\template_path \"" << path << "\"\n";
1961 case RC_TEMPDIRPATH:
1962 if (ignore_system_lyxrc ||
1963 tempdir_path != system_lyxrc.tempdir_path) {
1964 string const path = os::external_path(tempdir_path);
1965 os << "\\tempdir_path \"" << path << "\"\n";
1973 case RC_PLAINTEXT_LINELEN:
1974 if (ignore_system_lyxrc ||
1975 plaintext_linelen != system_lyxrc.plaintext_linelen) {
1976 os << "\\plaintext_linelen " << plaintext_linelen << '\n';
1980 case RC_MAKE_BACKUP:
1981 if (ignore_system_lyxrc ||
1982 make_backup != system_lyxrc.make_backup) {
1983 os << "\\make_backup " << convert<string>(make_backup) << '\n';
1987 case RC_BACKUPDIR_PATH:
1988 if (ignore_system_lyxrc ||
1989 backupdir_path != system_lyxrc.backupdir_path) {
1990 string const path = os::external_path(backupdir_path);
1991 os << "\\backupdir_path \"" << path << "\"\n";
1997 << "# PLAIN TEXT EXPORT SECTION ##############################\n"
2000 case RC_PLAINTEXT_ROFF_COMMAND:
2001 if (ignore_system_lyxrc ||
2002 plaintext_roff_command != system_lyxrc.plaintext_roff_command) {
2003 os << "\\plaintext_roff_command \"" << plaintext_roff_command
2010 << "# SPELLCHECKER SECTION ##############################\n"
2012 case RC_USE_SPELL_LIB:
2013 if (ignore_system_lyxrc ||
2014 use_spell_lib != system_lyxrc.use_spell_lib) {
2015 os << "\\use_spell_lib " << convert<string>(use_spell_lib) << '\n';
2019 case RC_SPELL_COMMAND:
2020 if (ignore_system_lyxrc ||
2021 isp_command != system_lyxrc.isp_command) {
2022 os << "\\spell_command \"" << isp_command << "\"\n";
2026 case RC_ACCEPT_COMPOUND:
2027 if (ignore_system_lyxrc ||
2028 isp_accept_compound != system_lyxrc.isp_accept_compound) {
2029 os << "\\accept_compound " << convert<string>(isp_accept_compound)
2034 case RC_USE_ALT_LANG:
2035 if (ignore_system_lyxrc ||
2036 isp_use_alt_lang != system_lyxrc.isp_use_alt_lang) {
2037 os << "\\use_alt_language " << convert<string>(isp_use_alt_lang)
2043 if (ignore_system_lyxrc ||
2044 isp_alt_lang != system_lyxrc.isp_alt_lang) {
2045 os << "\\alternate_language \"" << isp_alt_lang
2050 case RC_USE_ESC_CHARS:
2051 if (ignore_system_lyxrc ||
2052 isp_use_esc_chars != system_lyxrc.isp_use_esc_chars) {
2053 os << "\\use_escape_chars " << convert<string>(isp_use_esc_chars)
2059 if (ignore_system_lyxrc ||
2060 isp_esc_chars != system_lyxrc.isp_esc_chars) {
2061 os << "\\escape_chars \"" << isp_esc_chars << "\"\n";
2065 case RC_USE_PERS_DICT:
2066 if (ignore_system_lyxrc ||
2067 isp_use_pers_dict != system_lyxrc.isp_use_pers_dict) {
2068 os << "\\use_personal_dictionary "
2069 << convert<string>(isp_use_pers_dict)
2074 case RC_USE_PIXMAP_CACHE:
2075 if (ignore_system_lyxrc ||
2076 use_pixmap_cache != system_lyxrc.use_pixmap_cache) {
2077 os << "\\use_pixmap_cache "
2078 << convert<string>(use_pixmap_cache)
2082 if (isp_pers_dict != system_lyxrc.isp_pers_dict) {
2083 string const path = os::external_path(isp_pers_dict);
2084 os << "\\personal_dictionary \"" << path << "\"\n";
2088 case RC_USE_INP_ENC:
2089 if (ignore_system_lyxrc ||
2090 isp_use_input_encoding
2091 != system_lyxrc.isp_use_input_encoding) {
2092 os << "\\use_input_encoding "
2093 << convert<string>(isp_use_input_encoding)
2100 << "# LANGUAGE SUPPORT SECTION ##########################\n"
2103 case RC_RTL_SUPPORT:
2104 if (ignore_system_lyxrc ||
2105 rtl_support != system_lyxrc.rtl_support) {
2106 os << "\\rtl " << convert<string>(rtl_support) << '\n';
2110 case RC_LANGUAGE_PACKAGE:
2111 if (ignore_system_lyxrc ||
2112 language_package != system_lyxrc.language_package) {
2113 os << "\\language_package \"" << language_package
2118 case RC_LANGUAGE_GLOBAL_OPTIONS:
2119 if (ignore_system_lyxrc ||
2120 language_global_options
2121 != system_lyxrc.language_global_options) {
2122 os << "\\language_global_options \""
2123 << convert<string>(language_global_options)
2128 case RC_LANGUAGE_USE_BABEL:
2129 if (ignore_system_lyxrc ||
2130 language_use_babel != system_lyxrc.language_use_babel) {
2131 os << "\\language_use_babel \""
2132 << convert<string>(language_use_babel)
2137 case RC_LANGUAGE_COMMAND_BEGIN:
2138 if (ignore_system_lyxrc ||
2139 language_command_begin
2140 != system_lyxrc.language_command_begin) {
2141 os << "\\language_command_begin \""
2142 << language_command_begin
2147 case RC_LANGUAGE_COMMAND_END:
2148 if (ignore_system_lyxrc ||
2149 language_command_end
2150 != system_lyxrc.language_command_end) {
2151 os << "\\language_command_end \"" << language_command_end
2156 case RC_LANGUAGE_COMMAND_LOCAL:
2157 if (ignore_system_lyxrc ||
2158 language_command_local
2159 != system_lyxrc.language_command_local) {
2160 os << "\\language_command_local \""
2161 << language_command_local
2166 case RC_LANGUAGE_AUTO_BEGIN:
2167 if (ignore_system_lyxrc ||
2168 language_auto_begin != system_lyxrc.language_auto_begin) {
2169 os << "\\language_auto_begin "
2170 << convert<string>(language_auto_begin) << '\n';
2174 case RC_LANGUAGE_AUTO_END:
2175 if (ignore_system_lyxrc ||
2176 language_auto_end != system_lyxrc.language_auto_end) {
2177 os << "\\language_auto_end "
2178 << convert<string>(language_auto_end) << '\n';
2182 case RC_MARK_FOREIGN_LANGUAGE:
2183 if (ignore_system_lyxrc ||
2184 mark_foreign_language
2185 != system_lyxrc.mark_foreign_language) {
2186 os << "\\mark_foreign_language " <<
2187 convert<string>(mark_foreign_language) << '\n';
2193 << "# 2nd MISC SUPPORT SECTION ##########################\n"
2196 case RC_AUTO_NUMBER:
2197 if (ignore_system_lyxrc ||
2198 auto_number != system_lyxrc.auto_number) {
2199 os << "\\auto_number " << convert<string>(auto_number) << '\n';
2203 case RC_DEFAULT_LANGUAGE:
2204 if (ignore_system_lyxrc ||
2205 default_language != system_lyxrc.default_language) {
2206 os << "\\default_language " << default_language << '\n';
2212 << "# FORMATS SECTION ##########################\n"
2216 // New/modified formats
2217 for (Formats::const_iterator cit = formats.begin();
2218 cit != formats.end(); ++cit) {
2219 Format const * format =
2220 system_formats.getFormat(cit->name());
2222 format->extension() != cit->extension() ||
2223 format->prettyname() != cit->prettyname() ||
2224 format->shortcut() != cit->shortcut() ||
2225 format->viewer() != cit->viewer() ||
2226 format->editor() != cit->editor() ||
2227 format->documentFormat() != cit->documentFormat() ||
2228 format->vectorFormat() != cit->vectorFormat()) {
2229 os << "\\format \"" << cit->name() << "\" \""
2230 << cit->extension() << "\" \""
2231 << cit->prettyname() << "\" \""
2232 << cit->shortcut() << "\" \""
2233 << cit->viewer() << "\" \""
2234 << cit->editor() << "\" \"";
2235 std::vector<string> flags;
2236 if (cit->documentFormat())
2237 flags.push_back("document");
2238 if (cit->vectorFormat())
2239 flags.push_back("vector");
2240 os << support::getStringFromVector(flags);
2245 // Look for deleted formats
2246 for (Formats::const_iterator cit = system_formats.begin();
2247 cit != system_formats.end(); ++cit)
2248 if (!formats.getFormat(cit->name()))
2249 os << "\\format \"" << cit->name()
2250 << "\" \"\" \"\" \"\" \"\" \"\" \"\"\n";
2259 << "# CONVERTERS SECTION ##########################\n"
2263 // Look for new converters
2264 for (Converters::const_iterator cit = theConverters().begin();
2265 cit != theConverters().end(); ++cit) {
2266 Converter const * converter =
2267 theSystemConverters().getConverter(cit->from,
2270 converter->command != cit->command ||
2271 converter->flags != cit->flags)
2272 os << "\\converter \"" << cit->from << "\" \""
2273 << cit->to << "\" \""
2274 << cit->command << "\" \""
2275 << cit->flags << "\"\n";
2278 // New/modifed converters
2279 for (Converters::const_iterator cit = theSystemConverters().begin();
2280 cit != theSystemConverters().end(); ++cit)
2281 if (!theConverters().getConverter(cit->from, cit->to))
2282 os << "\\converter \"" << cit->from
2283 << "\" \"" << cit->to << "\" \"\" \"\"\n";
2290 << "# COPIERS SECTION ##########################\n"
2293 // Look for new movers
2294 Movers::const_iterator const sysbegin = theSystemMovers().begin();
2295 Movers::const_iterator const sysend = theSystemMovers().end();
2296 Movers::const_iterator it = theMovers().begin();
2297 Movers::const_iterator end = theMovers().end();
2299 for (; it != end; ++it) {
2300 Movers::const_iterator const sysit =
2301 std::find_if(sysbegin, sysend, SameMover(*it));
2302 if (sysit == sysend) {
2303 std::string const & fmt = it->first;
2304 std::string const & command =
2305 it->second.command();
2307 os << "\\copier " << fmt
2308 << " \"" << command << "\"\n";
2314 // We don't actually delete SpecialisedMover(s) from the
2315 // map, just clear their 'command', so there's no need
2316 // to test for anything else.
2324 string const LyXRC::getDescription(LyXRCTags tag)
2329 case RC_ACCEPT_COMPOUND:
2330 str = _("Consider run-together words, such as \"diskdrive\" for \"disk drive\", as legal words?");
2334 case RC_USE_ALT_LANG:
2335 str = _("Specify an alternate language. The default is to use the language of the document.");
2338 case RC_PLAINTEXT_ROFF_COMMAND:
2339 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.");
2342 case RC_PLAINTEXT_LINELEN:
2343 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.");
2346 case RC_AUTOREGIONDELETE:
2347 str = _("De-select if you don't want the current selection to be replaced automatically by what you type.");
2350 case RC_AUTORESET_OPTIONS:
2351 str = _("De-select if you don't want the class options to be reset to defaults after class change.");
2355 str = _("The time interval between auto-saves (in seconds). 0 means no auto-save.");
2358 case RC_AUTO_NUMBER:
2361 case RC_BACKUPDIR_PATH:
2362 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.");
2365 case RC_BIBTEX_COMMAND:
2366 str = _("Define the options of bibtex (cf. man bibtex) or select an alternative compiler (e.g. mlbibtex or bibulus).");
2370 str = _("Keybindings file. Can either specify an absolute path, or LyX will look in its global and local bind/ directories.");
2373 case RC_CHECKLASTFILES:
2374 str = _("Select to check whether the lastfiles still exist.");
2377 case RC_CHKTEX_COMMAND:
2378 str = _("Define how to run chktex. E.g. \"chktex -n11 -n1 -n3 -n6 -n9 -22 -n25 -n30 -n38\" Refer to the ChkTeX documentation.");
2387 case RC_CURSOR_FOLLOWS_SCROLLBAR:
2388 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.");
2391 case RC_CUSTOM_EXPORT_COMMAND:
2394 case RC_CUSTOM_EXPORT_FORMAT:
2397 case RC_DATE_INSERT_FORMAT:
2398 //xgettext:no-c-format
2399 str = _("This accepts the normal strftime formats; see man strftime for full details. E.g.\"%A, %e. %B %Y\".");
2402 case RC_DEFAULT_LANGUAGE:
2403 str = _("New documents will be assigned this language.");
2406 case RC_DEFAULT_PAPERSIZE:
2407 str = _("Specify the default paper size.");
2410 case RC_DIALOGS_ICONIFY_WITH_MAIN:
2411 str = _("Iconify the dialogs when the main window is iconified. (Affects only dialogs shown after the change has been made.)");
2414 case RC_DISPLAY_GRAPHICS:
2415 str = _("Select how LyX will display any graphics.");
2418 case RC_DOCUMENTPATH:
2419 str = _("The default path for your documents. An empty value selects the directory LyX was started from.");
2423 case RC_USE_ESC_CHARS:
2424 str = _("Specify additional chars that can be part of a word.");
2427 case RC_FONT_ENCODING:
2428 str = _("The font encoding used for the LaTeX2e fontenc package. T1 is highly recommended for non-English languages.");
2434 case RC_INDEX_COMMAND:
2435 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\".");
2442 case RC_KBMAP_PRIMARY:
2443 case RC_KBMAP_SECONDARY:
2444 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.");
2447 case RC_LABEL_INIT_LENGTH:
2448 str = _("Maximum number of words in the initialization string for a new label");
2451 case RC_LANGUAGE_AUTO_BEGIN:
2452 str = _("Select if a language switching command is needed at the beginning of the document.");
2455 case RC_LANGUAGE_AUTO_END:
2456 str = _("Select if a language switching command is needed at the end of the document.");
2459 case RC_LANGUAGE_COMMAND_BEGIN:
2460 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.");
2463 case RC_LANGUAGE_COMMAND_END:
2464 str = _("The LaTeX command for changing back to the language of the document.");
2467 case RC_LANGUAGE_COMMAND_LOCAL:
2468 str = _("The LaTeX command for local changing of the language.");
2471 case RC_LANGUAGE_GLOBAL_OPTIONS:
2472 str = _("De-select if you don't want the language(s) used as an argument to \\documentclass.");
2475 case RC_LANGUAGE_PACKAGE:
2476 str = _("The LaTeX command for loading the language package. E.g. \"\\usepackage{babel}\", \"\\usepackage{omega}\".");
2479 case RC_LANGUAGE_USE_BABEL:
2480 str = _("De-select if you don't want babel to be used when the language of the document is the default language.");
2483 case RC_USELASTFILEPOS:
2484 str = _("De-select if you do not want LyX to scroll to saved position.");
2487 case RC_LOADSESSION:
2488 str = _("De-select to prevent loading files opened from the last LyX session.");
2491 case RC_MAKE_BACKUP:
2492 str = _("De-select if you don't want LyX to create backup files.");
2495 case RC_MARK_FOREIGN_LANGUAGE:
2496 str = _("Select to control the highlighting of words with a language foreign to that of the document.");
2499 case RC_NUMLASTFILES:
2500 str = bformat(_("Maximal number of lastfiles. Up to %1$d can appear in the file menu."),
2504 case RC_PATH_PREFIX:
2505 str = _("Specify those directories which should be "
2506 "prepended to the PATH environment variable. "
2507 "Use the OS native format.");
2511 case RC_USE_PERS_DICT:
2512 str = _("Specify an alternate personal dictionary file. E.g. \".ispell_english\".");
2515 case RC_USE_PIXMAP_CACHE:
2516 str = _("Enable the pixmap cache that might improve performance on Mac and Windows.");
2520 str = _("Shows a typeset preview of things such as math");
2523 case RC_PREVIEW_HASHED_LABELS:
2524 str = _("Previewed equations will have \"(#)\" labels rather than numbered ones");
2527 case RC_PREVIEW_SCALE_FACTOR:
2528 str = _("Scale the preview size to suit.");
2531 case RC_PRINTCOLLCOPIESFLAG:
2532 str = _("The option for specifying whether the copies should be collated.");
2535 case RC_PRINTCOPIESFLAG:
2536 str = _("The option for specifying the number of copies to print.");
2540 str = _("The default printer to print on. If none is specified, LyX will use the environment variable PRINTER.");
2543 case RC_PRINTEVENPAGEFLAG:
2544 str = _("The option to print only even pages.");
2547 case RC_PRINTEXSTRAOPTIONS:
2548 str = _("Extra options to pass to printing program after everything else, but before the filename of the DVI file to be printed.");
2551 case RC_PRINTFILEEXTENSION:
2552 str = _("Extension of printer program output file. Usually \".ps\".");
2555 case RC_PRINTLANDSCAPEFLAG:
2556 str = _("The option to print out in landscape.");
2559 case RC_PRINTODDPAGEFLAG:
2560 str = _("The option to print only odd pages.");
2563 case RC_PRINTPAGERANGEFLAG:
2564 str = _("The option for specifying a comma-separated list of pages to print.");
2567 case RC_PRINTPAPERDIMENSIONFLAG:
2568 str = _("Option to specify the dimensions of the print paper.");
2571 case RC_PRINTPAPERFLAG:
2572 str = _("The option to specify paper type.");
2575 case RC_PRINTREVERSEFLAG:
2576 str = _("The option to reverse the order of the pages printed.");
2579 case RC_PRINTSPOOL_COMMAND:
2580 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.");
2583 case RC_PRINTSPOOL_PRINTERPREFIX:
2584 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.");
2587 case RC_PRINTTOFILE:
2588 str = _("Option to pass to the print program to print to a file.");
2591 case RC_PRINTTOPRINTER:
2592 str = _("Option to pass to the print program to print on a specific printer.");
2595 case RC_PRINT_ADAPTOUTPUT:
2596 str = _("Select for LyX to pass the name of the destination printer to your print command.");
2599 case RC_PRINT_COMMAND:
2600 str = _("Your favorite print program, e.g. \"dvips\", \"dvilj4\".");
2603 case RC_RTL_SUPPORT:
2604 str = _("Select to enable support of right-to-left languages (e.g. Hebrew, Arabic).");
2608 str = _("DPI (dots per inch) of your monitor is auto-detected by LyX. If that goes wrong, override the setting here.");
2611 case RC_SCREEN_FONT_ROMAN:
2612 case RC_SCREEN_FONT_SANS:
2613 case RC_SCREEN_FONT_TYPEWRITER:
2614 str = _("The screen fonts used to display the text while editing.");
2617 case RC_SCREEN_FONT_ROMAN_FOUNDRY:
2618 case RC_SCREEN_FONT_SANS_FOUNDRY:
2619 case RC_SCREEN_FONT_TYPEWRITER_FOUNDRY:
2622 case RC_SCREEN_FONT_SCALABLE:
2623 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.");
2626 case RC_SCREEN_FONT_SIZES:
2627 str = _("The font sizes used for calculating the scaling of the screen fonts.");
2630 case RC_SCREEN_ZOOM:
2631 //xgettext:no-c-format
2632 str = _("The zoom percentage for screen fonts. A setting of 100% will make the fonts roughly the same size as on paper.");
2635 case RC_SCREEN_GEOMETRY_HEIGHT:
2636 case RC_SCREEN_GEOMETRY_WIDTH:
2637 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).");
2640 case RC_SCREEN_GEOMETRY_XYSAVED:
2641 str = _("Allow session manager to save and restore windows position.");
2645 str = _("This starts the lyxserver. The pipes get an additional extension \".in\" and \".out\". Only for advanced users.");
2651 case RC_SHOW_BANNER:
2652 str = _("De-select if you don't want the startup banner.");
2655 case RC_SPELL_COMMAND:
2656 str = _("What command runs the spellchecker?");
2659 case RC_TEMPDIRPATH:
2660 str = _("LyX will place its temporary directories in this path. They will be deleted when you quit LyX.");
2663 case RC_TEMPLATEPATH:
2664 str = _("The path that LyX will set when offering to choose a template. An empty value selects the directory LyX was started from.");
2667 case RC_TEX_ALLOWS_SPACES:
2670 case RC_TEX_EXPECTS_WINDOWS_PATHS:
2674 str = _("The UI (user interface) file. Can either specify an absolute path, or LyX will look in its global and local ui/ directories.");
2686 case RC_USE_INP_ENC:
2687 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.");
2690 case RC_USE_SPELL_LIB:
2693 case RC_VIEWDVI_PAPEROPTION:
2694 _("Specify the paper command to DVI viewer (leave empty or use \"-paper\")");
2709 // The global instance
2712 // The global copy of the system lyxrc entries (everything except preferences)