3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
6 * \author Lars Gullik Bjønnes
7 * \author Jean-Marc Lasgouttes
8 * \author Angus Leeming
10 * \author André Pönitz
14 * Full author contact details are available in file CREDITS.
24 #include "support/debug.h"
26 #include "Converter.h"
28 #include "support/gettext.h"
31 #include "FontEnums.h"
34 #include "graphics/GraphicsTypes.h"
36 #include "support/convert.h"
37 #include "support/environment.h"
38 #include "support/filetools.h"
39 #include "support/lstrings.h"
40 #include "support/os.h"
41 #include "support/userinfo.h"
44 using namespace lyx::support;
48 namespace os = support::os;
52 // when adding something to this array keep it sorted!
53 keyword_item lyxrcTags[] = {
54 { "\\accept_compound", LyXRC::RC_ACCEPT_COMPOUND },
55 { "\\allow_geometry_session", LyXRC::RC_GEOMETRY_SESSION },
56 { "\\alternate_language", LyXRC::RC_ALT_LANG },
57 { "\\auto_number", LyXRC::RC_AUTO_NUMBER },
58 { "\\auto_region_delete", LyXRC::RC_AUTOREGIONDELETE },
59 { "\\auto_reset_options", LyXRC::RC_AUTORESET_OPTIONS },
60 { "\\autosave", LyXRC::RC_AUTOSAVE },
61 { "\\backupdir_path", LyXRC::RC_BACKUPDIR_PATH },
62 { "\\bibtex_command", LyXRC::RC_BIBTEX_COMMAND },
63 { "\\bind_file", LyXRC::RC_BINDFILE },
64 { "\\check_lastfiles", LyXRC::RC_CHECKLASTFILES },
65 { "\\chktex_command", LyXRC::RC_CHKTEX_COMMAND },
66 { "\\converter", LyXRC::RC_CONVERTER },
67 { "\\converter_cache_maxage", LyXRC::RC_CONVERTER_CACHE_MAXAGE },
68 { "\\copier", LyXRC::RC_COPIER },
69 { "\\cursor_follows_scrollbar", LyXRC::RC_CURSOR_FOLLOWS_SCROLLBAR },
70 { "\\custom_export_command", LyXRC::RC_CUSTOM_EXPORT_COMMAND },
71 { "\\custom_export_format", LyXRC::RC_CUSTOM_EXPORT_FORMAT },
72 { "\\date_insert_format", LyXRC::RC_DATE_INSERT_FORMAT },
73 { "\\def_file", LyXRC::RC_DEFFILE },
74 { "\\default_language", LyXRC::RC_DEFAULT_LANGUAGE },
75 { "\\default_papersize", LyXRC::RC_DEFAULT_PAPERSIZE },
76 { "\\dialogs_iconify_with_main", LyXRC::RC_DIALOGS_ICONIFY_WITH_MAIN },
77 { "\\display_graphics", LyXRC::RC_DISPLAY_GRAPHICS },
78 { "\\document_path", LyXRC::RC_DOCUMENTPATH },
79 { "\\escape_chars", LyXRC::RC_ESC_CHARS },
80 { "\\example_path", LyXRC::RC_EXAMPLEPATH },
81 { "\\font_encoding", LyXRC::RC_FONT_ENCODING },
82 { "\\format", LyXRC::RC_FORMAT },
83 { "\\index_command", LyXRC::RC_INDEX_COMMAND },
84 { "\\input", LyXRC::RC_INPUT },
85 { "\\kbmap", LyXRC::RC_KBMAP },
86 { "\\kbmap_primary", LyXRC::RC_KBMAP_PRIMARY },
87 { "\\kbmap_secondary", LyXRC::RC_KBMAP_SECONDARY },
88 { "\\label_init_length", LyXRC::RC_LABEL_INIT_LENGTH },
89 { "\\language_auto_begin", LyXRC::RC_LANGUAGE_AUTO_BEGIN },
90 { "\\language_auto_end", LyXRC::RC_LANGUAGE_AUTO_END },
91 { "\\language_command_begin", LyXRC::RC_LANGUAGE_COMMAND_BEGIN },
92 { "\\language_command_end", LyXRC::RC_LANGUAGE_COMMAND_END },
93 { "\\language_command_local", LyXRC::RC_LANGUAGE_COMMAND_LOCAL },
94 { "\\language_global_options", LyXRC::RC_LANGUAGE_GLOBAL_OPTIONS },
95 { "\\language_package", LyXRC::RC_LANGUAGE_PACKAGE },
96 { "\\language_use_babel", LyXRC::RC_LANGUAGE_USE_BABEL },
97 { "\\load_session", LyXRC::RC_LOADSESSION },
98 { "\\macro_edit_style", LyXRC::RC_MACRO_EDIT_STYLE },
99 { "\\make_backup", LyXRC::RC_MAKE_BACKUP },
100 { "\\mark_foreign_language", LyXRC::RC_MARK_FOREIGN_LANGUAGE },
101 { "\\mouse_wheel_speed", LyXRC::RC_MOUSE_WHEEL_SPEED },
102 { "\\num_lastfiles", LyXRC::RC_NUMLASTFILES },
103 { "\\path_prefix", LyXRC::RC_PATH_PREFIX },
104 { "\\personal_dictionary", LyXRC::RC_PERS_DICT },
105 { "\\plaintext_linelen", LyXRC::RC_PLAINTEXT_LINELEN },
106 { "\\plaintext_roff_command", LyXRC::RC_PLAINTEXT_ROFF_COMMAND },
107 { "\\preview", LyXRC::RC_PREVIEW },
108 { "\\preview_hashed_labels", LyXRC::RC_PREVIEW_HASHED_LABELS },
109 { "\\preview_scale_factor", LyXRC::RC_PREVIEW_SCALE_FACTOR },
110 { "\\print_adapt_output", LyXRC::RC_PRINT_ADAPTOUTPUT },
111 { "\\print_collcopies_flag", LyXRC::RC_PRINTCOLLCOPIESFLAG },
112 { "\\print_command", LyXRC::RC_PRINT_COMMAND },
113 { "\\print_copies_flag", LyXRC::RC_PRINTCOPIESFLAG },
114 { "\\print_evenpage_flag", LyXRC::RC_PRINTEVENPAGEFLAG },
115 { "\\print_extra_options", LyXRC::RC_PRINTEXSTRAOPTIONS },
116 { "\\print_file_extension", LyXRC::RC_PRINTFILEEXTENSION },
117 { "\\print_landscape_flag", LyXRC::RC_PRINTLANDSCAPEFLAG },
118 { "\\print_oddpage_flag", LyXRC::RC_PRINTODDPAGEFLAG },
119 { "\\print_pagerange_flag", LyXRC::RC_PRINTPAGERANGEFLAG },
120 { "\\print_paper_dimension_flag", LyXRC::RC_PRINTPAPERDIMENSIONFLAG },
121 { "\\print_paper_flag", LyXRC::RC_PRINTPAPERFLAG },
122 { "\\print_reverse_flag", LyXRC::RC_PRINTREVERSEFLAG },
123 { "\\print_spool_command", LyXRC::RC_PRINTSPOOL_COMMAND },
124 { "\\print_spool_printerprefix", LyXRC::RC_PRINTSPOOL_PRINTERPREFIX },
125 { "\\print_to_file", LyXRC::RC_PRINTTOFILE },
126 { "\\print_to_printer", LyXRC::RC_PRINTTOPRINTER },
127 { "\\printer", LyXRC::RC_PRINTER },
128 { "\\rtl", LyXRC::RC_RTL_SUPPORT },
129 { "\\screen_dpi", LyXRC::RC_SCREEN_DPI },
130 { "\\screen_font_roman", LyXRC::RC_SCREEN_FONT_ROMAN },
131 { "\\screen_font_roman_foundry", LyXRC::RC_SCREEN_FONT_ROMAN_FOUNDRY },
132 { "\\screen_font_sans", LyXRC::RC_SCREEN_FONT_SANS },
133 { "\\screen_font_sans_foundry", LyXRC::RC_SCREEN_FONT_SANS_FOUNDRY },
134 { "\\screen_font_scalable", LyXRC::RC_SCREEN_FONT_SCALABLE },
135 { "\\screen_font_sizes", LyXRC::RC_SCREEN_FONT_SIZES },
136 { "\\screen_font_typewriter", LyXRC::RC_SCREEN_FONT_TYPEWRITER },
137 { "\\screen_font_typewriter_foundry", LyXRC::RC_SCREEN_FONT_TYPEWRITER_FOUNDRY },
138 { "\\screen_zoom", LyXRC::RC_SCREEN_ZOOM },
139 { "\\serverpipe", LyXRC::RC_SERVERPIPE },
140 { "\\set_color", LyXRC::RC_SET_COLOR },
141 { "\\show_banner", LyXRC::RC_SHOW_BANNER },
142 { "\\sort_layouts", LyXRC::RC_SORT_LAYOUTS },
143 { "\\spell_command", LyXRC::RC_SPELL_COMMAND },
144 { "\\tempdir_path", LyXRC::RC_TEMPDIRPATH },
145 { "\\template_path", LyXRC::RC_TEMPLATEPATH },
146 { "\\tex_allows_spaces", LyXRC::RC_TEX_ALLOWS_SPACES },
147 { "\\tex_expects_windows_paths", LyXRC::RC_TEX_EXPECTS_WINDOWS_PATHS },
148 { "\\ui_file", LyXRC::RC_UIFILE },
149 { "\\use_alt_language", LyXRC::RC_USE_ALT_LANG },
150 { "\\use_converter_cache", LyXRC::RC_USE_CONVERTER_CACHE },
151 { "\\use_escape_chars", LyXRC::RC_USE_ESC_CHARS },
152 { "\\use_input_encoding", LyXRC::RC_USE_INP_ENC },
153 { "\\use_lastfilepos", LyXRC::RC_USELASTFILEPOS },
154 { "\\use_personal_dictionary", LyXRC::RC_USE_PERS_DICT },
155 { "\\use_pixmap_cache", LyXRC::RC_USE_PIXMAP_CACHE },
156 // compatibility with versions older than 1.4.0 only
157 { "\\use_pspell", LyXRC::RC_USE_SPELL_LIB },
158 { "\\use_spell_lib", LyXRC::RC_USE_SPELL_LIB },
159 // compatibility with versions older than 1.4.0 only
160 { "\\use_tempdir", LyXRC::RC_USETEMPDIR },
161 { "\\use_tooltip", LyXRC::RC_USE_TOOLTIP },
162 { "\\user_email", LyXRC::RC_USER_EMAIL },
163 { "\\user_name", LyXRC::RC_USER_NAME },
164 { "\\view_dvi_paper_option", LyXRC::RC_VIEWDVI_PAPEROPTION },
165 // compatibility with versions older than 1.4.0 only
166 { "\\viewer", LyXRC::RC_VIEWER}
169 const int lyxrcCount = sizeof(lyxrcTags) / sizeof(keyword_item);
180 void LyXRC::setDefaults() {
182 def_file = "default";
184 // Get printer from the environment. If fail, use default "",
185 // assuming that everything is set up correctly.
186 printer = getEnv("PRINTER");
187 print_adapt_output = false;
188 print_command = "dvips";
189 print_evenpage_flag = "-B";
190 print_oddpage_flag = "-A";
191 print_pagerange_flag = "-pp";
192 print_copies_flag = "-c";
193 print_collcopies_flag = "-C";
194 print_reverse_flag = "-r";
195 print_landscape_flag = "-t landscape";
196 print_to_printer = "-P";
197 print_to_file = "-o ";
198 print_file_extension = ".ps";
199 print_paper_flag = "-t";
200 print_paper_dimension_flag = "-T";
201 document_path.erase();
202 view_dvi_paper_option.erase();
203 default_papersize = PAPER_DEFAULT;
204 custom_export_format = "ps";
205 chktex_command = "chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38";
206 bibtex_command = "bibtex";
208 index_command = "makeindex -c -q";
210 // Because a screen typically is wider than a piece of paper:
212 allow_geometry_session = true;
213 // Default LaTeX font size:
214 font_sizes[FONT_SIZE_TINY] = "5.0";
215 font_sizes[FONT_SIZE_SCRIPT] = "7.0";
216 font_sizes[FONT_SIZE_FOOTNOTE] = "8.0";
217 font_sizes[FONT_SIZE_SMALL] = "9.0";
218 font_sizes[FONT_SIZE_NORMAL] = "10.0";
219 font_sizes[FONT_SIZE_LARGE] = "12.0";
220 font_sizes[FONT_SIZE_LARGER] = "14.4";
221 font_sizes[FONT_SIZE_LARGEST] = "17.26";
222 font_sizes[FONT_SIZE_HUGE] = "20.74";
223 font_sizes[FONT_SIZE_HUGER] = "24.88";
224 use_scalable_fonts = true;
225 roman_font_name = "";
227 typewriter_font_name = "";
229 auto_region_delete = true;
230 auto_reset_options = false;
231 plaintext_linelen = 65;
232 mouse_wheel_speed = 1.0;
233 num_lastfiles = maxlastfiles;
234 check_lastfiles = true;
235 use_lastfilepos = true;
236 load_session = false;
238 backupdir_path.erase();
239 display_graphics = graphics::ColorDisplay;
240 // Spellchecker settings:
241 use_spell_lib = true;
242 isp_command = "ispell";
243 isp_accept_compound = false;
244 isp_use_input_encoding = false;
245 isp_use_alt_lang = false;
246 isp_use_pers_dict = false;
247 isp_use_esc_chars = false;
251 mark_foreign_language = true;
252 language_auto_begin = true;
253 language_auto_end = true;
254 language_global_options = true;
255 language_use_babel = true;
256 language_package = "\\usepackage{babel}";
257 language_command_begin = "\\selectlanguage{$$lang}";
258 language_command_local = "\\foreignlanguage{$$lang}{";
259 sort_layouts = false;
260 default_language = "english";
262 windows_style_tex_paths = false;
263 tex_allows_spaces = false;
264 date_insert_format = "%x";
265 cursor_follows_scrollbar = false;
266 macro_edit_style = MACRO_EDIT_INLINE_BOX;
267 dialogs_iconify_with_main = false;
268 label_init_length = 3;
269 preview = PREVIEW_OFF;
270 preview_hashed_labels = false;
271 preview_scale_factor = "0.9";
272 use_converter_cache = true;
274 use_pixmap_cache = false;
275 converter_cache_maxage = 6 * 30 * 24 * 3600; // 6 months
277 user_name = to_utf8(support::user_name());
279 user_email = to_utf8(support::user_email());
285 void oldFontFormat(string & family, string & foundry)
287 if (family.empty() || family[0] != '-')
289 foundry = token(family, '-', 1);
290 family = token(family, '-', 2);
298 int LyXRC::read(FileName const & filename)
300 Lexer lexrc(lyxrcTags, lyxrcCount);
301 if (lyxerr.debugging(Debug::PARSER))
302 lexrc.printTable(lyxerr);
304 lexrc.setFile(filename);
305 if (!lexrc.isOK()) return -2;
307 LYXERR(Debug::LYXRC, "Reading '" << filename << "'...");
313 int LyXRC::read(istream & is)
315 Lexer lexrc(lyxrcTags, lyxrcCount);
316 if (lyxerr.debugging(Debug::PARSER))
317 lexrc.printTable(lyxerr);
320 if (!lexrc.isOK()) return -2;
322 LYXERR(Debug::LYXRC, "Reading istream...");
328 int LyXRC::read(Lexer & lexrc)
330 if (!lexrc.isOK()) return -2;
332 while (lexrc.isOK()) {
333 // By using two switches we take advantage of the compiler
334 // telling us if we have missed a LyXRCTags element in
335 // the second switch.
336 // Note that this also shows a problem with Lexer since it
337 // helps us avoid taking advantage of the strictness of the
340 int le = lexrc.lex();
342 case Lexer::LEX_UNDEF:
343 lexrc.printError("Unknown tag `$$Token'");
345 case Lexer::LEX_FEOF:
349 switch (static_cast<LyXRCTags>(le)) {
350 case RC_INPUT: // Include file
353 libFileSearch(string(),
356 lexrc.printError("Error reading "
357 "included file: " + tmp.absFilename());
363 bind_file = os::internal_path(lexrc.getString());
369 def_file = os::internal_path(lexrc.getString());
375 ui_file = os::internal_path(lexrc.getString());
379 case RC_AUTORESET_OPTIONS:
381 auto_reset_options = lexrc.getBool();
385 case RC_DISPLAY_GRAPHICS:
387 display_graphics = graphics::displayTranslator().find(lexrc.getString());
391 case RC_TEX_EXPECTS_WINDOWS_PATHS:
393 windows_style_tex_paths = lexrc.getBool();
397 case RC_TEX_ALLOWS_SPACES:
399 tex_allows_spaces = lexrc.getBool();
405 use_kbmap = lexrc.getBool();
409 case RC_KBMAP_PRIMARY:
411 string const kmap(os::internal_path(lexrc.getString()));
414 } else if (!libFileSearch("kbd", kmap,
416 primary_kbmap = kmap;
418 lexrc.printError("LyX: Keymap `$$Token' not found");
423 case RC_KBMAP_SECONDARY:
425 string const kmap(os::internal_path(lexrc.getString()));
428 } else if (!libFileSearch("kbd", kmap,
430 secondary_kbmap = kmap;
432 lexrc.printError("LyX: Keymap `$$Token' not found");
437 case RC_FONT_ENCODING:
439 fontenc = lexrc.getString();
445 printer = lexrc.getString();
449 case RC_PRINT_COMMAND:
451 print_command = lexrc.getString();
455 case RC_PRINTEVENPAGEFLAG:
457 print_evenpage_flag = lexrc.getString();
461 case RC_PRINTODDPAGEFLAG:
463 print_oddpage_flag = lexrc.getString();
467 case RC_PRINTPAGERANGEFLAG:
469 print_pagerange_flag = lexrc.getString();
473 case RC_PRINTCOPIESFLAG:
475 print_copies_flag = lexrc.getString();
479 case RC_PRINTCOLLCOPIESFLAG:
481 print_collcopies_flag = lexrc.getString();
485 case RC_PRINTREVERSEFLAG:
487 print_reverse_flag = lexrc.getString();
491 case RC_PRINTLANDSCAPEFLAG:
493 print_landscape_flag = lexrc.getString();
497 case RC_PRINTTOPRINTER:
499 print_to_printer = lexrc.getString();
503 case RC_PRINT_ADAPTOUTPUT:
505 print_adapt_output = lexrc.getBool();
511 print_to_file = os::internal_path(lexrc.getString());
515 case RC_PRINTFILEEXTENSION:
517 print_file_extension = lexrc.getString();
521 case RC_PRINTEXSTRAOPTIONS:
523 print_extra_options = lexrc.getString();
527 case RC_PRINTSPOOL_COMMAND:
529 print_spool_command = lexrc.getString();
533 case RC_PRINTSPOOL_PRINTERPREFIX:
535 print_spool_printerprefix = lexrc.getString();
539 case RC_PRINTPAPERDIMENSIONFLAG:
541 print_paper_dimension_flag = lexrc.getString();
545 case RC_PRINTPAPERFLAG:
547 print_paper_flag = lexrc.getString();
551 case RC_CUSTOM_EXPORT_COMMAND:
553 custom_export_command = lexrc.getString();
557 case RC_CUSTOM_EXPORT_FORMAT:
559 custom_export_format = lexrc.getString();
563 case RC_DEFAULT_PAPERSIZE:
566 ascii_lowercase(lexrc.getString());
567 if (size == "usletter")
570 else if (size == "legal")
573 else if (size == "executive")
576 else if (size == "a3")
579 else if (size == "a4")
582 else if (size == "a5")
585 else if (size == "b5")
588 else if (size == "default")
594 case RC_VIEWDVI_PAPEROPTION:
596 view_dvi_paper_option = lexrc.getString();
598 view_dvi_paper_option.erase();
602 case RC_CHKTEX_COMMAND:
604 chktex_command = lexrc.getString();
608 case RC_BIBTEX_COMMAND:
610 bibtex_command = lexrc.getString();
614 case RC_INDEX_COMMAND:
616 index_command = lexrc.getString();
622 dpi = lexrc.getInteger();
628 zoom = lexrc.getInteger();
632 case RC_GEOMETRY_SESSION:
634 allow_geometry_session = lexrc.getBool();
638 case RC_SCREEN_FONT_SIZES:
640 font_sizes[FONT_SIZE_TINY] =
644 font_sizes[FONT_SIZE_SCRIPT] =
648 font_sizes[FONT_SIZE_FOOTNOTE] =
652 font_sizes[FONT_SIZE_SMALL] =
656 font_sizes[FONT_SIZE_NORMAL] =
660 font_sizes[FONT_SIZE_LARGE] =
664 font_sizes[FONT_SIZE_LARGER] =
668 font_sizes[FONT_SIZE_LARGEST] =
672 font_sizes[FONT_SIZE_HUGE] =
676 font_sizes[FONT_SIZE_HUGER] =
681 case RC_SCREEN_FONT_SCALABLE:
683 use_scalable_fonts = lexrc.getBool();
689 autosave = lexrc.getInteger();
693 case RC_DOCUMENTPATH:
695 document_path = os::internal_path(lexrc.getString());
696 document_path = expandPath(document_path);
702 example_path = os::internal_path(lexrc.getString());
703 example_path = expandPath(example_path);
707 case RC_TEMPLATEPATH:
709 template_path = os::internal_path(lexrc.getString());
710 template_path = expandPath(template_path);
716 tempdir_path = os::internal_path(lexrc.getString());
717 tempdir_path = expandPath(tempdir_path);
723 lyxerr << "Ignoring obsolete use_tempdir flag." << endl;
727 case RC_USELASTFILEPOS:
729 use_lastfilepos = lexrc.getBool();
735 load_session = lexrc.getBool();
739 case RC_MOUSE_WHEEL_SPEED:
741 mouse_wheel_speed = lexrc.getFloat();
745 case RC_NUMLASTFILES:
747 num_lastfiles = lexrc.getInteger();
751 case RC_CHECKLASTFILES:
753 check_lastfiles = lexrc.getBool();
757 case RC_SCREEN_FONT_ROMAN:
759 roman_font_name = lexrc.getString();
760 oldFontFormat(roman_font_name,
765 case RC_SCREEN_FONT_SANS:
767 sans_font_name = lexrc.getString();
768 oldFontFormat(sans_font_name, sans_font_foundry);
772 case RC_SCREEN_FONT_TYPEWRITER:
774 typewriter_font_name = lexrc.getString();
775 oldFontFormat(typewriter_font_name,
776 typewriter_font_foundry);
780 case RC_SCREEN_FONT_ROMAN_FOUNDRY:
782 roman_font_foundry = lexrc.getString();
786 case RC_SCREEN_FONT_SANS_FOUNDRY:
788 sans_font_foundry = lexrc.getString();
792 case RC_SCREEN_FONT_TYPEWRITER_FOUNDRY:
794 typewriter_font_foundry = lexrc.getString();
800 string lyx_name, x11_name;
803 lyx_name = lexrc.getString();
805 lexrc.printError("Missing color tag.");
810 x11_name = lexrc.getString();
812 lexrc.printError("Missing color name for color: `$$Token'");
816 ColorCode const col =
817 lcolor.getFromLyXName(lyx_name);
818 if (col == Color_none ||
819 col == Color_inherit ||
823 if (!lcolor.setColor(col, x11_name)) {
824 lyxerr << "Bad lyxrc set_color for "
830 case RC_AUTOREGIONDELETE:
831 // Auto region delete defaults to true
833 auto_region_delete = lexrc.getBool();
839 lyxpipes = os::internal_path(lexrc.getString());
840 lyxpipes = expandPath(lyxpipes);
844 case RC_CURSOR_FOLLOWS_SCROLLBAR:
846 cursor_follows_scrollbar = lexrc.getBool();
850 case RC_MACRO_EDIT_STYLE:
852 switch (lexrc.getInteger()) {
853 case 0: macro_edit_style = MACRO_EDIT_INLINE_BOX; break;
854 case 1: macro_edit_style = MACRO_EDIT_INLINE; break;
855 case 2: macro_edit_style = MACRO_EDIT_LIST; break;
860 case RC_DIALOGS_ICONIFY_WITH_MAIN:
862 dialogs_iconify_with_main = lexrc.getBool();
866 case RC_PLAINTEXT_ROFF_COMMAND:
868 plaintext_roff_command = lexrc.getString();
871 case RC_PLAINTEXT_LINELEN:
873 plaintext_linelen = lexrc.getInteger();
876 // Spellchecker settings:
877 case RC_USE_SPELL_LIB:
879 use_spell_lib = lexrc.getBool();
882 case RC_SPELL_COMMAND:
884 isp_command = lexrc.getString();
887 case RC_ACCEPT_COMPOUND:
889 isp_accept_compound = lexrc.getBool();
894 isp_use_input_encoding = lexrc.getBool();
897 case RC_USE_ALT_LANG:
899 isp_use_alt_lang = lexrc.getBool();
902 case RC_USE_PERS_DICT:
904 isp_use_pers_dict = lexrc.getBool();
909 use_tooltip = lexrc.getBool();
912 case RC_USE_PIXMAP_CACHE:
914 use_pixmap_cache = lexrc.getBool();
917 case RC_USE_ESC_CHARS:
919 isp_use_esc_chars = lexrc.getBool();
924 isp_alt_lang = lexrc.getString();
929 isp_pers_dict = os::internal_path(lexrc.getString());
934 isp_esc_chars = lexrc.getString();
939 make_backup = lexrc.getBool();
942 case RC_BACKUPDIR_PATH:
944 backupdir_path = os::internal_path(lexrc.getString());
945 backupdir_path = expandPath(backupdir_path);
948 case RC_DATE_INSERT_FORMAT:
950 date_insert_format = lexrc.getString();
953 case RC_LANGUAGE_PACKAGE:
955 language_package = lexrc.getString();
958 case RC_LANGUAGE_AUTO_BEGIN:
960 language_auto_begin = lexrc.getBool();
963 case RC_LANGUAGE_AUTO_END:
965 language_auto_end = lexrc.getBool();
968 case RC_LANGUAGE_GLOBAL_OPTIONS:
970 language_global_options = lexrc.getBool();
973 case RC_LANGUAGE_USE_BABEL:
975 language_use_babel = lexrc.getBool();
978 case RC_LANGUAGE_COMMAND_BEGIN:
980 language_command_begin = lexrc.getString();
983 case RC_LANGUAGE_COMMAND_END:
985 language_command_end = lexrc.getString();
988 case RC_LANGUAGE_COMMAND_LOCAL:
990 language_command_local = lexrc.getString();
995 rtl_support = lexrc.getBool();
1000 auto_number = lexrc.getBool();
1003 case RC_MARK_FOREIGN_LANGUAGE:
1005 mark_foreign_language = lexrc.getBool();
1010 string fmt, command;
1012 fmt = lexrc.getString();
1015 command = lexrc.getString();
1017 setMover(fmt, command);
1021 case RC_CONVERTER: {
1022 string from, to, command, flags;
1024 from = lexrc.getString();
1027 to = lexrc.getString();
1030 command = lexrc.getString();
1033 flags = lexrc.getString();
1035 if (command.empty()) {
1036 theConverters().erase(from, to);
1038 theConverters().add(from, to, command, flags);
1042 // compatibility with versions older than 1.4.0 only
1044 string format, command;
1046 format = lexrc.getString();
1049 command = lexrc.getString();
1051 formats.setViewer(format, command);
1055 string format, extension, prettyname, shortcut;
1057 format = lexrc.getString();
1060 extension = lexrc.getString();
1063 prettyname = lexrc.getString();
1066 shortcut = lexrc.getString();
1068 string viewer, editor;
1070 viewer = lexrc.getString();
1072 editor = lexrc.getString();
1074 // Hack to ensure compatibility with versions older
1076 int le = lexrc.lex();
1077 if (le != Lexer::LEX_FEOF && le != Lexer::LEX_UNDEF) {
1078 flags = lexrc.getString();
1079 if (le != Lexer::LEX_DATA) {
1080 // We have got a known token.
1081 // Therefore this is an old style
1082 // format definition without
1084 lexrc.pushToken(flags);
1088 int flgs = Format::none;
1089 while (!flags.empty()) {
1091 flags = split(flags, flag, ',');
1092 if (flag == "document")
1093 flgs |= Format::document;
1094 else if (flag == "vector")
1095 flgs |= Format::vector;
1097 lyxerr << "Ignoring unknown flag `"
1098 << flag << "' for format `"
1099 << format << "'." << endl;
1101 if (prettyname.empty()) {
1102 if (theConverters().formatIsUsed(format)) {
1103 lyxerr << "Can't delete format "
1106 formats.erase(format);
1109 formats.add(format, extension, prettyname,
1110 shortcut, viewer, editor, flgs);
1114 case RC_DEFAULT_LANGUAGE:
1116 default_language = lexrc.getString();
1120 case RC_LABEL_INIT_LENGTH:
1122 label_init_length = lexrc.getInteger();
1126 case RC_SHOW_BANNER:
1128 show_banner = lexrc.getBool();
1134 string const tmp = lexrc.getString();
1135 if (tmp == "true" || tmp == "on")
1136 preview = PREVIEW_ON;
1137 else if (tmp == "no_math")
1138 preview = PREVIEW_NO_MATH;
1140 preview = PREVIEW_OFF;
1141 if (tmp != "false" && tmp != "off")
1142 lyxerr << "Unrecognized "
1144 << tmp << '\n' << endl;
1149 case RC_PREVIEW_HASHED_LABELS:
1151 preview_hashed_labels = lexrc.getBool();
1155 case RC_PREVIEW_SCALE_FACTOR:
1157 preview_scale_factor = lexrc.getString();
1163 user_name = lexrc.getString();
1168 user_email = lexrc.getString();
1171 case RC_PATH_PREFIX:
1173 path_prefix = lexrc.getString();
1176 case RC_USE_CONVERTER_CACHE:
1178 use_converter_cache = lexrc.getBool();
1181 case RC_CONVERTER_CACHE_MAXAGE:
1183 converter_cache_maxage =
1184 convert<unsigned int>(lexrc.getString());
1187 case RC_SORT_LAYOUTS:
1189 sort_layouts = lexrc.getBool();
1192 case RC_LAST: break; // this is just a dummy
1196 /// Update converters data-structures
1197 theConverters().update(formats);
1198 theConverters().buildGraph();
1204 void LyXRC::write(FileName const & filename, bool ignore_system_lyxrc) const
1206 ofstream ofs(filename.toFilesystemEncoding().c_str());
1208 write(ofs, ignore_system_lyxrc);
1212 void LyXRC::print() const
1214 if (lyxerr.debugging())
1215 write(lyxerr, false);
1223 typedef pair<string, SpecialisedMover> Data;
1225 SameMover(Data const & comparison)
1226 : comparison_(comparison) {}
1228 bool operator()(Data const & data) const
1230 return data.first == comparison_.first &&
1231 data.second.command() == comparison_.second.command();
1239 void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) const
1241 LyXRCTags tag = RC_LAST;
1243 if (!name.empty()) {
1244 for (int i = 0; i != lyxrcCount; ++i)
1245 if ("\\" + name == lyxrcTags[i].tag)
1246 tag = static_cast<LyXRCTags>(lyxrcTags[i].code);
1250 os << "### This file is part of\n"
1251 << "### ========================================================\n"
1252 << "### LyX, The Document Processor\n"
1254 << "### Copyright 1995 Matthias Ettrich\n"
1255 << "### Copyright 1995-2007 The LyX Team.\n"
1257 << "### ========================================================\n"
1259 << "# This file is written by LyX, if you want to make your own\n"
1260 << "# modifications you should do them from inside LyX and save\n"
1263 // Why the switch you might ask. It is a trick to ensure that all
1264 // the elements in the LyXRCTags enum is handled. As you can see
1265 // there are no breaks at all. So it is just a huge fall-through.
1266 // The nice thing is that we will get a warning from the compiler
1267 // if we forget an element.
1271 // input/include files are not done here
1273 if (ignore_system_lyxrc ||
1274 bind_file != system_lyxrc.bind_file) {
1275 string const path = os::external_path(bind_file);
1276 os << "\\bind_file \"" << path << "\"\n";
1282 if (ignore_system_lyxrc ||
1283 def_file != system_lyxrc.def_file) {
1284 string const path = os::external_path(def_file);
1285 os << "\\def_file \"" << path << "\"\n";
1294 << "# MISC SECTION ######################################\n"
1296 // bind files are not done here.
1298 case RC_PATH_PREFIX:
1299 if (ignore_system_lyxrc ||
1300 path_prefix != system_lyxrc.path_prefix) {
1301 os << "\\path_prefix \"" << path_prefix << "\"\n";
1306 if (ignore_system_lyxrc ||
1307 ui_file != system_lyxrc.ui_file) {
1308 string const path = os::external_path(ui_file);
1309 os << "\\ui_file \"" << path << "\"\n";
1313 case RC_AUTOREGIONDELETE:
1314 if (ignore_system_lyxrc ||
1315 auto_region_delete != system_lyxrc.auto_region_delete) {
1316 os << "# Set to false to inhibit automatic replacement of\n"
1317 << "# the current selection.\n"
1318 << "\\auto_region_delete " << convert<string>(auto_region_delete)
1323 case RC_AUTORESET_OPTIONS:
1324 if (ignore_system_lyxrc ||
1325 auto_reset_options != system_lyxrc.auto_reset_options) {
1326 os << "# Set to false to inhibit automatic reset of\n"
1327 << "# the class options to defaults on class change.\n"
1328 << "\\auto_reset_options "
1329 << convert<string>(auto_reset_options)
1335 if (ignore_system_lyxrc ||
1336 autosave != system_lyxrc.autosave) {
1337 os << "# The time interval between auto-saves in seconds.\n"
1338 << "\\autosave " << autosave << '\n';
1342 case RC_DISPLAY_GRAPHICS:
1343 if (ignore_system_lyxrc ||
1344 display_graphics != system_lyxrc.display_graphics) {
1345 os << "# Display graphics within LyX\n"
1346 << "# monochrome|grayscale|color|none\n"
1347 << "\\display_graphics "
1348 << graphics::displayTranslator().find(
1349 graphics::DisplayType(display_graphics))
1354 case RC_SORT_LAYOUTS:
1355 if (ignore_system_lyxrc ||
1356 sort_layouts != system_lyxrc.sort_layouts) {
1357 os << "# Sort layouts alphabetically.\n"
1358 << "\\sort_layouts " << convert<string>(sort_layouts) << '\n';
1362 case RC_VIEWDVI_PAPEROPTION:
1363 if (ignore_system_lyxrc ||
1364 view_dvi_paper_option
1365 != system_lyxrc.view_dvi_paper_option) {
1366 os << "# Options used to specify paper size to the\n"
1367 << "# view_dvi_command (e.g. -paper)\n"
1368 << "\\view_dvi_paper_option \""
1369 << view_dvi_paper_option << "\"\n";
1373 case RC_DEFAULT_PAPERSIZE:
1374 if (ignore_system_lyxrc ||
1375 default_papersize != system_lyxrc.default_papersize) {
1376 os << "# The default papersize to use.\n"
1377 << "\\default_papersize \"";
1378 switch (default_papersize) {
1380 os << "default"; break;
1381 case PAPER_USLETTER:
1382 os << "usletter"; break;
1384 os << "legal"; break;
1385 case PAPER_USEXECUTIVE:
1386 os << "executive"; break;
1397 case PAPER_B4: break;
1403 case RC_CHKTEX_COMMAND:
1404 if (ignore_system_lyxrc ||
1405 chktex_command != system_lyxrc.chktex_command) {
1406 os << "\\chktex_command \"" << chktex_command << "\"\n";
1410 case RC_BIBTEX_COMMAND:
1411 if (ignore_system_lyxrc ||
1412 bibtex_command != system_lyxrc.bibtex_command) {
1413 os << "\\bibtex_command \"" << bibtex_command << "\"\n";
1417 case RC_INDEX_COMMAND:
1418 if (ignore_system_lyxrc ||
1419 index_command != system_lyxrc.index_command) {
1420 os << "\\index_command \"" << index_command << "\"\n";
1424 case RC_TEX_EXPECTS_WINDOWS_PATHS:
1425 if (ignore_system_lyxrc ||
1426 windows_style_tex_paths != system_lyxrc.windows_style_tex_paths) {
1427 os << "\\tex_expects_windows_paths "
1428 << convert<string>(windows_style_tex_paths) << '\n';
1432 case RC_TEX_ALLOWS_SPACES:
1433 if (tex_allows_spaces != system_lyxrc.tex_allows_spaces) {
1434 os << "\\tex_allows_spaces "
1435 << convert<string>(tex_allows_spaces) << '\n';
1440 if (ignore_system_lyxrc ||
1441 use_kbmap != system_lyxrc.use_kbmap) {
1442 os << "\\kbmap " << convert<string>(use_kbmap) << '\n';
1446 case RC_KBMAP_PRIMARY:
1447 if (ignore_system_lyxrc ||
1448 primary_kbmap != system_lyxrc.primary_kbmap) {
1449 string const path = os::external_path(primary_kbmap);
1450 os << "\\kbmap_primary \"" << path << "\"\n";
1454 case RC_KBMAP_SECONDARY:
1455 if (ignore_system_lyxrc ||
1456 secondary_kbmap != system_lyxrc.secondary_kbmap) {
1457 string const path = os::external_path(secondary_kbmap);
1458 os << "\\kbmap_secondary \"" << path << "\"\n";
1463 if (ignore_system_lyxrc ||
1464 lyxpipes != system_lyxrc.lyxpipes) {
1465 string const path = os::external_path(lyxpipes);
1466 os << "\\serverpipe \"" << path << "\"\n";
1470 case RC_DATE_INSERT_FORMAT:
1471 if (ignore_system_lyxrc ||
1472 date_insert_format != system_lyxrc.date_insert_format) {
1473 os << "\\date_insert_format \"" << date_insert_format
1478 case RC_LABEL_INIT_LENGTH:
1479 if (ignore_system_lyxrc ||
1480 label_init_length != system_lyxrc.label_init_length) {
1481 os << "\\label_init_length " << label_init_length
1488 os << "\\user_name \"" << user_name << "\"\n";
1493 os << "\\user_email \"" << user_email << "\"\n";
1497 case RC_SHOW_BANNER:
1498 if (ignore_system_lyxrc ||
1499 show_banner != system_lyxrc.show_banner) {
1500 os << "\\show_banner " << convert<string>(show_banner) << '\n';
1506 if (ignore_system_lyxrc ||
1507 preview != system_lyxrc.preview) {
1513 case PREVIEW_NO_MATH:
1520 os << "\\preview " << status << '\n';
1525 case RC_PREVIEW_HASHED_LABELS:
1526 if (ignore_system_lyxrc ||
1527 preview_hashed_labels !=
1528 system_lyxrc.preview_hashed_labels) {
1529 os << "\\preview_hashed_labels "
1530 << convert<string>(preview_hashed_labels) << '\n';
1535 case RC_PREVIEW_SCALE_FACTOR:
1536 if (ignore_system_lyxrc ||
1537 preview_scale_factor != system_lyxrc.preview_scale_factor) {
1538 os << "\\preview_scale_factor "
1539 << preview_scale_factor << '\n';
1544 case RC_USE_CONVERTER_CACHE:
1545 if (ignore_system_lyxrc ||
1546 use_converter_cache != system_lyxrc.use_converter_cache) {
1547 os << "\\use_converter_cache "
1548 << convert<string>(use_converter_cache) << '\n';
1553 case RC_CONVERTER_CACHE_MAXAGE:
1554 if (ignore_system_lyxrc ||
1555 converter_cache_maxage != system_lyxrc.converter_cache_maxage) {
1556 os << "\\converter_cache_maxage "
1557 << converter_cache_maxage << '\n';
1563 << "# SCREEN & FONTS SECTION ############################\n"
1567 if (ignore_system_lyxrc ||
1568 dpi != system_lyxrc.dpi) {
1569 os << "\\screen_dpi " << dpi << '\n';
1573 case RC_SCREEN_ZOOM:
1574 if (ignore_system_lyxrc ||
1575 zoom != system_lyxrc.zoom) {
1576 os << "\\screen_zoom " << zoom << '\n';
1580 case RC_GEOMETRY_SESSION:
1581 if (ignore_system_lyxrc ||
1582 allow_geometry_session != system_lyxrc.allow_geometry_session) {
1583 os << "\\allow_geometry_session " << convert<string>(allow_geometry_session)
1588 case RC_CURSOR_FOLLOWS_SCROLLBAR:
1589 if (ignore_system_lyxrc ||
1590 cursor_follows_scrollbar
1591 != system_lyxrc.cursor_follows_scrollbar) {
1592 os << "\\cursor_follows_scrollbar "
1593 << convert<string>(cursor_follows_scrollbar) << '\n';
1597 case RC_MACRO_EDIT_STYLE:
1598 if (ignore_system_lyxrc ||
1600 != system_lyxrc.macro_edit_style) {
1601 os << "\\macro_edit_style ";
1602 switch (macro_edit_style) {
1603 case MACRO_EDIT_INLINE_BOX: os << "0\n"; break;
1604 case MACRO_EDIT_INLINE: os << "1\n"; break;
1605 case MACRO_EDIT_LIST: os << "2\n"; break;
1610 case RC_DIALOGS_ICONIFY_WITH_MAIN:
1611 if (ignore_system_lyxrc ||
1612 dialogs_iconify_with_main
1613 != system_lyxrc.dialogs_iconify_with_main) {
1614 os << "\\dialogs_iconify_with_main "
1615 << convert<string>(dialogs_iconify_with_main) << '\n';
1619 case RC_SCREEN_FONT_ROMAN:
1620 if (ignore_system_lyxrc ||
1621 roman_font_name != system_lyxrc.roman_font_name) {
1622 os << "\\screen_font_roman \"" << roman_font_name
1627 case RC_SCREEN_FONT_ROMAN_FOUNDRY:
1628 if (ignore_system_lyxrc ||
1629 roman_font_foundry != system_lyxrc.roman_font_foundry) {
1630 os << "\\screen_font_roman_foundry \"" << roman_font_foundry
1635 case RC_SCREEN_FONT_SANS:
1636 if (ignore_system_lyxrc ||
1637 sans_font_name != system_lyxrc.sans_font_name) {
1638 os << "\\screen_font_sans \"" << sans_font_name
1643 case RC_SCREEN_FONT_SANS_FOUNDRY:
1644 if (ignore_system_lyxrc ||
1645 sans_font_foundry != system_lyxrc.sans_font_foundry) {
1646 os << "\\screen_font_sans_foundry \"" << sans_font_foundry
1651 case RC_SCREEN_FONT_TYPEWRITER:
1652 if (ignore_system_lyxrc ||
1653 typewriter_font_name != system_lyxrc.typewriter_font_name) {
1654 os << "\\screen_font_typewriter \""
1655 << typewriter_font_name << "\"\n";
1659 case RC_SCREEN_FONT_TYPEWRITER_FOUNDRY:
1660 if (ignore_system_lyxrc ||
1661 typewriter_font_foundry != system_lyxrc.typewriter_font_foundry) {
1662 os << "\\screen_font_typewriter_foundry \""
1663 << typewriter_font_foundry << "\"\n";
1668 case RC_SCREEN_FONT_SCALABLE:
1669 if (ignore_system_lyxrc ||
1670 use_scalable_fonts != system_lyxrc.use_scalable_fonts) {
1671 os << "\\screen_font_scalable "
1672 << convert<string>(use_scalable_fonts)
1677 case RC_SCREEN_FONT_SIZES:
1678 if (ignore_system_lyxrc ||
1679 font_sizes[FONT_SIZE_TINY]
1680 != system_lyxrc.font_sizes[FONT_SIZE_TINY] ||
1681 font_sizes[FONT_SIZE_SCRIPT]
1682 != system_lyxrc.font_sizes[FONT_SIZE_SCRIPT] ||
1683 font_sizes[FONT_SIZE_FOOTNOTE]
1684 != system_lyxrc.font_sizes[FONT_SIZE_FOOTNOTE] ||
1685 font_sizes[FONT_SIZE_SMALL]
1686 != system_lyxrc.font_sizes[FONT_SIZE_SMALL] ||
1687 font_sizes[FONT_SIZE_NORMAL]
1688 != system_lyxrc.font_sizes[FONT_SIZE_NORMAL] ||
1689 font_sizes[FONT_SIZE_LARGE]
1690 != system_lyxrc.font_sizes[FONT_SIZE_LARGE] ||
1691 font_sizes[FONT_SIZE_LARGER]
1692 != system_lyxrc.font_sizes[FONT_SIZE_LARGER] ||
1693 font_sizes[FONT_SIZE_LARGEST]
1694 != system_lyxrc.font_sizes[FONT_SIZE_LARGEST] ||
1695 font_sizes[FONT_SIZE_HUGE]
1696 != system_lyxrc.font_sizes[FONT_SIZE_HUGE] ||
1697 font_sizes[FONT_SIZE_HUGER]
1698 != system_lyxrc.font_sizes[FONT_SIZE_HUGER]) {
1699 os.setf(ios::fixed);
1701 os << "\\screen_font_sizes"
1702 << ' ' << font_sizes[FONT_SIZE_TINY]
1703 << ' ' << font_sizes[FONT_SIZE_SCRIPT]
1704 << ' ' << font_sizes[FONT_SIZE_FOOTNOTE]
1705 << ' ' << font_sizes[FONT_SIZE_SMALL]
1706 << ' ' << font_sizes[FONT_SIZE_NORMAL]
1707 << ' ' << font_sizes[FONT_SIZE_LARGE]
1708 << ' ' << font_sizes[FONT_SIZE_LARGER]
1709 << ' ' << font_sizes[FONT_SIZE_LARGEST]
1710 << ' ' << font_sizes[FONT_SIZE_HUGE]
1711 << ' ' << font_sizes[FONT_SIZE_HUGER]
1718 << "# COLOR SECTION ###################################\n"
1722 for (int i = 0; i < Color_ignore; ++i) {
1723 ColorCode lc = static_cast<ColorCode>(i);
1725 string const col(lcolor.getX11Name(lc));
1726 if (ignore_system_lyxrc ||
1727 col != system_lcolor.getX11Name(lc)) {
1728 os << "\\set_color \""
1729 << lcolor.getLyXName(lc) << "\" \""
1737 << "# PRINTER SECTION ###################################\n"
1741 if (ignore_system_lyxrc ||
1742 printer != system_lyxrc.printer) {
1743 os << "\\printer \"" << printer << "\"\n";
1747 case RC_PRINT_ADAPTOUTPUT:
1748 if (ignore_system_lyxrc ||
1749 print_adapt_output != system_lyxrc.print_adapt_output) {
1750 os << "\\print_adapt_output "
1751 << convert<string>(print_adapt_output)
1756 case RC_PRINT_COMMAND:
1757 if (ignore_system_lyxrc ||
1758 print_command != system_lyxrc.print_command) {
1759 os << "\\print_command \"" << print_command << "\"\n";
1763 case RC_PRINTEXSTRAOPTIONS:
1764 if (ignore_system_lyxrc ||
1765 print_extra_options != system_lyxrc.print_extra_options) {
1766 os << "\\print_extra_options \"" << print_extra_options
1771 case RC_PRINTSPOOL_COMMAND:
1772 if (ignore_system_lyxrc ||
1773 print_spool_command != system_lyxrc.print_spool_command) {
1774 os << "\\print_spool_command \"" << print_spool_command
1779 case RC_PRINTSPOOL_PRINTERPREFIX:
1780 if (ignore_system_lyxrc ||
1781 print_spool_printerprefix
1782 != system_lyxrc.print_spool_printerprefix) {
1783 os << "\\print_spool_printerprefix \""
1784 << print_spool_printerprefix << "\"\n";
1788 case RC_PRINTEVENPAGEFLAG:
1789 if (ignore_system_lyxrc ||
1790 print_evenpage_flag != system_lyxrc.print_evenpage_flag) {
1791 os << "\\print_evenpage_flag \"" << print_evenpage_flag
1796 case RC_PRINTODDPAGEFLAG:
1797 if (ignore_system_lyxrc ||
1798 print_oddpage_flag != system_lyxrc.print_oddpage_flag) {
1799 os << "\\print_oddpage_flag \"" << print_oddpage_flag
1804 case RC_PRINTREVERSEFLAG:
1805 if (ignore_system_lyxrc ||
1806 print_reverse_flag != system_lyxrc.print_reverse_flag) {
1807 os << "\\print_reverse_flag \"" << print_reverse_flag
1812 case RC_PRINTLANDSCAPEFLAG:
1813 if (ignore_system_lyxrc ||
1814 print_landscape_flag != system_lyxrc.print_landscape_flag) {
1815 os << "\\print_landscape_flag \"" << print_landscape_flag
1820 case RC_PRINTPAGERANGEFLAG:
1821 if (ignore_system_lyxrc ||
1822 print_pagerange_flag != system_lyxrc.print_pagerange_flag) {
1823 os << "\\print_pagerange_flag \"" << print_pagerange_flag
1828 case RC_PRINTCOPIESFLAG:
1829 if (ignore_system_lyxrc ||
1830 print_copies_flag != system_lyxrc.print_copies_flag) {
1831 os << "\\print_copies_flag \"" << print_copies_flag
1836 case RC_PRINTCOLLCOPIESFLAG:
1837 if (ignore_system_lyxrc ||
1838 print_collcopies_flag
1839 != system_lyxrc.print_collcopies_flag) {
1840 os << "\\print_collcopies_flag \""
1841 << print_collcopies_flag
1846 case RC_PRINTPAPERFLAG:
1847 if (ignore_system_lyxrc ||
1848 print_paper_flag != system_lyxrc.print_paper_flag) {
1849 os << "\\print_paper_flag \"" << print_paper_flag
1854 case RC_PRINTPAPERDIMENSIONFLAG:
1855 if (ignore_system_lyxrc ||
1856 print_paper_dimension_flag
1857 != system_lyxrc.print_paper_dimension_flag) {
1858 os << "\\print_paper_dimension_flag \""
1859 << print_paper_dimension_flag << "\"\n";
1863 case RC_PRINTTOPRINTER:
1864 if (ignore_system_lyxrc ||
1865 print_to_printer != system_lyxrc.print_to_printer) {
1866 os << "\\print_to_printer \"" << print_to_printer
1871 case RC_PRINTTOFILE:
1872 if (ignore_system_lyxrc ||
1873 print_to_file != system_lyxrc.print_to_file) {
1874 string const path = os::external_path(print_to_file);
1875 os << "\\print_to_file \"" << path << "\"\n";
1879 case RC_PRINTFILEEXTENSION:
1880 if (ignore_system_lyxrc ||
1881 print_file_extension != system_lyxrc.print_file_extension) {
1882 os << "\\print_file_extension \""
1883 << print_file_extension
1890 << "# EXPORT SECTION ####################################\n"
1893 case RC_CUSTOM_EXPORT_COMMAND:
1894 if (ignore_system_lyxrc ||
1895 custom_export_command
1896 != system_lyxrc.custom_export_command) {
1897 os << "\\custom_export_command \""
1898 << custom_export_command
1903 case RC_CUSTOM_EXPORT_FORMAT:
1904 if (ignore_system_lyxrc ||
1905 custom_export_format
1906 != system_lyxrc.custom_export_format) {
1907 os << "\\custom_export_format \"" << custom_export_format
1914 << "# TEX SECTION #######################################\n"
1917 case RC_FONT_ENCODING:
1918 if (ignore_system_lyxrc ||
1919 fontenc != system_lyxrc.fontenc) {
1920 os << "\\font_encoding \"" << fontenc << "\"\n";
1926 << "# FILE SECTION ######################################\n"
1929 case RC_DOCUMENTPATH:
1930 if (ignore_system_lyxrc ||
1931 document_path != system_lyxrc.document_path) {
1932 string const path = os::external_path(document_path);
1933 os << "\\document_path \"" << path << "\"\n";
1937 case RC_USELASTFILEPOS:
1938 if (ignore_system_lyxrc ||
1939 use_lastfilepos != system_lyxrc.use_lastfilepos) {
1940 os << "\\use_lastfilepos " << convert<string>(use_lastfilepos)
1945 case RC_LOADSESSION:
1946 if (ignore_system_lyxrc ||
1947 load_session != system_lyxrc.load_session) {
1948 os << "\\load_session " << convert<string>(load_session)
1953 case RC_MOUSE_WHEEL_SPEED:
1954 if (ignore_system_lyxrc ||
1955 mouse_wheel_speed != system_lyxrc.mouse_wheel_speed) {
1956 os << "\\mouse_wheel_speed " << mouse_wheel_speed << '\n';
1960 case RC_NUMLASTFILES:
1961 if (ignore_system_lyxrc ||
1962 num_lastfiles != system_lyxrc.num_lastfiles) {
1963 os << "\\num_lastfiles " << num_lastfiles << '\n';
1967 case RC_CHECKLASTFILES:
1968 if (ignore_system_lyxrc ||
1969 check_lastfiles != system_lyxrc.check_lastfiles) {
1970 os << "\\check_lastfiles " << convert<string>(check_lastfiles)
1975 case RC_EXAMPLEPATH:
1976 if (ignore_system_lyxrc ||
1977 example_path != system_lyxrc.example_path) {
1978 string const path = os::external_path(example_path);
1979 os << "\\example_path \"" << path << "\"\n";
1983 case RC_TEMPLATEPATH:
1984 if (ignore_system_lyxrc ||
1985 template_path != system_lyxrc.template_path) {
1986 string const path = os::external_path(template_path);
1987 os << "\\template_path \"" << path << "\"\n";
1991 case RC_TEMPDIRPATH:
1992 if (ignore_system_lyxrc ||
1993 tempdir_path != system_lyxrc.tempdir_path) {
1994 string const path = os::external_path(tempdir_path);
1995 os << "\\tempdir_path \"" << path << "\"\n";
2003 case RC_PLAINTEXT_LINELEN:
2004 if (ignore_system_lyxrc ||
2005 plaintext_linelen != system_lyxrc.plaintext_linelen) {
2006 os << "\\plaintext_linelen " << plaintext_linelen << '\n';
2010 case RC_MAKE_BACKUP:
2011 if (ignore_system_lyxrc ||
2012 make_backup != system_lyxrc.make_backup) {
2013 os << "\\make_backup " << convert<string>(make_backup) << '\n';
2017 case RC_BACKUPDIR_PATH:
2018 if (ignore_system_lyxrc ||
2019 backupdir_path != system_lyxrc.backupdir_path) {
2020 string const path = os::external_path(backupdir_path);
2021 os << "\\backupdir_path \"" << path << "\"\n";
2027 << "# PLAIN TEXT EXPORT SECTION ##############################\n"
2030 case RC_PLAINTEXT_ROFF_COMMAND:
2031 if (ignore_system_lyxrc ||
2032 plaintext_roff_command != system_lyxrc.plaintext_roff_command) {
2033 os << "\\plaintext_roff_command \"" << plaintext_roff_command
2040 << "# SPELLCHECKER SECTION ##############################\n"
2042 case RC_USE_SPELL_LIB:
2043 if (ignore_system_lyxrc ||
2044 use_spell_lib != system_lyxrc.use_spell_lib) {
2045 os << "\\use_spell_lib " << convert<string>(use_spell_lib) << '\n';
2049 case RC_SPELL_COMMAND:
2050 if (ignore_system_lyxrc ||
2051 isp_command != system_lyxrc.isp_command) {
2052 os << "\\spell_command \"" << isp_command << "\"\n";
2056 case RC_ACCEPT_COMPOUND:
2057 if (ignore_system_lyxrc ||
2058 isp_accept_compound != system_lyxrc.isp_accept_compound) {
2059 os << "\\accept_compound " << convert<string>(isp_accept_compound)
2064 case RC_USE_ALT_LANG:
2065 if (ignore_system_lyxrc ||
2066 isp_use_alt_lang != system_lyxrc.isp_use_alt_lang) {
2067 os << "\\use_alt_language " << convert<string>(isp_use_alt_lang)
2073 if (ignore_system_lyxrc ||
2074 isp_alt_lang != system_lyxrc.isp_alt_lang) {
2075 os << "\\alternate_language \"" << isp_alt_lang
2080 case RC_USE_ESC_CHARS:
2081 if (ignore_system_lyxrc ||
2082 isp_use_esc_chars != system_lyxrc.isp_use_esc_chars) {
2083 os << "\\use_escape_chars " << convert<string>(isp_use_esc_chars)
2089 if (ignore_system_lyxrc ||
2090 isp_esc_chars != system_lyxrc.isp_esc_chars) {
2091 os << "\\escape_chars \"" << isp_esc_chars << "\"\n";
2095 case RC_USE_PERS_DICT:
2096 if (ignore_system_lyxrc ||
2097 isp_use_pers_dict != system_lyxrc.isp_use_pers_dict) {
2098 os << "\\use_personal_dictionary "
2099 << convert<string>(isp_use_pers_dict)
2104 case RC_USE_TOOLTIP:
2105 if (ignore_system_lyxrc ||
2106 use_tooltip != system_lyxrc.use_tooltip) {
2107 os << "\\use_tooltip "
2108 << convert<string>(use_tooltip)
2111 case RC_USE_PIXMAP_CACHE:
2112 if (ignore_system_lyxrc ||
2113 use_pixmap_cache != system_lyxrc.use_pixmap_cache) {
2114 os << "\\use_pixmap_cache "
2115 << convert<string>(use_pixmap_cache)
2119 if (isp_pers_dict != system_lyxrc.isp_pers_dict) {
2120 string const path = os::external_path(isp_pers_dict);
2121 os << "\\personal_dictionary \"" << path << "\"\n";
2125 case RC_USE_INP_ENC:
2126 if (ignore_system_lyxrc ||
2127 isp_use_input_encoding
2128 != system_lyxrc.isp_use_input_encoding) {
2129 os << "\\use_input_encoding "
2130 << convert<string>(isp_use_input_encoding)
2137 << "# LANGUAGE SUPPORT SECTION ##########################\n"
2140 case RC_RTL_SUPPORT:
2141 if (ignore_system_lyxrc ||
2142 rtl_support != system_lyxrc.rtl_support) {
2143 os << "\\rtl " << convert<string>(rtl_support) << '\n';
2147 case RC_LANGUAGE_PACKAGE:
2148 if (ignore_system_lyxrc ||
2149 language_package != system_lyxrc.language_package) {
2150 os << "\\language_package \"" << language_package
2155 case RC_LANGUAGE_GLOBAL_OPTIONS:
2156 if (ignore_system_lyxrc ||
2157 language_global_options
2158 != system_lyxrc.language_global_options) {
2159 os << "\\language_global_options \""
2160 << convert<string>(language_global_options)
2165 case RC_LANGUAGE_USE_BABEL:
2166 if (ignore_system_lyxrc ||
2167 language_use_babel != system_lyxrc.language_use_babel) {
2168 os << "\\language_use_babel \""
2169 << convert<string>(language_use_babel)
2174 case RC_LANGUAGE_COMMAND_BEGIN:
2175 if (ignore_system_lyxrc ||
2176 language_command_begin
2177 != system_lyxrc.language_command_begin) {
2178 os << "\\language_command_begin \""
2179 << language_command_begin
2184 case RC_LANGUAGE_COMMAND_END:
2185 if (ignore_system_lyxrc ||
2186 language_command_end
2187 != system_lyxrc.language_command_end) {
2188 os << "\\language_command_end \"" << language_command_end
2193 case RC_LANGUAGE_COMMAND_LOCAL:
2194 if (ignore_system_lyxrc ||
2195 language_command_local
2196 != system_lyxrc.language_command_local) {
2197 os << "\\language_command_local \""
2198 << language_command_local
2203 case RC_LANGUAGE_AUTO_BEGIN:
2204 if (ignore_system_lyxrc ||
2205 language_auto_begin != system_lyxrc.language_auto_begin) {
2206 os << "\\language_auto_begin "
2207 << convert<string>(language_auto_begin) << '\n';
2211 case RC_LANGUAGE_AUTO_END:
2212 if (ignore_system_lyxrc ||
2213 language_auto_end != system_lyxrc.language_auto_end) {
2214 os << "\\language_auto_end "
2215 << convert<string>(language_auto_end) << '\n';
2219 case RC_MARK_FOREIGN_LANGUAGE:
2220 if (ignore_system_lyxrc ||
2221 mark_foreign_language
2222 != system_lyxrc.mark_foreign_language) {
2223 os << "\\mark_foreign_language " <<
2224 convert<string>(mark_foreign_language) << '\n';
2230 << "# 2nd MISC SUPPORT SECTION ##########################\n"
2233 case RC_AUTO_NUMBER:
2234 if (ignore_system_lyxrc ||
2235 auto_number != system_lyxrc.auto_number) {
2236 os << "\\auto_number " << convert<string>(auto_number) << '\n';
2240 case RC_DEFAULT_LANGUAGE:
2241 if (ignore_system_lyxrc ||
2242 default_language != system_lyxrc.default_language) {
2243 os << "\\default_language " << default_language << '\n';
2249 << "# FORMATS SECTION ##########################\n"
2253 // New/modified formats
2254 for (Formats::const_iterator cit = formats.begin();
2255 cit != formats.end(); ++cit) {
2256 Format const * format =
2257 system_formats.getFormat(cit->name());
2259 format->extension() != cit->extension() ||
2260 format->prettyname() != cit->prettyname() ||
2261 format->shortcut() != cit->shortcut() ||
2262 format->viewer() != cit->viewer() ||
2263 format->editor() != cit->editor() ||
2264 format->documentFormat() != cit->documentFormat() ||
2265 format->vectorFormat() != cit->vectorFormat()) {
2266 os << "\\format \"" << cit->name() << "\" \""
2267 << cit->extension() << "\" \""
2268 << cit->prettyname() << "\" \""
2269 << cit->shortcut() << "\" \""
2270 << cit->viewer() << "\" \""
2271 << cit->editor() << "\" \"";
2272 vector<string> flags;
2273 if (cit->documentFormat())
2274 flags.push_back("document");
2275 if (cit->vectorFormat())
2276 flags.push_back("vector");
2277 os << getStringFromVector(flags);
2282 // Look for deleted formats
2283 for (Formats::const_iterator cit = system_formats.begin();
2284 cit != system_formats.end(); ++cit)
2285 if (!formats.getFormat(cit->name()))
2286 os << "\\format \"" << cit->name()
2287 << "\" \"\" \"\" \"\" \"\" \"\" \"\"\n";
2296 << "# CONVERTERS SECTION ##########################\n"
2300 // Look for new converters
2301 for (Converters::const_iterator cit = theConverters().begin();
2302 cit != theConverters().end(); ++cit) {
2303 Converter const * converter =
2304 theSystemConverters().getConverter(cit->from,
2307 converter->command != cit->command ||
2308 converter->flags != cit->flags)
2309 os << "\\converter \"" << cit->from << "\" \""
2310 << cit->to << "\" \""
2311 << cit->command << "\" \""
2312 << cit->flags << "\"\n";
2315 // New/modifed converters
2316 for (Converters::const_iterator cit = theSystemConverters().begin();
2317 cit != theSystemConverters().end(); ++cit)
2318 if (!theConverters().getConverter(cit->from, cit->to))
2319 os << "\\converter \"" << cit->from
2320 << "\" \"" << cit->to << "\" \"\" \"\"\n";
2327 << "# COPIERS SECTION ##########################\n"
2330 // Look for new movers
2331 Movers::const_iterator const sysbegin = theSystemMovers().begin();
2332 Movers::const_iterator const sysend = theSystemMovers().end();
2333 Movers::const_iterator it = theMovers().begin();
2334 Movers::const_iterator end = theMovers().end();
2336 for (; it != end; ++it) {
2337 Movers::const_iterator const sysit =
2338 find_if(sysbegin, sysend, SameMover(*it));
2339 if (sysit == sysend) {
2340 string const & fmt = it->first;
2341 string const & command =
2342 it->second.command();
2344 os << "\\copier " << fmt
2345 << " \"" << command << "\"\n";
2351 // We don't actually delete SpecialisedMover(s) from the
2352 // map, just clear their 'command', so there's no need
2353 // to test for anything else.
2361 string const LyXRC::getDescription(LyXRCTags tag)
2366 case RC_ACCEPT_COMPOUND:
2367 str = _("Consider run-together words, such as \"diskdrive\" for \"disk drive\", as legal words?");
2371 case RC_USE_ALT_LANG:
2372 str = _("Specify an alternate language. The default is to use the language of the document.");
2375 case RC_PLAINTEXT_ROFF_COMMAND:
2376 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.");
2379 case RC_PLAINTEXT_LINELEN:
2380 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.");
2383 case RC_AUTOREGIONDELETE:
2384 str = _("De-select if you don't want the current selection to be replaced automatically by what you type.");
2387 case RC_AUTORESET_OPTIONS:
2388 str = _("De-select if you don't want the class options to be reset to defaults after class change.");
2392 str = _("The time interval between auto-saves (in seconds). 0 means no auto-save.");
2395 case RC_AUTO_NUMBER:
2398 case RC_BACKUPDIR_PATH:
2399 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.");
2402 case RC_BIBTEX_COMMAND:
2403 str = _("Define the options of bibtex (cf. man bibtex) or select an alternative compiler (e.g. mlbibtex or bibulus).");
2407 str = _("Keybindings file. Can either specify an absolute path, or LyX will look in its global and local bind/ directories.");
2410 case RC_CHECKLASTFILES:
2411 str = _("Select to check whether the lastfiles still exist.");
2414 case RC_CHKTEX_COMMAND:
2415 str = _("Define how to run chktex. E.g. \"chktex -n11 -n1 -n3 -n6 -n9 -22 -n25 -n30 -n38\" Refer to the ChkTeX documentation.");
2424 case RC_CURSOR_FOLLOWS_SCROLLBAR:
2425 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.");
2428 case RC_SHOW_MACRO_LABEL:
2429 str = _("Show a small box around a Math Macro with the macro name when the cursor is inside.");
2432 case RC_CUSTOM_EXPORT_COMMAND:
2435 case RC_CUSTOM_EXPORT_FORMAT:
2438 case RC_DATE_INSERT_FORMAT:
2439 //xgettext:no-c-format
2440 str = _("This accepts the normal strftime formats; see man strftime for full details. E.g.\"%A, %e. %B %Y\".");
2444 str = _("Command definition file. Can either specify an absolute path, or LyX will look in its global and local commands/ directories.");
2447 case RC_DEFAULT_LANGUAGE:
2448 str = _("New documents will be assigned this language.");
2451 case RC_DEFAULT_PAPERSIZE:
2452 str = _("Specify the default paper size.");
2455 case RC_DIALOGS_ICONIFY_WITH_MAIN:
2456 str = _("Iconify the dialogs when the main window is iconified. (Affects only dialogs shown after the change has been made.)");
2459 case RC_DISPLAY_GRAPHICS:
2460 str = _("Select how LyX will display any graphics.");
2463 case RC_DOCUMENTPATH:
2464 str = _("The default path for your documents. An empty value selects the directory LyX was started from.");
2468 case RC_USE_ESC_CHARS:
2469 str = _("Specify additional chars that can be part of a word.");
2472 case RC_EXAMPLEPATH:
2473 str = _("The path that LyX will set when offering to choose an example. An empty value selects the directory LyX was started from.");
2476 case RC_FONT_ENCODING:
2477 str = _("The font encoding used for the LaTeX2e fontenc package. T1 is highly recommended for non-English languages.");
2483 case RC_INDEX_COMMAND:
2484 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\".");
2491 case RC_KBMAP_PRIMARY:
2492 case RC_KBMAP_SECONDARY:
2493 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.");
2496 case RC_LABEL_INIT_LENGTH:
2497 str = _("Maximum number of words in the initialization string for a new label");
2500 case RC_LANGUAGE_AUTO_BEGIN:
2501 str = _("Select if a language switching command is needed at the beginning of the document.");
2504 case RC_LANGUAGE_AUTO_END:
2505 str = _("Select if a language switching command is needed at the end of the document.");
2508 case RC_LANGUAGE_COMMAND_BEGIN:
2509 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.");
2512 case RC_LANGUAGE_COMMAND_END:
2513 str = _("The LaTeX command for changing back to the language of the document.");
2516 case RC_LANGUAGE_COMMAND_LOCAL:
2517 str = _("The LaTeX command for local changing of the language.");
2520 case RC_LANGUAGE_GLOBAL_OPTIONS:
2521 str = _("De-select if you don't want the language(s) used as an argument to \\documentclass.");
2524 case RC_LANGUAGE_PACKAGE:
2525 str = _("The LaTeX command for loading the language package. E.g. \"\\usepackage{babel}\", \"\\usepackage{omega}\".");
2528 case RC_LANGUAGE_USE_BABEL:
2529 str = _("De-select if you don't want babel to be used when the language of the document is the default language.");
2532 case RC_USELASTFILEPOS:
2533 str = _("De-select if you do not want LyX to scroll to saved position.");
2536 case RC_LOADSESSION:
2537 str = _("De-select to prevent loading files opened from the last LyX session.");
2540 case RC_MAKE_BACKUP:
2541 str = _("De-select if you don't want LyX to create backup files.");
2544 case RC_MARK_FOREIGN_LANGUAGE:
2545 str = _("Select to control the highlighting of words with a language foreign to that of the document.");
2548 case RC_MOUSE_WHEEL_SPEED:
2549 str = bformat(_("The scrolling speed of the mouse wheel. "),
2553 case RC_NUMLASTFILES:
2554 str = bformat(_("Maximal number of lastfiles. Up to %1$d can appear in the file menu."),
2558 case RC_PATH_PREFIX:
2559 str = _("Specify those directories which should be "
2560 "prepended to the PATH environment variable. "
2561 "Use the OS native format.");
2565 case RC_USE_PERS_DICT:
2566 str = _("Specify an alternate personal dictionary file. E.g. \".ispell_english\".");
2570 str = _("Shows a typeset preview of things such as math");
2573 case RC_PREVIEW_HASHED_LABELS:
2574 str = _("Previewed equations will have \"(#)\" labels rather than numbered ones");
2577 case RC_PREVIEW_SCALE_FACTOR:
2578 str = _("Scale the preview size to suit.");
2581 case RC_PRINTCOLLCOPIESFLAG:
2582 str = _("The option for specifying whether the copies should be collated.");
2585 case RC_PRINTCOPIESFLAG:
2586 str = _("The option for specifying the number of copies to print.");
2590 str = _("The default printer to print on. If none is specified, LyX will use the environment variable PRINTER.");
2593 case RC_PRINTEVENPAGEFLAG:
2594 str = _("The option to print only even pages.");
2597 case RC_PRINTEXSTRAOPTIONS:
2598 str = _("Extra options to pass to printing program after everything else, but before the filename of the DVI file to be printed.");
2601 case RC_PRINTFILEEXTENSION:
2602 str = _("Extension of printer program output file. Usually \".ps\".");
2605 case RC_PRINTLANDSCAPEFLAG:
2606 str = _("The option to print out in landscape.");
2609 case RC_PRINTODDPAGEFLAG:
2610 str = _("The option to print only odd pages.");
2613 case RC_PRINTPAGERANGEFLAG:
2614 str = _("The option for specifying a comma-separated list of pages to print.");
2617 case RC_PRINTPAPERDIMENSIONFLAG:
2618 str = _("Option to specify the dimensions of the print paper.");
2621 case RC_PRINTPAPERFLAG:
2622 str = _("The option to specify paper type.");
2625 case RC_PRINTREVERSEFLAG:
2626 str = _("The option to reverse the order of the pages printed.");
2629 case RC_PRINTSPOOL_COMMAND:
2630 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.");
2633 case RC_PRINTSPOOL_PRINTERPREFIX:
2634 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.");
2637 case RC_PRINTTOFILE:
2638 str = _("Option to pass to the print program to print to a file.");
2641 case RC_PRINTTOPRINTER:
2642 str = _("Option to pass to the print program to print on a specific printer.");
2645 case RC_PRINT_ADAPTOUTPUT:
2646 str = _("Select for LyX to pass the name of the destination printer to your print command.");
2649 case RC_PRINT_COMMAND:
2650 str = _("Your favorite print program, e.g. \"dvips\", \"dvilj4\".");
2653 case RC_RTL_SUPPORT:
2654 str = _("Select to enable support of right-to-left languages (e.g. Hebrew, Arabic).");
2658 str = _("DPI (dots per inch) of your monitor is auto-detected by LyX. If that goes wrong, override the setting here.");
2661 case RC_SCREEN_FONT_ROMAN:
2662 case RC_SCREEN_FONT_SANS:
2663 case RC_SCREEN_FONT_TYPEWRITER:
2664 str = _("The screen fonts used to display the text while editing.");
2667 case RC_SCREEN_FONT_ROMAN_FOUNDRY:
2668 case RC_SCREEN_FONT_SANS_FOUNDRY:
2669 case RC_SCREEN_FONT_TYPEWRITER_FOUNDRY:
2672 case RC_SCREEN_FONT_SCALABLE:
2673 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.");
2676 case RC_SCREEN_FONT_SIZES:
2677 str = _("The font sizes used for calculating the scaling of the screen fonts.");
2680 case RC_SCREEN_ZOOM:
2681 //xgettext:no-c-format
2682 str = _("The zoom percentage for screen fonts. A setting of 100% will make the fonts roughly the same size as on paper.");
2685 case RC_GEOMETRY_SESSION:
2686 str = _("Allow session manager to save and restore windows geometry.");
2690 str = _("This starts the lyxserver. The pipes get an additional extension \".in\" and \".out\". Only for advanced users.");
2696 case RC_SHOW_BANNER:
2697 str = _("De-select if you don't want the startup banner.");
2700 case RC_SPELL_COMMAND:
2701 str = _("What command runs the spellchecker?");
2704 case RC_TEMPDIRPATH:
2705 str = _("LyX will place its temporary directories in this path. They will be deleted when you quit LyX.");
2708 case RC_TEMPLATEPATH:
2709 str = _("The path that LyX will set when offering to choose a template. An empty value selects the directory LyX was started from.");
2712 case RC_TEX_ALLOWS_SPACES:
2715 case RC_TEX_EXPECTS_WINDOWS_PATHS:
2719 str = _("The UI (user interface) file. Can either specify an absolute path, or LyX will look in its global and local ui/ directories.");
2731 case RC_USE_INP_ENC:
2732 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.");
2735 case RC_USE_TOOLTIP:
2736 str = _("Enable the automatic appearance of tool tips in the work area.");
2739 case RC_USE_PIXMAP_CACHE:
2740 str = _("Enable the pixmap cache that might improve performance on Mac and Windows.");
2743 case RC_USE_SPELL_LIB:
2746 case RC_VIEWDVI_PAPEROPTION:
2747 _("Specify the paper command to DVI viewer (leave empty or use \"-paper\")");
2762 // The global instance
2765 // The global copy of the system lyxrc entries (everything except preferences)