mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 21:40:19 +00:00
Store LaTeXFeatures' externalPreambles as a list<string> rather than a string.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7658 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
f228e41203
commit
4da67cb792
@ -1,3 +1,8 @@
|
||||
2003-09-03 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* scripts/fig2pdftex.sh:
|
||||
* scripts/fig2pstex.sh: fail silently if the input file doesn't exist.
|
||||
|
||||
2003-08-22 José Matos <jamatos@lyx.org>
|
||||
|
||||
* lyx2lyx/lyxconvert_210.py: first attempt to support 0.10.7
|
||||
|
@ -117,6 +117,9 @@ test $# -eq 2 || exit 1
|
||||
input=$1
|
||||
output=$2
|
||||
|
||||
# Fail silently if the file doesn't exist
|
||||
test -r $input || exit 0
|
||||
|
||||
# Strip the extension from ${output}
|
||||
outbase=`echo ${output} | sed 's/[.][^.]*$//'`
|
||||
|
||||
|
@ -28,6 +28,9 @@ type fig2dev > /dev/null || exit 1
|
||||
input=$1
|
||||
output=$2
|
||||
|
||||
# Fail silently if the file doesn't exist
|
||||
test -r $input || exit 0
|
||||
|
||||
# Strip the extension from ${output}
|
||||
outbase=`echo ${output} | sed 's/[.][^.]*$//'`
|
||||
|
||||
|
@ -1,3 +1,9 @@
|
||||
2003-09-03 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* LaTeXFeatures.[Ch]: replace the externalPreambles string with a
|
||||
preamble_snippets list, enabling us to add snippets to the preamble only
|
||||
if the snippet was not there already.
|
||||
|
||||
2003-09-04 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* Chktex.C, converter.C, lyx_cb.C: add #include "support/lyxlib.h".
|
||||
|
@ -106,9 +106,12 @@ bool LaTeXFeatures::isRequired(string const & name) const
|
||||
}
|
||||
|
||||
|
||||
void LaTeXFeatures::addExternalPreamble(string const & pream)
|
||||
void LaTeXFeatures::addExternalPreamble(string const & preamble)
|
||||
{
|
||||
externalPreambles += pream;
|
||||
FeaturesList::const_iterator begin = preamble_snippets.begin();
|
||||
FeaturesList::const_iterator end = preamble_snippets.end();
|
||||
if (find(begin, end, preamble) == end)
|
||||
preamble_snippets.push_back(preamble);
|
||||
}
|
||||
|
||||
|
||||
@ -298,7 +301,11 @@ string const LaTeXFeatures::getPackages() const
|
||||
packages << "]{natbib}\n";
|
||||
}
|
||||
|
||||
packages << externalPreambles;
|
||||
FeaturesList::const_iterator pit = preamble_snippets.begin();
|
||||
FeaturesList::const_iterator pend = preamble_snippets.end();
|
||||
for (; pit != pend; ++pit) {
|
||||
packages << *pit << '\n';
|
||||
}
|
||||
|
||||
return STRCONV(packages.str());
|
||||
}
|
||||
|
@ -83,17 +83,15 @@ public:
|
||||
bool useBabel() const;
|
||||
|
||||
private:
|
||||
string externalPreambles;
|
||||
|
||||
std::list<string> usedLayouts;
|
||||
|
||||
/// Static preamble bits from the external material insets
|
||||
|
||||
|
||||
typedef std::list<string> FeaturesList;
|
||||
///
|
||||
FeaturesList features;
|
||||
///
|
||||
FeaturesList preamble_snippets;
|
||||
///
|
||||
typedef std::set<Language const *> LanguageList;
|
||||
///
|
||||
LanguageList UsedLanguages;
|
||||
|
@ -10,9 +10,6 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include "ExternalTemplate.h"
|
||||
|
||||
#include "lyxlex.h"
|
||||
@ -22,6 +19,8 @@
|
||||
#include "support/filetools.h"
|
||||
#include "support/path_defines.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
using namespace lyx::support;
|
||||
|
||||
using std::endl;
|
||||
|
Loading…
Reference in New Issue
Block a user