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 },
75 { "\\fax_command", LyXRC::RC_FAX_COMMAND },
76 { "\\fax_program", LyXRC::RC_FAXPROGRAM },
78 { "\\font_encoding", LyXRC::RC_FONT_ENCODING },
79 { "\\format", LyXRC::RC_FORMAT },
80 { "\\input", LyXRC::RC_INPUT },
81 { "\\kbmap", LyXRC::RC_KBMAP },
82 { "\\kbmap_primary", LyXRC::RC_KBMAP_PRIMARY },
83 { "\\kbmap_secondary", LyXRC::RC_KBMAP_SECONDARY },
84 { "\\language_auto_begin", LyXRC::RC_LANGUAGE_AUTO_BEGIN },
85 { "\\language_auto_end", LyXRC::RC_LANGUAGE_AUTO_END },
86 { "\\language_command_begin", LyXRC::RC_LANGUAGE_COMMAND_BEGIN },
87 { "\\language_command_end", LyXRC::RC_LANGUAGE_COMMAND_END },
88 { "\\language_package", LyXRC::RC_LANGUAGE_PACKAGE },
89 { "\\lastfiles", LyXRC::RC_LASTFILES },
90 { "\\make_backup", LyXRC::RC_MAKE_BACKUP },
91 { "\\mark_foreign_language", LyXRC::RC_MARK_FOREIGN_LANGUAGE },
92 { "\\new_ask_filename", LyXRC::RC_NEW_ASK_FILENAME },
93 { "\\num_lastfiles", LyXRC::RC_NUMLASTFILES },
94 { "\\override_x_deadkeys", LyXRC::RC_OVERRIDE_X_DEADKEYS },
95 { "\\personal_dictionary", LyXRC::RC_PERS_DICT },
97 { "\\phone_book", LyXRC::RC_PHONEBOOK },
99 { "\\print_adapt_output", LyXRC::RC_PRINT_ADAPTOUTPUT },
100 { "\\print_collcopies_flag", LyXRC::RC_PRINTCOLLCOPIESFLAG },
101 { "\\print_command", LyXRC::RC_PRINT_COMMAND },
102 { "\\print_copies_flag", LyXRC::RC_PRINTCOPIESFLAG },
103 { "\\print_evenpage_flag", LyXRC::RC_PRINTEVENPAGEFLAG },
104 { "\\print_extra_options", LyXRC::RC_PRINTEXSTRAOPTIONS },
105 { "\\print_file_extension", LyXRC::RC_PRINTFILEEXTENSION },
106 { "\\print_landscape_flag", LyXRC::RC_PRINTLANDSCAPEFLAG },
107 { "\\print_oddpage_flag", LyXRC::RC_PRINTODDPAGEFLAG },
108 { "\\print_pagerange_flag", LyXRC::RC_PRINTPAGERANGEFLAG },
109 { "\\print_paper_dimension_flag", LyXRC::RC_PRINTPAPERDIMENSIONFLAG },
110 { "\\print_paper_flag", LyXRC::RC_PRINTPAPERFLAG },
111 { "\\print_reverse_flag", LyXRC::RC_PRINTREVERSEFLAG },
112 { "\\print_spool_command", LyXRC::RC_PRINTSPOOL_COMMAND },
113 { "\\print_spool_printerprefix", LyXRC::RC_PRINTSPOOL_PRINTERPREFIX },
114 { "\\print_to_file", LyXRC::RC_PRINTTOFILE },
115 { "\\print_to_printer", LyXRC::RC_PRINTTOPRINTER },
116 { "\\printer", LyXRC::RC_PRINTER },
117 { "\\ps_command", LyXRC::RC_PS_COMMAND },
118 { "\\rtl", LyXRC::RC_RTL_SUPPORT },
119 { "\\screen_dpi", LyXRC::RC_SCREEN_DPI },
120 { "\\screen_font_encoding", LyXRC::RC_SCREEN_FONT_ENCODING },
121 { "\\screen_font_encoding_menu", LyXRC::RC_SCREEN_FONT_ENCODING_MENU },
122 { "\\screen_font_menu", LyXRC::RC_SCREEN_FONT_MENU },
123 { "\\screen_font_popup", LyXRC::RC_SCREEN_FONT_POPUP },
124 { "\\screen_font_roman", LyXRC::RC_SCREEN_FONT_ROMAN },
125 { "\\screen_font_sans", LyXRC::RC_SCREEN_FONT_SANS },
126 { "\\screen_font_scalable", LyXRC::RC_SCREEN_FONT_SCALABLE },
127 { "\\screen_font_sizes", LyXRC::RC_SCREEN_FONT_SIZES },
128 { "\\screen_font_typewriter", LyXRC::RC_SCREEN_FONT_TYPEWRITER },
129 { "\\screen_zoom", LyXRC::RC_SCREEN_ZOOM },
130 { "\\serverpipe", LyXRC::RC_SERVERPIPE },
131 { "\\set_color", LyXRC::RC_SET_COLOR },
132 { "\\show_banner", LyXRC::RC_SHOW_BANNER },
133 { "\\spell_command", LyXRC::RC_SPELL_COMMAND },
134 { "\\tempdir_path", LyXRC::RC_TEMPDIRPATH },
135 { "\\template_path", LyXRC::RC_TEMPLATEPATH },
136 { "\\ui_file", LyXRC::RC_UIFILE },
137 { "\\use_alt_language", LyXRC::RC_USE_ALT_LANG },
138 { "\\use_escape_chars", LyXRC::RC_USE_ESC_CHARS },
139 { "\\use_input_encoding", LyXRC::RC_USE_INP_ENC },
140 { "\\use_personal_dictionary", LyXRC::RC_USE_PERS_DICT },
141 { "\\use_tempdir", LyXRC::RC_USETEMPDIR },
142 { "\\view_dvi_paper_option", LyXRC::RC_VIEWDVI_PAPEROPTION },
143 { "\\viewer" ,LyXRC::RC_VIEWER},
144 { "\\wheel_jump", LyXRC::RC_WHEEL_JUMP }
147 /* Let the range depend of the size of lyxrcTags. Alejandro 240596 */
148 static const int lyxrcCount = sizeof(lyxrcTags) / sizeof(keyword_item);
157 void LyXRC::setDefaults() {
159 // Get printer from the environment. If fail, use default "",
160 // assuming that everything is set up correctly.
161 printer = GetEnv("PRINTER");
162 print_adapt_output = false;
163 print_command = "dvips";
164 print_evenpage_flag = "-B";
165 print_oddpage_flag = "-A";
166 print_pagerange_flag = "-pp";
167 print_copies_flag = "-c";
168 print_collcopies_flag = "-C";
169 print_reverse_flag = "-r";
170 print_landscape_flag = "-t landscape";
171 print_to_printer = "-P";
172 print_to_file = "-o ";
173 print_file_extension = ".ps";
174 print_paper_flag = "-t";
175 print_paper_dimension_flag = "-T";
176 document_path = GetEnvPath("HOME");
177 tempdir_path = "/tmp";
180 view_dvi_paper_option = "-paper";
181 default_papersize = BufferParams::PAPER_USLETTER;
182 custom_export_format = "ps";
183 chktex_command = "chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38";
186 // Because a screen typically is wider than a piece of paper:
189 // Default LaTeX font size:
190 font_sizes[LyXFont::SIZE_TINY] = 5.0;
191 font_sizes[LyXFont::SIZE_SCRIPT] = 7.0;
192 font_sizes[LyXFont::SIZE_FOOTNOTE] = 8.0;
193 font_sizes[LyXFont::SIZE_SMALL] = 9.0;
194 font_sizes[LyXFont::SIZE_NORMAL] = 10.0;
195 font_sizes[LyXFont::SIZE_LARGE] = 12.0;
196 font_sizes[LyXFont::SIZE_LARGER] = 14.4;
197 font_sizes[LyXFont::SIZE_LARGEST] = 17.26;
198 font_sizes[LyXFont::SIZE_HUGE] = 20.74;
199 font_sizes[LyXFont::SIZE_HUGER] = 24.88;
200 use_scalable_fonts = true;
201 roman_font_name = "-*-times";
202 sans_font_name = "-*-helvetica";
203 typewriter_font_name = "-*-courier";
204 menu_font_name = "-*-helvetica-bold-r";
205 popup_font_name = "-*-helvetica-medium-r";
206 font_norm = "iso8859-1";
207 font_norm_type = OTHER_ENCODING;
209 override_x_deadkeys = true;
211 auto_region_delete = true;
214 check_lastfiles = true;
217 exit_confirmation = true;
218 display_shortcuts = true;
219 // Spellchecker settings:
220 isp_command = "ispell";
221 isp_accept_compound = false;
222 isp_use_input_encoding = false;
223 isp_use_alt_lang = false;
224 isp_use_pers_dict = false;
225 isp_use_esc_chars = false;
230 mark_foreign_language = true;
231 language_package = "\\usepackage{babel}";
232 language_auto_begin = true;
233 language_auto_end = true;
234 language_command_begin = "\\selectlanguage{$$lang}";
235 language_command_end = "\\selectlanguage{$$lang}";
236 default_language = "english";
238 new_ask_filename = false;
241 date_insert_format = "%A, %e %B %Y";
243 cursor_follows_scrollbar = false;
245 /// These variables are not stored on disk (perhaps they
246 // should be moved from the LyXRC class).
252 int LyXRC::ReadBindFile(string const & name)
255 string tmp = i18nLibFileSearch("bind", name, "bind");
256 lyxerr[Debug::LYXRC] << "Reading bindfile:" << tmp << endl;
257 int result = read(tmp);
259 lyxerr << "Error reading bind file: " << tmp << endl;
265 int LyXRC::read(string const & filename)
268 string bindFile = "cua";
270 LyXLex lexrc(lyxrcTags, lyxrcCount);
271 if (lyxerr.debugging(Debug::PARSER))
272 lexrc.printTable(lyxerr);
274 lexrc.setFile(filename);
275 if (!lexrc.IsOK()) return -2;
277 lyxerr[Debug::INIT] << "Reading '" << filename << "'..." << endl;
279 while (lexrc.IsOK()) {
280 // By using two switches we take advantage of the compiler
281 // telling us if we have missed a LyXRCTags element in
282 // the second switch.
283 // Note that this also shows a problem with LyXLex since it
284 // helps us avoid taking advantage of the strictness of the
287 int le = lexrc.lex();
289 case LyXLex::LEX_UNDEF:
290 lexrc.printError("Unknown tag `$$Token'");
292 case LyXLex::LEX_FEOF:
296 switch (static_cast<LyXRCTags>(le)) {
297 case RC_INPUT: // Include file
299 string tmp = LibFileSearch(string(),
302 lexrc.printError("Error reading "
303 "included file: "+tmp);
307 case RC_BINDFILE: // RVDK_PATCH_5
309 string tmp(lexrc.GetString());
310 if (bind_file.empty()) {
311 // we only need the name of the first
312 // bind file since that (usually)
313 // includes several others.
322 ui_file = lexrc.GetString();
326 case RC_EXIT_CONFIRMATION:
328 exit_confirmation = lexrc.GetBool();
331 case RC_DISPLAY_SHORTCUTS:
333 display_shortcuts = lexrc.GetBool();
338 use_kbmap = lexrc.GetBool();
341 case RC_KBMAP_PRIMARY:
343 string kmap(lexrc.GetString());
346 } else if (!LibFileSearch("kbd", kmap,
348 primary_kbmap = kmap;
350 lexrc.printError("LyX: Keymap `$$Token' not found");
354 case RC_KBMAP_SECONDARY:
356 string kmap(lexrc.GetString());
359 } else if (!LibFileSearch("kbd", kmap,
361 secondary_kbmap = kmap;
363 lexrc.printError("LyX: Keymap `$$Token' not found");
367 case RC_FONT_ENCODING:
369 fontenc = lexrc.GetString();
374 printer = lexrc.GetString();
377 case RC_PRINT_COMMAND:
379 print_command = lexrc.GetString();
382 case RC_PRINTEVENPAGEFLAG:
384 print_evenpage_flag = lexrc.GetString();
387 case RC_PRINTODDPAGEFLAG:
389 print_oddpage_flag = lexrc.GetString();
392 case RC_PRINTPAGERANGEFLAG:
394 print_pagerange_flag = lexrc.GetString();
397 case RC_PRINTCOPIESFLAG:
399 print_copies_flag = lexrc.GetString();
402 case RC_PRINTCOLLCOPIESFLAG:
404 print_collcopies_flag = lexrc.GetString();
407 case RC_PRINTREVERSEFLAG:
409 print_reverse_flag = lexrc.GetString();
412 case RC_PRINTLANDSCAPEFLAG:
414 print_landscape_flag = lexrc.GetString();
417 case RC_PRINTTOPRINTER:
419 print_to_printer = lexrc.GetString();
422 case RC_PRINT_ADAPTOUTPUT:
424 print_adapt_output = lexrc.GetBool();
429 print_to_file = lexrc.GetString();
432 case RC_PRINTFILEEXTENSION:
434 print_file_extension = lexrc.GetString();
437 case RC_PRINTEXSTRAOPTIONS:
439 print_extra_options = lexrc.GetString();
442 case RC_PRINTSPOOL_COMMAND:
444 print_spool_command = lexrc.GetString();
447 case RC_PRINTSPOOL_PRINTERPREFIX:
449 print_spool_printerprefix = lexrc.GetString();
452 case RC_PRINTPAPERDIMENSIONFLAG:
454 print_paper_dimension_flag = lexrc.GetString();
457 case RC_PRINTPAPERFLAG:
459 print_paper_flag = lexrc.GetString();
462 case RC_CUSTOM_EXPORT_COMMAND:
464 custom_export_command = lexrc.GetString();
467 case RC_CUSTOM_EXPORT_FORMAT:
469 custom_export_format = lexrc.GetString();
472 case RC_DEFAULT_PAPERSIZE:
474 string size = lowercase(lexrc.GetString());
475 if (size == "usletter")
477 BufferParams::PAPER_USLETTER;
478 else if (size == "legal")
480 BufferParams::PAPER_LEGALPAPER;
481 else if (size == "executive")
483 BufferParams::PAPER_EXECUTIVEPAPER;
484 else if (size == "a3")
486 BufferParams::PAPER_A3PAPER;
487 else if (size == "a4")
489 BufferParams::PAPER_A4PAPER;
490 else if (size == "a5")
492 BufferParams::PAPER_A5PAPER;
493 else if (size == "b5")
495 BufferParams::PAPER_B5PAPER;
499 case RC_VIEWDVI_PAPEROPTION:
501 view_dvi_paper_option = lexrc.GetString();
503 view_dvi_paper_option = "";
508 ps_command = lexrc.GetString();
511 case RC_CHKTEX_COMMAND:
513 chktex_command = lexrc.GetString();
518 dpi = lexrc.GetInteger();
523 zoom = lexrc.GetInteger();
528 wheel_jump = lexrc.GetInteger();
531 case RC_SCREEN_FONT_SIZES:
533 font_sizes[LyXFont::SIZE_TINY] =
536 font_sizes[LyXFont::SIZE_SCRIPT] =
539 font_sizes[LyXFont::SIZE_FOOTNOTE] =
542 font_sizes[LyXFont::SIZE_SMALL] =
545 font_sizes[LyXFont::SIZE_NORMAL] =
548 font_sizes[LyXFont::SIZE_LARGE] =
551 font_sizes[LyXFont::SIZE_LARGER] =
554 font_sizes[LyXFont::SIZE_LARGEST] =
557 font_sizes[LyXFont::SIZE_HUGE] =
560 font_sizes[LyXFont::SIZE_HUGER] =
564 case RC_SCREEN_FONT_SCALABLE:
566 use_scalable_fonts = lexrc.GetBool();
571 autosave = lexrc.GetInteger();
574 case RC_DOCUMENTPATH:
576 document_path = ExpandPath(lexrc.GetString());
580 case RC_TEMPLATEPATH:
582 template_path = ExpandPath(lexrc.GetString());
587 tempdir_path = ExpandPath(lexrc.GetString());
592 use_tempdir = lexrc.GetBool();
597 lastfiles = ExpandPath(lexrc.GetString());
600 case RC_NUMLASTFILES:
602 num_lastfiles = lexrc.GetInteger();
605 case RC_CHECKLASTFILES:
607 check_lastfiles = lexrc.GetBool();
610 case RC_SCREEN_FONT_ROMAN:
612 roman_font_name = lexrc.GetString();
615 case RC_SCREEN_FONT_SANS:
617 sans_font_name = lexrc.GetString();
620 case RC_SCREEN_FONT_TYPEWRITER:
622 typewriter_font_name = lexrc.GetString();
625 case RC_SCREEN_FONT_MENU:
627 menu_font_name = lexrc.GetString();
630 case RC_SCREEN_FONT_POPUP:
632 popup_font_name = lexrc.GetString();
635 case RC_SCREEN_FONT_ENCODING:
637 font_norm = lexrc.GetString();
638 set_font_norm_type();
642 case RC_SCREEN_FONT_ENCODING_MENU:
644 font_norm_menu = lexrc.GetString();
649 string lyx_name, x11_name;
652 lyx_name = lexrc.GetString();
654 lexrc.printError("Missing color tag.");
659 x11_name = lexrc.GetString();
661 lexrc.printError("Missing color name for color : `$$Token'");
665 if (!lcolor.setColor(lyx_name, x11_name))
666 lyxerr << "Bad lyxrc set_color for "
671 case RC_AUTOREGIONDELETE:
672 // Auto region delete defaults to true
674 auto_region_delete = lexrc.GetBool();
679 // we should not do an explicit binding before
680 // loading a bind file. So, in this case, load
681 // the default bind file.
684 bind_file = bindFile;
686 // !!!chb, dynamic key binding...
690 if (lexrc.lex() == LyXLex::LEX_DATA) {
691 seq = lexrc.GetString();
693 lexrc.printError("Bad key sequence: `$$Token'");
697 if (lexrc.lex() == LyXLex::LEX_DATA) {
698 cmd = lexrc.GetString();
700 lexrc.printError("Bad command: `$$Token'");
704 if ((action = lyxaction.LookupFunc(cmd))>= 0) {
705 if (lyxerr.debugging(Debug::KBMAP)) {
706 lyxerr << "RC_BIND: Sequence `"
707 << seq << "' Command `"
708 << cmd << "' Action `"
709 << action << '\'' << endl;
711 res = toplevel_keymap->bind(seq, action);
714 "Invalid key sequence `"
717 } else {// cmd is the last token read.
719 "Unknown LyX function `$$Token'");
723 case RC_OVERRIDE_X_DEADKEYS:
725 override_x_deadkeys = lexrc.GetBool();
730 lyxpipes = ExpandPath(lexrc.GetString());
733 case RC_CURSOR_FOLLOWS_SCROLLBAR:
735 cursor_follows_scrollbar = lexrc.GetBool();
741 fax_command = lexrc.GetString();
745 fax_program = lexrc.GetString();
749 string s = lexrc.GetString();
753 phone_book = user_lyxdir + s;
757 case RC_ASCIIROFF_COMMAND:
759 ascii_roff_command = lexrc.GetString();
761 case RC_ASCII_LINELEN:
763 ascii_linelen = lexrc.GetInteger();
765 // Spellchecker settings:
766 case RC_SPELL_COMMAND:
768 isp_command = lexrc.GetString();
770 case RC_ACCEPT_COMPOUND:
772 isp_accept_compound = lexrc.GetBool();
776 isp_use_input_encoding = lexrc.GetBool();
778 case RC_USE_ALT_LANG:
780 isp_use_alt_lang = lexrc.GetBool();
782 case RC_USE_PERS_DICT:
784 isp_use_pers_dict = lexrc.GetBool();
786 case RC_USE_ESC_CHARS:
788 isp_use_esc_chars = lexrc.GetBool();
792 isp_alt_lang = lexrc.GetString();
796 isp_pers_dict = lexrc.GetString();
800 isp_esc_chars = lexrc.GetString();
804 make_backup = lexrc.GetBool();
806 case RC_BACKUPDIR_PATH:
808 backupdir_path = ExpandPath(lexrc.GetString());
810 case RC_DATE_INSERT_FORMAT:
812 date_insert_format = lexrc.GetString();
814 case RC_LANGUAGE_PACKAGE:
816 language_package = lexrc.GetString();
818 case RC_LANGUAGE_AUTO_BEGIN:
820 language_auto_begin = lexrc.GetBool();
822 case RC_LANGUAGE_AUTO_END:
824 language_auto_end = lexrc.GetBool();
826 case RC_LANGUAGE_COMMAND_BEGIN:
828 language_command_begin = lexrc.GetString();
830 case RC_LANGUAGE_COMMAND_END:
832 language_command_end = lexrc.GetString();
836 rtl_support = lexrc.GetBool();
840 auto_number = lexrc.GetBool();
842 case RC_MARK_FOREIGN_LANGUAGE:
844 mark_foreign_language = lexrc.GetBool();
848 show_banner = lexrc.GetBool();
851 case RC_NEW_ASK_FILENAME:
853 new_ask_filename = lexrc.GetBool();
856 string from, to, command, flags;
858 from = lexrc.GetString();
860 to = lexrc.GetString();
862 command = lexrc.GetString();
864 flags = lexrc.GetString();
865 Converter::Add(from, to, command, flags);
869 string format, command;
871 format = lexrc.GetString();
873 command = lexrc.GetString();
874 Formats::SetViewer(format, command);
878 string format, extension, prettyname, shortcut;
880 format = lexrc.GetString();
882 extension = lexrc.GetString();
884 prettyname = lexrc.GetString();
886 shortcut = lexrc.GetString();
887 Formats::Add(format, extension, prettyname, shortcut);
890 case RC_DEFAULT_LANGUAGE:
892 default_language = lexrc.GetString();
895 case RC_LAST: break; // this is just a dummy
903 void LyXRC::write(string const & filename) const
905 ofstream ofs(filename.c_str());
911 void LyXRC::print() const
913 if (lyxerr.debugging())
920 void LyXRC::output(ostream & os) const
922 os << "### This file is part of\n"
923 << "### ========================================================\n"
924 << "### LyX, The Document Processor\n"
926 << "### Copyright 1995 Matthias Ettrich\n"
927 << "### Copyright 1995-2000 The LyX Team.\n"
929 << "### ========================================================\n"
931 << "# This file is written by LyX, if you want to make your own\n"
932 << "# modifications you should do them from inside LyX and save\n"
935 // Why the switch you might ask. It is a trick to ensure that all
936 // the elements in the LyXRCTags enum is handled. As you can see
937 // there are no breaks at all. So it is just a huge fall-through.
938 // The nice thing is that we will get a warning from the compiler
939 // if we forget an element.
940 LyXRCTags tag = RC_LAST;
944 // input/include files are not done here
946 // bindings is not written to the preferences file.
948 if (bind_file != system_lyxrc.bind_file) {
949 os << "\\bind_file " << bind_file << "\n";
955 << "# MISC SECTION ######################################\n"
959 if (show_banner != system_lyxrc.show_banner) {
960 os << "# Set to false to inhibit the startup banner.\n"
961 << "\\show_banner " << tostr(show_banner) << "\n";
963 // bind files are not done here.
965 if (ui_file != system_lyxrc.ui_file) {
966 os << "\\ui_file \"" << ui_file << "\"\n";
968 case RC_AUTOREGIONDELETE:
969 if (auto_region_delete != system_lyxrc.auto_region_delete) {
970 os << "# Set to false to inhibit automatic replacement of\n"
971 << "# the current selection.\n"
972 << "\\auto_region_delete " << tostr(auto_region_delete)
976 if (autosave != system_lyxrc.autosave) {
977 os << "# The time interval between auto-saves in seconds.\n"
978 << "\\autosave " << autosave << "\n";
980 case RC_EXIT_CONFIRMATION:
981 if (exit_confirmation != system_lyxrc.exit_confirmation) {
982 os << "# Ask for confirmation before exit if there are\n"
983 << "# unsaved changed documents.\n"
984 << "\\exit_confirmation " << tostr(exit_confirmation)
987 case RC_DISPLAY_SHORTCUTS:
988 if (display_shortcuts != system_lyxrc.display_shortcuts) {
989 os << "# Display name of the last command executed,\n"
990 << "# with a list of short-cuts in the minibuffer.\n"
991 << "\\display_shortcuts " << tostr(display_shortcuts)
994 case RC_VIEWDVI_PAPEROPTION:
995 if (view_dvi_paper_option
996 != system_lyxrc.view_dvi_paper_option) {
997 os << "# Options used to specify paper size to the\n"
998 << "# view_dvi_command\n"
999 << "\\view_dvi_paper_option \""
1000 << view_dvi_paper_option << "\"\n";
1002 case RC_DEFAULT_PAPERSIZE:
1003 if (default_papersize != system_lyxrc.default_papersize) {
1004 os << "# The default papersize to use.\n"
1005 << "\\default_papersize \"";
1006 switch (default_papersize) {
1007 case BufferParams::PAPER_USLETTER:
1008 os << "usletter"; break;
1009 case BufferParams::PAPER_LEGALPAPER:
1010 os << "legal"; break;
1011 case BufferParams::PAPER_EXECUTIVEPAPER:
1012 os << "executive"; break;
1013 case BufferParams::PAPER_A3PAPER:
1015 case BufferParams::PAPER_A4PAPER:
1017 case BufferParams::PAPER_A5PAPER:
1019 case BufferParams::PAPER_B5PAPER:
1021 case BufferParams::PAPER_DEFAULT: break;
1026 if (ps_command != system_lyxrc.ps_command) {
1027 os << "# Program used for interpreting postscript.\n"
1028 << "\\ps_command \"" << ps_command << "\"\n";
1030 case RC_CHKTEX_COMMAND:
1031 if (chktex_command != system_lyxrc.chktex_command) {
1032 os << "\\chktex_command \"" << chktex_command << "\"\n";
1035 if (use_kbmap != system_lyxrc.use_kbmap) {
1036 os << "\\kbmap " << tostr(use_kbmap) << "\n";
1038 case RC_KBMAP_PRIMARY:
1039 if (primary_kbmap != system_lyxrc.primary_kbmap) {
1040 os << "\\kbmap_primary \"" << primary_kbmap << "\"\n";
1042 case RC_KBMAP_SECONDARY:
1043 if (secondary_kbmap != system_lyxrc.secondary_kbmap) {
1044 os << "\\kbmap_secondary \"" << secondary_kbmap
1048 if (lyxpipes != system_lyxrc.lyxpipes) {
1049 os << "\\serverpipe \"" << lyxpipes << "\"\n";
1051 case RC_DATE_INSERT_FORMAT:
1052 if (date_insert_format != system_lyxrc.date_insert_format) {
1053 os << "\\date_insert_format \"" << date_insert_format
1058 << "# SCREEN & FONTS SECTION ############################\n"
1062 if (dpi != system_lyxrc.dpi) {
1063 os << "\\screen_dpi " << dpi << "\n";
1065 case RC_SCREEN_ZOOM:
1066 if (zoom != system_lyxrc.zoom) {
1067 os << "\\screen_zoom " << zoom << "\n";
1070 if (wheel_jump != system_lyxrc.wheel_jump) {
1071 os << "\\wheel_jump " << wheel_jump << "\n";
1073 case RC_CURSOR_FOLLOWS_SCROLLBAR:
1074 if (cursor_follows_scrollbar
1075 != system_lyxrc.cursor_follows_scrollbar) {
1076 os << "\\cursor_follows_scrollbar "
1077 << tostr(cursor_follows_scrollbar) << "\n";
1079 case RC_SCREEN_FONT_ROMAN:
1080 if (roman_font_name != system_lyxrc.roman_font_name) {
1081 os << "\\screen_font_roman \"" << roman_font_name
1084 case RC_SCREEN_FONT_SANS:
1085 if (sans_font_name != system_lyxrc.sans_font_name) {
1086 os << "\\screen_font_sans \"" << sans_font_name
1089 case RC_SCREEN_FONT_TYPEWRITER:
1090 if (typewriter_font_name != system_lyxrc.typewriter_font_name) {
1091 os << "\\screen_font_typewriter \""
1092 << typewriter_font_name << "\"\n";
1094 case RC_SCREEN_FONT_SCALABLE:
1095 if (use_scalable_fonts != system_lyxrc.use_scalable_fonts) {
1096 os << "\\screen_font_scalable "
1097 << tostr(use_scalable_fonts)
1100 case RC_SCREEN_FONT_ENCODING:
1101 if (font_norm != system_lyxrc.font_norm) {
1102 os << "\\screen_font_encoding \"" << font_norm
1105 case RC_SCREEN_FONT_POPUP:
1106 if (popup_font_name != system_lyxrc.popup_font_name) {
1107 os << "\\screen_font_popup \"" << popup_font_name
1110 case RC_SCREEN_FONT_MENU:
1111 if (menu_font_name != system_lyxrc.menu_font_name) {
1112 os << "\\screen_font_menu \"" << menu_font_name
1115 case RC_SCREEN_FONT_SIZES:
1116 if (font_sizes[LyXFont::SIZE_TINY]
1117 != system_lyxrc.font_sizes[LyXFont::SIZE_TINY] ||
1118 font_sizes[LyXFont::SIZE_SCRIPT]
1119 != system_lyxrc.font_sizes[LyXFont::SIZE_SCRIPT] ||
1120 font_sizes[LyXFont::SIZE_FOOTNOTE]
1121 != system_lyxrc.font_sizes[LyXFont::SIZE_FOOTNOTE] ||
1122 font_sizes[LyXFont::SIZE_SMALL]
1123 != system_lyxrc.font_sizes[LyXFont::SIZE_SMALL] ||
1124 font_sizes[LyXFont::SIZE_NORMAL]
1125 != system_lyxrc.font_sizes[LyXFont::SIZE_NORMAL] ||
1126 font_sizes[LyXFont::SIZE_LARGE]
1127 != system_lyxrc.font_sizes[LyXFont::SIZE_LARGE] ||
1128 font_sizes[LyXFont::SIZE_LARGER]
1129 != system_lyxrc.font_sizes[LyXFont::SIZE_LARGER] ||
1130 font_sizes[LyXFont::SIZE_LARGEST]
1131 != system_lyxrc.font_sizes[LyXFont::SIZE_LARGEST] ||
1132 font_sizes[LyXFont::SIZE_HUGE]
1133 != system_lyxrc.font_sizes[LyXFont::SIZE_HUGE] ||
1134 font_sizes[LyXFont::SIZE_HUGER]
1135 != system_lyxrc.font_sizes[LyXFont::SIZE_HUGER]) {
1136 os.setf(ios::fixed);
1138 os << "\\screen_font_sizes";
1139 os << " " << font_sizes[LyXFont::SIZE_TINY];
1140 os << " " << font_sizes[LyXFont::SIZE_SCRIPT];
1141 os << " " << font_sizes[LyXFont::SIZE_FOOTNOTE];
1142 os << " " << font_sizes[LyXFont::SIZE_SMALL];
1143 os << " " << font_sizes[LyXFont::SIZE_NORMAL];
1144 os << " " << font_sizes[LyXFont::SIZE_LARGE];
1145 os << " " << font_sizes[LyXFont::SIZE_LARGER];
1146 os << " " << font_sizes[LyXFont::SIZE_LARGEST];
1147 os << " " << font_sizes[LyXFont::SIZE_HUGE];
1148 os << " " << font_sizes[LyXFont::SIZE_HUGER];
1152 //case RC_SET_COLOR:
1153 // color bindings not written to preference file.
1154 // And we want to be warned about that. (Lgb)
1157 << "# PRINTER SECTION ###################################\n"
1161 if (printer != system_lyxrc.printer) {
1162 os << "\\printer \"" << printer << "\"\n";
1164 case RC_PRINT_ADAPTOUTPUT:
1165 if (print_adapt_output != system_lyxrc.print_adapt_output) {
1166 os << "\\print_adapt_output "
1167 << tostr(print_adapt_output)
1170 case RC_PRINT_COMMAND:
1171 if (print_command != system_lyxrc.print_command) {
1172 os << "\\print_command \"" << print_command << "\"\n";
1174 case RC_PRINTEXSTRAOPTIONS:
1175 if (print_extra_options != system_lyxrc.print_extra_options) {
1176 os << "\\print_extra_options \"" << print_extra_options
1179 case RC_PRINTSPOOL_COMMAND:
1180 if (print_spool_command != system_lyxrc.print_spool_command) {
1181 os << "\\print_spool_command \"" << print_spool_command
1184 case RC_PRINTSPOOL_PRINTERPREFIX:
1185 if (print_spool_printerprefix
1186 != system_lyxrc.print_spool_printerprefix) {
1187 os << "\\print_spool_printerprefix \""
1188 << print_spool_printerprefix << "\"\n";
1190 case RC_PRINTEVENPAGEFLAG:
1191 if (print_evenpage_flag != system_lyxrc.print_evenpage_flag) {
1192 os << "\\print_evenpage_flag \"" << print_evenpage_flag
1195 case RC_PRINTODDPAGEFLAG:
1196 if (print_oddpage_flag != system_lyxrc.print_oddpage_flag) {
1197 os << "\\print_oddpage_flag \"" << print_oddpage_flag
1200 case RC_PRINTREVERSEFLAG:
1201 if (print_reverse_flag != system_lyxrc.print_reverse_flag) {
1202 os << "\\print_reverse_flag \"" << print_reverse_flag
1205 case RC_PRINTLANDSCAPEFLAG:
1206 if (print_landscape_flag != system_lyxrc.print_landscape_flag) {
1207 os << "\\print_landscape_flag \"" << print_landscape_flag
1210 case RC_PRINTPAGERANGEFLAG:
1211 if (print_pagerange_flag != system_lyxrc.print_pagerange_flag) {
1212 os << "\\print_pagerange_flag \"" << print_pagerange_flag
1215 case RC_PRINTCOPIESFLAG:
1216 if (print_copies_flag != system_lyxrc.print_copies_flag) {
1217 os << "\\print_copies_flag \"" << print_copies_flag
1220 case RC_PRINTCOLLCOPIESFLAG:
1221 if (print_collcopies_flag
1222 != system_lyxrc.print_collcopies_flag) {
1223 os << "\\print_collcopies_flag \""
1224 << print_collcopies_flag
1227 case RC_PRINTPAPERFLAG:
1228 if (print_paper_flag != system_lyxrc.print_paper_flag) {
1229 os << "\\print_paper_flag \"" << print_paper_flag
1232 case RC_PRINTPAPERDIMENSIONFLAG:
1233 if (print_paper_dimension_flag
1234 != system_lyxrc.print_paper_dimension_flag) {
1235 os << "\\print_paper_dimension_flag \""
1236 << print_paper_dimension_flag << "\"\n";
1238 case RC_PRINTTOPRINTER:
1239 if (print_to_printer != system_lyxrc.print_to_printer) {
1240 os << "\\print_to_printer \"" << print_to_printer
1243 case RC_PRINTTOFILE:
1244 if (print_to_file != system_lyxrc.print_to_file) {
1245 os << "\\print_to_file \"" << print_to_file << "\"\n";
1247 case RC_PRINTFILEEXTENSION:
1248 if (print_file_extension != system_lyxrc.print_file_extension) {
1249 os << "\\print_file_extension \""
1250 << print_file_extension
1255 << "# EXPORT SECTION ####################################\n"
1258 case RC_CUSTOM_EXPORT_COMMAND:
1259 if (custom_export_command
1260 != system_lyxrc.custom_export_command) {
1261 os << "\\custom_export_command \""
1262 << custom_export_command
1265 case RC_CUSTOM_EXPORT_FORMAT:
1266 if (custom_export_format
1267 != system_lyxrc.custom_export_format) {
1268 os << "\\custom_export_format \"" << custom_export_format
1273 << "# TEX SECTION #######################################\n"
1276 case RC_FONT_ENCODING:
1277 if (fontenc != system_lyxrc.fontenc) {
1278 os << "\\font_encoding \"" << fontenc << "\"\n";
1282 << "# FILE SECTION ######################################\n"
1285 case RC_DOCUMENTPATH:
1286 if (document_path != system_lyxrc.document_path) {
1287 os << "\\document_path \"" << document_path << "\"\n";
1290 if (lastfiles != system_lyxrc.lastfiles) {
1291 os << "\\lastfiles \"" << lastfiles << "\"\n";
1293 case RC_NUMLASTFILES:
1294 if (num_lastfiles != system_lyxrc.num_lastfiles) {
1295 os << "\\num_lastfiles " << num_lastfiles << "\n";
1297 case RC_CHECKLASTFILES:
1298 if (check_lastfiles != system_lyxrc.check_lastfiles) {
1299 os << "\\check_lastfiles " << tostr(check_lastfiles)
1302 case RC_TEMPLATEPATH:
1303 if (template_path != system_lyxrc.template_path) {
1304 os << "\\template_path \"" << template_path << "\"\n";
1306 case RC_TEMPDIRPATH:
1307 if (tempdir_path != system_lyxrc.tempdir_path) {
1308 os << "\\tempdir_path \"" << tempdir_path << "\"\n";
1311 if (use_tempdir != system_lyxrc.use_tempdir) {
1312 os << "\\use_tempdir " << tostr(use_tempdir) << "\n";
1314 case RC_ASCII_LINELEN:
1315 if (ascii_linelen != system_lyxrc.ascii_linelen) {
1316 os << "\\ascii_linelen " << ascii_linelen << "\n";
1318 case RC_MAKE_BACKUP:
1319 if (make_backup != system_lyxrc.make_backup) {
1320 os << "\\make_backup " << tostr(make_backup) << "\n";
1322 case RC_BACKUPDIR_PATH:
1323 if (backupdir_path != system_lyxrc.backupdir_path) {
1324 os << "\\backupdir_path \"" << backupdir_path << "\"\n";
1329 << "# FAX SECTION #######################################\n"
1332 case RC_FAX_COMMAND:
1333 if (fax_command != system_lyxrc.fax_command) {
1334 os << "\\fax_command \"" << fax_command << "\"\n";
1337 if (phone_book != system_lyxrc.phone_book) {
1338 os << "\\phone_book \"" << phone_book << "\"\n";
1341 if (fax_program != system_lyxrc.fax_program) {
1342 os << "\\fax_program \"" << fax_program << "\"\n";
1346 << "# ASCII EXPORT SECTION ##############################\n"
1349 case RC_ASCIIROFF_COMMAND:
1350 if (ascii_roff_command != system_lyxrc.ascii_roff_command) {
1351 os << "\\ascii_roff_command \"" << ascii_roff_command
1356 << "# SPELLCHECKER SECTION ##############################\n"
1359 case RC_SPELL_COMMAND:
1360 if (isp_command != system_lyxrc.isp_command) {
1361 os << "\\spell_command \"" << isp_command << "\"\n";
1363 case RC_ACCEPT_COMPOUND:
1364 if (isp_accept_compound != system_lyxrc.isp_accept_compound) {
1365 os << "\\accept_compound " << tostr(isp_accept_compound)
1368 case RC_USE_ALT_LANG:
1369 if (isp_use_alt_lang != system_lyxrc.isp_use_alt_lang) {
1370 os << "\\use_alt_language " << tostr(isp_use_alt_lang)
1374 if (isp_alt_lang != system_lyxrc.isp_alt_lang) {
1375 os << "\\alternate_language \"" << isp_alt_lang
1378 case RC_USE_ESC_CHARS:
1379 if (isp_use_esc_chars != system_lyxrc.isp_use_esc_chars) {
1380 os << "\\use_escape_chars " << tostr(isp_use_esc_chars)
1384 if (isp_esc_chars != system_lyxrc.isp_esc_chars) {
1385 os << "\\escape_chars \"" << isp_esc_chars << "\"\n";
1387 case RC_USE_PERS_DICT:
1388 if (isp_use_pers_dict != system_lyxrc.isp_use_pers_dict) {
1389 os << "\\use_personal_dictionary "
1390 << tostr(isp_use_pers_dict)
1394 if (isp_pers_dict != system_lyxrc.isp_pers_dict) {
1395 os << "\\personal_dictionary \"" << isp_pers_dict
1398 case RC_USE_INP_ENC:
1399 if (isp_use_input_encoding
1400 != system_lyxrc.isp_use_input_encoding) {
1401 os << "\\use_input_encoding "
1402 << tostr(isp_use_input_encoding)
1407 << "# LANGUAGE SUPPORT SECTION ##########################\n"
1410 case RC_RTL_SUPPORT:
1411 if (rtl_support != system_lyxrc.rtl_support) {
1412 os << "\\rtl " << tostr(rtl_support) << "\n";
1414 case RC_LANGUAGE_PACKAGE:
1415 if (language_package != system_lyxrc.language_package) {
1416 os << "\\language_package \"" << language_package
1419 case RC_LANGUAGE_COMMAND_BEGIN:
1420 if (language_command_begin
1421 != system_lyxrc.language_command_begin) {
1422 os << "\\language_command_begin \""
1423 << language_command_begin
1426 case RC_LANGUAGE_COMMAND_END:
1427 if (language_command_end
1428 != system_lyxrc.language_command_end) {
1429 os << "\\language_command_end \"" << language_command_end
1432 case RC_LANGUAGE_AUTO_BEGIN:
1433 if (language_auto_begin != system_lyxrc.language_auto_begin) {
1434 os << "\\language_auto_begin "
1435 << tostr(language_auto_begin) << "\n";
1437 case RC_LANGUAGE_AUTO_END:
1438 if (language_auto_end != system_lyxrc.language_auto_end) {
1439 os << "\\language_auto_end "
1440 << tostr(language_auto_end) << "\n";
1442 case RC_MARK_FOREIGN_LANGUAGE:
1443 if (mark_foreign_language
1444 != system_lyxrc.mark_foreign_language) {
1445 os << "\\mark_foreign_language " <<
1446 tostr(mark_foreign_language) << "\n";
1450 << "# 2nd MISC SUPPORT SECTION ##########################\n"
1453 case RC_OVERRIDE_X_DEADKEYS:
1454 if (override_x_deadkeys != system_lyxrc.override_x_deadkeys) {
1455 os << "\\override_x_deadkeys "
1456 << tostr(override_x_deadkeys) << "\n";
1458 case RC_SCREEN_FONT_ENCODING_MENU:
1459 if (font_norm_menu != system_lyxrc.font_norm_menu) {
1460 os << "\\screen_font_encoding_menu \"" << font_norm_menu
1463 case RC_AUTO_NUMBER:
1464 if (auto_number != system_lyxrc.auto_number) {
1465 os << "\\auto_number " << tostr(auto_number) << "\n";
1467 case RC_NEW_ASK_FILENAME:
1468 if (new_ask_filename != system_lyxrc.new_ask_filename) {
1469 os << "\\new_ask_filename " << tostr(new_ask_filename)
1472 case RC_DEFAULT_LANGUAGE:
1473 if (default_language != system_lyxrc.default_language) {
1474 os << "\\default_language " << default_language << "\n";
1480 void LyXRC::set_font_norm_type()
1482 if (font_norm == "iso10646-1")
1483 font_norm_type = ISO_10646_1;
1484 else if (font_norm == "iso8859-1")
1485 font_norm_type = ISO_8859_1;
1486 else if (font_norm == "iso8859-6.8x")
1487 font_norm_type = ISO_8859_6_8;
1488 else if (font_norm == "iso8859-9")
1489 font_norm_type = ISO_8859_9;
1491 font_norm_type = OTHER_ENCODING;
1494 string LyXRC::getFeedback(LyXRCTags tag)
1499 case RC_FONT_ENCODING:
1500 str = N_("The font encoding used for the LaTeX2e fontenc package.\nT1 is highly recommended for non-English languages.");
1504 str = N_("The default printer to print on. If none is specified, LyX will\nuse the environment variable PRINTER.");
1507 case RC_PRINT_COMMAND:
1508 str = N_("Your favorite print program, eg \"dvips\", \"dvilj4\"");
1511 case RC_PRINTEVENPAGEFLAG:
1512 case RC_PRINTODDPAGEFLAG:
1513 case RC_PRINTPAGERANGEFLAG:
1514 case RC_PRINTCOPIESFLAG:
1515 case RC_PRINTCOLLCOPIESFLAG:
1516 case RC_PRINTREVERSEFLAG:
1517 case RC_PRINTLANDSCAPEFLAG:
1518 case RC_PRINTPAPERFLAG:
1519 case RC_PRINTPAPERDIMENSIONFLAG:
1520 str = N_("Look at the man page for your favorite print program to learn\nwhich options to use.");
1523 case RC_PRINTTOPRINTER:
1524 str = N_("Option to pass to the print program to print on a specific printer.");
1527 case RC_PRINT_ADAPTOUTPUT:
1528 str = N_("Set to true for LyX to pass the name of the destination printer to your\nprint command.");
1531 case RC_PRINTTOFILE:
1532 str = N_("Option to pass to the print program to print to a file.");
1535 case RC_PRINTFILEEXTENSION:
1536 str = N_("Extension of printer program output file. Usually .ps");
1539 case RC_PRINTEXSTRAOPTIONS:
1540 str = N_("Extra options to pass to printing program after everything else,\nbut before the filename of the DVI file to be printed.");
1543 case RC_PRINTSPOOL_COMMAND:
1544 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.");
1547 case RC_PRINTSPOOL_PRINTERPREFIX:
1548 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.");
1552 str = N_("DPI (dots per inch) of your monitor is auto-detected by LyX.\nIf that goes wrong, override the setting here.");
1555 case RC_SCREEN_ZOOM:
1556 str = N_("The zoom percentage for screen fonts.\nA setting of 100% will make the fonts roughly the same size as on paper.");
1559 case RC_SCREEN_FONT_SIZES:
1560 str = N_("The font sizes used for calculating the scaling of the screen fonts.");
1563 case RC_SCREEN_FONT_ROMAN:
1564 case RC_SCREEN_FONT_SANS:
1565 case RC_SCREEN_FONT_TYPEWRITER:
1566 str = N_("The screen fonts used to display the text while editing.");
1569 case RC_SCREEN_FONT_MENU:
1570 str = N_("The font for menus (and groups titles in popups).");
1573 case RC_SCREEN_FONT_POPUP:
1574 str = N_("The font for popups.");
1577 case RC_SCREEN_FONT_ENCODING:
1578 str = N_("The norm for the screen fonts.");
1581 case RC_SCREEN_FONT_ENCODING_MENU:
1582 str = N_("The norm for the menu/popups fonts.");
1589 str = N_("The time interval between auto-saves (in seconds).\n0 means no auto-save");
1592 case RC_DOCUMENTPATH:
1593 str = N_("The default path for your documents.");
1596 case RC_TEMPLATEPATH:
1597 str = N_("The path that LyX will set when offering to choose a template.");
1600 case RC_TEMPDIRPATH:
1601 str = N_("The path that LyX will use to store temporary TeX output.");
1605 str = N_("Specify to use a temporary directory to store temporary TeX output.\nThis directory is deleted when you quit LyX.");
1609 str = N_("The file where the last-files information should be stored.");
1612 case RC_AUTOREGIONDELETE:
1613 str = N_("Set to false if you don't want the current selection to be replaced\nautomatically by what you type.");
1616 case RC_OVERRIDE_X_DEADKEYS:
1617 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.");
1622 str = N_("This starts the lyxserver. The pipes get an additional extension\n\".in\" and \".out\". Only for advanced users.");
1626 str = N_("Keybindings file. Can either specify an absolute path,\nor LyX will look in its global and local bind/ directories.");
1630 str = N_("The UI (user interface) file. Can either specify an absolute path,\nor LyX will look in its global and local ui/ directories.");
1634 case RC_KBMAP_PRIMARY:
1635 case RC_KBMAP_SECONDARY:
1636 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.");
1640 case RC_FAX_COMMAND:
1649 case RC_ASCIIROFF_COMMAND:
1650 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.");
1653 case RC_ASCII_LINELEN:
1654 str = N_("This is the maximum line length of an exported ASCII file\n(LaTeX, SGML or plain text).");
1657 case RC_NUMLASTFILES:
1658 str = N_("Maximal number of lastfiles. Up to 9 can appear in the file menu.");
1661 case RC_CHECKLASTFILES:
1662 str = N_("Specify to check whether the lastfiles still exist.");
1665 case RC_VIEWDVI_PAPEROPTION:
1668 case RC_DEFAULT_PAPERSIZE:
1669 str = N_("Specify the default paper size.");
1675 case RC_ACCEPT_COMPOUND:
1676 str = N_("Consider run-together words, such as \"notthe\" for \"not the\",\nas legal words?");
1679 case RC_SPELL_COMMAND:
1680 str = N_("What command runs the spell checker?");
1683 case RC_USE_INP_ENC:
1684 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.");
1687 case RC_USE_ALT_LANG:
1689 str = N_("Specify an alternate language.\nThe default is to use the language of the document.");
1692 case RC_USE_PERS_DICT:
1694 str = N_("Specify an alternate personal dictionary file.\nE.g. \".ispell_english\".");
1697 case RC_USE_ESC_CHARS:
1699 str = N_("Specify additional chars that can be part of a word.");
1702 case RC_SCREEN_FONT_SCALABLE:
1703 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.");
1706 case RC_CHKTEX_COMMAND:
1707 str = N_("Define how to run chktex.\nE.g. \"chktex -n11 -n1 -n3 -n6 -n9 -22 -n25 -n30 -n38\"\nRefer to the ChkTeX documentation.");
1710 case RC_CURSOR_FOLLOWS_SCROLLBAR:
1711 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.");
1714 case RC_EXIT_CONFIRMATION:
1715 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.)");
1718 case RC_DISPLAY_SHORTCUTS:
1719 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.");
1722 case RC_MAKE_BACKUP:
1723 str = N_("Set to false if you don't want LyX to create backup files.");
1726 case RC_BACKUPDIR_PATH:
1727 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.");
1730 case RC_RTL_SUPPORT:
1731 str = N_("Use to enable support of right-to-left languages (e.g. Hebrew, Arabic).");
1734 case RC_MARK_FOREIGN_LANGUAGE:
1735 str = N_("Use to control the highlighting of words with a language foreign to\nthat of the document.");
1738 case RC_LANGUAGE_PACKAGE:
1739 str = N_("The latex command for loading the language package.\nE.g. \"\\usepackage{babel}\", \"\\usepackage{omega}\".");
1742 case RC_LANGUAGE_AUTO_BEGIN:
1743 str = N_("Use if a language switching command is needed at the beginning\nof the document.");
1746 case RC_LANGUAGE_AUTO_END:
1747 str = N_("Use if a language switching command is needed at the end\nof the document.");
1750 case RC_LANGUAGE_COMMAND_BEGIN:
1751 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.");
1754 case RC_LANGUAGE_COMMAND_END:
1755 str = N_("The latex command for changing back to the language of the document.");
1758 case RC_DATE_INSERT_FORMAT:
1759 str = N_("This accepts the normal strftime formats; see man strftime for full details.\nE.g.\"%A, %e. %B %Y\".");
1762 case RC_SHOW_BANNER:
1763 str = N_("Set to false if you don't want the startup banner.");
1767 str = N_("The wheel movement factor (for mice with wheels or five button mice)");
1779 case RC_NEW_ASK_FILENAME:
1780 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.");
1783 case RC_DEFAULT_LANGUAGE:
1784 str = N_("New documents will be assigned this language.");
1794 // The global instance
1797 // The global copy of the system lyxrc entries (everything except preferences)