* \pygmentize_command
holds the name of the driver command used by the Pygments python module.
+* \default_platex_view_format
+ Determine the default output format for Japanese documents that use the
+ pLaTeX backend [default: "pdf3" == "PDF (dvipdfm)"]
+
!!!The following pref variables were changed in 2.3:
!!!The following new LyX functions have been introduced in 2.3:
+* buffer-zoom
+ Zooms the screen fonts to a given value or resets to the default zoom
+ when no argument is given.
+
* branch-invert
Toggles inversion status of branch inset.
# Add pygmentize_command for the python pygments syntax highlighter
# No conversion necessary.
+# Incremented to format 23, by spitz
+# Add default_platex_view_format, a default output format for
+# Japanese documents via pLaTeX.
+# No conversion necessary.
+
# NOTE: The format should also be updated in LYXRC.cpp and
# in configure.py.
# End conversions for LyX 2.1 to 2.2
####################################
+#################################
+# Conversions from LyX 2.2 to 2.3
+
+# Only format changes that don't require conversion
+
+# End conversions for LyX 2.2 to 2.3
+####################################
+
+
+############################################################
+# Format-conversion map. Also add empty format changes here.
+
conversions = [
[ 1, [ # there were several conversions for format 1
export_menu,
[ 19, [remove_print_support]],
[ 20, []],
[ 21, []],
- [ 22, []]
+ [ 22, []],
+ [ 23, []]
]
if (!default_output_format.empty()
&& default_output_format != "default")
return default_output_format;
- if (isDocBook()
- || encoding().package() == Encoding::japanese) {
+ if (isDocBook()) {
FormatList const & formats = exportableFormats(true);
if (formats.empty())
return string();
// return the first we find
return formats.front()->name();
}
+ if (encoding().package() == Encoding::japanese)
+ return lyxrc.default_platex_view_format;
if (useNonTeXFonts)
return lyxrc.default_otf_view_format;
return lyxrc.default_view_format;
// The format should also be updated in configure.py, and conversion code
// should be added to prefs2prefs_prefs.py.
-static unsigned int const LYXRC_FILEFORMAT = 22; // ef: pygmentize_command
+static unsigned int const LYXRC_FILEFORMAT = 23; // spitz: default_platex_view_format
// when adding something to this array keep it sorted!
LexerKeyword lyxrcTags[] = {
{ "\\default_decimal_point", LyXRC::RC_DEFAULT_DECIMAL_POINT },
{ "\\default_length_unit", LyXRC::RC_DEFAULT_LENGTH_UNIT },
{ "\\default_otf_view_format", LyXRC::RC_DEFAULT_OTF_VIEW_FORMAT },
+ { "\\default_platex_view_format", LyXRC::RC_DEFAULT_PLATEX_VIEW_FORMAT },
{ "\\default_view_format", LyXRC::RC_DEFAULT_VIEW_FORMAT },
{ "\\dialogs_iconify_with_main", LyXRC::RC_DIALOGS_ICONIFY_WITH_MAIN },
{ "\\display_graphics", LyXRC::RC_DISPLAY_GRAPHICS },
view_dvi_paper_option.erase();
default_view_format = "pdf2";
default_otf_view_format = "pdf4";
+ default_platex_view_format = "pdf3";
chktex_command = "chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38";
bibtex_command = "automatic";
fontenc = "default";
lexrc >> default_otf_view_format;
break;
+ case RC_DEFAULT_PLATEX_VIEW_FORMAT:
+ lexrc >> default_platex_view_format;
+ break;
+
case RC_DEFAULT_VIEW_FORMAT:
lexrc >> default_view_format;
break;
if (tag != RC_LAST)
break;
// fall through
+ case RC_DEFAULT_PLATEX_VIEW_FORMAT:
+ if ((ignore_system_lyxrc ||
+ default_platex_view_format != system_lyxrc.default_platex_view_format)
+ && !default_platex_view_format.empty()) {
+ os << "\\default_platex_view_format " << default_platex_view_format << '\n';
+ }
+ if (tag != RC_LAST)
+ break;
+ // fall through
case RC_DEFAULT_VIEW_FORMAT:
if (ignore_system_lyxrc ||
default_view_format != system_lyxrc.default_view_format) {
case LyXRC::RC_DATE_INSERT_FORMAT:
case LyXRC::RC_GUI_LANGUAGE:
case LyXRC::RC_DEFAULT_OTF_VIEW_FORMAT:
+ case LyXRC::RC_DEFAULT_PLATEX_VIEW_FORMAT:
case LyXRC::RC_DEFAULT_VIEW_FORMAT:
case LyXRC::RC_DEFFILE:
case LyXRC::RC_DIALOGS_ICONIFY_WITH_MAIN:
RC_DEFAULT_DECIMAL_POINT,
RC_DEFAULT_LENGTH_UNIT,
RC_DEFAULT_OTF_VIEW_FORMAT,
+ RC_DEFAULT_PLATEX_VIEW_FORMAT,
RC_DEFAULT_VIEW_FORMAT,
RC_DEFFILE,
RC_DIALOGS_ICONIFY_WITH_MAIN,
///
std::string default_otf_view_format;
///
+ std::string default_platex_view_format;
+ ///
std::string default_view_format;
/// all available viewers
Alternatives viewer_alternatives;
this, SIGNAL(changed()));
connect(defaultOTFFormatCB, SIGNAL(activated(QString)),
this, SIGNAL(changed()));
+ connect(defaultPlatexFormatCB, SIGNAL(activated(QString)),
+ this, SIGNAL(changed()));
connect(viewerCO, SIGNAL(activated(int)),
this, SIGNAL(changed()));
connect(editorCO, SIGNAL(activated(int)),
QString const default_otf_format = defaultOTFFormatCB->itemData(
defaultOTFFormatCB->currentIndex()).toString();
rc.default_otf_view_format = fromqstr(default_otf_format);
+ QString const default_platex_format = defaultPlatexFormatCB->itemData(
+ defaultPlatexFormatCB->currentIndex()).toString();
+ rc.default_platex_view_format = fromqstr(default_platex_format);
}
pos = defaultOTFFormatCB->findData(toqstr(rc.default_otf_view_format));
defaultOTFFormatCB->setCurrentIndex(pos);
defaultOTFFormatCB->setCurrentIndex(pos);
+ pos = defaultPlatexFormatCB->findData(toqstr(rc.default_platex_view_format));
+ defaultPlatexFormatCB->setCurrentIndex(pos);
+ defaultPlatexFormatCB->setCurrentIndex(pos);
}
}
QString const current = formatsCB->currentText();
QString const current_def = defaultFormatCB->currentText();
QString const current_def_otf = defaultOTFFormatCB->currentText();
+ QString const current_def_platex = defaultPlatexFormatCB->currentText();
// update comboboxes with formats
formatsCB->blockSignals(true);
defaultFormatCB->blockSignals(true);
defaultOTFFormatCB->blockSignals(true);
+ defaultPlatexFormatCB->blockSignals(true);
formatsCB->clear();
defaultFormatCB->clear();
defaultOTFFormatCB->clear();
+ defaultPlatexFormatCB->clear();
form_->formats().sort();
for (Format const & f : form_->formats()) {
QString const prettyname = toqstr(translateIfPossible(f.prettyname()));
QVariant(toqstr(f.name())));
defaultOTFFormatCB->addItem(prettyname,
QVariant(toqstr(f.name())));
- } else if (form_->converters().isReachable("latex", f.name())
- || form_->converters().isReachable("pdflatex", f.name()))
- defaultFormatCB->addItem(prettyname,
+ } else {
+ if (form_->converters().isReachable("latex", f.name())
+ || form_->converters().isReachable("pdflatex", f.name()))
+ defaultFormatCB->addItem(prettyname,
QVariant(toqstr(f.name())));
+ if (form_->converters().isReachable("platex", f.name()))
+ defaultPlatexFormatCB->addItem(prettyname,
+ QVariant(toqstr(f.name())));
+ }
}
// restore selections
defaultFormatCB->setCurrentIndex(item < 0 ? 0 : item);
item = defaultOTFFormatCB->findText(current_def_otf, Qt::MatchExactly);
defaultOTFFormatCB->setCurrentIndex(item < 0 ? 0 : item);
+ item = defaultPlatexFormatCB->findText(current_def_platex, Qt::MatchExactly);
+ defaultPlatexFormatCB->setCurrentIndex(item < 0 ? 0 : item);
formatsCB->blockSignals(false);
defaultFormatCB->blockSignals(false);
defaultOTFFormatCB->blockSignals(false);
+ defaultPlatexFormatCB->blockSignals(false);
}
<rect>
<x>0</x>
<y>0</y>
- <width>386</width>
- <height>417</height>
+ <width>496</width>
+ <height>584</height>
</rect>
</property>
<property name="windowTitle">
<item row="11" column="0" colspan="5">
<widget class="QGroupBox" name="defaultFormatGB">
<property name="toolTip">
- <string>Specify the default output format when using (PDF)LaTeX</string>
+ <string>Specification of the default output formats when using specific LaTeX variants</string>
</property>
<property name="title">
<string>Default Output Formats</string>
<bool>true</bool>
</property>
<layout class="QGridLayout" name="gridLayout">
- <item row="0" column="0">
- <widget class="QLabel" name="defaultFormatLA">
- <property name="text">
- <string>With &TeX fonts:</string>
- </property>
- <property name="buddy">
- <cstring>defaultFormatCB</cstring>
- </property>
- </widget>
- </item>
- <item row="0" column="1" colspan="2">
- <widget class="QComboBox" name="defaultFormatCB">
- <property name="toolTip">
- <string>The default output format for documents (except with non-TeX fonts)</string>
- </property>
- </widget>
- </item>
<item row="0" column="3">
<spacer name="horizontalSpacer">
<property name="orientation">
</property>
</spacer>
</item>
- <item row="1" column="0">
- <widget class="QLabel" name="defaultOTFFormatLA">
- <property name="text">
- <string>With n&on-TeX fonts:</string>
+ <item row="2" column="3">
+ <spacer name="horizontalSpacer_3">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
</property>
- <property name="buddy">
- <cstring>defaultFormatCB</cstring>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>148</width>
+ <height>20</height>
+ </size>
</property>
- </widget>
+ </spacer>
</item>
- <item row="1" column="1">
+ <item row="2" column="1" colspan="2">
<widget class="QComboBox" name="defaultOTFFormatCB">
<property name="toolTip">
<string>The default output format for documents using non-TeX fonts</string>
</property>
</widget>
</item>
- <item row="1" column="2" colspan="2">
- <spacer name="horizontalSpacer_3">
+ <item row="0" column="6">
+ <spacer name="horizontalSpacer_4">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</property>
</spacer>
</item>
+ <item row="0" column="1" colspan="2">
+ <widget class="QComboBox" name="defaultFormatCB">
+ <property name="toolTip">
+ <string>This is the default output format for LyX documents, except for DocBook classes, documents that use non-TeX fonts and Japanese documents</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="5">
+ <widget class="QComboBox" name="defaultPlatexFormatCB">
+ <property name="toolTip">
+ <string>The default output format for Japanese documents (using pLaTeX)</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0">
+ <widget class="QLabel" name="defaultOTFFormatLA">
+ <property name="text">
+ <string>With n&on-TeX fonts:</string>
+ </property>
+ <property name="buddy">
+ <cstring>defaultFormatCB</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="0">
+ <widget class="QLabel" name="defaultFormatLA">
+ <property name="text">
+ <string>With &TeX fonts:</string>
+ </property>
+ <property name="buddy">
+ <cstring>defaultFormatCB</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="4">
+ <widget class="QLabel" name="defaultPLatexFormatLA">
+ <property name="text">
+ <string>&Japanese:</string>
+ </property>
+ <property name="buddy">
+ <cstring>defaultPlatexFormatCB</cstring>
+ </property>
+ </widget>
+ </item>
</layout>
</widget>
</item>
- <item row="12" column="1" colspan="2">
+ <item row="12" column="1" colspan="3">
<spacer>
<property name="orientation">
<enum>Qt::Vertical</enum>