+ if (check_lastfiles != system_lyxrc.check_lastfiles) {
+ os << "\\check_lastfiles " << tostr(check_lastfiles)
+ << "\n";
+ }
+ case RC_TEMPLATEPATH:
+ if (template_path != system_lyxrc.template_path) {
+ os << "\\template_path \"" << template_path << "\"\n";
+ }
+ case RC_TEMPDIRPATH:
+ if (tempdir_path != system_lyxrc.tempdir_path) {
+ os << "\\tempdir_path \"" << tempdir_path << "\"\n";
+ }
+ case RC_USETEMPDIR:
+ if (use_tempdir != system_lyxrc.use_tempdir) {
+ os << "\\use_tempdir " << tostr(use_tempdir) << "\n";
+ }
+ case RC_ASCII_LINELEN:
+ if (ascii_linelen != system_lyxrc.ascii_linelen) {
+ os << "\\ascii_linelen " << ascii_linelen << "\n";
+ }
+ case RC_MAKE_BACKUP:
+ if (make_backup != system_lyxrc.make_backup) {
+ os << "\\make_backup " << tostr(make_backup) << "\n";
+ }
+ case RC_BACKUPDIR_PATH:
+ if (backupdir_path != system_lyxrc.backupdir_path) {
+ os << "\\backupdir_path \"" << backupdir_path << "\"\n";
+ }
+
+ os << "\n#\n"
+ << "# ASCII EXPORT SECTION ##############################\n"
+ << "#\n\n";
+
+ case RC_ASCIIROFF_COMMAND:
+ if (ascii_roff_command != system_lyxrc.ascii_roff_command) {
+ os << "\\ascii_roff_command \"" << ascii_roff_command
+ << "\"\n";
+ }
+
+ os << "\n#\n"
+ << "# SPELLCHECKER SECTION ##############################\n"
+ << "#\n\n";
+#ifdef USE_PSPELL
+ case RC_USE_PSPELL:
+ if (use_pspell != system_lyxrc.use_pspell) {
+ os << "\\use_pspell " << tostr(use_pspell) << "\n";
+ }
+#endif
+ case RC_SPELL_COMMAND:
+ if (isp_command != system_lyxrc.isp_command) {
+ os << "\\spell_command \"" << isp_command << "\"\n";
+ }
+ case RC_ACCEPT_COMPOUND:
+ if (isp_accept_compound != system_lyxrc.isp_accept_compound) {
+ os << "\\accept_compound " << tostr(isp_accept_compound)
+ << "\n";
+ }
+ case RC_USE_ALT_LANG:
+ if (isp_use_alt_lang != system_lyxrc.isp_use_alt_lang) {
+ os << "\\use_alt_language " << tostr(isp_use_alt_lang)
+ << "\n";
+ }
+ case RC_ALT_LANG:
+ if (isp_alt_lang != system_lyxrc.isp_alt_lang) {
+ os << "\\alternate_language \"" << isp_alt_lang
+ << "\"\n";
+ }
+ case RC_USE_ESC_CHARS:
+ if (isp_use_esc_chars != system_lyxrc.isp_use_esc_chars) {
+ os << "\\use_escape_chars " << tostr(isp_use_esc_chars)
+ << "\n";
+ }
+ case RC_ESC_CHARS:
+ if (isp_esc_chars != system_lyxrc.isp_esc_chars) {
+ os << "\\escape_chars \"" << isp_esc_chars << "\"\n";
+ }
+ case RC_USE_PERS_DICT:
+ if (isp_use_pers_dict != system_lyxrc.isp_use_pers_dict) {
+ os << "\\use_personal_dictionary "
+ << tostr(isp_use_pers_dict)
+ << "\n";
+ }
+ case RC_PERS_DICT:
+ if (isp_pers_dict != system_lyxrc.isp_pers_dict) {
+ os << "\\personal_dictionary \"" << isp_pers_dict
+ << "\"\n";
+ }
+ case RC_USE_INP_ENC:
+ if (isp_use_input_encoding
+ != system_lyxrc.isp_use_input_encoding) {
+ os << "\\use_input_encoding "
+ << tostr(isp_use_input_encoding)
+ << "\n";
+ }
+
+ os << "\n#\n"
+ << "# LANGUAGE SUPPORT SECTION ##########################\n"
+ << "#\n\n";
+
+ case RC_RTL_SUPPORT:
+ if (rtl_support != system_lyxrc.rtl_support) {
+ os << "\\rtl " << tostr(rtl_support) << "\n";
+ }
+ case RC_LANGUAGE_PACKAGE:
+ if (language_package != system_lyxrc.language_package) {
+ os << "\\language_package \"" << language_package
+ << "\"\n";
+ }
+ case RC_LANGUAGE_GLOBAL_OPTIONS:
+ if (language_global_options
+ != system_lyxrc.language_global_options) {
+ os << "\\language_global_options \""
+ << tostr(language_global_options)
+ << "\"\n";
+ }
+ case RC_LANGUAGE_USE_BABEL:
+ if (language_use_babel != system_lyxrc.language_use_babel) {
+ os << "\\language_use_babel \""
+ << tostr(language_use_babel)
+ << "\"\n";
+ }
+ case RC_LANGUAGE_COMMAND_BEGIN:
+ if (language_command_begin
+ != system_lyxrc.language_command_begin) {
+ os << "\\language_command_begin \""
+ << language_command_begin
+ << "\"\n";
+ }
+ case RC_LANGUAGE_COMMAND_END:
+ if (language_command_end
+ != system_lyxrc.language_command_end) {
+ os << "\\language_command_end \"" << language_command_end
+ << "\"\n";
+ }
+ case RC_LANGUAGE_COMMAND_LOCAL:
+ if (language_command_local
+ != system_lyxrc.language_command_local) {
+ os << "\\language_command_local \""
+ << language_command_local
+ << "\"\n";
+ }
+ case RC_LANGUAGE_AUTO_BEGIN:
+ if (language_auto_begin != system_lyxrc.language_auto_begin) {
+ os << "\\language_auto_begin "
+ << tostr(language_auto_begin) << "\n";
+ }
+ case RC_LANGUAGE_AUTO_END:
+ if (language_auto_end != system_lyxrc.language_auto_end) {
+ os << "\\language_auto_end "
+ << tostr(language_auto_end) << "\n";
+ }
+ case RC_MARK_FOREIGN_LANGUAGE:
+ if (mark_foreign_language
+ != system_lyxrc.mark_foreign_language) {
+ os << "\\mark_foreign_language " <<
+ tostr(mark_foreign_language) << "\n";
+ }
+
+ os << "\n#\n"
+ << "# 2nd MISC SUPPORT SECTION ##########################\n"
+ << "#\n\n";
+
+ case RC_OVERRIDE_X_DEADKEYS:
+ if (override_x_deadkeys != system_lyxrc.override_x_deadkeys) {
+ os << "\\override_x_deadkeys "
+ << tostr(override_x_deadkeys) << "\n";
+ }
+ case RC_AUTO_NUMBER:
+ if (auto_number != system_lyxrc.auto_number) {
+ os << "\\auto_number " << tostr(auto_number) << "\n";
+ }
+ case RC_NEW_ASK_FILENAME:
+ if (new_ask_filename != system_lyxrc.new_ask_filename) {
+ os << "\\new_ask_filename " << tostr(new_ask_filename)
+ << "\n";
+ }
+ case RC_DEFAULT_LANGUAGE:
+ if (default_language != system_lyxrc.default_language) {
+ os << "\\default_language " << default_language << "\n";
+ }
+
+ os << "\n#\n"
+ << "# FORMATS SECTION ##########################\n"
+ << "#\n\n";
+
+ case RC_FORMAT:
+ // Look for deleted formats
+ for (Formats::const_iterator cit = formats.begin();
+ cit != formats.end(); ++cit) {
+ Format const * format =
+ system_formats.getFormat(cit->name());
+ if (!format ||
+ format->extension() != cit->extension() ||
+ format->prettyname() != cit->prettyname() ||
+ format->shortcut() != cit->shortcut())
+ os << "\\format \"" << cit->name() << "\" \""
+ << cit->extension() << "\" \""
+ << cit->prettyname() << "\" \""
+ << cit->shortcut() << "\"\n";
+ }
+
+ // New/modifed formats
+ for (Formats::const_iterator cit = system_formats.begin();
+ cit != system_formats.end(); ++cit)
+ if (!formats.getFormat(cit->name()))
+ os << "\\format \"" << cit->name()
+ << "\" \"\" \"\" \"\"\n";
+ case RC_VIEWER:
+ for (Formats::const_iterator cit = formats.begin();
+ cit != formats.end(); ++cit) {
+ Format const * format =
+ system_formats.getFormat(cit->name());
+ if ((!format || format->viewer() != cit->viewer()) &&
+ (format || !cit->viewer().empty()))
+ os << "\\viewer \"" << cit->name() << "\" \""
+ << cit->viewer() << "\"\n";
+ }
+
+ os << "\n#\n"
+ << "# CONVERTERS SECTION ##########################\n"
+ << "#\n\n";
+
+ case RC_CONVERTER:
+ // Look for new converters
+ for (Converters::const_iterator cit = converters.begin();
+ cit != converters.end(); ++cit) {
+ Converter const * converter =
+ system_converters.getConverter(cit->from,
+ cit->to);
+ if (!converter ||
+ converter->command != cit->command ||
+ converter->flags != cit->flags)
+ os << "\\converter \"" << cit->from << "\" \""
+ << cit->to << "\" \""
+ << cit->command << "\" \""
+ << cit->flags << "\"\n";
+ }
+
+ // New/modifed converters
+ for (Converters::const_iterator cit = system_converters.begin();
+ cit != system_converters.end(); ++cit)
+ if (!converters.getConverter(cit->from, cit->to))
+ os << "\\converter \"" << cit->from
+ << "\" \"" << cit->to << "\" \"\" \"\"\n";
+ }
+ os.flush();
+}
+
+void LyXRC::set_font_norm_type()
+{
+ if (font_norm == "iso10646-1")
+ font_norm_type = ISO_10646_1;
+ else if (font_norm == "iso8859-1")
+ font_norm_type = ISO_8859_1;
+ else if (font_norm == "iso8859-3")
+ font_norm_type = ISO_8859_3;
+ else if (font_norm == "iso8859-4")
+ font_norm_type = ISO_8859_4;
+ else if (font_norm == "iso8859-6.8x")
+ font_norm_type = ISO_8859_6_8;
+ else if (font_norm == "iso8859-9")
+ font_norm_type = ISO_8859_9;
+ else if (font_norm == "iso8859-15")
+ font_norm_type = ISO_8859_15;
+ else
+ font_norm_type = OTHER_ENCODING;
+}
+
+
+string const LyXRC::getDescription(LyXRCTags tag)
+{
+ string str;
+
+ switch (tag) {
+ case RC_FONT_ENCODING:
+ str = N_("The font encoding used for the LaTeX2e fontenc package. T1 is highly recommended for non-English languages.");
+ break;
+
+ case RC_PRINTER:
+ str = N_("The default printer to print on. If none is specified, LyX will use the environment variable PRINTER.");
+ break;
+
+ case RC_PRINT_COMMAND:
+ str = N_("Your favorite print program, e.g. \"dvips\", \"dvilj4\".");
+ break;
+
+ case RC_PRINTEVENPAGEFLAG:
+ str = N_("The option to print only even pages.");
+ break;
+
+ case RC_PRINTODDPAGEFLAG:
+ str = N_("The option to print only odd pages.");
+ break;
+
+ case RC_PRINTPAGERANGEFLAG:
+ str = N_("The option for specifying a comma-separated list of pages to print.");
+ break;
+
+ case RC_PRINTCOPIESFLAG:
+ str = N_("The option for specifying the number of copies to print.");
+ break;
+
+ case RC_PRINTCOLLCOPIESFLAG:
+ str = N_("The option for specifying whether the copies should be collated.");
+ break;
+
+ case RC_PRINTREVERSEFLAG:
+ str = N_("The option to reverse the order of the pages printed.");
+ break;
+
+ case RC_PRINTLANDSCAPEFLAG:
+ str = N_("The option to print out in landscape.");
+ break;
+
+ case RC_PRINTPAPERFLAG:
+ str = N_("The option to specify paper type.");
+ break;
+
+ case RC_PRINTPAPERDIMENSIONFLAG:
+ str = N_("Option to specify the dimensions of the print paper.");
+ break;
+
+ case RC_PRINTTOPRINTER:
+ str = N_("Option to pass to the print program to print on a specific printer.");
+ break;
+
+ case RC_PRINT_ADAPTOUTPUT:
+ str = N_("Select for LyX to pass the name of the destination printer to your print command.");
+ break;
+
+ case RC_PRINTTOFILE:
+ str = N_("Option to pass to the print program to print to a file.");
+ break;
+
+ case RC_PRINTFILEEXTENSION:
+ str = N_("Extension of printer program output file. Usually \".ps\".");
+ break;
+
+ case RC_PRINTEXSTRAOPTIONS:
+ str = N_("Extra options to pass to printing program after everything else, but before the filename of the DVI file to be printed.");
+ break;
+
+ case RC_PRINTSPOOL_COMMAND:
+ str = N_("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.");
+ break;
+
+ case RC_PRINTSPOOL_PRINTERPREFIX:
+ str = N_("If you specify a printer name in the print dialog, the following argument is prepended along with the printer name after the spool command.");
+ break;
+
+ case RC_SCREEN_DPI:
+ str = N_("DPI (dots per inch) of your monitor is auto-detected by LyX. If that goes wrong, override the setting here.");
+ break;
+
+ case RC_SCREEN_ZOOM:
+ //xgettext:no-c-format
+ str = N_("The zoom percentage for screen fonts. A setting of 100% will make the fonts roughly the same size as on paper.");
+ break;
+
+ case RC_SCREEN_FONT_SIZES:
+ str = N_("The font sizes used for calculating the scaling of the screen fonts.");
+ break;
+