+1999-12-22 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
+
+ * src/buffer.C (getBibkeyList): pass the parameter delim to
+ InsetInclude::getKeys and InsetBibtex::getKeys.
+
+ * src/insets/insetinclude.[Ch] (getKeys): add parameter delim, which
+ is passed to Buffer::getBibkeyList
+
+ * src/insets/insetbib.[Ch] (getKeys): add parameter delim, and use it
+ instead of the hardcoded comma.
+
+ * src/insets/insetbib.C (getKeys): make sure that there are not
+ leading blanks in bibtex keys. Normal latex does not care, but
+ harvard.sty seems to dislike blanks at the beginning of citation
+ keys. In particular, the retturn value of the function is
+
+ * INSTALL: make it clear that libstdc++ is needed and that gcc
+ 2.7.x probably does not work.
+
+ * src/support/filetools.C (findtexfile): make debug message go to
+ the LATEX channel
+ * src/insets/insetbib.C (getKeys): ditto
+
+ * src/debug.C (showTags): make sure that the output is correctly
+ aligned.
+
+ * configure.in: add a comment for TWO_COLOR_ICON define.
+
+ * acconfig.h: remove all the entries that already defined in
+ configure.in or acinclude.m4.
+
+ * src/buffer.C (makeLaTeXFile): headers of latex file also changed
+ to avoid user name, date and copyright.
+
1999-12-21 Juergen Vigna <jug@sad.it>
* src/table.C (Read): Now read bogus row format informations
compilers knows a bit about the C++ standard. Compilers that are known
to compile LyX are gcc 2.8.1 and 2.95.x, the various versions of egcs
and Digital C++ version 6.1. Please tell us your experience with other
-compilers.
+compilers. It is probably _not_ possible to compile LyX with gcc
+2.7.x, but this may change in the future.
+
+Note that, contrary to LyX 1.0.x, LyX 1.1.x makes great use of C++
+Standard Template Library (STL); this means that gcc users will have
+to install the relevant libstdc++ library to be able to compile this
+version.
If you make modifications to files in src/ (for example by applying a
patch), you will need to have the GNU gettext package installed, due to
@TOP@
-/* Define on SunOS 4 and SCO, were some functions are missing from the headers */
-#undef BROKEN_HEADERS
-
-/* Define if you want debugging turned on as default. */
-#undef DEBUG_AS_DEFAULT
-
-/* Define if you are building a development version of LyX */
-#undef DEVEL_VERSION
-
/* Define to 1 if NLS is requested. */
#undef ENABLE_NLS
-/* Define to nothing if your compiler does not understand the
- `explicit' directive */
-#undef explicit
-
/* define this to the location of forms.h to be used with #include,
e.g. <forms.h> */
#undef FORMS_H_LOCATION
-/* define this to the location of stl_string_fwd.h to be used with #include,
- NOTE: Do not set it to <stl_string_fwd.h> as that will find the LyX
- supplied version of the header.
- e.g. <../include/stl_string_fwd.h> or better yet use an absolute path */
-#undef STL_STRING_FWD_H_LOCATION
-
/* Define if your locale.h file contains LC_MESSAGES. */
#undef HAVE_LC_MESSAGES
/* Define as 1 if you have the stpcopy function */
#undef HAVE_STPCPY
-#if 0
-/* Define if the bool type is known to your compiler */
-#undef HAVE_bool
-#endif
-
-/* Define to the name of the distribution. */
-#undef PACKAGE
-
-/* You might want to define TWO_COLOR_ICONS if you want to spare
- your colormap. This will use monochrome icons instead of colored
- ones. */
-#undef TWO_COLOR_ICONS
-
-/* Define to the version of the distribution. */
-#undef VERSION
-
-/* Define this if you want to see the #warning directives put here and
- there by the developpers to get attention */
-#undef WITH_WARNINGS
+/* define this to the location of stl_string_fwd.h to be used with #include,
+ NOTE: Do not set it to <stl_string_fwd.h> as that will find the LyX
+ supplied version of the header.
+ e.g. <../include/stl_string_fwd.h> or better yet use an absolute path */
+#undef STL_STRING_FWD_H_LOCATION
/* define this to the location of xpm.h to be used with #include,
e.g. <xpm.h> */
### and now some special lyx flags.
AC_ARG_WITH(two-colors,[ --with-two-colors use two color pixmaps],
- [AC_DEFINE(TWO_COLOR_ICONS)
+ [AC_DEFINE(TWO_COLOR_ICONS,1,
+ [You might want to define TWO_COLOR_ICONS if you want to spare
+ your colormap. This will use monochrome icons instead of colored ones.])
lyx_flags="$lyx_flags two-colors"])
AC_ARG_ENABLE(assertions,
[ --enable-assertions add runtime sanity checks in the program],,
string LFile;
if (!only_body && nice) {
- LFile += "%% This LaTeX-file was created by <";
- LFile += userName + "> " + date();
- LFile += "%% LyX 1.0 (C) 1995-1999 by Matthias Ettrich and the LyX Team\n";
- LFile += "\n%% Do not edit this file unless you know what you are doing.\n";
- texrow.newline();
- texrow.newline();
+ LFile += "%% " LYX_DOCVERSION " created this file. "
+ "For more info, see http://www.lyx.org/.\n";
+ LFile += "%% Do not edit unless you really know what you are doing.\n";
texrow.newline();
texrow.newline();
}
if (inset-> LyxCode() == Inset::BIBTEX_CODE) {
if (!bibkeys.empty())
bibkeys += delim;
- bibkeys += static_cast<InsetBibtex*>(inset)->getKeys();
+ bibkeys += static_cast<InsetBibtex*>(inset)->getKeys(delim);
} else if (inset-> LyxCode() == Inset::INCLUDE_CODE) {
- string bk = static_cast<InsetInclude*>(inset)->getKeys();
+ string bk = static_cast<InsetInclude*>(inset)->getKeys(delim);
if (!bk.empty()) {
if (!bibkeys.empty())
bibkeys += delim;
#include <config.h>
#include "debug.h"
+#include <iomanip>
+using std::setw;
+
struct error_item {
Debug::type level;
char const * name;
void Debug::showTags(ostream & os)
{
for (int i = 0 ; i < numErrorTags ; ++i)
- os << " " << errorTags[i].level
- << " " << errorTags[i].name
+ os << setw(5) << errorTags[i].level
+ << setw(10) << errorTags[i].name
<< " " << errorTags[i].desc << '\n';
os.flush();
}
// This method returns a comma separated list of Bibtex entries
-string InsetBibtex::getKeys()
+string InsetBibtex::getKeys(char delim)
{
// This hack is copied from InsetBibtex::Latex.
// Is it still needed? Probably yes.
while(!tmp.empty()) {
string fil = findtexfile(ChangeExtension(tmp, "bib", false),
"bib");
- lyxerr << "Bibfile: " << fil << endl;
+ lyxerr[Debug::LATEX] << "Bibfile: " << fil << endl;
// If we didn't find a matching file name just fail silently
if (!fil.empty()) {
// This is a _very_ simple parser for Bibtex database
ifstream ifs(fil.c_str());
string linebuf;
while (getline(ifs, linebuf)) {
+ linebuf = frontStrip(linebuf);
if (prefixIs(linebuf, "@")) {
linebuf = subst(linebuf, '{', '(');
linebuf = split(linebuf, tmp, '(');
&& !prefixIs(tmp, "@preamble")) {
linebuf = split(linebuf,
tmp, ',');
+ tmp = frontStrip(strip(tmp));
if (!tmp.empty()) {
- keys += strip(tmp);
- keys += ", ";
+ keys += tmp;
+ keys += delim;
}
}
}
///
int Latex(string & file, signed char fragile);
///
- string getKeys();
+ string getKeys(char delim);
///
unsigned char Editable() const {
return 1;
}
-string InsetInclude::getKeys() const
+string InsetInclude::getKeys(char delim) const
{
string lst;
if (loadIfNeeded()) {
Buffer *tmp = bufferlist.getBuffer(getFileName());
tmp->setParentName("");
- lst = tmp->getBibkeyList(',');
+ lst = tmp->getBibkeyList(delim);
tmp->setParentName(getMasterFilename());
}
/// This returns the list of labels on the child buffer
string getLabel(int) const;
/// This returns the list of bibkeys on the child buffer
- string getKeys() const;
+ string getKeys(char delim) const;
///
void Edit(int, int);
///
string kpsecmd = "kpsewhich --format= " + format + " " + OnlyFilename(fil);
cmdret c = do_popen(kpsecmd);
- lyxerr << "kpse status = " << c.first << "\n"
- << "kpse result = `" << strip(c.second, '\n') << "'" << endl;
+ lyxerr[Debug::LATEX] << "kpse status = " << c.first << "\n"
+ << "kpse result = `" << strip(c.second, '\n')
+ << "'" << endl;
return c.first != -1 ? strip(c.second, '\n') : string();
}