1999-09-27 18:44:28 +00:00
|
|
|
|
/* This file is part of
|
2002-03-21 17:09:55 +00:00
|
|
|
|
* ======================================================
|
|
|
|
|
*
|
1999-09-27 18:44:28 +00:00
|
|
|
|
* LyX, The Document Processor
|
2002-03-21 17:09:55 +00:00
|
|
|
|
*
|
1999-10-02 16:21:10 +00:00
|
|
|
|
* Copyright 1995 Matthias Ettrich
|
2001-05-30 13:53:44 +00:00
|
|
|
|
* Copyright 1995-2001 The LyX Team.
|
1999-09-27 18:44:28 +00:00
|
|
|
|
*
|
1999-11-15 10:58:38 +00:00
|
|
|
|
* ====================================================== */
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
|
|
|
|
#include <config.h>
|
|
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
|
#pragma implementation
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#include "insetlatexaccent.h"
|
1999-10-07 18:44:17 +00:00
|
|
|
|
#include "debug.h"
|
1999-09-27 18:44:28 +00:00
|
|
|
|
#include "lyxrc.h"
|
1999-10-02 16:21:10 +00:00
|
|
|
|
#include "support/lstrings.h"
|
2000-06-21 15:07:57 +00:00
|
|
|
|
#include "BufferView.h"
|
2002-05-23 09:21:32 +00:00
|
|
|
|
#include "frontends/Painter.h"
|
2002-05-24 14:34:32 +00:00
|
|
|
|
#include "frontends/font_metrics.h"
|
2001-04-05 12:26:41 +00:00
|
|
|
|
#include "language.h"
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
2000-04-04 00:19:15 +00:00
|
|
|
|
using std::ostream;
|
2000-03-28 02:18:55 +00:00
|
|
|
|
using std::endl;
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
|
|
|
|
/* LatexAccent. Proper handling of accented characters */
|
|
|
|
|
/* This part is done by Ivan Schreter, schreter@ccsun.tuke.sk */
|
1999-12-16 06:43:25 +00:00
|
|
|
|
/* Later modified by Lars G. Bj<42>nnes, larsbj@lyx.org */
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
|
|
|
|
InsetLatexAccent::InsetLatexAccent()
|
2000-07-15 23:51:46 +00:00
|
|
|
|
: candisp(false)
|
|
|
|
|
{}
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
|
|
|
|
|
2000-07-15 23:51:46 +00:00
|
|
|
|
InsetLatexAccent::InsetLatexAccent(string const & str)
|
|
|
|
|
: contents(str)
|
1999-09-27 18:44:28 +00:00
|
|
|
|
{
|
|
|
|
|
checkContents();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void InsetLatexAccent::checkContents()
|
2002-03-21 17:09:55 +00:00
|
|
|
|
// check, if we know the modifier and can display it ok on screen
|
1999-09-27 18:44:28 +00:00
|
|
|
|
{
|
2002-03-21 17:09:55 +00:00
|
|
|
|
candisp = false;
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
2001-08-07 08:48:27 +00:00
|
|
|
|
if (contents.empty() || contents.length() < 2) {
|
|
|
|
|
lyxerr[Debug::KEY] << "Cannot decode: " << contents << endl;
|
|
|
|
|
return;
|
|
|
|
|
}
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
|
|
|
|
// REMOVE IN 0.13
|
|
|
|
|
// Dirty Hack for backward compability. remove in 0.13 (Lgb)
|
1999-10-02 16:21:10 +00:00
|
|
|
|
contents = frontStrip(strip(contents));
|
|
|
|
|
if (!contains(contents, "{") && !contains(contents, "}")) {
|
1999-09-27 18:44:28 +00:00
|
|
|
|
if (contents.length() == 2) {
|
1999-10-02 16:21:10 +00:00
|
|
|
|
string tmp;
|
1999-09-27 18:44:28 +00:00
|
|
|
|
tmp += contents[0];
|
|
|
|
|
tmp += contents[1];
|
|
|
|
|
tmp += "{}";
|
|
|
|
|
contents = tmp;
|
|
|
|
|
} else if (contents.length() == 3) {
|
1999-10-02 16:21:10 +00:00
|
|
|
|
string tmp;
|
1999-09-27 18:44:28 +00:00
|
|
|
|
tmp += contents[0];
|
|
|
|
|
tmp += contents[1];
|
|
|
|
|
tmp += '{';
|
|
|
|
|
tmp += contents[2];
|
|
|
|
|
tmp += '}';
|
|
|
|
|
contents = tmp;
|
1999-11-15 10:58:38 +00:00
|
|
|
|
} else if (contents.length() == 4 && contents[2] == ' ') {
|
1999-10-02 16:21:10 +00:00
|
|
|
|
string tmp;
|
1999-09-27 18:44:28 +00:00
|
|
|
|
tmp += contents[0];
|
|
|
|
|
tmp += contents[1];
|
|
|
|
|
tmp += '{';
|
|
|
|
|
tmp += contents[3];
|
|
|
|
|
tmp += '}';
|
|
|
|
|
contents = tmp;
|
1999-11-15 10:58:38 +00:00
|
|
|
|
} else if (contents.length() == 4 && contents[2] == '\\'
|
|
|
|
|
&& (contents[3] == 'i' || contents[3] == 'j')) {
|
1999-10-02 16:21:10 +00:00
|
|
|
|
string tmp;
|
1999-09-27 18:44:28 +00:00
|
|
|
|
tmp += contents[0];
|
|
|
|
|
tmp += contents[1];
|
|
|
|
|
tmp += '{';
|
|
|
|
|
tmp += contents[2];
|
|
|
|
|
tmp += contents[3];
|
|
|
|
|
tmp += '}';
|
|
|
|
|
contents = tmp;
|
|
|
|
|
}
|
|
|
|
|
}
|
2002-03-21 17:09:55 +00:00
|
|
|
|
if (contents[0] != '\\') { // demand that first char is a '\\'
|
2001-08-07 08:48:27 +00:00
|
|
|
|
lyxerr[Debug::KEY] << "Cannot decode: " << contents << endl;
|
|
|
|
|
return;
|
|
|
|
|
}
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
2000-01-25 12:35:27 +00:00
|
|
|
|
lyxerr[Debug::KEY] << "Decode: " << contents << endl;
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
2002-03-21 17:09:55 +00:00
|
|
|
|
remdot = false; plusasc = false; plusdesc = false;
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
2002-03-21 17:09:55 +00:00
|
|
|
|
switch (contents[1]) { // second char should be one of these
|
1999-09-27 18:44:28 +00:00
|
|
|
|
case '\'': // acute
|
2002-03-21 17:09:55 +00:00
|
|
|
|
modtype = ACUTE; // acute
|
|
|
|
|
plusasc = true; // at the top of character
|
|
|
|
|
break;
|
1999-09-27 18:44:28 +00:00
|
|
|
|
case '`': // grave
|
2002-03-21 17:09:55 +00:00
|
|
|
|
modtype = GRAVE; // grave
|
|
|
|
|
plusasc = true; // at the top
|
|
|
|
|
break;
|
1999-09-27 18:44:28 +00:00
|
|
|
|
case '=': // macron
|
2002-03-21 17:09:55 +00:00
|
|
|
|
modtype = MACRON; // macron
|
|
|
|
|
plusasc = true; // at the top
|
|
|
|
|
break;
|
1999-09-27 18:44:28 +00:00
|
|
|
|
case '~': // tilde
|
2002-03-21 17:09:55 +00:00
|
|
|
|
modtype = TILDE; // tilde
|
|
|
|
|
plusasc = true; // at the top
|
|
|
|
|
break;
|
1999-09-27 18:44:28 +00:00
|
|
|
|
case 'b': // underbar
|
2002-03-21 17:09:55 +00:00
|
|
|
|
modtype = UNDERBAR; // underbar
|
|
|
|
|
plusdesc = true; // at the bottom
|
|
|
|
|
break;
|
1999-09-27 18:44:28 +00:00
|
|
|
|
case 'c': // cedilla
|
2002-03-21 17:09:55 +00:00
|
|
|
|
modtype = CEDILLA; // cedilla
|
|
|
|
|
plusdesc = true; // at the bottom
|
|
|
|
|
break;
|
1999-09-27 18:44:28 +00:00
|
|
|
|
case 'd': // underdot
|
2002-03-21 17:09:55 +00:00
|
|
|
|
modtype = UNDERDOT; // underdot
|
|
|
|
|
plusdesc = true; // at the bottom
|
|
|
|
|
break;
|
1999-09-27 18:44:28 +00:00
|
|
|
|
case 'r': // circle
|
2002-03-21 17:09:55 +00:00
|
|
|
|
modtype = CIRCLE; // circle
|
|
|
|
|
plusasc = true; // at the top
|
|
|
|
|
break;
|
1999-09-27 18:44:28 +00:00
|
|
|
|
case 't': // tie
|
2002-03-21 17:09:55 +00:00
|
|
|
|
modtype = TIE; // tie
|
|
|
|
|
plusasc = true; // at the top
|
|
|
|
|
break;
|
1999-09-27 18:44:28 +00:00
|
|
|
|
case 'u': // breve
|
2002-03-21 17:09:55 +00:00
|
|
|
|
modtype = BREVE; // breve
|
|
|
|
|
plusasc = true; // at the top
|
|
|
|
|
break;
|
1999-09-27 18:44:28 +00:00
|
|
|
|
case 'v': // caron
|
2002-03-21 17:09:55 +00:00
|
|
|
|
modtype = CARON; // caron
|
|
|
|
|
plusasc = true; // at the top
|
|
|
|
|
break;
|
1999-09-27 18:44:28 +00:00
|
|
|
|
case 'q': // special caron
|
2002-03-21 17:09:55 +00:00
|
|
|
|
modtype = SPECIAL_CARON; // special caron
|
|
|
|
|
plusasc = true; // at the top
|
|
|
|
|
break;
|
1999-09-27 18:44:28 +00:00
|
|
|
|
case 'H': // hungarian umlaut
|
2002-03-21 17:09:55 +00:00
|
|
|
|
modtype = HUNGARIAN_UMLAUT; // hungarian umlaut
|
|
|
|
|
plusasc = true; // at the top
|
|
|
|
|
break;
|
1999-09-27 18:44:28 +00:00
|
|
|
|
case '"': // umlaut
|
2002-03-21 17:09:55 +00:00
|
|
|
|
modtype = UMLAUT; // umlaut
|
|
|
|
|
plusasc = true; // at the top
|
|
|
|
|
break;
|
1999-09-27 18:44:28 +00:00
|
|
|
|
case '.': // dot
|
2002-03-21 17:09:55 +00:00
|
|
|
|
modtype = DOT; // dot
|
|
|
|
|
plusasc = true; // at the top
|
|
|
|
|
break;
|
1999-09-27 18:44:28 +00:00
|
|
|
|
case '^': // circumflex
|
2002-03-21 17:09:55 +00:00
|
|
|
|
modtype = CIRCUMFLEX; // circumflex
|
|
|
|
|
plusasc = true; // at the top
|
|
|
|
|
break;
|
1999-09-27 18:44:28 +00:00
|
|
|
|
case 'k': // ogonek
|
|
|
|
|
modtype = OGONEK; // ogonek
|
|
|
|
|
plusdesc = true;
|
|
|
|
|
break;
|
|
|
|
|
case 'i': // dot-less-i
|
|
|
|
|
modtype = DOT_LESS_I; // dot-less-i
|
|
|
|
|
plusasc = true; // at the top (not really needed)
|
|
|
|
|
remdot = true;
|
|
|
|
|
break;
|
|
|
|
|
case 'j': // dot-less-j
|
|
|
|
|
modtype = DOT_LESS_J; // dot-less-j
|
|
|
|
|
plusasc = true; // at the top (not really needed)
|
|
|
|
|
remdot = true;
|
|
|
|
|
break;
|
2002-03-21 17:09:55 +00:00
|
|
|
|
case 'l': // lslash
|
|
|
|
|
modtype = lSLASH;
|
|
|
|
|
plusasc = true; // at the top (not really needed)
|
|
|
|
|
break;
|
|
|
|
|
case 'L': // lslash
|
|
|
|
|
modtype = LSLASH;
|
|
|
|
|
plusasc = true; // at the top (not really needed)
|
|
|
|
|
break;
|
1999-09-27 18:44:28 +00:00
|
|
|
|
default:
|
2000-04-11 16:57:16 +00:00
|
|
|
|
lyxerr[Debug::KEY] << "Default" << endl;
|
1999-09-27 18:44:28 +00:00
|
|
|
|
// unknow accent (or something else)
|
2002-03-21 17:09:55 +00:00
|
|
|
|
return;
|
|
|
|
|
}
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
|
|
|
|
// we demand that third char is a '{' (Lgb)
|
|
|
|
|
if (contents[2] != '{') return;
|
|
|
|
|
|
|
|
|
|
// special clause for \i{}, \j{} \l{} and \L{}
|
|
|
|
|
if ((modtype == DOT_LESS_I || modtype == DOT_LESS_J
|
1999-12-16 06:43:25 +00:00
|
|
|
|
|| modtype == lSLASH || modtype == LSLASH)
|
2000-11-04 10:00:12 +00:00
|
|
|
|
&& contents[3] == '}') {
|
1999-09-27 18:44:28 +00:00
|
|
|
|
switch (modtype) {
|
|
|
|
|
case DOT_LESS_I: ic = 'i'; break;
|
|
|
|
|
case DOT_LESS_J: ic = 'j'; break;
|
|
|
|
|
case lSLASH: ic = 'l'; break;
|
|
|
|
|
case LSLASH: ic = 'L'; break;
|
|
|
|
|
default:
|
|
|
|
|
// if this happens something is really wrong
|
1999-10-07 18:44:17 +00:00
|
|
|
|
lyxerr << "InsetLaTexAccent: weird error." << endl;
|
1999-09-27 18:44:28 +00:00
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
//ic = (modtype == DOT_LESS_J ? 'j' : 'i');
|
2000-01-25 12:35:27 +00:00
|
|
|
|
lyxerr[Debug::KEY] << "Contents: [" << contents << "]"
|
2002-03-21 17:09:55 +00:00
|
|
|
|
<< ", ic: " << ic
|
|
|
|
|
<< ", top: " << plusasc
|
|
|
|
|
<< ", bot: " << plusdesc
|
|
|
|
|
<< ", dot: " << remdot
|
2000-01-25 12:35:27 +00:00
|
|
|
|
<< ", mod: " << modtype << endl;
|
1999-12-16 06:43:25 +00:00
|
|
|
|
// Special case for space
|
1999-09-27 18:44:28 +00:00
|
|
|
|
} else if (contents[3] == '}') {
|
|
|
|
|
ic = ' ';
|
|
|
|
|
} else {
|
|
|
|
|
int i = 3;
|
2002-03-21 17:09:55 +00:00
|
|
|
|
|
1999-09-27 18:44:28 +00:00
|
|
|
|
// now get the char
|
|
|
|
|
ic = contents[3]; // i will always be 3 here
|
|
|
|
|
|
|
|
|
|
// ic should now be a alfa-char or '\\'
|
|
|
|
|
if (ic == '\\') {
|
|
|
|
|
ic = contents[++i]; // will only allow \<foo>{\i} and \<foo>{\j}
|
|
|
|
|
if (ic == 'i' || ic == 'j')
|
|
|
|
|
remdot = true;
|
|
|
|
|
else
|
|
|
|
|
return;
|
2000-11-04 10:00:12 +00:00
|
|
|
|
} else if ((ic == 'i'|| ic == 'j') && contents[4] == '}') {
|
1999-12-16 06:43:25 +00:00
|
|
|
|
// Do a rewrite: \<foo>{i} --> \<foo>{\i}
|
|
|
|
|
string temp = contents;
|
|
|
|
|
temp.erase(3, string::npos);
|
|
|
|
|
temp += '\\';
|
|
|
|
|
temp += char(ic);
|
2000-11-04 10:00:12 +00:00
|
|
|
|
for (string::size_type j = 4;
|
1999-12-16 06:43:25 +00:00
|
|
|
|
j < contents.length(); ++j)
|
1999-11-15 10:58:38 +00:00
|
|
|
|
temp+= contents[j];
|
1999-12-16 06:43:25 +00:00
|
|
|
|
contents= temp;
|
|
|
|
|
++i;
|
1999-11-04 01:40:20 +00:00
|
|
|
|
remdot = true;
|
2002-03-21 17:09:55 +00:00
|
|
|
|
}
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
|
|
|
|
// demand a '}' at the end
|
|
|
|
|
if (contents[++i] != '}' && contents[++i]) return;
|
2002-03-21 17:09:55 +00:00
|
|
|
|
|
1999-09-27 18:44:28 +00:00
|
|
|
|
// fine, the char is properly decoded now (hopefully)
|
2000-01-25 12:35:27 +00:00
|
|
|
|
lyxerr[Debug::KEY] << "Contents: [" << contents << "]"
|
|
|
|
|
<< ", ic: " << ic
|
2002-03-21 17:09:55 +00:00
|
|
|
|
<< ", top: " << plusasc
|
|
|
|
|
<< ", bot: " << plusdesc
|
2000-01-25 12:35:27 +00:00
|
|
|
|
<< ", dot: " << remdot
|
|
|
|
|
<< ", mod: " << modtype << endl;
|
1999-09-27 18:44:28 +00:00
|
|
|
|
}
|
2002-03-21 17:09:55 +00:00
|
|
|
|
candisp = true;
|
1999-09-27 18:44:28 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2000-07-05 14:57:48 +00:00
|
|
|
|
int InsetLatexAccent::ascent(BufferView *, LyXFont const & font) const
|
2000-02-10 17:53:36 +00:00
|
|
|
|
{
|
|
|
|
|
// This function is a bit too simplistix and is just a
|
|
|
|
|
// "try to make a fit for all accents" approach, to
|
|
|
|
|
// make it better we need to know what kind of accent is
|
|
|
|
|
// used and add to max based on that.
|
|
|
|
|
int max;
|
|
|
|
|
if (candisp) {
|
|
|
|
|
if (ic == ' ')
|
2002-05-24 14:34:32 +00:00
|
|
|
|
max = font_metrics::ascent('a', font);
|
2000-02-10 17:53:36 +00:00
|
|
|
|
else
|
2002-05-24 14:34:32 +00:00
|
|
|
|
max = font_metrics::ascent(ic, font);
|
|
|
|
|
if (plusasc)
|
|
|
|
|
max += (font_metrics::maxAscent(font) + 3) / 3;
|
2000-02-10 17:53:36 +00:00
|
|
|
|
} else
|
2002-05-24 14:34:32 +00:00
|
|
|
|
max = font_metrics::maxAscent(font) + 4;
|
2000-02-10 17:53:36 +00:00
|
|
|
|
return max;
|
|
|
|
|
}
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
|
|
|
|
|
2000-07-05 14:57:48 +00:00
|
|
|
|
int InsetLatexAccent::descent(BufferView *, LyXFont const & font) const
|
2000-02-10 17:53:36 +00:00
|
|
|
|
{
|
|
|
|
|
int max;
|
|
|
|
|
if (candisp) {
|
2002-05-24 14:34:32 +00:00
|
|
|
|
if (ic == ' ')
|
|
|
|
|
max = font_metrics::descent('a', font);
|
|
|
|
|
else
|
|
|
|
|
max = font_metrics::descent(ic, font);
|
|
|
|
|
if (plusdesc)
|
|
|
|
|
max += 3;
|
2000-02-10 17:53:36 +00:00
|
|
|
|
} else
|
2002-05-24 14:34:32 +00:00
|
|
|
|
max = font_metrics::maxDescent(font) + 4;
|
2000-02-10 17:53:36 +00:00
|
|
|
|
return max;
|
|
|
|
|
}
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
|
|
|
|
|
2000-07-05 14:57:48 +00:00
|
|
|
|
int InsetLatexAccent::width(BufferView *, LyXFont const & font) const
|
2000-02-10 17:53:36 +00:00
|
|
|
|
{
|
|
|
|
|
if (candisp)
|
2002-05-24 14:34:32 +00:00
|
|
|
|
return font_metrics::width(ic, font);
|
|
|
|
|
else
|
|
|
|
|
return font_metrics::width(contents, font) + 4;
|
2000-02-10 17:53:36 +00:00
|
|
|
|
}
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
|
|
|
|
|
2001-06-28 10:25:20 +00:00
|
|
|
|
int InsetLatexAccent::lbearing(LyXFont const & font) const
|
1999-12-15 06:12:28 +00:00
|
|
|
|
{
|
2002-05-24 14:34:32 +00:00
|
|
|
|
return font_metrics::lbearing(ic, font);
|
1999-12-15 06:12:28 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2001-06-28 10:25:20 +00:00
|
|
|
|
int InsetLatexAccent::rbearing(LyXFont const & font) const
|
1999-12-15 06:12:28 +00:00
|
|
|
|
{
|
2002-05-24 14:34:32 +00:00
|
|
|
|
return font_metrics::rbearing(ic, font);
|
1999-12-15 06:12:28 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2001-06-28 10:25:20 +00:00
|
|
|
|
bool InsetLatexAccent::displayISO8859_9(BufferView * bv, LyXFont const & font,
|
2002-03-21 17:09:55 +00:00
|
|
|
|
int baseline,
|
2000-02-10 17:53:36 +00:00
|
|
|
|
float & x) const
|
|
|
|
|
{
|
|
|
|
|
unsigned char tmpic = ic;
|
2002-03-21 17:09:55 +00:00
|
|
|
|
|
2000-02-10 17:53:36 +00:00
|
|
|
|
switch (modtype) {
|
|
|
|
|
case CEDILLA:
|
|
|
|
|
{
|
|
|
|
|
if (ic == 'c') tmpic = 0xe7;
|
|
|
|
|
if (ic == 'C') tmpic = 0xc7;
|
|
|
|
|
if (ic == 's') tmpic = 0xfe;
|
|
|
|
|
if (ic == 'S') tmpic = 0xde;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case BREVE:
|
|
|
|
|
{ if (ic == 'g') tmpic = 0xf0;
|
|
|
|
|
if (ic == 'G') tmpic = 0xd0;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case UMLAUT:
|
|
|
|
|
{
|
|
|
|
|
if (ic == 'o') tmpic = 0xf6;
|
|
|
|
|
if (ic == 'O') tmpic = 0xd6;
|
|
|
|
|
if (ic == 'u') tmpic = 0xfc;
|
|
|
|
|
if (ic == 'U') tmpic = 0xdc;
|
|
|
|
|
break;
|
|
|
|
|
}
|
2002-03-21 17:09:55 +00:00
|
|
|
|
case DOT: if (ic == 'I') tmpic = 0xdd; break;
|
2000-02-10 17:53:36 +00:00
|
|
|
|
case DOT_LESS_I: tmpic = 0xfd; break;
|
|
|
|
|
default: return false;
|
|
|
|
|
}
|
|
|
|
|
if (tmpic != ic) {
|
|
|
|
|
char ch = char(tmpic);
|
2000-07-05 14:57:48 +00:00
|
|
|
|
bv->painter().text(int(x), baseline, ch, font);
|
|
|
|
|
x += width(bv, font);
|
2000-02-10 17:53:36 +00:00
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2000-10-30 21:53:29 +00:00
|
|
|
|
void InsetLatexAccent::draw(BufferView * bv, LyXFont const & font0,
|
2000-06-23 15:02:46 +00:00
|
|
|
|
int baseline, float & x, bool) const
|
2000-02-10 17:53:36 +00:00
|
|
|
|
{
|
2000-06-21 15:07:57 +00:00
|
|
|
|
Painter & pain = bv->painter();
|
|
|
|
|
|
2000-10-30 21:53:29 +00:00
|
|
|
|
if (lyxrc.font_norm_type == LyXRC::ISO_8859_9)
|
2002-03-21 17:09:55 +00:00
|
|
|
|
if (displayISO8859_9(bv, font0, baseline, x))
|
2000-02-10 17:53:36 +00:00
|
|
|
|
return;
|
2002-03-21 17:09:55 +00:00
|
|
|
|
|
|
|
|
|
/* draw it! */
|
2000-02-10 17:53:36 +00:00
|
|
|
|
// All the manually drawn accents in this function could use an
|
|
|
|
|
// overhaul. Different ways of drawing (what metrics to use)
|
|
|
|
|
// should also be considered.
|
2000-10-30 21:53:29 +00:00
|
|
|
|
|
|
|
|
|
LyXFont font(font0);
|
|
|
|
|
if (lyxrc.font_norm_type == LyXRC::ISO_10646_1)
|
|
|
|
|
font.setLanguage(english_language);
|
2002-03-21 17:09:55 +00:00
|
|
|
|
|
2000-02-10 17:53:36 +00:00
|
|
|
|
if (candisp) {
|
2000-07-05 14:57:48 +00:00
|
|
|
|
int asc = ascent(bv, font);
|
|
|
|
|
int desc = descent(bv, font);
|
|
|
|
|
int wid = width(bv, font);
|
2001-06-28 10:25:20 +00:00
|
|
|
|
float x2 = x + (rbearing(font) - lbearing(font)) / 2.0;
|
2000-02-10 17:53:36 +00:00
|
|
|
|
float hg;
|
|
|
|
|
int y;
|
|
|
|
|
if (plusasc) {
|
|
|
|
|
// mark at the top
|
2002-05-24 14:34:32 +00:00
|
|
|
|
hg = font_metrics::maxDescent(font);
|
2000-02-10 17:53:36 +00:00
|
|
|
|
y = baseline - asc;
|
|
|
|
|
|
|
|
|
|
if (font.shape() == LyXFont::ITALIC_SHAPE)
|
|
|
|
|
x2 += (4.0 * hg) / 5.0; // italic
|
|
|
|
|
} else {
|
|
|
|
|
// at the bottom
|
|
|
|
|
hg = desc;
|
|
|
|
|
y = baseline;
|
|
|
|
|
}
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
2000-02-10 17:53:36 +00:00
|
|
|
|
float hg35 = float(hg * 3.0) / 5.0;
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
2000-02-10 17:53:36 +00:00
|
|
|
|
// display with proper accent mark
|
|
|
|
|
// first the letter
|
|
|
|
|
pain.text(int(x), baseline, ic, font);
|
|
|
|
|
|
|
|
|
|
if (remdot) {
|
2002-05-24 14:34:32 +00:00
|
|
|
|
int tmpvar = baseline - font_metrics::ascent('i', font);
|
2000-02-10 17:53:36 +00:00
|
|
|
|
float tmpx = 0;
|
|
|
|
|
if (font.shape() == LyXFont::ITALIC_SHAPE)
|
|
|
|
|
tmpx += (8.0 * hg) / 10.0; // italic
|
|
|
|
|
lyxerr[Debug::KEY] << "Removing dot." << endl;
|
|
|
|
|
// remove the dot first
|
|
|
|
|
pain.fillRectangle(int(x + tmpx), tmpvar, wid,
|
2002-05-24 14:34:32 +00:00
|
|
|
|
font_metrics::ascent('i', font) -
|
|
|
|
|
font_metrics::ascent('x', font) - 1,
|
2001-07-24 10:13:19 +00:00
|
|
|
|
backgroundColor());
|
2000-02-10 17:53:36 +00:00
|
|
|
|
// the five lines below is a simple hack to
|
|
|
|
|
// make the display of accent 'i' and 'j'
|
|
|
|
|
// better. It makes the accent be written
|
|
|
|
|
// closer to the top of the dot-less 'i' or 'j'.
|
|
|
|
|
char tmpic = ic; // store the ic when we
|
|
|
|
|
ic = 'x'; // calculates the ascent of
|
2000-07-05 14:57:48 +00:00
|
|
|
|
asc = ascent(bv, font); // the dot-less version (here: 'x')
|
2000-02-10 17:53:36 +00:00
|
|
|
|
ic = tmpic; // set the orig ic back
|
|
|
|
|
y = baseline - asc; // update to new y coord.
|
|
|
|
|
}
|
|
|
|
|
// now the rest - draw within (x, y, x+wid, y+hg)
|
|
|
|
|
switch (modtype) {
|
2000-02-15 14:28:15 +00:00
|
|
|
|
case ACUTE: // acute 0xB4
|
2002-05-24 14:34:32 +00:00
|
|
|
|
{
|
|
|
|
|
pain.text(int(x2 - (font_metrics::rbearing(0xB4, font) - font_metrics::lbearing(0xB4, font)) / 2),
|
|
|
|
|
baseline - font_metrics::ascent(ic, font) - font_metrics::descent(0xB4, font) - (font_metrics::ascent(0xB4, font) + font_metrics::descent(0xB4, font)) / 2,
|
2000-02-15 14:28:15 +00:00
|
|
|
|
char(0xB4), font);
|
2000-02-10 17:53:36 +00:00
|
|
|
|
break;
|
|
|
|
|
}
|
2000-02-15 14:28:15 +00:00
|
|
|
|
case GRAVE: // grave 0x60
|
2000-02-10 17:53:36 +00:00
|
|
|
|
{
|
2002-05-24 14:34:32 +00:00
|
|
|
|
pain.text(int(x2 - (font_metrics::rbearing(0x60, font) - font_metrics::lbearing(0x60, font)) / 2),
|
|
|
|
|
int(baseline - font_metrics::ascent(ic, font) - font_metrics::descent(0x60, font) - (font_metrics::ascent(0x60, font) + font_metrics::descent(0x60, font)) / 2.0),
|
2000-02-15 14:28:15 +00:00
|
|
|
|
char(0x60), font);
|
2000-02-10 17:53:36 +00:00
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case MACRON: // macron
|
|
|
|
|
{
|
2002-05-24 14:34:32 +00:00
|
|
|
|
pain.text(int(x2 - (font_metrics::rbearing(0xAF, font) - font_metrics::lbearing(0xAF, font)) / 2),
|
|
|
|
|
baseline - font_metrics::ascent(ic, font) - font_metrics::descent(0xAF, font) - (font_metrics::ascent(0xAF, font) + font_metrics::descent(0xAF, font)),
|
2000-02-15 14:28:15 +00:00
|
|
|
|
char(0xAF), font);
|
2000-02-10 17:53:36 +00:00
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case TILDE: // tilde
|
|
|
|
|
{
|
2002-05-24 14:34:32 +00:00
|
|
|
|
pain.text(int(x2 - (font_metrics::rbearing('~', font) - font_metrics::lbearing('~', font)) / 2),
|
|
|
|
|
baseline - font_metrics::ascent(ic, font) - font_metrics::descent('~', font) - (font_metrics::ascent('~', font) + font_metrics::descent('~', font)) / 2,
|
2000-02-15 14:28:15 +00:00
|
|
|
|
'~', font);
|
2000-02-10 17:53:36 +00:00
|
|
|
|
break;
|
|
|
|
|
}
|
2000-02-15 14:28:15 +00:00
|
|
|
|
case UNDERBAR: // underbar 0x5F
|
2000-02-10 17:53:36 +00:00
|
|
|
|
{
|
2002-05-24 14:34:32 +00:00
|
|
|
|
pain.text(int(x2 - (font_metrics::rbearing(0x5F, font) - font_metrics::lbearing(0x5F, font)) / 2), baseline,
|
2000-02-15 14:28:15 +00:00
|
|
|
|
char(0x5F), font);
|
2000-02-10 17:53:36 +00:00
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case CEDILLA: // cedilla
|
|
|
|
|
{
|
2002-05-24 14:34:32 +00:00
|
|
|
|
pain.text(int(x2 - (font_metrics::rbearing(0xB8, font) - font_metrics::lbearing(0xB8, font)) / 2), baseline,
|
2000-02-15 14:28:15 +00:00
|
|
|
|
char(0xB8), font);
|
2002-03-21 17:09:55 +00:00
|
|
|
|
|
2000-02-10 17:53:36 +00:00
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case UNDERDOT: // underdot
|
|
|
|
|
{
|
2002-05-24 14:34:32 +00:00
|
|
|
|
pain.text(int(x2 - (font_metrics::rbearing('.', font) - font_metrics::lbearing('.', font)) / 2.0),
|
|
|
|
|
int(baseline + 3.0 / 2.0 * (font_metrics::ascent('.', font) + font_metrics::descent('.', font))),
|
2000-02-17 19:59:08 +00:00
|
|
|
|
'.', font);
|
2000-02-10 17:53:36 +00:00
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
case DOT: // dot
|
|
|
|
|
{
|
2002-05-24 14:34:32 +00:00
|
|
|
|
pain.text(int(x2 - (font_metrics::rbearing('.', font) - font_metrics::lbearing('.', font)) / 2.0),
|
|
|
|
|
baseline - font_metrics::ascent(ic, font) - font_metrics::descent('.', font) - (font_metrics::ascent('.', font) + font_metrics::descent('.', font)) / 2,
|
2000-02-17 19:59:08 +00:00
|
|
|
|
'.', font);
|
2000-02-10 17:53:36 +00:00
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
case CIRCLE: // circle
|
|
|
|
|
{
|
2000-02-17 19:59:08 +00:00
|
|
|
|
LyXFont tmpf(font);
|
|
|
|
|
tmpf.decSize().decSize();
|
2002-05-24 14:34:32 +00:00
|
|
|
|
pain.text(int(x2 - (font_metrics::rbearing(0xB0, tmpf) - font_metrics::lbearing(0xB0, tmpf)) / 2.0),
|
|
|
|
|
int(baseline - font_metrics::ascent(ic, font) - font_metrics::descent(0xB0, tmpf) - (font_metrics::ascent(0xB0, tmpf) + font_metrics::descent(0xB0, tmpf)) / 3.0),
|
2000-02-17 19:59:08 +00:00
|
|
|
|
char(0xB0), tmpf);
|
2000-02-10 17:53:36 +00:00
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case TIE: // tie
|
|
|
|
|
{
|
2000-05-20 21:37:05 +00:00
|
|
|
|
pain.arc(int(x2 + hg35), int(y + hg / 2.0),
|
|
|
|
|
int(2 * hg), int(hg), 0, 360 * 32);
|
2000-02-10 17:53:36 +00:00
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case BREVE: // breve
|
|
|
|
|
{
|
|
|
|
|
pain.arc(int(x2 - (hg / 2.0)), y,
|
2000-05-20 21:37:05 +00:00
|
|
|
|
int(hg), int(hg), 0, -360*32);
|
2000-02-10 17:53:36 +00:00
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case CARON: // caron
|
|
|
|
|
{
|
|
|
|
|
int xp[3], yp[3];
|
2002-03-21 17:09:55 +00:00
|
|
|
|
|
2000-02-10 17:53:36 +00:00
|
|
|
|
xp[0] = int(x2 - hg35); yp[0] = int(y + hg35);
|
|
|
|
|
xp[1] = int(x2); yp[1] = int(y + hg);
|
|
|
|
|
xp[2] = int(x2 + hg35); yp[2] = int(y + hg35);
|
|
|
|
|
pain.lines(xp, yp, 3);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case SPECIAL_CARON: // special caron
|
|
|
|
|
{
|
|
|
|
|
switch (ic) {
|
|
|
|
|
case 'L': wid = int(4.0 * wid / 5.0); break;
|
|
|
|
|
case 't': y -= int(hg35 / 2.0); break;
|
|
|
|
|
}
|
|
|
|
|
int xp[3], yp[3];
|
|
|
|
|
xp[0] = int(x + wid);
|
|
|
|
|
yp[0] = int(y + hg35 + hg);
|
2002-03-21 17:09:55 +00:00
|
|
|
|
|
2000-02-10 17:53:36 +00:00
|
|
|
|
xp[1] = int(x + wid + (hg35 / 2.0));
|
|
|
|
|
yp[1] = int(y + hg + (hg35 / 2.0));
|
2002-03-21 17:09:55 +00:00
|
|
|
|
|
2000-02-10 17:53:36 +00:00
|
|
|
|
xp[2] = int(x + wid + (hg35 / 2.0));
|
|
|
|
|
yp[2] = y + int(hg);
|
|
|
|
|
|
|
|
|
|
pain.lines(xp, yp, 3);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case HUNGARIAN_UMLAUT: // hung. umlaut
|
|
|
|
|
{
|
2002-05-24 14:34:32 +00:00
|
|
|
|
pain.text(int(x2 - (font_metrics::rbearing('<EFBFBD>', font) - font_metrics::lbearing('<EFBFBD>', font))),
|
|
|
|
|
baseline - font_metrics::ascent(ic, font) - font_metrics::descent('<EFBFBD>', font) - (font_metrics::ascent('<EFBFBD>', font) + font_metrics::descent('<EFBFBD>', font)) / 2,
|
2000-02-17 19:59:08 +00:00
|
|
|
|
'<EFBFBD>', font);
|
2000-05-20 21:37:05 +00:00
|
|
|
|
pain.text(int(x2),
|
2002-05-24 14:34:32 +00:00
|
|
|
|
baseline - font_metrics::ascent(ic, font) - font_metrics::descent('<EFBFBD>', font) - (font_metrics::ascent('<EFBFBD>', font) + font_metrics::descent('<EFBFBD>', font)) / 2,
|
2000-02-17 19:59:08 +00:00
|
|
|
|
'<EFBFBD>', font);
|
2000-02-10 17:53:36 +00:00
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case UMLAUT: // umlaut
|
|
|
|
|
{
|
2002-05-24 14:34:32 +00:00
|
|
|
|
pain.text(int(x2 - (font_metrics::rbearing('<EFBFBD>', font) - font_metrics::lbearing('<EFBFBD>', font)) / 2),
|
|
|
|
|
baseline - font_metrics::ascent(ic, font) - font_metrics::descent('<EFBFBD>', font) - (font_metrics::ascent('<EFBFBD>', font) + font_metrics::descent('<EFBFBD>', font)) / 2,
|
2000-02-15 14:28:15 +00:00
|
|
|
|
'<EFBFBD>', font);
|
2000-02-10 17:53:36 +00:00
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case CIRCUMFLEX: // circumflex
|
|
|
|
|
{
|
2000-02-17 19:59:08 +00:00
|
|
|
|
LyXFont tmpf(font);
|
|
|
|
|
tmpf.decSize().decSize().decSize();
|
2002-05-24 14:34:32 +00:00
|
|
|
|
pain.text(int(x2 - (font_metrics::rbearing(0x5E, tmpf) - font_metrics::lbearing(0x5E, tmpf)) / 2),
|
|
|
|
|
int(baseline - font_metrics::ascent(ic, font) - font_metrics::descent(0x5E, tmpf) - (font_metrics::ascent(0x5E, tmpf) + font_metrics::descent(0x5E, tmpf)) / 3.0),
|
2000-02-17 19:59:08 +00:00
|
|
|
|
char(0x5E), tmpf);
|
2000-02-10 17:53:36 +00:00
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case OGONEK: // ogonek
|
|
|
|
|
{
|
|
|
|
|
// this does probably not look like an ogonek, so
|
|
|
|
|
// it should certainly be refined
|
|
|
|
|
int xp[4], yp[4];
|
2002-03-21 17:09:55 +00:00
|
|
|
|
|
2000-02-10 17:53:36 +00:00
|
|
|
|
xp[0] = int(x2);
|
|
|
|
|
yp[0] = y;
|
2002-03-21 17:09:55 +00:00
|
|
|
|
|
2000-02-10 17:53:36 +00:00
|
|
|
|
xp[1] = int(x2);
|
|
|
|
|
yp[1] = y + int(hg35);
|
2002-03-21 17:09:55 +00:00
|
|
|
|
|
2000-02-10 17:53:36 +00:00
|
|
|
|
xp[2] = int(x2 - hg35);
|
|
|
|
|
yp[2] = y + int(hg / 2.0);
|
2002-03-21 17:09:55 +00:00
|
|
|
|
|
2000-02-10 17:53:36 +00:00
|
|
|
|
xp[3] = int(x2 + hg / 4.0);
|
|
|
|
|
yp[3] = y + int(hg);
|
|
|
|
|
|
|
|
|
|
pain.lines(xp, yp, 4);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case lSLASH:
|
|
|
|
|
case LSLASH:
|
|
|
|
|
{
|
|
|
|
|
int xp[2], yp[2];
|
2002-03-21 17:09:55 +00:00
|
|
|
|
|
|
|
|
|
xp[0] = int(x);
|
2000-02-10 17:53:36 +00:00
|
|
|
|
yp[0] = y + int(3.0 * hg);
|
2002-03-21 17:09:55 +00:00
|
|
|
|
|
|
|
|
|
xp[1] = int(x + float(wid) * 0.75);
|
2000-02-10 17:53:36 +00:00
|
|
|
|
yp[1] = y + int(hg);
|
2002-03-21 17:09:55 +00:00
|
|
|
|
|
|
|
|
|
pain.lines(xp, yp, 2);
|
|
|
|
|
break;
|
2000-02-10 17:53:36 +00:00
|
|
|
|
}
|
|
|
|
|
case DOT_LESS_I: // dotless-i
|
|
|
|
|
case DOT_LESS_J: // dotless-j
|
|
|
|
|
{
|
|
|
|
|
// nothing to do for these
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
pain.fillRectangle(int(x + 1),
|
2000-07-05 14:57:48 +00:00
|
|
|
|
baseline - ascent(bv, font) + 1,
|
|
|
|
|
width(bv, font) - 2,
|
|
|
|
|
ascent(bv, font)
|
2001-07-24 10:13:19 +00:00
|
|
|
|
+ descent(bv, font) - 2,
|
|
|
|
|
backgroundColor());
|
2000-07-05 14:57:48 +00:00
|
|
|
|
pain.rectangle(int(x + 1), baseline - ascent(bv, font) + 1,
|
|
|
|
|
width(bv, font) - 2,
|
|
|
|
|
ascent(bv, font) + descent(bv, font) - 2);
|
2000-02-10 17:53:36 +00:00
|
|
|
|
pain.text(int(x + 2), baseline, contents, font);
|
|
|
|
|
}
|
2000-07-05 14:57:48 +00:00
|
|
|
|
x += width(bv, font);
|
2000-02-10 17:53:36 +00:00
|
|
|
|
}
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
|
|
|
|
|
2001-06-28 10:25:20 +00:00
|
|
|
|
void InsetLatexAccent::write(Buffer const *, ostream & os) const
|
1999-09-27 18:44:28 +00:00
|
|
|
|
{
|
1999-12-07 00:44:53 +00:00
|
|
|
|
os << "\\i " << contents << "\n";
|
1999-09-27 18:44:28 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2001-06-28 10:25:20 +00:00
|
|
|
|
void InsetLatexAccent::read(Buffer const *, LyXLex & lex)
|
1999-09-27 18:44:28 +00:00
|
|
|
|
{
|
2001-08-06 19:13:25 +00:00
|
|
|
|
lex.eatLine();
|
|
|
|
|
contents = lex.getString();
|
1999-09-27 18:44:28 +00:00
|
|
|
|
checkContents();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2001-06-28 10:25:20 +00:00
|
|
|
|
int InsetLatexAccent::latex(Buffer const *, ostream & os,
|
2000-04-19 01:42:55 +00:00
|
|
|
|
bool /*fragile*/, bool/*fs*/) const
|
1999-09-27 18:44:28 +00:00
|
|
|
|
{
|
1999-12-07 00:44:53 +00:00
|
|
|
|
os << contents;
|
1999-09-27 18:44:28 +00:00
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2001-06-28 10:25:20 +00:00
|
|
|
|
int InsetLatexAccent::ascii(Buffer const *, ostream & os, int) const
|
2000-04-24 20:58:23 +00:00
|
|
|
|
{
|
|
|
|
|
os << contents;
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2001-06-28 10:25:20 +00:00
|
|
|
|
int InsetLatexAccent::linuxdoc(Buffer const *, ostream & os) const
|
2000-03-06 02:42:40 +00:00
|
|
|
|
{
|
|
|
|
|
os << contents;
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2002-06-18 15:44:30 +00:00
|
|
|
|
int InsetLatexAccent::docbook(Buffer const *, ostream & os, bool) const
|
2000-03-06 02:42:40 +00:00
|
|
|
|
{
|
|
|
|
|
os << contents;
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
2001-06-28 10:25:20 +00:00
|
|
|
|
bool InsetLatexAccent::deletable() const
|
1999-09-27 18:44:28 +00:00
|
|
|
|
{
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2001-06-28 10:25:20 +00:00
|
|
|
|
bool InsetLatexAccent::directWrite() const
|
1999-09-27 18:44:28 +00:00
|
|
|
|
{
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2001-07-06 15:57:54 +00:00
|
|
|
|
Inset * InsetLatexAccent::clone(Buffer const &, bool) const
|
1999-09-27 18:44:28 +00:00
|
|
|
|
{
|
1999-11-22 16:19:48 +00:00
|
|
|
|
return new InsetLatexAccent(contents);
|
1999-09-27 18:44:28 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2001-06-28 10:25:20 +00:00
|
|
|
|
Inset::Code InsetLatexAccent::lyxCode() const
|
1999-09-27 18:44:28 +00:00
|
|
|
|
{
|
|
|
|
|
return Inset::ACCENT_CODE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
1999-10-07 18:44:17 +00:00
|
|
|
|
ostream & operator<<(ostream & o, InsetLatexAccent::ACCENT_TYPES at)
|
|
|
|
|
{
|
|
|
|
|
return o << int(at);
|
|
|
|
|
}
|