N_("Use math&dots package automatically"),
N_("Use mathdo&ts package"),
N_("The LaTeX package mathdots is only used if the command \\iddots is inserted into formulas")},
+ {"mathtools",
+ N_("Use mathtools package automatically"),
+ N_("Use mathtools package"),
+ N_("The LaTeX package mathtools is only used if some mathematical relations are inserted into formulas")},
{"mhchem",
N_("Use mhchem &package automatically"),
N_("Use mh&chem package"),
// biblio
biblioModule = new UiWidget<Ui::BiblioUi>;
+ connect(biblioModule->citeDefaultRB, SIGNAL(toggled(bool)),
+ this, SLOT(setNumerical(bool)));
+ connect(biblioModule->citeJurabibRB, SIGNAL(toggled(bool)),
+ this, SLOT(setAuthorYear(bool)));
connect(biblioModule->citeNatbibRB, SIGNAL(toggled(bool)),
biblioModule->citationStyleL, SLOT(setEnabled(bool)));
connect(biblioModule->citeNatbibRB, SIGNAL(toggled(bool)),
}
+void GuiDocument::setAuthorYear(bool authoryear)
+{
+ if (authoryear)
+ biblioModule->citeStyleCO->setCurrentIndex(0);
+ biblioChanged();
+}
+
+
+void GuiDocument::setNumerical(bool numerical)
+{
+ if (numerical)
+ biblioModule->citeStyleCO->setCurrentIndex(1);
+ biblioChanged();
+}
+
+
namespace {
// FIXME unicode
// both of these should take a vector<docstring>
// biblio
bp_.setCiteEngine(ENGINE_BASIC);
- if (biblioModule->citeNatbibRB->isChecked()) {
- bool const use_numerical_citations =
- biblioModule->citeStyleCO->currentIndex();
- if (use_numerical_citations)
- bp_.setCiteEngine(ENGINE_NATBIB_NUMERICAL);
- else
- bp_.setCiteEngine(ENGINE_NATBIB_AUTHORYEAR);
-
- } else if (biblioModule->citeJurabibRB->isChecked())
+ if (biblioModule->citeNatbibRB->isChecked())
+ bp_.setCiteEngine(ENGINE_NATBIB);
+ else if (biblioModule->citeJurabibRB->isChecked())
bp_.setCiteEngine(ENGINE_JURABIB);
+ if (biblioModule->citeStyleCO->currentIndex())
+ bp_.setCiteEngineType(ENGINE_TYPE_NUMERICAL);
+ else
+ bp_.setCiteEngineType(ENGINE_TYPE_AUTHORYEAR);
+
bp_.use_bibtopic =
biblioModule->bibtopicCB->isChecked();
bp_.citeEngine() == ENGINE_BASIC);
biblioModule->citeNatbibRB->setChecked(
- bp_.citeEngine() == ENGINE_NATBIB_NUMERICAL ||
- bp_.citeEngine() == ENGINE_NATBIB_AUTHORYEAR);
+ bp_.citeEngine() == ENGINE_NATBIB);
biblioModule->citeStyleCO->setCurrentIndex(
- bp_.citeEngine() == ENGINE_NATBIB_NUMERICAL);
+ bp_.citeEngineType() == ENGINE_TYPE_NUMERICAL);
biblioModule->citeJurabibRB->setChecked(
bp_.citeEngine() == ENGINE_JURABIB);
InsetListingsParams(bp_.listings_params).separatedParams();
listingsModule->listingsED->setPlainText(toqstr(lstparams));
- // Output
- // update combobox with formats
- updateDefaultFormat();
- int index = outputModule->defaultFormatCO->findData(toqstr(
- bp_.default_output_format));
- // set to default if format is not found
- if (index == -1)
- index = 0;
- outputModule->defaultFormatCO->setCurrentIndex(index);
+ // Fonts
bool const os_fonts_available =
bp_.baseClass()->outputType() == lyx::LATEX
&& LaTeXFeatures::isAvailable("fontspec");
fontModule->osFontsCB->setEnabled(os_fonts_available);
fontModule->osFontsCB->setChecked(
os_fonts_available && bp_.useNonTeXFonts);
-
- outputModule->outputsyncCB->setChecked(bp_.output_sync);
- outputModule->synccustomCB->setEditText(toqstr(bp_.output_sync_macro));
-
- outputModule->mathimgSB->setValue(bp_.html_math_img_scale);
- outputModule->mathoutCB->setCurrentIndex(bp_.html_math_output);
- outputModule->strictCB->setChecked(bp_.html_be_strict);
- outputModule->cssCB->setChecked(bp_.html_css_as_file);
-
- // Fonts
updateFontsize(documentClass().opt_fontsize(),
bp_.fontsize);
fontModule->fontencLE->setText(toqstr(bp_.fontenc));
}
+ // Output
+ // This must be set _after_ fonts since updateDefaultFormat()
+ // checks osFontsCB settings.
+ // update combobox with formats
+ updateDefaultFormat();
+ int index = outputModule->defaultFormatCO->findData(toqstr(
+ bp_.default_output_format));
+ // set to default if format is not found
+ if (index == -1)
+ index = 0;
+ outputModule->defaultFormatCO->setCurrentIndex(index);
+
+ outputModule->outputsyncCB->setChecked(bp_.output_sync);
+ outputModule->synccustomCB->setEditText(toqstr(bp_.output_sync_macro));
+
+ outputModule->mathimgSB->setValue(bp_.html_math_img_scale);
+ outputModule->mathoutCB->setCurrentIndex(bp_.html_math_output);
+ outputModule->strictCB->setChecked(bp_.html_be_strict);
+ outputModule->cssCB->setChecked(bp_.html_css_as_file);
+
// paper
bool const extern_geometry =
documentClass().provides("geometry");