⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tex2any.h

📁 Wxpython Implemented on Windows CE, Source code
💻 H
📖 第 1 页 / 共 3 页
字号:
// Called on error
void OnError(const wxChar *msg);

// Called for information
void OnInform(const wxChar *msg);

// Special yield wrapper
void Tex2RTFYield(bool force = false);

/*
 * Useful utilities
 *
 */

// Look for \label macro, use this ref name if found or
// make up a topic name otherwise.
wxChar *FindTopicName(TexChunk *chunk);
// Force the current topic to be this (e.g. force 'references' label).
void ForceTopicName(const wxChar *name);
void ResetTopicCounter(void);

// Parse unit eg. 14, 12pt, 34cm and return value in points.
int ParseUnitArgument(wxChar *unitArg);

// Set small, large, normal etc. point sizes for reference size
void SetFontSizes(int pointSize);

/*
 * Strip off any extension (dot something) from end of file,
 * IF one exists. Inserts zero into buffer.
 *
 */

void StripExtension(wxChar *buffer);

/*
 * Reference structure
 *
 */

class TexRef: public wxObject
{
 public:
  wxChar *refLabel;      // Reference label
  wxChar *refFile;       // Reference filename (can be NULL)
  wxChar *sectionNumber; // Section or figure number (as a string)
  wxChar *sectionName; // name e.g. 'section'
  TexRef(const wxChar *label, const wxChar *file, const wxChar *section, const wxChar *sectionN = NULL);
  ~TexRef(void);
};

/*
 * Add a reference
 *
 */

void AddTexRef(wxChar *name, wxChar *file = NULL, wxChar *sectionName = NULL,
         int chapter = 0, int section = 0, int subsection = 0, int subsubsection = 0);

/*
 * Read and write reference file (.ref), to resolve refs for second pass.
 *
 */
void WriteTexReferences(wxChar *filename);
void ReadTexReferences(wxChar *filename);

/*
 * Bibliography stuff
 *
 */

class BibEntry: public wxObject
{
 public:
  wxChar *key;

  /*
   * book, inbook, article, phdthesis, inproceedings, techreport
   */
  wxChar *type;

  /*
   * Possible fields
   *
   */
  wxChar *editor;
  wxChar *title;
  wxChar *booktitle;
  wxChar *author;
  wxChar *journal;
  wxChar *volume;
  wxChar *number;
  wxChar *year;
  wxChar *month;
  wxChar *pages;
  wxChar *chapter;
  wxChar *publisher;
  wxChar *address;
  wxChar *institution;
  wxChar *organization;
  wxChar *comment;

  inline BibEntry(void)
  {
    key = NULL;
    type = NULL;
    editor = NULL;
    title = NULL;
    booktitle = NULL;
    author = NULL;
    journal = NULL;
    volume = NULL;
    number = NULL;
    chapter = NULL;
    year = NULL;
    month = NULL;
    pages = NULL;
    publisher = NULL;
    address = NULL;
    institution = NULL;
    organization = NULL;
    comment = NULL;
  }
};

extern wxList BibList;
extern wxStringList CitationList;

bool ReadBib(wxChar *filename);
void OutputBib(void);
void ResolveBibReferences(void);
void AddCitation(wxChar *citeKey);
TexRef *FindReference(wxChar *key);

/*
 * Ability to customize, or at least suppress unknown macro errors
 *
 */

extern wxList CustomMacroList;

#define CUSTOM_MACRO_IGNORE 0
#define CUSTOM_MACRO_OUTPUT 1
#define CUSTOM_MACRO_MARK   2

class CustomMacro: public wxObject
{
public:
    wxChar *macroName;
    wxChar *macroBody;
    int noArgs;
    inline CustomMacro(const wxChar *name, int args, wxChar *body)
    {
        noArgs = args;
        macroName = wxStrcpy(new wxChar[wxStrlen(name) + 1], name);
        if (body)
            macroBody = wxStrcpy(new wxChar[wxStrlen(body) + 1], body);
        else
            macroBody = NULL;
    }
    ~CustomMacro();
};

bool ReadCustomMacros(const wxString& filename);
void ShowCustomMacros(void);
CustomMacro *FindCustomMacro(wxChar *name);
wxChar *ParseMultifieldString(wxChar *s, int *pos);

/*
 * Colour table stuff
 *
 */

class ColourTableEntry: public wxObject
{
 public:
  wxChar *name;
  unsigned int red;
  unsigned int green;
  unsigned int blue;

  ColourTableEntry(const wxChar *theName, unsigned int r,  unsigned int g,  unsigned int b);
  ~ColourTableEntry(void);
};

extern wxList ColourTable;
extern void AddColour(const wxChar *theName, unsigned int r,  unsigned int g,  unsigned int b);
extern int FindColourPosition(wxChar *theName);
// Converts e.g. "red" -> "#FF0000"
extern bool FindColourHTMLString(wxChar *theName, wxChar *buf);
extern void InitialiseColourTable(void);

#define ltABSTRACT          1
#define ltADDCONTENTSLINE   2
#define ltADDTOCOUNTER      3
#define ltALPH1             4
#define ltALPH2             5
#define ltAPPENDIX          6
#define ltARABIC            7
#define ltARRAY             8
#define ltAUTHOR            9

