int pos_len;
int searched_size;
vector <string> result = vector <string>();
- MatchResult(int len = 0): match_len(len),match_prefix(0),match2end(0), pos(0),leadsize(0),pos_len(-1),searched_size(0) {};
+ MatchResult(int len = 0): match_len(len),match_prefix(0),match2end(0), pos(0),leadsize(0),pos_len(-1),searched_size(0) {}
};
static MatchResult::range interpretMatch(MatchResult &oldres, MatchResult &newres)
class Border {
public:
- Border(int l=0, int u=0) : low(l), upper(u) {};
+ Border(int l=0, int u=0) : low(l), upper(u) {}
int low;
int upper;
};
void static fillMissingUnicodesymbols()
{
+ addAccents("\\pounds", getutf8(0x00a3));
+ addAccents("\\textsterling", getutf8(0x00a3));
addAccents("\\textyen", getutf8(0x00a5));
addAccents("\\yen", getutf8(0x00a5));
addAccents("\\textsection", getutf8(0x00a7));
addAccents("\\mathsection", getutf8(0x00a7));
addAccents("\\textlnot", getutf8(0x00ac));
addAccents("\\neg", getutf8(0x00ac));
+ addAccents("\\textregistered", getutf8(0x00ae));
+ addAccents("\\circledR", getutf8(0x00ae));
addAccents("\\textpm", getutf8(0x00b1));
addAccents("\\pm", getutf8(0x00b1));
addAccents("\\textparagraph", getutf8(0x00b6));
addAccents("\\textperiodcentered", getutf8(0x00b7));
addAccents("\\texttimes", getutf8(0x00d7));
addAccents("\\times", getutf8(0x00d7));
+ addAccents("\\O", getutf8(0x00d8));
addAccents("\\dh", getutf8(0x00f0));
addAccents("\\eth", getutf8(0x00f0));
addAccents("\\textdiv", getutf8(0x00f7));
addAccents("\\div", getutf8(0x00f7));
addAccents("\\o", getutf8(0x00f8));
+ addAccents("\\textcrlambda", getutf8(0x019b));
addAccents("\\j", getutf8(0x0237));
+ addAccents("\\textepsilon", getutf8(0x025b));
+ addAccents("\\varepsilon", getutf8(0x025b));
+ addAccents("\\textGamma", getutf8(0x0393));
+ addAccents("\\Gamma", getutf8(0x0393));
+ addAccents("\\textDelta", getutf8(0x0394));
+ addAccents("\\Delta", getutf8(0x0394));
+ addAccents("\\textTheta", getutf8(0x0398));
+ addAccents("\\Theta", getutf8(0x0398));
+ addAccents("\\textLambda", getutf8(0x039b));
+ addAccents("\\Lambda", getutf8(0x039b));
+ addAccents("\\textXi", getutf8(0x039e));
+ addAccents("\\Xi", getutf8(0x039e));
+ addAccents("\\textPi", getutf8(0x03a0));
+ addAccents("\\Pi", getutf8(0x03a0));
+ addAccents("\\textSigma", getutf8(0x03a3));
+ addAccents("\\Sigma", getutf8(0x03a3));
+ addAccents("\\textUpsilon", getutf8(0x03a5));
+ addAccents("\\Upsilon", getutf8(0x03a5));
+ addAccents("\\textPhi", getutf8(0x03a6));
+ addAccents("\\Phi", getutf8(0x03a6));
+ addAccents("\\textPsi", getutf8(0x03a8));
+ addAccents("\\Psi", getutf8(0x03a8));
+ addAccents("\\textOmega", getutf8(0x03a9));
+ addAccents("\\Omega", getutf8(0x03a9));
addAccents("\\textalpha", getutf8(0x03b1));
addAccents("\\alpha", getutf8(0x03b1));
addAccents("\\textbeta", getutf8(0x03b2));
addAccents("\\gimel", getutf8(0x05d2));
addAccents("\\hebdalet", getutf8(0x05d3));
addAccents("\\daleth", getutf8(0x05d3));
+ addAccents("\\hebhe", getutf8(0x05d4));
+ addAccents("\\hebvav", getutf8(0x05d5));
+ addAccents("\\hebzayin", getutf8(0x05d6));
+ addAccents("\\hebhet", getutf8(0x05d7));
+ addAccents("\\hebtet", getutf8(0x05d8));
+ addAccents("\\hebyod", getutf8(0x05d9));
+ addAccents("\\hebfinalkaf", getutf8(0x05da));
+ addAccents("\\hebkaf", getutf8(0x05db));
+ addAccents("\\heblamed", getutf8(0x05dc));
+ addAccents("\\hebfinalmem", getutf8(0x05dd));
+ addAccents("\\hebmem", getutf8(0x05de));
+ addAccents("\\hebfinalnun", getutf8(0x05df));
+ addAccents("\\hebnun", getutf8(0x05e0));
+ addAccents("\\hebsamekh", getutf8(0x05e1));
+ addAccents("\\hebayin", getutf8(0x05e2));
+ addAccents("\\hebfinalpe", getutf8(0x05e3));
+ addAccents("\\hebpe", getutf8(0x05e4));
+ addAccents("\\hebfinaltsadi", getutf8(0x05e5));
+ addAccents("\\hebtsadi", getutf8(0x05e6));
+ addAccents("\\hebqof", getutf8(0x05e7));
+ addAccents("\\hebresh", getutf8(0x05e8));
+ addAccents("\\hebshin", getutf8(0x05e9));
+ addAccents("\\hebtav", getutf8(0x05ea));
+
// Thai characters
addAccents("\\thaiKoKai", getutf8(0x0e01));
addAccents("\\thaiKhoKhai", getutf8(0x0e02));
addAccents("\\thainine", getutf8(0x0e59));
addAccents("\\thaiAngkhankhu", getutf8(0x0e5a));
addAccents("\\thaiKhomut", getutf8(0x0e5b));
-
addAccents("\\dag", getutf8(0x2020));
addAccents("\\dagger", getutf8(0x2020));
+ addAccents("\\textdagger", getutf8(0x2020));
addAccents("\\ddag", getutf8(0x2021));
addAccents("\\ddagger", getutf8(0x2021));
addAccents("\\textbullet", getutf8(0x2022));
addAccents("\\bullet", getutf8(0x2022));
addAccents("\\dots", getutf8(0x2026));
addAccents("\\ldots", getutf8(0x2026));
+ addAccents("\\textellipsis", getutf8(0x2026));
addAccents("\\textasciiacute", getutf8(0x2032));
addAccents("\\prime", getutf8(0x2032));
+ addAccents("\\textacutedbl", getutf8(0x2033));
+ addAccents("\\dprime", getutf8(0x2033));
addAccents("\\textasciigrave", getutf8(0x2035));
addAccents("\\backprime", getutf8(0x2035));
+ addAccents("\\textsubcircum{ }", getutf8(0x2038));
+ addAccents("\\caretinsert", getutf8(0x2038));
addAccents("\\textasteriskcentered", getutf8(0x204e));
addAccents("\\ast", getutf8(0x204e));
addAccents("\\textmho", getutf8(0x2127));
addAccents("\\surd", getutf8(0x221a));
addAccents("\\textbigcircle", getutf8(0x25ef));
addAccents("\\bigcirc", getutf8(0x25ef));
+ addAccents("\\FiveStar", getutf8(0x2605));
+ addAccents("\\bigstar", getutf8(0x2605));
+ addAccents("\\FiveStarOpen", getutf8(0x2606));
+ addAccents("\\bigwhitestar", getutf8(0x2606));
+ addAccents("\\Checkmark", getutf8(0x2713));
+ addAccents("\\checkmark", getutf8(0x2713));
+ addAccents("\\CrossMaltese", getutf8(0x2720));
+ addAccents("\\maltese", getutf8(0x2720));
addAccents("\\textlangle", getutf8(0x27e8));
addAccents("\\langle", getutf8(0x27e8));
addAccents("\\textrangle", getutf8(0x27e9));
buildKeys(isPatternString);
entries_ = vector<KeyInfo>();
buildEntries(isPatternString);
- };
+ }
int getFirstKey() {
entidx_ = 0;
if (entries_.empty()) {
return -1;
}
return 0;
- };
+ }
int getNextKey() {
entidx_++;
if (int(entries_.size()) > entidx_) {
else {
return -1;
}
- };
+ }
bool setNextKey(int idx) {
if ((idx == entidx_) && (entidx_ >= 0)) {
entidx_--;
}
else
return false;
- };
+ }
int find(int start, KeyInfo::KeyType keytype) const {
if (start < 0)
return -1;
tmpIdx++;
}
return -1;
- };
+ }
int process(ostringstream & os, KeyInfo const & actual);
int dispatch(ostringstream & os, int previousStart, KeyInfo & actual);
- // string show(int lastpos) { return interval.show(lastpos);};
- int nextNotIgnored(int start) { return interval_.nextNotIgnored(start);};
+ // string show(int lastpos) { return interval.show(lastpos);}
+ int nextNotIgnored(int start) { return interval_.nextNotIgnored(start);}
KeyInfo &getKeyInfo(int keyinfo) {
static KeyInfo invalidInfo = KeyInfo();
if ((keyinfo < 0) || ( keyinfo >= int(entries_.size())))
return invalidInfo;
else
return entries_[keyinfo];
- };
- void setForDefaultLang(KeyInfo const & defLang) {interval_.setForDefaultLang(defLang);};
- void addIntervall(int low, int up) { interval_.addIntervall(low, up); };
+ }
+ void setForDefaultLang(KeyInfo const & defLang) {interval_.setForDefaultLang(defLang);}
+ void addIntervall(int low, int up) { interval_.addIntervall(low, up); }
};
m.mathSize = m.mathEnd - m.mathStart;
entries_.push_back(m);
}
- bool empty() const { return entries_.empty(); };
+ bool empty() const { return entries_.empty(); }
size_t getEndPos() const {
if (entries_.empty() || (actualIdx_ >= entries_.size())) {
return 0;
}
return entries_[actualIdx_].mathSize;
}
- void incrEntry() { actualIdx_++; };
+ void incrEntry() { actualIdx_++; }
};
void LatexInfo::buildEntries(bool isPatternString)
max_match.match_len = actual_match_len;
maxl = len;
if (maxl - minl < 4)
- len = (int)((maxl + minl)/2);
+ len = (maxl + minl)/2;
else
- len = (int)(minl + (maxl - minl + 3)/4);
+ len = minl + (maxl - minl + 3)/4;
}
else {
// (actual_match_len < max_match.match_len)
minl = len + 1;
- len = (int)((maxl + minl)/2);
+ len = (maxl + minl)/2;
}
}
len = minl;