1 /* This file is part of
2 * ======================================================
4 * LyX, The Document Processor
6 * Copyright 1995 Matthias Ettrich
7 * Copyright 1995-2000 The LyX Team.
9 * ====================================================== */
14 #pragma implementation "lyxrc.h"
25 #include "LyXAction.h"
26 #include "lyxserver.h"
29 #include "tex-strings.h"
30 #include "support/path.h"
31 #include "support/filetools.h"
33 #include "converter.h"
41 // this is crappy... why are those colors command line arguments and
42 // not in lyxrc?? (Matthias)
43 // Because nobody put them there. (Asger)
45 extern LyXAction lyxaction;
46 extern kb_keymap * toplevel_keymap;
50 keyword_item lyxrcTags[] = {
51 { "\\accept_compound", LyXRC::RC_ACCEPT_COMPOUND },
52 { "\\alternate_language", LyXRC::RC_ALT_LANG },
53 { "\\ascii_linelen", LyXRC::RC_ASCII_LINELEN },
54 { "\\ascii_roff_command", LyXRC::RC_ASCIIROFF_COMMAND },
55 { "\\auto_number", LyXRC::RC_AUTO_NUMBER },
56 { "\\auto_region_delete", LyXRC::RC_AUTOREGIONDELETE },
57 { "\\autosave", LyXRC::RC_AUTOSAVE },
58 { "\\backupdir_path", LyXRC::RC_BACKUPDIR_PATH },
59 { "\\bind", LyXRC::RC_BIND },
60 { "\\bind_file", LyXRC::RC_BINDFILE },
61 { "\\check_lastfiles", LyXRC::RC_CHECKLASTFILES },
62 { "\\chktex_command", LyXRC::RC_CHKTEX_COMMAND },
63 { "\\converter", LyXRC::RC_CONVERTER },
64 { "\\cursor_follows_scrollbar", LyXRC::RC_CURSOR_FOLLOWS_SCROLLBAR },
65 { "\\custom_export_command", LyXRC::RC_CUSTOM_EXPORT_COMMAND },
66 { "\\custom_export_format", LyXRC::RC_CUSTOM_EXPORT_FORMAT },
67 { "\\date_insert_format", LyXRC::RC_DATE_INSERT_FORMAT },
68 { "\\default_language", LyXRC::RC_DEFAULT_LANGUAGE },
69 { "\\default_papersize", LyXRC::RC_DEFAULT_PAPERSIZE },
70 { "\\display_shortcuts", LyXRC::RC_DISPLAY_SHORTCUTS },
71 { "\\document_path", LyXRC::RC_DOCUMENTPATH },
72 { "\\escape_chars", LyXRC::RC_ESC_CHARS },
73 { "\\exit_confirmation", LyXRC::RC_EXIT_CONFIRMATION },
74 { "\\fax_command", LyXRC::RC_FAX_COMMAND },
75 { "\\fax_program", LyXRC::RC_FAXPROGRAM },
76 { "\\font_encoding", LyXRC::RC_FONT_ENCODING },
77 { "\\format", LyXRC::RC_FORMAT },
78 { "\\input", LyXRC::RC_INPUT },
79 { "\\kbmap", LyXRC::RC_KBMAP },
80 { "\\kbmap_primary", LyXRC::RC_KBMAP_PRIMARY },
81 { "\\kbmap_secondary", LyXRC::RC_KBMAP_SECONDARY },
82 { "\\language_auto_begin", LyXRC::RC_LANGUAGE_AUTO_BEGIN },
83 { "\\language_auto_end", LyXRC::RC_LANGUAGE_AUTO_END },
84 { "\\language_command_begin", LyXRC::RC_LANGUAGE_COMMAND_BEGIN },
85 { "\\language_command_end", LyXRC::RC_LANGUAGE_COMMAND_END },
86 { "\\language_package", LyXRC::RC_LANGUAGE_PACKAGE },
87 { "\\lastfiles", LyXRC::RC_LASTFILES },
88 { "\\make_backup", LyXRC::RC_MAKE_BACKUP },
89 { "\\mark_foreign_language", LyXRC::RC_MARK_FOREIGN_LANGUAGE },
90 { "\\new_ask_filename", LyXRC::RC_NEW_ASK_FILENAME },
91 { "\\num_lastfiles", LyXRC::RC_NUMLASTFILES },
92 { "\\override_x_deadkeys", LyXRC::RC_OVERRIDE_X_DEADKEYS },
93 { "\\personal_dictionary", LyXRC::RC_PERS_DICT },
94 { "\\phone_book", LyXRC::RC_PHONEBOOK },
95 { "\\print_adapt_output", LyXRC::RC_PRINT_ADAPTOUTPUT },
96 { "\\print_collcopies_flag", LyXRC::RC_PRINTCOLLCOPIESFLAG },
97 { "\\print_command", LyXRC::RC_PRINT_COMMAND },
98 { "\\print_copies_flag", LyXRC::RC_PRINTCOPIESFLAG },
99 { "\\print_evenpage_flag", LyXRC::RC_PRINTEVENPAGEFLAG },
100 { "\\print_extra_options", LyXRC::RC_PRINTEXSTRAOPTIONS },
101 { "\\print_file_extension", LyXRC::RC_PRINTFILEEXTENSION },
102 { "\\print_landscape_flag", LyXRC::RC_PRINTLANDSCAPEFLAG },
103 { "\\print_oddpage_flag", LyXRC::RC_PRINTODDPAGEFLAG },
104 { "\\print_pagerange_flag", LyXRC::RC_PRINTPAGERANGEFLAG },
105 { "\\print_paper_dimension_flag", LyXRC::RC_PRINTPAPERDIMENSIONFLAG },
106 { "\\print_paper_flag", LyXRC::RC_PRINTPAPERFLAG },
107 { "\\print_reverse_flag", LyXRC::RC_PRINTREVERSEFLAG },
108 { "\\print_spool_command", LyXRC::RC_PRINTSPOOL_COMMAND },
109 { "\\print_spool_printerprefix", LyXRC::RC_PRINTSPOOL_PRINTERPREFIX },
110 { "\\print_to_file", LyXRC::RC_PRINTTOFILE },
111 { "\\print_to_printer", LyXRC::RC_PRINTTOPRINTER },
112 { "\\printer", LyXRC::RC_PRINTER },
113 { "\\ps_command", LyXRC::RC_PS_COMMAND },
114 { "\\rtl", LyXRC::RC_RTL_SUPPORT },
115 { "\\screen_dpi", LyXRC::RC_SCREEN_DPI },
116 { "\\screen_font_encoding", LyXRC::RC_SCREEN_FONT_ENCODING },
117 { "\\screen_font_encoding_menu", LyXRC::RC_SCREEN_FONT_ENCODING_MENU },
118 { "\\screen_font_menu", LyXRC::RC_SCREEN_FONT_MENU },
119 { "\\screen_font_popup", LyXRC::RC_SCREEN_FONT_POPUP },
120 { "\\screen_font_roman", LyXRC::RC_SCREEN_FONT_ROMAN },
121 { "\\screen_font_sans", LyXRC::RC_SCREEN_FONT_SANS },
122 { "\\screen_font_scalable", LyXRC::RC_SCREEN_FONT_SCALABLE },
123 { "\\screen_font_sizes", LyXRC::RC_SCREEN_FONT_SIZES },
124 { "\\screen_font_typewriter", LyXRC::RC_SCREEN_FONT_TYPEWRITER },
125 { "\\screen_zoom", LyXRC::RC_SCREEN_ZOOM },
126 { "\\serverpipe", LyXRC::RC_SERVERPIPE },
127 { "\\set_color", LyXRC::RC_SET_COLOR },
128 { "\\show_banner", LyXRC::RC_SHOW_BANNER },
129 { "\\spell_command", LyXRC::RC_SPELL_COMMAND },
130 { "\\tempdir_path", LyXRC::RC_TEMPDIRPATH },
131 { "\\template_path", LyXRC::RC_TEMPLATEPATH },
132 { "\\ui_file", LyXRC::RC_UIFILE },
133 { "\\use_alt_language", LyXRC::RC_USE_ALT_LANG },
134 { "\\use_escape_chars", LyXRC::RC_USE_ESC_CHARS },
135 { "\\use_input_encoding", LyXRC::RC_USE_INP_ENC },
136 { "\\use_personal_dictionary", LyXRC::RC_USE_PERS_DICT },
137 { "\\use_tempdir", LyXRC::RC_USETEMPDIR },
138 { "\\view_dvi_paper_option", LyXRC::RC_VIEWDVI_PAPEROPTION },
139 { "\\viewer" ,LyXRC::RC_VIEWER},
140 { "\\wheel_jump", LyXRC::RC_WHEEL_JUMP }
143 /* Let the range depend of the size of lyxrcTags. Alejandro 240596 */
144 static const int lyxrcCount = sizeof(lyxrcTags) / sizeof(keyword_item);
153 void LyXRC::setDefaults() {
155 // Get printer from the environment. If fail, use default "",
156 // assuming that everything is set up correctly.
157 printer = GetEnv("PRINTER");
158 print_adapt_output = false;
159 print_command = "dvips";
160 print_evenpage_flag = "-B";
161 print_oddpage_flag = "-A";
162 print_pagerange_flag = "-pp";
163 print_copies_flag = "-c";
164 print_collcopies_flag = "-C";
165 print_reverse_flag = "-r";
166 print_landscape_flag = "-t landscape";
167 print_to_printer = "-P";
168 print_to_file = "-o ";
169 print_file_extension = ".ps";
170 print_paper_flag = "-t";
171 print_paper_dimension_flag = "-T";
172 document_path = GetEnvPath("HOME");
173 tempdir_path = "/tmp";
176 view_dvi_paper_option = "-paper";
177 default_papersize = BufferParams::PAPER_USLETTER;
178 custom_export_format = "ps";
179 chktex_command = "chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38";
182 // Because a screen typically is wider than a piece of paper:
185 // Default LaTeX font size:
186 font_sizes[LyXFont::SIZE_TINY] = 5.0;
187 font_sizes[LyXFont::SIZE_SCRIPT] = 7.0;
188 font_sizes[LyXFont::SIZE_FOOTNOTE] = 8.0;
189 font_sizes[LyXFont::SIZE_SMALL] = 9.0;
190 font_sizes[LyXFont::SIZE_NORMAL] = 10.0;
191 font_sizes[LyXFont::SIZE_LARGE] = 12.0;
192 font_sizes[LyXFont::SIZE_LARGER] = 14.4;
193 font_sizes[LyXFont::SIZE_LARGEST] = 17.26;
194 font_sizes[LyXFont::SIZE_HUGE] = 20.74;
195 font_sizes[LyXFont::SIZE_HUGER] = 24.88;
196 use_scalable_fonts = true;
197 roman_font_name = "-*-times";
198 sans_font_name = "-*-helvetica";
199 typewriter_font_name = "-*-courier";
200 menu_font_name = "-*-helvetica-bold-r";
201 popup_font_name = "-*-helvetica-medium-r";
202 font_norm = "iso8859-1";
203 font_norm_type = OTHER_ENCODING;
205 override_x_deadkeys = true;
207 auto_region_delete = true;
210 check_lastfiles = true;
213 exit_confirmation = true;
214 display_shortcuts = true;
215 // Spellchecker settings:
216 isp_command = "ispell";
217 isp_accept_compound = false;
218 isp_use_input_encoding = false;
219 isp_use_alt_lang = false;
220 isp_use_pers_dict = false;
221 isp_use_esc_chars = false;
226 mark_foreign_language = true;
227 language_package = "\\usepackage{babel}";
228 language_auto_begin = true;
229 language_auto_end = true;
230 language_command_begin = "\\selectlanguage{$$lang}";
231 language_command_end = "\\selectlanguage{$$lang}";
232 default_language = "english";
234 new_ask_filename = false;
237 date_insert_format = "%A, %e %B %Y";
239 cursor_follows_scrollbar = false;
241 /// These variables are not stored on disk (perhaps they
242 // should be moved from the LyXRC class).
248 int LyXRC::ReadBindFile(string const & name)
251 string tmp = i18nLibFileSearch("bind", name, "bind");
252 lyxerr[Debug::LYXRC] << "Reading bindfile:" << tmp << endl;
253 int result = read(tmp);
255 lyxerr << "Error reading bind file: " << tmp << endl;
261 int LyXRC::read(string const & filename)
264 string bindFile = "cua";
266 LyXLex lexrc(lyxrcTags, lyxrcCount);
267 if (lyxerr.debugging(Debug::PARSER))
268 lexrc.printTable(lyxerr);
270 lexrc.setFile(filename);
271 if (!lexrc.IsOK()) return -2;
273 lyxerr[Debug::INIT] << "Reading '" << filename << "'..." << endl;
275 while (lexrc.IsOK()) {
276 // By using two switches we take advantage of the compiler
277 // telling us if we have missed a LyXRCTags element in
278 // the second switch.
279 // Note that this also shows a problem with LyXLex since it
280 // helps us avoid taking advantage of the strictness of the
283 int le = lexrc.lex();
285 case LyXLex::LEX_UNDEF:
286 lexrc.printError("Unknown tag `$$Token'");
288 case LyXLex::LEX_FEOF:
292 switch (static_cast<LyXRCTags>(le)) {
293 case RC_INPUT: // Include file
295 string tmp = LibFileSearch(string(),
298 lexrc.printError("Error reading "
299 "included file: "+tmp);
303 case RC_BINDFILE: // RVDK_PATCH_5
305 string tmp(lexrc.GetString());
306 if (bind_file.empty()) {
307 // we only need the name of the first
308 // bind file since that (usually)
309 // includes several others.
318 ui_file = lexrc.GetString();
322 case RC_EXIT_CONFIRMATION:
324 exit_confirmation = lexrc.GetBool();
327 case RC_DISPLAY_SHORTCUTS:
329 display_shortcuts = lexrc.GetBool();
334 use_kbmap = lexrc.GetBool();
337 case RC_KBMAP_PRIMARY:
339 string kmap(lexrc.GetString());
342 } else if (!LibFileSearch("kbd", kmap,
344 primary_kbmap = kmap;
346 lexrc.printError("LyX: Keymap `$$Token' not found");
350 case RC_KBMAP_SECONDARY:
352 string kmap(lexrc.GetString());
355 } else if (!LibFileSearch("kbd", kmap,
357 secondary_kbmap = kmap;
359 lexrc.printError("LyX: Keymap `$$Token' not found");
363 case RC_FONT_ENCODING:
365 fontenc = lexrc.GetString();
370 printer = lexrc.GetString();
373 case RC_PRINT_COMMAND:
375 print_command = lexrc.GetString();
378 case RC_PRINTEVENPAGEFLAG:
380 print_evenpage_flag = lexrc.GetString();
383 case RC_PRINTODDPAGEFLAG:
385 print_oddpage_flag = lexrc.GetString();
388 case RC_PRINTPAGERANGEFLAG:
390 print_pagerange_flag = lexrc.GetString();
393 case RC_PRINTCOPIESFLAG:
395 print_copies_flag = lexrc.GetString();
398 case RC_PRINTCOLLCOPIESFLAG:
400 print_collcopies_flag = lexrc.GetString();
403 case RC_PRINTREVERSEFLAG:
405 print_reverse_flag = lexrc.GetString();
408 case RC_PRINTLANDSCAPEFLAG:
410 print_landscape_flag = lexrc.GetString();
413 case RC_PRINTTOPRINTER:
415 print_to_printer = lexrc.GetString();
418 case RC_PRINT_ADAPTOUTPUT:
420 print_adapt_output = lexrc.GetBool();
425 print_to_file = lexrc.GetString();
428 case RC_PRINTFILEEXTENSION:
430 print_file_extension = lexrc.GetString();
433 case RC_PRINTEXSTRAOPTIONS:
435 print_extra_options = lexrc.GetString();
438 case RC_PRINTSPOOL_COMMAND:
440 print_spool_command = lexrc.GetString();
443 case RC_PRINTSPOOL_PRINTERPREFIX:
445 print_spool_printerprefix = lexrc.GetString();
448 case RC_PRINTPAPERDIMENSIONFLAG:
450 print_paper_dimension_flag = lexrc.GetString();
453 case RC_PRINTPAPERFLAG:
455 print_paper_flag = lexrc.GetString();
458 case RC_CUSTOM_EXPORT_COMMAND:
460 custom_export_command = lexrc.GetString();
463 case RC_CUSTOM_EXPORT_FORMAT:
465 custom_export_format = lexrc.GetString();
468 case RC_DEFAULT_PAPERSIZE:
470 string size = lowercase(lexrc.GetString());
471 if (size == "usletter")
473 BufferParams::PAPER_USLETTER;
474 else if (size == "legal")
476 BufferParams::PAPER_LEGALPAPER;
477 else if (size == "executive")
479 BufferParams::PAPER_EXECUTIVEPAPER;
480 else if (size == "a3")
482 BufferParams::PAPER_A3PAPER;
483 else if (size == "a4")
485 BufferParams::PAPER_A4PAPER;
486 else if (size == "a5")
488 BufferParams::PAPER_A5PAPER;
489 else if (size == "b5")
491 BufferParams::PAPER_B5PAPER;
495 case RC_VIEWDVI_PAPEROPTION:
497 view_dvi_paper_option = lexrc.GetString();
499 view_dvi_paper_option = "";
504 ps_command = lexrc.GetString();
507 case RC_CHKTEX_COMMAND:
509 chktex_command = lexrc.GetString();
514 dpi = lexrc.GetInteger();
519 zoom = lexrc.GetInteger();
524 wheel_jump = lexrc.GetInteger();
527 case RC_SCREEN_FONT_SIZES:
529 font_sizes[LyXFont::SIZE_TINY] =
532 font_sizes[LyXFont::SIZE_SCRIPT] =
535 font_sizes[LyXFont::SIZE_FOOTNOTE] =
538 font_sizes[LyXFont::SIZE_SMALL] =
541 font_sizes[LyXFont::SIZE_NORMAL] =
544 font_sizes[LyXFont::SIZE_LARGE] =
547 font_sizes[LyXFont::SIZE_LARGER] =
550 font_sizes[LyXFont::SIZE_LARGEST] =
553 font_sizes[LyXFont::SIZE_HUGE] =
556 font_sizes[LyXFont::SIZE_HUGER] =
560 case RC_SCREEN_FONT_SCALABLE:
562 use_scalable_fonts = lexrc.GetBool();
567 autosave = lexrc.GetInteger();
570 case RC_DOCUMENTPATH:
572 document_path = ExpandPath(lexrc.GetString());
576 case RC_TEMPLATEPATH:
578 template_path = ExpandPath(lexrc.GetString());
583 tempdir_path = ExpandPath(lexrc.GetString());
588 use_tempdir = lexrc.GetBool();
593 lastfiles = ExpandPath(lexrc.GetString());
596 case RC_NUMLASTFILES:
598 num_lastfiles = lexrc.GetInteger();
601 case RC_CHECKLASTFILES:
603 check_lastfiles = lexrc.GetBool();
606 case RC_SCREEN_FONT_ROMAN:
608 roman_font_name = lexrc.GetString();
611 case RC_SCREEN_FONT_SANS:
613 sans_font_name = lexrc.GetString();
616 case RC_SCREEN_FONT_TYPEWRITER:
618 typewriter_font_name = lexrc.GetString();
621 case RC_SCREEN_FONT_MENU:
623 menu_font_name = lexrc.GetString();
626 case RC_SCREEN_FONT_POPUP:
628 popup_font_name = lexrc.GetString();
631 case RC_SCREEN_FONT_ENCODING:
633 font_norm = lexrc.GetString();
634 set_font_norm_type();
638 case RC_SCREEN_FONT_ENCODING_MENU:
640 font_norm_menu = lexrc.GetString();
645 string lyx_name, x11_name;
648 lyx_name = lexrc.GetString();
650 lexrc.printError("Missing color tag.");
655 x11_name = lexrc.GetString();
657 lexrc.printError("Missing color name for color : `$$Token'");
661 if (!lcolor.setColor(lyx_name, x11_name))
662 lyxerr << "Bad lyxrc set_color for "
667 case RC_AUTOREGIONDELETE:
668 // Auto region delete defaults to true
670 auto_region_delete = lexrc.GetBool();
675 // we should not do an explicit binding before
676 // loading a bind file. So, in this case, load
677 // the default bind file.
680 bind_file = bindFile;
682 // !!!chb, dynamic key binding...
686 if (lexrc.lex() == LyXLex::LEX_DATA) {
687 seq = lexrc.GetString();
689 lexrc.printError("Bad key sequence: `$$Token'");
693 if (lexrc.lex() == LyXLex::LEX_DATA) {
694 cmd = lexrc.GetString();
696 lexrc.printError("Bad command: `$$Token'");
700 if ((action = lyxaction.LookupFunc(cmd))>= 0) {
701 if (lyxerr.debugging(Debug::KBMAP)) {
702 lyxerr << "RC_BIND: Sequence `"
703 << seq << "' Command `"
704 << cmd << "' Action `"
705 << action << '\'' << endl;
707 res = toplevel_keymap->bind(seq, action);
710 "Invalid key sequence `"
713 } else {// cmd is the last token read.
715 "Unknown LyX function `$$Token'");
719 case RC_OVERRIDE_X_DEADKEYS:
721 override_x_deadkeys = lexrc.GetBool();
726 lyxpipes = ExpandPath(lexrc.GetString());
729 case RC_CURSOR_FOLLOWS_SCROLLBAR:
731 cursor_follows_scrollbar = lexrc.GetBool();
736 fax_command = lexrc.GetString();
740 fax_program = lexrc.GetString();
744 string s = lexrc.GetString();
748 phone_book = user_lyxdir + s;
751 case RC_ASCIIROFF_COMMAND:
753 ascii_roff_command = lexrc.GetString();
755 case RC_ASCII_LINELEN:
757 ascii_linelen = lexrc.GetInteger();
759 // Spellchecker settings:
760 case RC_SPELL_COMMAND:
762 isp_command = lexrc.GetString();
764 case RC_ACCEPT_COMPOUND:
766 isp_accept_compound = lexrc.GetBool();
770 isp_use_input_encoding = lexrc.GetBool();
772 case RC_USE_ALT_LANG:
774 isp_use_alt_lang = lexrc.GetBool();
776 case RC_USE_PERS_DICT:
778 isp_use_pers_dict = lexrc.GetBool();
780 case RC_USE_ESC_CHARS:
782 isp_use_esc_chars = lexrc.GetBool();
786 isp_alt_lang = lexrc.GetString();
790 isp_pers_dict = lexrc.GetString();
794 isp_esc_chars = lexrc.GetString();
798 make_backup = lexrc.GetBool();
800 case RC_BACKUPDIR_PATH:
802 backupdir_path = ExpandPath(lexrc.GetString());
804 case RC_DATE_INSERT_FORMAT:
806 date_insert_format = lexrc.GetString();
808 case RC_LANGUAGE_PACKAGE:
810 language_package = lexrc.GetString();
812 case RC_LANGUAGE_AUTO_BEGIN:
814 language_auto_begin = lexrc.GetBool();
816 case RC_LANGUAGE_AUTO_END:
818 language_auto_end = lexrc.GetBool();
820 case RC_LANGUAGE_COMMAND_BEGIN:
822 language_command_begin = lexrc.GetString();
824 case RC_LANGUAGE_COMMAND_END:
826 language_command_end = lexrc.GetString();
830 rtl_support = lexrc.GetBool();
834 auto_number = lexrc.GetBool();
836 case RC_MARK_FOREIGN_LANGUAGE:
838 mark_foreign_language = lexrc.GetBool();
842 show_banner = lexrc.GetBool();
845 case RC_NEW_ASK_FILENAME:
847 new_ask_filename = lexrc.GetBool();
850 string from, to, command, flags;
852 from = lexrc.GetString();
854 to = lexrc.GetString();
856 command = lexrc.GetString();
858 flags = lexrc.GetString();
859 Converter::Add(from, to, command, flags);
863 string format, command;
865 format = lexrc.GetString();
867 command = lexrc.GetString();
868 Formats::SetViewer(format, command);
872 string format, extension, prettyname, shortcut;
874 format = lexrc.GetString();
876 extension = lexrc.GetString();
878 prettyname = lexrc.GetString();
880 shortcut = lexrc.GetString();
881 Formats::Add(format, extension, prettyname, shortcut);
884 case RC_DEFAULT_LANGUAGE:
886 default_language = lexrc.GetString();
889 case RC_LAST: break; // this is just a dummy
897 void LyXRC::write(string const & filename) const
899 ofstream ofs(filename.c_str());
905 void LyXRC::print() const
907 if (lyxerr.debugging())
914 void LyXRC::output(ostream & os) const
916 os << "### This file is part of\n"
917 << "### ========================================================\n"
918 << "### LyX, The Document Processor\n"
920 << "### Copyright 1995 Matthias Ettrich\n"
921 << "### Copyright 1995-2000 The LyX Team.\n"
923 << "### ========================================================\n"
925 << "# This file is written by LyX, if you want to make your own\n"
926 << "# modifications you should do them from inside LyX and save\n"
929 // Why the switch you might ask. It is a trick to ensure that all
930 // the elements in the LyXRCTags enum is handled. As you can see
931 // there are no breaks at all. So it is just a huge fall-through.
932 // The nice thing is that we will get a warning from the compiler
933 // if we forget an element.
934 LyXRCTags tag = RC_LAST;
938 // input/include files are not done here
940 // bindings is not written to the preferences file.
942 if (bind_file != system_lyxrc.bind_file) {
943 os << "\\bind_file " << bind_file << "\n";
949 << "# MISC SECTION ######################################\n"
953 if (show_banner != system_lyxrc.show_banner) {
954 os << "# Set to false to inhibit the startup banner.\n"
955 << "\\show_banner " << tostr(show_banner) << "\n";
957 // bind files are not done here.
959 if (ui_file != system_lyxrc.ui_file) {
960 os << "\\ui_file \"" << ui_file << "\"\n";
962 case RC_AUTOREGIONDELETE:
963 if (auto_region_delete != system_lyxrc.auto_region_delete) {
964 os << "# Set to false to inhibit automatic replacement of\n"
965 << "# the current selection.\n"
966 << "\\auto_region_delete " << tostr(auto_region_delete)
970 if (autosave != system_lyxrc.autosave) {
971 os << "# The time interval between auto-saves in seconds.\n"
972 << "\\autosave " << autosave << "\n";
974 case RC_EXIT_CONFIRMATION:
975 if (exit_confirmation != system_lyxrc.exit_confirmation) {
976 os << "# Ask for confirmation before exit if there are\n"
977 << "# unsaved changed documents.\n"
978 << "\\exit_confirmation " << tostr(exit_confirmation)
981 case RC_DISPLAY_SHORTCUTS:
982 if (display_shortcuts != system_lyxrc.display_shortcuts) {
983 os << "# Display name of the last command executed,\n"
984 << "# with a list of short-cuts in the minibuffer.\n"
985 << "\\display_shortcuts " << tostr(display_shortcuts)
988 case RC_VIEWDVI_PAPEROPTION:
989 if (view_dvi_paper_option
990 != system_lyxrc.view_dvi_paper_option) {
991 os << "# Options used to specify paper size to the\n"
992 << "# view_dvi_command\n"
993 << "\\view_dvi_paper_option \""
994 << view_dvi_paper_option << "\"\n";
996 case RC_DEFAULT_PAPERSIZE:
997 if (default_papersize != system_lyxrc.default_papersize) {
998 os << "# The default papersize to use.\n"
999 << "\\default_papersize \"";
1000 switch (default_papersize) {
1001 case BufferParams::PAPER_USLETTER:
1002 os << "usletter"; break;
1003 case BufferParams::PAPER_LEGALPAPER:
1004 os << "legal"; break;
1005 case BufferParams::PAPER_EXECUTIVEPAPER:
1006 os << "executive"; break;
1007 case BufferParams::PAPER_A3PAPER:
1009 case BufferParams::PAPER_A4PAPER:
1011 case BufferParams::PAPER_A5PAPER:
1013 case BufferParams::PAPER_B5PAPER:
1015 case BufferParams::PAPER_DEFAULT: break;
1020 if (ps_command != system_lyxrc.ps_command) {
1021 os << "# Program used for interpreting postscript.\n"
1022 << "\\ps_command \"" << ps_command << "\"\n";
1024 case RC_CHKTEX_COMMAND:
1025 if (chktex_command != system_lyxrc.chktex_command) {
1026 os << "\\chktex_command \"" << chktex_command << "\"\n";
1029 if (use_kbmap != system_lyxrc.use_kbmap) {
1030 os << "\\kbmap " << tostr(use_kbmap) << "\n";
1032 case RC_KBMAP_PRIMARY:
1033 if (primary_kbmap != system_lyxrc.primary_kbmap) {
1034 os << "\\kbmap_primary \"" << primary_kbmap << "\"\n";
1036 case RC_KBMAP_SECONDARY:
1037 if (secondary_kbmap != system_lyxrc.secondary_kbmap) {
1038 os << "\\kbmap_secondary \"" << secondary_kbmap
1042 if (lyxpipes != system_lyxrc.lyxpipes) {
1043 os << "\\serverpipe \"" << lyxpipes << "\"\n";
1045 case RC_DATE_INSERT_FORMAT:
1046 if (date_insert_format != system_lyxrc.date_insert_format) {
1047 os << "\\date_insert_format \"" << date_insert_format
1052 << "# SCREEN & FONTS SECTION ############################\n"
1056 if (dpi != system_lyxrc.dpi) {
1057 os << "\\screen_dpi " << dpi << "\n";
1059 case RC_SCREEN_ZOOM:
1060 if (zoom != system_lyxrc.zoom) {
1061 os << "\\screen_zoom " << zoom << "\n";
1064 if (wheel_jump != system_lyxrc.wheel_jump) {
1065 os << "\\wheel_jump " << wheel_jump << "\n";
1067 case RC_CURSOR_FOLLOWS_SCROLLBAR:
1068 if (cursor_follows_scrollbar
1069 != system_lyxrc.cursor_follows_scrollbar) {
1070 os << "\\cursor_follows_scrollbar "
1071 << tostr(cursor_follows_scrollbar) << "\n";
1073 case RC_SCREEN_FONT_ROMAN:
1074 if (roman_font_name != system_lyxrc.roman_font_name) {
1075 os << "\\screen_font_roman \"" << roman_font_name
1078 case RC_SCREEN_FONT_SANS:
1079 if (sans_font_name != system_lyxrc.sans_font_name) {
1080 os << "\\screen_font_sans \"" << sans_font_name
1083 case RC_SCREEN_FONT_TYPEWRITER:
1084 if (typewriter_font_name != system_lyxrc.typewriter_font_name) {
1085 os << "\\screen_font_typewriter \""
1086 << typewriter_font_name << "\"\n";
1088 case RC_SCREEN_FONT_SCALABLE:
1089 if (use_scalable_fonts != system_lyxrc.use_scalable_fonts) {
1090 os << "\\screen_font_scalable "
1091 << tostr(use_scalable_fonts)
1094 case RC_SCREEN_FONT_ENCODING:
1095 if (font_norm != system_lyxrc.font_norm) {
1096 os << "\\screen_font_encoding \"" << font_norm
1099 case RC_SCREEN_FONT_POPUP:
1100 if (popup_font_name != system_lyxrc.popup_font_name) {
1101 os << "\\screen_font_popup \"" << popup_font_name
1104 case RC_SCREEN_FONT_MENU:
1105 if (menu_font_name != system_lyxrc.menu_font_name) {
1106 os << "\\screen_font_menu \"" << menu_font_name
1109 case RC_SCREEN_FONT_SIZES:
1110 if (font_sizes[LyXFont::SIZE_TINY]
1111 != system_lyxrc.font_sizes[LyXFont::SIZE_TINY] ||
1112 font_sizes[LyXFont::SIZE_SCRIPT]
1113 != system_lyxrc.font_sizes[LyXFont::SIZE_SCRIPT] ||
1114 font_sizes[LyXFont::SIZE_FOOTNOTE]
1115 != system_lyxrc.font_sizes[LyXFont::SIZE_FOOTNOTE] ||
1116 font_sizes[LyXFont::SIZE_SMALL]
1117 != system_lyxrc.font_sizes[LyXFont::SIZE_SMALL] ||
1118 font_sizes[LyXFont::SIZE_NORMAL]
1119 != system_lyxrc.font_sizes[LyXFont::SIZE_NORMAL] ||
1120 font_sizes[LyXFont::SIZE_LARGE]
1121 != system_lyxrc.font_sizes[LyXFont::SIZE_LARGE] ||
1122 font_sizes[LyXFont::SIZE_LARGER]
1123 != system_lyxrc.font_sizes[LyXFont::SIZE_LARGER] ||
1124 font_sizes[LyXFont::SIZE_LARGEST]
1125 != system_lyxrc.font_sizes[LyXFont::SIZE_LARGEST] ||
1126 font_sizes[LyXFont::SIZE_HUGE]
1127 != system_lyxrc.font_sizes[LyXFont::SIZE_HUGE] ||
1128 font_sizes[LyXFont::SIZE_HUGER]
1129 != system_lyxrc.font_sizes[LyXFont::SIZE_HUGER]) {
1130 os.setf(ios::fixed);
1132 os << "\\screen_font_sizes";
1133 os << " " << font_sizes[LyXFont::SIZE_TINY];
1134 os << " " << font_sizes[LyXFont::SIZE_SCRIPT];
1135 os << " " << font_sizes[LyXFont::SIZE_FOOTNOTE];
1136 os << " " << font_sizes[LyXFont::SIZE_SMALL];
1137 os << " " << font_sizes[LyXFont::SIZE_NORMAL];
1138 os << " " << font_sizes[LyXFont::SIZE_LARGE];
1139 os << " " << font_sizes[LyXFont::SIZE_LARGER];
1140 os << " " << font_sizes[LyXFont::SIZE_LARGEST];
1141 os << " " << font_sizes[LyXFont::SIZE_HUGE];
1142 os << " " << font_sizes[LyXFont::SIZE_HUGER];
1146 //case RC_SET_COLOR:
1147 // color bindings not written to preference file.
1148 // And we want to be warned about that. (Lgb)
1151 << "# PRINTER SECTION ###################################\n"
1155 if (printer != system_lyxrc.printer) {
1156 os << "\\printer \"" << printer << "\"\n";
1158 case RC_PRINT_ADAPTOUTPUT:
1159 if (print_adapt_output != system_lyxrc.print_adapt_output) {
1160 os << "\\print_adapt_output "
1161 << tostr(print_adapt_output)
1164 case RC_PRINT_COMMAND:
1165 if (print_command != system_lyxrc.print_command) {
1166 os << "\\print_command \"" << print_command << "\"\n";
1168 case RC_PRINTEXSTRAOPTIONS:
1169 if (print_extra_options != system_lyxrc.print_extra_options) {
1170 os << "\\print_extra_options \"" << print_extra_options
1173 case RC_PRINTSPOOL_COMMAND:
1174 if (print_spool_command != system_lyxrc.print_spool_command) {
1175 os << "\\print_spool_command \"" << print_spool_command
1178 case RC_PRINTSPOOL_PRINTERPREFIX:
1179 if (print_spool_printerprefix
1180 != system_lyxrc.print_spool_printerprefix) {
1181 os << "\\print_spool_printerprefix \""
1182 << print_spool_printerprefix << "\"\n";
1184 case RC_PRINTEVENPAGEFLAG:
1185 if (print_evenpage_flag != system_lyxrc.print_evenpage_flag) {
1186 os << "\\print_evenpage_flag \"" << print_evenpage_flag
1189 case RC_PRINTODDPAGEFLAG:
1190 if (print_oddpage_flag != system_lyxrc.print_oddpage_flag) {
1191 os << "\\print_oddpage_flag \"" << print_oddpage_flag
1194 case RC_PRINTREVERSEFLAG:
1195 if (print_reverse_flag != system_lyxrc.print_reverse_flag) {
1196 os << "\\print_reverse_flag \"" << print_reverse_flag
1199 case RC_PRINTLANDSCAPEFLAG:
1200 if (print_landscape_flag != system_lyxrc.print_landscape_flag) {
1201 os << "\\print_landscape_flag \"" << print_landscape_flag
1204 case RC_PRINTPAGERANGEFLAG:
1205 if (print_pagerange_flag != system_lyxrc.print_pagerange_flag) {
1206 os << "\\print_pagerange_flag \"" << print_pagerange_flag
1209 case RC_PRINTCOPIESFLAG:
1210 if (print_copies_flag != system_lyxrc.print_copies_flag) {
1211 os << "\\print_copies_flag \"" << print_copies_flag
1214 case RC_PRINTCOLLCOPIESFLAG:
1215 if (print_collcopies_flag
1216 != system_lyxrc.print_collcopies_flag) {
1217 os << "\\print_collcopies_flag \""
1218 << print_collcopies_flag
1221 case RC_PRINTPAPERFLAG:
1222 if (print_paper_flag != system_lyxrc.print_paper_flag) {
1223 os << "\\print_paper_flag \"" << print_paper_flag
1226 case RC_PRINTPAPERDIMENSIONFLAG:
1227 if (print_paper_dimension_flag
1228 != system_lyxrc.print_paper_dimension_flag) {
1229 os << "\\print_paper_dimension_flag \""
1230 << print_paper_dimension_flag << "\"\n";
1232 case RC_PRINTTOPRINTER:
1233 if (print_to_printer != system_lyxrc.print_to_printer) {
1234 os << "\\print_to_printer \"" << print_to_printer
1237 case RC_PRINTTOFILE:
1238 if (print_to_file != system_lyxrc.print_to_file) {
1239 os << "\\print_to_file \"" << print_to_file << "\"\n";
1241 case RC_PRINTFILEEXTENSION:
1242 if (print_file_extension != system_lyxrc.print_file_extension) {
1243 os << "\\print_file_extension \""
1244 << print_file_extension
1249 << "# EXPORT SECTION ####################################\n"
1252 case RC_CUSTOM_EXPORT_COMMAND:
1253 if (custom_export_command
1254 != system_lyxrc.custom_export_command) {
1255 os << "\\custom_export_command \""
1256 << custom_export_command
1259 case RC_CUSTOM_EXPORT_FORMAT:
1260 if (custom_export_format
1261 != system_lyxrc.custom_export_format) {
1262 os << "\\custom_export_format \"" << custom_export_format
1267 << "# TEX SECTION #######################################\n"
1270 case RC_FONT_ENCODING:
1271 if (fontenc != system_lyxrc.fontenc) {
1272 os << "\\font_encoding \"" << fontenc << "\"\n";
1276 << "# FILE SECTION ######################################\n"
1279 case RC_DOCUMENTPATH:
1280 if (document_path != system_lyxrc.document_path) {
1281 os << "\\document_path \"" << document_path << "\"\n";
1284 if (lastfiles != system_lyxrc.lastfiles) {
1285 os << "\\lastfiles \"" << lastfiles << "\"\n";
1287 case RC_NUMLASTFILES:
1288 if (num_lastfiles != system_lyxrc.num_lastfiles) {
1289 os << "\\num_lastfiles " << num_lastfiles << "\n";
1291 case RC_CHECKLASTFILES:
1292 if (check_lastfiles != system_lyxrc.check_lastfiles) {
1293 os << "\\check_lastfiles " << tostr(check_lastfiles)
1296 case RC_TEMPLATEPATH:
1297 if (template_path != system_lyxrc.template_path) {
1298 os << "\\template_path \"" << template_path << "\"\n";
1300 case RC_TEMPDIRPATH:
1301 if (tempdir_path != system_lyxrc.tempdir_path) {
1302 os << "\\tempdir_path \"" << tempdir_path << "\"\n";
1305 if (use_tempdir != system_lyxrc.use_tempdir) {
1306 os << "\\use_tempdir " << tostr(use_tempdir) << "\n";
1308 case RC_ASCII_LINELEN:
1309 if (ascii_linelen != system_lyxrc.ascii_linelen) {
1310 os << "\\ascii_linelen " << ascii_linelen << "\n";
1312 case RC_MAKE_BACKUP:
1313 if (make_backup != system_lyxrc.make_backup) {
1314 os << "\\make_backup " << tostr(make_backup) << "\n";
1316 case RC_BACKUPDIR_PATH:
1317 if (backupdir_path != system_lyxrc.backupdir_path) {
1318 os << "\\backupdir_path \"" << backupdir_path << "\"\n";
1322 << "# FAX SECTION #######################################\n"
1325 case RC_FAX_COMMAND:
1326 if (fax_command != system_lyxrc.fax_command) {
1327 os << "\\fax_command \"" << fax_command << "\"\n";
1330 if (phone_book != system_lyxrc.phone_book) {
1331 os << "\\phone_book \"" << phone_book << "\"\n";
1334 if (fax_program != system_lyxrc.fax_program) {
1335 os << "\\fax_program \"" << fax_program << "\"\n";
1339 << "# ASCII EXPORT SECTION ##############################\n"
1342 case RC_ASCIIROFF_COMMAND:
1343 if (ascii_roff_command != system_lyxrc.ascii_roff_command) {
1344 os << "\\ascii_roff_command \"" << ascii_roff_command
1349 << "# SPELLCHECKER SECTION ##############################\n"
1352 case RC_SPELL_COMMAND:
1353 if (isp_command != system_lyxrc.isp_command) {
1354 os << "\\spell_command \"" << isp_command << "\"\n";
1356 case RC_ACCEPT_COMPOUND:
1357 if (isp_accept_compound != system_lyxrc.isp_accept_compound) {
1358 os << "\\accept_compound " << tostr(isp_accept_compound)
1361 case RC_USE_ALT_LANG:
1362 if (isp_use_alt_lang != system_lyxrc.isp_use_alt_lang) {
1363 os << "\\use_alt_language " << tostr(isp_use_alt_lang)
1367 if (isp_alt_lang != system_lyxrc.isp_alt_lang) {
1368 os << "\\alternate_language \"" << isp_alt_lang
1371 case RC_USE_ESC_CHARS:
1372 if (isp_use_esc_chars != system_lyxrc.isp_use_esc_chars) {
1373 os << "\\use_escape_chars " << tostr(isp_use_esc_chars)
1377 if (isp_esc_chars != system_lyxrc.isp_esc_chars) {
1378 os << "\\escape_chars \"" << isp_esc_chars << "\"\n";
1380 case RC_USE_PERS_DICT:
1381 if (isp_use_pers_dict != system_lyxrc.isp_use_pers_dict) {
1382 os << "\\use_personal_dictionary "
1383 << tostr(isp_use_pers_dict)
1387 if (isp_pers_dict != system_lyxrc.isp_pers_dict) {
1388 os << "\\personal_dictionary \"" << isp_pers_dict
1391 case RC_USE_INP_ENC:
1392 if (isp_use_input_encoding
1393 != system_lyxrc.isp_use_input_encoding) {
1394 os << "\\use_input_encoding "
1395 << tostr(isp_use_input_encoding)
1400 << "# LANGUAGE SUPPORT SECTION ##########################\n"
1403 case RC_RTL_SUPPORT:
1404 if (rtl_support != system_lyxrc.rtl_support) {
1405 os << "\\rtl " << tostr(rtl_support) << "\n";
1407 case RC_LANGUAGE_PACKAGE:
1408 if (language_package != system_lyxrc.language_package) {
1409 os << "\\language_package \"" << language_package
1412 case RC_LANGUAGE_COMMAND_BEGIN:
1413 if (language_command_begin
1414 != system_lyxrc.language_command_begin) {
1415 os << "\\language_command_begin \""
1416 << language_command_begin
1419 case RC_LANGUAGE_COMMAND_END:
1420 if (language_command_end
1421 != system_lyxrc.language_command_end) {
1422 os << "\\language_command_end \"" << language_command_end
1425 case RC_LANGUAGE_AUTO_BEGIN:
1426 if (language_auto_begin != system_lyxrc.language_auto_begin) {
1427 os << "\\language_auto_begin "
1428 << tostr(language_auto_begin) << "\n";
1430 case RC_LANGUAGE_AUTO_END:
1431 if (language_auto_end != system_lyxrc.language_auto_end) {
1432 os << "\\language_auto_end "
1433 << tostr(language_auto_end) << "\n";
1435 case RC_MARK_FOREIGN_LANGUAGE:
1436 if (mark_foreign_language
1437 != system_lyxrc.mark_foreign_language) {
1438 os << "\\mark_foreign_language " <<
1439 tostr(mark_foreign_language) << "\n";
1443 << "# 2nd MISC SUPPORT SECTION ##########################\n"
1446 case RC_OVERRIDE_X_DEADKEYS:
1447 if (override_x_deadkeys != system_lyxrc.override_x_deadkeys) {
1448 os << "\\override_x_deadkeys "
1449 << tostr(override_x_deadkeys) << "\n";
1451 case RC_SCREEN_FONT_ENCODING_MENU:
1452 if (font_norm_menu != system_lyxrc.font_norm_menu) {
1453 os << "\\screen_font_encoding_menu \"" << font_norm_menu
1456 case RC_AUTO_NUMBER:
1457 if (auto_number != system_lyxrc.auto_number) {
1458 os << "\\auto_number " << tostr(auto_number) << "\n";
1460 case RC_NEW_ASK_FILENAME:
1461 if (new_ask_filename != system_lyxrc.new_ask_filename) {
1462 os << "\\new_ask_filename " << tostr(new_ask_filename)
1465 case RC_DEFAULT_LANGUAGE:
1466 if (default_language != system_lyxrc.default_language) {
1467 os << "\\default_language " << default_language << "\n";
1473 void LyXRC::set_font_norm_type()
1475 if (font_norm == "iso10646-1")
1476 font_norm_type = ISO_10646_1;
1477 else if (font_norm == "iso8859-1")
1478 font_norm_type = ISO_8859_1;
1479 else if (font_norm == "iso8859-6.8x")
1480 font_norm_type = ISO_8859_6_8;
1481 else if (font_norm == "iso8859-9")
1482 font_norm_type = ISO_8859_9;
1484 font_norm_type = OTHER_ENCODING;
1487 string LyXRC::getFeedback(LyXRCTags tag)
1492 case RC_FONT_ENCODING:
1493 str = N_("The font encoding used for the LaTeX2e fontenc package.\nT1 is highly recommended for non-English languages.");
1497 str = N_("The default printer to print on. If none is specified, LyX will\nuse the environment variable PRINTER.");
1500 case RC_PRINT_COMMAND:
1501 str = N_("Your favorite print program, eg \"dvips\", \"dvilj4\"");
1504 case RC_PRINTEVENPAGEFLAG:
1505 case RC_PRINTODDPAGEFLAG:
1506 case RC_PRINTPAGERANGEFLAG:
1507 case RC_PRINTCOPIESFLAG:
1508 case RC_PRINTCOLLCOPIESFLAG:
1509 case RC_PRINTREVERSEFLAG:
1510 case RC_PRINTLANDSCAPEFLAG:
1511 case RC_PRINTPAPERFLAG:
1512 case RC_PRINTPAPERDIMENSIONFLAG:
1513 str = N_("Look at the man page for your favorite print program to learn\nwhich options to use.");
1516 case RC_PRINTTOPRINTER:
1517 str = N_("Option to pass to the print program to print on a specific printer.");
1520 case RC_PRINT_ADAPTOUTPUT:
1521 str = N_("Set to true for LyX to pass the name of the destination printer to your\nprint command.");
1524 case RC_PRINTTOFILE:
1525 str = N_("Option to pass to the print program to print to a file.");
1528 case RC_PRINTFILEEXTENSION:
1529 str = N_("Extension of printer program output file. Usually .ps");
1532 case RC_PRINTEXSTRAOPTIONS:
1533 str = N_("Extra options to pass to printing program after everything else,\nbut before the filename of the DVI file to be printed.");
1536 case RC_PRINTSPOOL_COMMAND:
1537 str = N_("When set, this printer option automatically prints to a file and then calls\na separate print spooling program on that file with the given name\nand arguments.");
1540 case RC_PRINTSPOOL_PRINTERPREFIX:
1541 str = N_("If you specify a printer name in the print dialog, the following argument\nis prepended along with the printer name after the spool command.");
1545 str = N_("DPI (dots per inch) of your monitor is auto-detected by LyX.\nIf that goes wrong, override the setting here.");
1548 case RC_SCREEN_ZOOM:
1549 str = N_("The zoom percentage for screen fonts.\nA setting of 100% will make the fonts roughly the same size as on paper.");
1552 case RC_SCREEN_FONT_SIZES:
1553 str = N_("The font sizes used for calculating the scaling of the screen fonts.");
1556 case RC_SCREEN_FONT_ROMAN:
1557 case RC_SCREEN_FONT_SANS:
1558 case RC_SCREEN_FONT_TYPEWRITER:
1559 str = N_("The screen fonts used to display the text while editing.");
1562 case RC_SCREEN_FONT_MENU:
1563 str = N_("The font for menus (and groups titles in popups).");
1566 case RC_SCREEN_FONT_POPUP:
1567 str = N_("The font for popups.");
1570 case RC_SCREEN_FONT_ENCODING:
1571 str = N_("The norm for the screen fonts.");
1574 case RC_SCREEN_FONT_ENCODING_MENU:
1575 str = N_("The norm for the menu/popups fonts.");
1582 str = N_("The time interval between auto-saves (in seconds).\n0 means no auto-save");
1585 case RC_DOCUMENTPATH:
1586 str = N_("The default path for your documents.");
1589 case RC_TEMPLATEPATH:
1590 str = N_("The path that LyX will set when offering to choose a template.");
1593 case RC_TEMPDIRPATH:
1594 str = N_("The path that LyX will use to store temporary TeX output.");
1598 str = N_("Specify to use a temporary directory to store temporary TeX output.\nThis directory is deleted when you quit LyX.");
1602 str = N_("The file where the last-files information should be stored.");
1605 case RC_AUTOREGIONDELETE:
1606 str = N_("Set to false if you don't want the current selection to be replaced\nautomatically by what you type.");
1609 case RC_OVERRIDE_X_DEADKEYS:
1610 str = N_("Set to true for LyX to take over the handling of the dead keys\n(a.k.a accent keys) that may be defined for your keyboard.");
1615 str = N_("This starts the lyxserver. The pipes get an additional extension\n\".in\" and \".out\". Only for advanced users.");
1619 str = N_("Keybindings file. Can either specify an absolute path,\nor LyX will look in its global and local bind/ directories.");
1623 str = N_("The UI (user interface) file. Can either specify an absolute path,\nor LyX will look in its global and local ui/ directories.");
1627 case RC_KBMAP_PRIMARY:
1628 case RC_KBMAP_SECONDARY:
1629 str = N_("Use this to set the correct mapping file for your keyboard.\nYou'll need this if you for instance want to type German documents\non an American keyboard.");
1632 case RC_FAX_COMMAND:
1641 case RC_ASCIIROFF_COMMAND:
1642 str = N_("Use to define an external program to render tables in the ASCII output.\nE.g. \"groff -t -Tlatin1 $$FName\" where $$FName is the input file.\nIf \"none\" is specified, an internal routine is used.");
1645 case RC_ASCII_LINELEN:
1646 str = N_("This is the maximum line length of an exported ASCII file\n(LaTeX, SGML or plain text).");
1649 case RC_NUMLASTFILES:
1650 str = N_("Maximal number of lastfiles. Up to 9 can appear in the file menu.");
1653 case RC_CHECKLASTFILES:
1654 str = N_("Specify to check whether the lastfiles still exist.");
1657 case RC_VIEWDVI_PAPEROPTION:
1660 case RC_DEFAULT_PAPERSIZE:
1661 str = N_("Specify the default paper size.");
1667 case RC_ACCEPT_COMPOUND:
1668 str = N_("Consider run-together words, such as \"notthe\" for \"not the\",\nas legal words?");
1671 case RC_SPELL_COMMAND:
1672 str = N_("What command runs the spell checker?");
1675 case RC_USE_INP_ENC:
1676 str = N_("Specify whether to pass the -T input encoding option to ispell.\nEnable this if you can't spellcheck words with international letters\nin them.\nThis may not work with all dictionaries.");
1679 case RC_USE_ALT_LANG:
1681 str = N_("Specify an alternate language.\nThe default is to use the language of the document.");
1684 case RC_USE_PERS_DICT:
1686 str = N_("Specify an alternate personal dictionary file.\nE.g. \".ispell_english\".");
1689 case RC_USE_ESC_CHARS:
1691 str = N_("Specify additional chars that can be part of a word.");
1694 case RC_SCREEN_FONT_SCALABLE:
1695 str = N_("Allow the use of scalable screen fonts? If false, LyX will use the\nclosest existing size for a match. Use this if the scalable fonts\nlook bad and you have many fixed size fonts.");
1698 case RC_CHKTEX_COMMAND:
1699 str = N_("Define how to run chktex.\nE.g. \"chktex -n11 -n1 -n3 -n6 -n9 -22 -n25 -n30 -n38\"\nRefer to the ChkTeX documentation.");
1702 case RC_CURSOR_FOLLOWS_SCROLLBAR:
1703 str = N_("LyX normally doesn't update the cursor position if you move the scrollbar.\nSet to true if you'd prefer to always have the cursor on screen.");
1706 case RC_EXIT_CONFIRMATION:
1707 str = N_("Sets whether LyX asks for a second confirmation to exit when you have\nchanged documents.\n(LyX will still ask to save changed documents.)");
1710 case RC_DISPLAY_SHORTCUTS:
1711 str = N_("LyX continously displays names of last command executed,\nalong with a list of defined short-cuts for it in the minibuffer.\nSet to false if LyX seems slow.");
1714 case RC_MAKE_BACKUP:
1715 str = N_("Set to false if you don't want LyX to create backup files.");
1718 case RC_BACKUPDIR_PATH:
1719 str = N_("The path for storing backup files. If it is an empty string,\nLyX will store the backup file in the same directory as the original file.");
1722 case RC_RTL_SUPPORT:
1723 str = N_("Use to enable support of right-to-left languages (e.g. Hebrew, Arabic).");
1726 case RC_MARK_FOREIGN_LANGUAGE:
1727 str = N_("Use to control the highlighting of words with a language foreign to\nthat of the document.");
1730 case RC_LANGUAGE_PACKAGE:
1731 str = N_("The latex command for loading the language package.\nE.g. \"\\usepackage{babel}\", \"\\usepackage{omega}\".");
1734 case RC_LANGUAGE_AUTO_BEGIN:
1735 str = N_("Use if a language switching command is needed at the beginning\nof the document.");
1738 case RC_LANGUAGE_AUTO_END:
1739 str = N_("Use if a language switching command is needed at the end\nof the document.");
1742 case RC_LANGUAGE_COMMAND_BEGIN:
1743 str = N_("The latex command for changing from the language of the document\nto another language.\nE.g. \\selectlanguage{$$lang} where $$lang is substituted by the name\nof the second language.");
1746 case RC_LANGUAGE_COMMAND_END:
1747 str = N_("The latex command for changing back to the language of the document.");
1750 case RC_DATE_INSERT_FORMAT:
1751 str = N_("This accepts the normal strftime formats; see man strftime for full details.\nE.g.\"%A, %e. %B %Y\".");
1754 case RC_SHOW_BANNER:
1755 str = N_("Set to false if you don't want the startup banner.");
1759 str = N_("The wheel movement factor (for mice with wheels or five button mice)");
1771 case RC_NEW_ASK_FILENAME:
1772 str = N_("This sets the behaviour if you want to be asked for a filename when\ncreating a new document or wait until you save it and be asked then.");
1775 case RC_DEFAULT_LANGUAGE:
1776 str = N_("New documents will be assigned this language.");
1786 // The global instance
1789 // The global copy of the system lyxrc entries (everything except preferences)