1999-09-27 18:44:28 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/* This file is part of
|
1999-11-15 12:01:38 +00:00
|
|
|
* ======================================================
|
1999-09-27 18:44:28 +00:00
|
|
|
*
|
|
|
|
* LyX, The Document Processor
|
|
|
|
*
|
2000-02-04 09:38:32 +00:00
|
|
|
* Copyright 1995 Matthias Ettrich
|
2001-05-30 13:53:44 +00:00
|
|
|
* Copyright 1995-2001 the LyX Team.
|
1999-09-27 18:44:28 +00:00
|
|
|
*
|
1999-11-15 12:01:38 +00:00
|
|
|
* ====================================================== */
|
1999-09-27 18:44:28 +00:00
|
|
|
|
1999-10-02 16:21:10 +00:00
|
|
|
#ifndef LATEXFEATURES_H
|
|
|
|
#define LATEXFEATURES_H
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface
|
|
|
|
#endif
|
|
|
|
|
1999-11-09 23:52:04 +00:00
|
|
|
#include <vector>
|
2000-03-17 10:14:46 +00:00
|
|
|
#include <set>
|
1999-11-09 23:52:04 +00:00
|
|
|
|
1999-10-02 16:21:10 +00:00
|
|
|
#include "LString.h"
|
2000-09-27 17:07:33 +00:00
|
|
|
#include "layout.h"
|
1999-10-02 16:21:10 +00:00
|
|
|
|
1999-09-27 18:44:28 +00:00
|
|
|
class BufferParams;
|
2000-03-17 10:14:46 +00:00
|
|
|
struct Language;
|
1999-10-02 16:21:10 +00:00
|
|
|
|
1999-09-27 18:44:28 +00:00
|
|
|
/** The packages and commands that a buffer needs. This struct
|
2000-08-07 20:58:24 +00:00
|
|
|
contains an entry for each of the latex packages and
|
|
|
|
commands that a buffer might need. This struct is supposed to be
|
|
|
|
extended as the need arises. Remember to update the validate function
|
|
|
|
in buffer.C and paragraph.C when you do so.
|
|
|
|
*/
|
1999-09-27 18:44:28 +00:00
|
|
|
struct LaTeXFeatures {
|
|
|
|
///
|
2000-09-27 17:07:33 +00:00
|
|
|
LaTeXFeatures(BufferParams const &, LyXTextClass::size_type n) ;
|
1999-09-27 18:44:28 +00:00
|
|
|
/// The packaes needed by the document
|
2001-05-08 17:08:44 +00:00
|
|
|
string const getPackages() const;
|
1999-09-27 18:44:28 +00:00
|
|
|
/// The macros definitions needed by the document
|
2001-05-08 17:08:44 +00:00
|
|
|
string const getMacros() const;
|
1999-09-27 18:44:28 +00:00
|
|
|
/// The definitions needed by the document's textclass
|
2001-05-08 17:08:44 +00:00
|
|
|
string const getTClassPreamble() const;
|
2000-07-01 12:54:45 +00:00
|
|
|
///
|
2001-05-08 17:08:44 +00:00
|
|
|
string const getIncludedFiles(string const & fname) const;
|
|
|
|
///
|
2001-05-09 15:20:58 +00:00
|
|
|
void getFloatDefinitions(std::ostream & os) const;
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
|
|
///
|
2001-05-08 17:08:44 +00:00
|
|
|
void showStruct() const;
|
1999-09-27 18:44:28 +00:00
|
|
|
|
2000-06-12 11:27:15 +00:00
|
|
|
/// Provide a string name-space to the requirements
|
|
|
|
void require(string const & name);
|
|
|
|
|
|
|
|
/// Static preamble bits from the external material insets
|
|
|
|
string externalPreambles;
|
|
|
|
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
2000-07-17 14:31:07 +00:00
|
|
|
bool array;
|
|
|
|
///
|
1999-09-27 18:44:28 +00:00
|
|
|
bool color; // color.sty
|
2000-02-29 02:19:17 +00:00
|
|
|
///
|
|
|
|
bool graphicx; // graphicx.sty
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
|
|
|
bool graphics; // graphics.sty
|
|
|
|
///
|
|
|
|
bool setspace; // setspace.sty
|
|
|
|
///
|
|
|
|
bool makeidx; // makeind.sty
|
|
|
|
///
|
|
|
|
bool verbatim; // verbatim.sty
|
|
|
|
///
|
|
|
|
bool longtable; // longtable.sty
|
|
|
|
///
|
2001-05-10 15:53:10 +00:00
|
|
|
//bool algorithm; // algorithm.sty
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
|
|
|
bool rotating; // rotating.sty
|
|
|
|
///
|
|
|
|
bool amssymb; // amssymb.sty
|
|
|
|
///
|
|
|
|
bool latexsym; // latexsym.sty
|
|
|
|
///
|
|
|
|
bool pifont; // pifont.sty
|
|
|
|
///
|
|
|
|
bool subfigure; // subfigure.sty
|
|
|
|
///
|
|
|
|
bool floatflt; // floatflt.sty
|
|
|
|
///
|
|
|
|
bool url; // url.sty
|
2000-05-19 16:46:01 +00:00
|
|
|
///
|
|
|
|
bool varioref; // varioref.sty
|
|
|
|
///
|
|
|
|
bool prettyref; // prettyref.sty
|
2000-06-12 11:27:15 +00:00
|
|
|
///
|
|
|
|
bool chess; // chess.sty
|
2001-07-19 14:12:37 +00:00
|
|
|
///
|
|
|
|
bool natbib; // natbib.sty
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
|
|
///
|
|
|
|
bool lyx;
|
|
|
|
///
|
|
|
|
bool lyxline;
|
|
|
|
/// \noun
|
|
|
|
bool noun;
|
|
|
|
/// \lyxarrow
|
|
|
|
bool lyxarrow;
|
2000-08-07 20:58:24 +00:00
|
|
|
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
|
|
|
bool quotesinglbase;
|
|
|
|
///
|
|
|
|
bool quotedblbase;
|
|
|
|
///
|
|
|
|
bool guilsinglleft;
|
|
|
|
///
|
|
|
|
bool guilsinglright;
|
|
|
|
///
|
|
|
|
bool guillemotleft;
|
|
|
|
///
|
|
|
|
bool guillemotright;
|
2000-08-07 20:58:24 +00:00
|
|
|
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
|
|
|
bool amsstyle;
|
|
|
|
///
|
|
|
|
bool boldsymbol;
|
|
|
|
///
|
|
|
|
bool binom;
|
|
|
|
|
2000-04-04 00:19:15 +00:00
|
|
|
std::vector<bool> layout;
|
2000-08-07 20:58:24 +00:00
|
|
|
|
|
|
|
///
|
2001-06-25 00:06:33 +00:00
|
|
|
bool ParagraphIndent;
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
|
|
|
bool NeedLyXFootnoteCode;
|
|
|
|
///
|
|
|
|
bool NeedLyXMinipageIndent;
|
2000-03-17 10:14:46 +00:00
|
|
|
///
|
2000-04-04 00:19:15 +00:00
|
|
|
typedef std::set<Language const *> LanguageList;
|
2000-03-17 10:14:46 +00:00
|
|
|
///
|
|
|
|
LanguageList UsedLanguages;
|
2000-06-28 13:35:52 +00:00
|
|
|
///
|
2000-12-29 12:48:02 +00:00
|
|
|
typedef std::set<string> UsedFloats;
|
2000-06-28 13:35:52 +00:00
|
|
|
///
|
2000-12-29 12:48:02 +00:00
|
|
|
UsedFloats usedFloats;
|
2000-07-01 12:54:45 +00:00
|
|
|
///
|
2000-07-03 14:33:51 +00:00
|
|
|
typedef std::map<string , string> FileMap;
|
2000-07-01 12:54:45 +00:00
|
|
|
///
|
2000-07-07 07:46:37 +00:00
|
|
|
FileMap IncludedFiles;
|
2000-08-07 20:58:24 +00:00
|
|
|
///
|
2000-04-10 21:40:13 +00:00
|
|
|
BufferParams const & bufferParams() const;
|
|
|
|
private:
|
2000-08-07 20:58:24 +00:00
|
|
|
///
|
2000-04-10 21:40:13 +00:00
|
|
|
BufferParams const & params;
|
1999-09-27 18:44:28 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|