diff options
author | Teus Benschop <teusjannette@gmail.com> | 2018-10-28 11:51:26 +0100 |
---|---|---|
committer | Teus Benschop <teusjannette@gmail.com> | 2018-10-28 11:51:26 +0100 |
commit | 1d0ff54794b5edea7cdf1d2d66710a0fa885bcc5 (patch) | |
tree | 8ece5f9ef437fbb151f2b22ed0c6e1a714879c7c /include/teilatex.h | |
parent | c7dbdc9161a7c460526b80fe01af49d714856126 (diff) |
New upstream version 1.8.1
Diffstat (limited to 'include/teilatex.h')
-rw-r--r-- | include/teilatex.h | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/include/teilatex.h b/include/teilatex.h new file mode 100644 index 0000000..c36e302 --- /dev/null +++ b/include/teilatex.h @@ -0,0 +1,57 @@ +/****************************************************************************** + * + * teilatex.h - Implementation of TEILaTeX + * + * $Id: teilatex.h 3548 2017-12-10 05:11:38Z scribe $ + * + * Copyright 2012-2014 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation version 2. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + */ + +#ifndef TEILATEX_H +#define TEILATEX_H + +#include <swbasicfilter.h> + +SWORD_NAMESPACE_START + +/** this filter converts TEI text to LaTeX text + */ +class SWDLLEXPORT TEILaTeX : public SWBasicFilter { +private: + bool renderNoteNumbers; + +protected: + class MyUserData : public BasicFilterUserData { + public: + bool isBiblicalText; + SWBuf lastHi; + bool firstCell; // for tables, indicates whether a cell is the first one in a row + int consecutiveNewlines; + + SWBuf version; + MyUserData(const SWModule *module, const SWKey *key); + }; + virtual BasicFilterUserData *createUserData(const SWModule *module, const SWKey *key) { + return new MyUserData(module, key); + } + virtual bool handleToken(SWBuf &buf, const char *token, BasicFilterUserData *userData); +public: + TEILaTeX(); + void setRenderNoteNumbers(bool val = true) { renderNoteNumbers = val; } +}; + +SWORD_NAMESPACE_END +#endif |