#define ltBACKSLASH         30
#define ltBASELINESKIP      31
#define ltBF                32
#define ltBIBITEM           33
#define ltBIBLIOGRAPHYSTYLE 34
#define ltBIBLIOGRAPHY      35
#define ltBOXIT             36
#define ltBACKSLASHRAW      37
#define ltBACKGROUND        38
#define ltBACKGROUNDCOLOUR  39
#define ltBACKGROUNDIMAGE   40
#define ltBRCLEAR           41

#define ltCAPTIONSTAR       50
#define ltCAPTION           51
#define ltCDOTS             52
#define ltCENTERLINE        53
#define ltCENTERING         54
#define ltCENTER            55
#define ltCEXTRACT          56
#define ltCHAPTERHEADING    57
#define ltCHAPTERSTAR       58
#define ltCHAPTER           59
#define ltCINSERT           60
#define ltCITE              61
#define ltCLASS             62
#define ltCLEARDOUBLEPAGE   63
#define ltCLEARPAGE         64
#define ltCLINE             65
#define ltCLIPSFUNC         66
#define ltCOLUMNSEP         67
#define ltCOMMENT           68
#define ltCOPYRIGHT         69
#define ltCPARAM            70

#define ltCHEAD             71
#define ltCFOOT             72

#define ltCHAPTERHEADINGSTAR 73

#define ltDATE              90
#define ltDESCRIPTION       91
#define ltDESTRUCT          92
#define ltDOCUMENTSTYLE     93
#define ltDOCUMENT          94
#define ltDOUBLESPACE       95
#define ltDEFINECOLOUR      96
#define ltDEFINECOLOR       97

#define ltEM                120
#define ltENUMERATE         121
#define ltEQUATION          122
#define ltEVENSIDEMARGIN    123

#define ltFBOX              150
#define ltFIGURE            151
#define ltFLUSHLEFT         152
#define ltFLUSHRIGHT        153
#define ltFOOTHEIGHT        154
#define ltFOOTNOTE          155
#define ltFOOTSKIP          156
#define ltFRAMEBOX          157
#define ltFUNCTIONSECTION   158
#define ltFUNC              159
#define ltFIGURESTAR        160
#define ltFOOTNOTESIZE      161
#define ltFOOTNOTEPOPUP     162
#define ltFANCYPLAIN        163
#define ltFCOL              164
#define ltBCOL              165
#define ltFOLLOWEDLINKCOLOUR 166

#define ltGLOSSARY          180
#define ltGLOSS             181

#define ltHEADHEIGHT        200
#define ltHELPGLOSSARY      201
#define ltHELPIGNORE        202
#define ltHELPONLY          203
#define ltHELPINPUT         204
#define ltHELPFONTFAMILY    205
#define ltHELPFONTSIZE      206
#define ltHELPREFN          207
#define ltHELPREF           208
#define ltHFILL             209
#define ltHLINE             210
#define ltHRULE             211
#define ltHSPACESTAR        212
#define ltHSPACE            213
#define ltHSKIPSTAR         214
#define ltHSKIP             215
#define lthuge              216
#define ltHuge              217
#define ltHUGE              218
#define ltHTMLIGNORE        219
#define ltHTMLONLY          220

#define ltINCLUDEONLY       240
#define ltINCLUDE           241
#define ltINDEX             242
#define ltINPUT             243
#define ltITEMIZE           244
#define ltITEM              245
#define ltIMAGE             246
#define ltIT                247
#define ltITEMSEP           248
#define ltINDENTED          249
#define ltIMAGEMAP          250
#define ltIMAGER            251
#define ltIMAGEL            252
#define ltINSERTATLEVEL     253

#define ltKILL              260

#define ltLABEL             280
#define ltlarge             281
#define ltLarge             282
#define ltLARGE             283
#define ltLATEX             284
#define ltLBOX              285
#define ltLDOTS             286
#define ltLINEBREAK         287
#define ltLISTOFFIGURES     288
#define ltLISTOFTABLES      289
#define ltLHEAD             290
#define ltLFOOT             291
#define ltLATEXIGNORE       292
#define ltLATEXONLY         293
#define ltLOWERCASE         294
#define ltLBRACERAW         295
#define ltLINKCOLOUR        296

#define ltMAKEGLOSSARY      300
#define ltMAKEINDEX         301
#define ltMAKETITLE         302
#define ltMARKRIGHT         303
#define ltMARKBOTH          304
#define ltMARGINPARWIDTH    305
#define ltMARGINPAR         306
#define ltMARGINPARODD      307
#define ltMARGINPAREVEN     308
#define ltMBOX              309
#define ltMEMBERSECTION     310
#define ltMEMBER            311
#define ltMULTICOLUMN       312
#define ltMARGINPARSEP      313

#define ltNEWCOUNTER        330
#define ltNEWLINE           331
#define ltNEWPAGE           332
#define ltNOCITE            333
#define ltNOINDENT          334
#define ltNOLINEBREAK       335
#define ltNOPAGEBREAK       336
#define ltNORMALSIZE        337

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -