mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
Further amendment to 72a488d7
Rephrase positively the check box for the output of en- and em-dashes and disable it when using non-TeX fonts. The state of the check box is remembered, so that toggling the non-TeX fonts check box does not cause information loss.
This commit is contained in:
parent
167eea3990
commit
16d5c49b38
@ -88,10 +88,10 @@
|
||||
|
||||
!!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
|
||||
|
@ -840,6 +840,8 @@ GuiDocument::GuiDocument(GuiView & lv)
|
||||
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)),
|
||||
@ -1936,6 +1938,13 @@ void GuiDocument::fontScToggled(bool state)
|
||||
}
|
||||
|
||||
|
||||
void GuiDocument::dashesToggled(bool state)
|
||||
{
|
||||
if (!fontModule->osFontsCB->isChecked())
|
||||
fontModule->dashesCB->setChecked(state);
|
||||
}
|
||||
|
||||
|
||||
void GuiDocument::updateFontOptions()
|
||||
{
|
||||
bool const tex_fonts = !fontModule->osFontsCB->isChecked();
|
||||
@ -1957,6 +1966,7 @@ void GuiDocument::updateFontOptions()
|
||||
fontModule->fontsRomanCO->currentIndex()).toString();
|
||||
fontModule->fontScCB->setEnabled(providesSC(font));
|
||||
fontModule->fontOsfCB->setEnabled(providesOSF(font));
|
||||
fontModule->dashesCB->setEnabled(tex_fonts);
|
||||
updateMathFonts(font);
|
||||
}
|
||||
|
||||
@ -3048,7 +3058,7 @@ void GuiDocument::applyView()
|
||||
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;
|
||||
@ -3553,7 +3563,7 @@ void GuiDocument::paramsToDialog()
|
||||
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);
|
||||
|
@ -105,6 +105,7 @@ private Q_SLOTS:
|
||||
void ttChanged(int);
|
||||
void fontOsfToggled(bool state);
|
||||
void fontScToggled(bool state);
|
||||
void dashesToggled(bool state);
|
||||
void setIndent(int);
|
||||
void enableIndent(bool);
|
||||
void setSkip(int);
|
||||
|
@ -255,10 +255,10 @@
|
||||
<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>
|
||||
|
Loading…
Reference in New Issue
Block a user