!!Caveats when upgrading from earlier versions to 2.3.x
-* If the "Use non-TeX fonts" and "Don't use ligatures for en- and em-dashes"
- document preferences are not checked, when exporting documents containing
- en- and em-dashes to the format of LyX 2.0 or earlier, the following line
- has to be manually added to the unicodesymbols file of that LyX version:<br>
+* If using TeX fonts and en- and em-dashes are output as font ligatures,
+ when exporting documents containing en- and em-dashes to the format of
+ LyX 2.0 or earlier, the following line has to be manually added to the
+ unicodesymbols file of that LyX version:<br>
0x200b "\\hspace{0pt}" "" "" "" "" # ZERO WIDTH SPACE<br>
This avoids "uncodable character" issues if the document is actually
loaded by that LyX version. LyX 2.1 and later versions already have the
this, SLOT(change_adaptor()));
connect(fontModule->dashesCB, SIGNAL(clicked()),
this, SLOT(change_adaptor()));
+ connect(fontModule->dashesCB, SIGNAL(toggled(bool)),
+ this, SLOT(dashesToggled(bool)));
connect(fontModule->scaleSansSB, SIGNAL(valueChanged(int)),
this, SLOT(change_adaptor()));
connect(fontModule->scaleTypewriterSB, SIGNAL(valueChanged(int)),
}
+void GuiDocument::dashesToggled(bool state)
+{
+ if (!fontModule->osFontsCB->isChecked())
+ fontModule->dashesCB->setChecked(state);
+}
+
+
void GuiDocument::updateFontOptions()
{
bool const tex_fonts = !fontModule->osFontsCB->isChecked();
fontModule->fontsRomanCO->currentIndex()).toString();
fontModule->fontScCB->setEnabled(providesSC(font));
fontModule->fontOsfCB->setEnabled(providesOSF(font));
+ fontModule->dashesCB->setEnabled(tex_fonts);
updateMathFonts(font);
}
fromqstr(fontModule->cjkFontLE->text());
bp_.use_microtype = fontModule->microtypeCB->isChecked();
- bp_.use_dash_ligatures = !fontModule->dashesCB->isChecked();
+ bp_.use_dash_ligatures = fontModule->dashesCB->isChecked();
bp_.fonts_sans_scale[nontexfonts] = fontModule->scaleSansSB->value();
bp_.fonts_sans_scale[!nontexfonts] = fontModule->font_sf_scale;
fontModule->cjkFontLE->setText(QString());
fontModule->microtypeCB->setChecked(bp_.use_microtype);
- fontModule->dashesCB->setChecked(!bp_.use_dash_ligatures);
+ fontModule->dashesCB->setChecked(bp_.use_dash_ligatures);
fontModule->fontScCB->setChecked(bp_.fonts_expert_sc);
fontModule->fontOsfCB->setChecked(bp_.fonts_old_figures);
<item row="11" column="1">
<widget class="QCheckBox" name="dashesCB">
<property name="toolTip">
- <string>Use \textendash and \textemdash instead of -- and --- for en- and em-dashes</string>
+ <string>Use font ligatures -- and --- instead of \textendash and \textemdash for en- and em-dashes</string>
</property>
<property name="text">
- <string>Don't use ligatures for en- and &em-dashes</string>
+ <string>Output en- and &em-dashes as ligatures</string>
</property>
</widget>
</item>