New lfun "accent-perispomeni".

This function inserts a COMBINING GREEK PERISPOMENI character that is
normalized to pre-composed characters for base characters where a 
corresponding WITH PERISPOMENI character exists.

This is a partial solution for Ticket #6463.
This commit is contained in:
Günter Milde 2015-08-13 11:15:19 +02:00
parent 4ede231ef1
commit fb3bb6361c
5 changed files with 19 additions and 1 deletions

View File

@ -116,6 +116,7 @@ enum FuncCode
// 70
LFUN_ACCENT_ACUTE,
LFUN_ACCENT_TILDE,
LFUN_ACCENT_PERISPOMENI,
LFUN_ACCENT_CEDILLA,
LFUN_ACCENT_MACRON,
LFUN_ACCENT_UNDERBAR,

View File

@ -199,6 +199,14 @@ void LyXAction::init()
* \endvar
*/
{ LFUN_ACCENT_OGONEK, "accent-ogonek", Noop, Edit },
/*!
* \var lyx::FuncCode lyx::LFUN_ACCENT_PERISPOMENI
* \li Action: Adds a perispomeni (Greek circumflex)
over the next character typed.
* \li Syntax: accent-perispomeni
* \endvar
*/
{ LFUN_ACCENT_PERISPOMENI, "accent-perispomeni", Noop, Edit },
/*!
* \var lyx::FuncCode lyx::LFUN_ACCENT_TIE
* \li Action: Adds a tie \htmlonly (a͡)\endhtmlonly

View File

@ -2268,6 +2268,7 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
case LFUN_ACCENT_GRAVE:
case LFUN_ACCENT_ACUTE:
case LFUN_ACCENT_TILDE:
case LFUN_ACCENT_PERISPOMENI:
case LFUN_ACCENT_CEDILLA:
case LFUN_ACCENT_MACRON:
case LFUN_ACCENT_DOT:
@ -3153,6 +3154,9 @@ bool Text::getStatus(Cursor & cur, FuncRequest const & cmd,
break;
// FIXME: why are accent lfuns forbidden with pass_thru layouts?
// Because they insert COMBINING DIACRITICAL Unicode characters,
// that cannot be handled by LaTeX but must be converted according
// to the definition in lib/unicodesymbols?
case LFUN_ACCENT_ACUTE:
case LFUN_ACCENT_BREVE:
case LFUN_ACCENT_CARON:
@ -3166,6 +3170,7 @@ bool Text::getStatus(Cursor & cur, FuncRequest const & cmd,
case LFUN_ACCENT_OGONEK:
case LFUN_ACCENT_TIE:
case LFUN_ACCENT_TILDE:
case LFUN_ACCENT_PERISPOMENI:
case LFUN_ACCENT_UMLAUT:
case LFUN_ACCENT_UNDERBAR:
case LFUN_ACCENT_UNDERDOT:

View File

@ -71,7 +71,9 @@ static TeXAccent lyx_accent_table[] = {
{TEX_GRAVE, 0x0300, "grave", LFUN_ACCENT_GRAVE},
{TEX_MACRON, 0x0304, "macron", LFUN_ACCENT_MACRON},
{TEX_TILDE, 0x0303, "tilde", LFUN_ACCENT_TILDE},
{TEX_UNDERBAR, 0x0320, "underbar", LFUN_ACCENT_UNDERBAR},
{TEX_PERISPOMENI, 0x0342, "perispomeni", LFUN_ACCENT_PERISPOMENI},
{TEX_UNDERBAR, 0x0320, "underbar", LFUN_ACCENT_UNDERBAR}, // COMBINING MINUS SIGN BELOW or 0x0331 COMBINING MACRON BELOW ?
{TEX_CEDILLA, 0x0327, "cedilla", LFUN_ACCENT_CEDILLA},
{TEX_UNDERDOT, 0x0323, "underdot", LFUN_ACCENT_UNDERDOT},
{TEX_CIRCUMFLEX, 0x0302, "circumflex", LFUN_ACCENT_CIRCUMFLEX},

View File

@ -42,6 +42,8 @@ enum tex_accent {
///
TEX_TILDE,
///
TEX_PERISPOMENI,
///
TEX_UNDERBAR,
///
TEX_CEDILLA,