The SWORD Project  1.9.0.svnversion
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
osislatex.h
Go to the documentation of this file.
1 /******************************************************************************
2  *
3  * osislatex.h - class OSISLaTeX: a RenderFilter which renders LaTeX
4  * from a module marked up in OSIS
5  *
6  * $Id: osislatex.h 3786 2020-08-30 11:35:14Z scribe $
7  *
8  * Copyright 2011-2014 CrossWire Bible Society (http://www.crosswire.org)
9  * CrossWire Bible Society
10  * P. O. Box 2528
11  * Tempe, AZ 85280-2528
12  *
13  * This program is free software; you can redistribute it and/or modify it
14  * under the terms of the GNU General Public License as published by the
15  * Free Software Foundation version 2.
16  *
17  * This program is distributed in the hope that it will be useful, but
18  * WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20  * General Public License for more details.
21  *
22  */
23 
24 #ifndef OSISLATEX_H
25 #define OSISLATEX_H
26 
27 #include <swbasicfilter.h>
28 
30 
34 private:
35  bool morphFirst;
37 protected:
38 
39  class TagStack;
40  // used by derived classes so we have it in the header
41  virtual BasicFilterUserData *createUserData(const SWModule *module, const SWKey *key);
42  virtual bool handleToken(SWBuf &buf, const char *token, BasicFilterUserData *userData);
43 
44 
46  public:
48  bool inXRefNote;
51  bool firstCell; // for tables, indicates whether a cell is the first one in a row
54  SWBuf divLevel; // divLevel "module", "testament, "bookgroup", "book", "majorsection", "section", "paragraph" , ignore others.
55 
65 
66  MyUserData(const SWModule *module, const SWKey *key);
67  ~MyUserData();
68  void outputNewline(SWBuf &buf);
69  };
70 public:
71  OSISLaTeX();
72  void setMorphFirst(bool val = true) { morphFirst = val; }
73  void setRenderNoteNumbers(bool val = true) { renderNoteNumbers = val; }
74  virtual const char *getHeader() const;
75 };
76 
78 #endif
#define SWORD_NAMESPACE_START
Definition: defs.h:39
Definition: swbuf.h:47
#define SWDLLEXPORT
Definition: defs.h:171
virtual bool handleToken(SWBuf &buf, const char *token, BasicFilterUserData *userData)
bool renderNoteNumbers
Definition: osislatex.h:36
void setMorphFirst(bool val=true)
Definition: osislatex.h:72
SWText * module
Definition: osis2mod.cpp:105
TagStack * hiStack
Definition: osislatex.h:57
virtual BasicFilterUserData * createUserData(const SWModule *module, const SWKey *key)
Definition: swbasicfilter.h:91
TagStack * lineStack
Definition: osislatex.h:59
void setRenderNoteNumbers(bool val=true)
Definition: osislatex.h:73
virtual const char * getHeader() const
Definition: swfilter.h:62
#define SWORD_NAMESPACE_END
Definition: defs.h:40
TagStack * quoteStack
Definition: osislatex.h:56
Definition: swkey.h:77
TagStack * titleStack
Definition: osislatex.h:58
bool morphFirst
Definition: osislatex.h:35