[apps/reader] Ajout de \leq et \neq

This commit is contained in:
Mino1289
2021-10-31 23:18:32 +01:00
parent 1a2a61a43c
commit 5fbc7feaa1
2 changed files with 26 additions and 0 deletions

View File

@@ -173,6 +173,19 @@ Layout TexParser::popCommand() {
return popequivCommand();
}
}
else if (strncmp(k_leqCommand, m_text, strlen(k_leqCommand)) == 0) {
m_text += strlen(k_leqCommand);
if (*m_text == ' ' || *m_text == '\\' || *m_text == '$') {
return popleqCommand();
}
}
else if (strncmp(k_geqCommand, m_text, strlen(k_geqCommand)) == 0) {
m_text += strlen(k_geqCommand);
if (*m_text == ' ' || *m_text == '\\' || *m_text == '$') {
return popgeqCommand();
}
}
else if (strncmp(k_leftarrowCommand, m_text, strlen(k_leftarrowCommand)) == 0) {
m_text += strlen(k_leftarrowCommand);
if (*m_text == ' ' || *m_text == '\\' || *m_text == '$') {
@@ -586,6 +599,14 @@ Layout TexParser::popequivCommand() {
return CodePointLayout::Builder(CodePoint(0x2261));
}
Layout TexParser::popleqCommand() {
return CodePointLayout::Builder(CodePoint(0x2264));
}
Layout TexParser::popgeqCommand() {
return CodePointLayout::Builder(CodePoint(0x2265));
}
Layout TexParser::popleftarrowCommand() {
return CodePointLayout::Builder(CodePoint(0x2190));
}

View File

@@ -34,6 +34,8 @@ private:
Layout popapproxCommand();
Layout popneqCommand();
Layout popequivCommand();
Layout popleqCommand();
Layout popgeqCommand();
// Arrows
Layout popleftarrowCommand();
@@ -118,6 +120,9 @@ private:
static constexpr char const * k_approxCommand = "approx";
static constexpr char const * k_neqCommand = "neq";
static constexpr char const * k_equivCommand = "equiv";
static constexpr char const * k_leqCommand = "leq";
static constexpr char const * k_geqCommand = "geq";
// Arrows
static constexpr char const * k_leftarrowCommand = "leftarrow";