Dear all, You can find an implementation of nomencl support in the attachments. there are two diffs and the tgz file for the new files.
I basically developed everything deriving from the index counterpart.
Files in the directory frontend should be OK ( except the silly
constructors), since they are very straightforward. I should admit
that, I had some difficulties in LFUNs since I am quite new on them.
But they seem to be working :)..
The main questionable development is in insetCommandParams class. I
have changed the scanCommand() and getCommand() functions a bit. So
that it can parse the commands in the form:
\command [option 1] [option 2] {content 1} {content 2}
where previously it could parse only the form \command [option 1]
[option 2] {content 1}. Unfortunately, I am not a LaTeX guy, and I
cannot foresee any problems that may be introduced with this
development. I have tested some lyx functionalities that uses
scanCommand() function, and it seems OK. However, I have no idea if
for some extreme cases this can create problems. Therefore I would be
glad if somebody checks them.
and last of all, I developed this against the lyx 1.5.x. However, (if
insetCommandParams mod. is correct) there is no reason not to add this
functionality in lyx 1.4.x
with my kindest regards,
ugras
Index: LyXAction.C
===================================================================
--- LyXAction.C (revision 14934)
+++ LyXAction.C (working copy)
@@ -3,10 +3,10 @@
* This file is part of LyX, the document processor.
* Licence details can be found in the file COPYING.
*
- * \author Lars Gullik Bjønnes
+ * \author Lars Gullik Bjnnes
* \author Jean-Marc Lasgouttes
* \author John Levon
- * \author André Pönitz
+ * \author Andr�P�itz
*
* Full author contact details are available in file CREDITS.
*/
@@ -359,6 +359,8 @@
{ LFUN_MOUSE_TRIPLE, "", ReadOnly },
{ LFUN_PARAGRAPH_MOVE_DOWN, "paragraph-move-down", Noop },
{ LFUN_PARAGRAPH_MOVE_UP, "paragraph-move-up", Noop },
+ { LFUN_NOMENCL_INSERT, "nomencl-insert", Noop },
+ { LFUN_NOMENCL_PRINT, "nomencl-print", Noop },
{ LFUN_NOACTION, "", Noop }
};
Index: LaTeXFeatures.C
===================================================================
--- LaTeXFeatures.C (revision 14934)
+++ LaTeXFeatures.C (working copy)
@@ -3,11 +3,11 @@
* This file is part of LyX, the document processor.
* Licence details can be found in the file COPYING.
*
- * \author José Matos
- * \author Lars Gullik Bjønnes
+ * \author Jos�Matos
+ * \author Lars Gullik Bjnnes
* \author Jean-Marc Lasgouttes
- * \author Jürgen Vigna
- * \author André Pönitz
+ * \author Jrgen Vigna
+ * \author Andr�P�itz
*
* Full author contact details are available in file CREDITS.
*/
@@ -383,6 +383,12 @@
packages << "\\usepackage[dot]{bibtopic}\n";
}
+ if (isRequired("nomencl")) {
+ packages << "\\usepackage{nomencl}\n"
+ << "\\makeglossary\n";
+ }
+
+
return packages.str();
}
Index: insets/insetbase.h
===================================================================
--- insets/insetbase.h (revision 14934)
+++ insets/insetbase.h (working copy)
@@ -317,7 +317,11 @@
///
VSPACE_CODE,
///
- MATHMACROARG_CODE
+ MATHMACROARG_CODE,
+ ///
+ NOMENCL_CODE,
+ ///
+ NOMENCL_PRINT_CODE
};
/** returns the Code corresponding to the \c name.
Index: insets/insetcommandparams.C
===================================================================
--- insets/insetcommandparams.C (revision 14934)
+++ insets/insetcommandparams.C (working copy)
@@ -28,19 +28,20 @@
InsetCommandParams::InsetCommandParams(string const & n,
string const & c,
string const & o,
- string const & s)
- : cmdname(n), contents(c), options(o), sec_options(s),
+ string const & s,
+ string const & sc)
+ : cmdname(n), contents(c), options(o), sec_options(s), sec_contents(sc),
preview_(false)
{}
void InsetCommandParams::scanCommand(string const & cmd)
{
- string tcmdname, toptions, tsecoptions, tcontents;
+ string tcmdname, toptions, tsecoptions, tcontents,tseccontents;
if (cmd.empty()) return;
- enum { WS, CMDNAME, OPTION, SECOPTION, CONTENT } state = WS;
+ enum { WS, CMDNAME, OPTION, CONTENT } state = WS;
// Used to handle things like \command[foo[bar]]{foo{bar}}
int nestdepth = 0;
@@ -52,55 +53,55 @@
(state == CMDNAME && c == '{')) {
state = WS;
}
- if ((state == OPTION && c == ']') ||
- (state == SECOPTION && c == ']') ||
- (state == CONTENT && c == '}')) {
- if (nestdepth == 0) {
- state = WS;
- } else {
- --nestdepth;
- }
+ if((state == OPTION && c == ']')||
+ (state == CONTENT && c == '}')) {
+ --nestdepth;
}
- if ((state == OPTION && c == '[') ||
- (state == SECOPTION && c == '[') ||
- (state == CONTENT && c == '{')) {
+ if((state == OPTION && c == '[')||
+ (state == CONTENT && c == '{')) {
++nestdepth;
}
+ if(state != CMDNAME &&!nestdepth) {
+ if(state == OPTION && toptions.empty()){
+ toptions = tsecoptions;
+ tsecoptions.clear();
+ }
+ if(state == CONTENT && tcontents.empty()){
+ tcontents= tseccontents;
+ tseccontents.clear();
+ }
+ state = WS;
+ }
switch (state) {
case CMDNAME: tcmdname += c; break;
- case OPTION: toptions += c; break;
- case SECOPTION: tsecoptions += c; break;
- case CONTENT: tcontents += c; break;
+ case OPTION: tsecoptions += c; break;
+ case CONTENT: tseccontents += c; break;
case WS: {
- char const b = i? cmd[i-1]: 0;
if (c == '\\') {
state = CMDNAME;
- } else if (c == '[' && b != ']') {
- state = OPTION;
- nestdepth = 0; // Just to be sure
- } else if (c == '[' && b == ']') {
- state = SECOPTION;
- nestdepth = 0; // Just to be sure
- } else if (c == '{') {
- state = CONTENT;
- nestdepth = 0; // Just to be sure
}
- break;
+ if (c == '[') {
+ state = OPTION; ++nestdepth;
+ }
+ if (c == '{') {
+ state = CONTENT; ++nestdepth;
+ }
}
}
}
-
// Don't mess with this.
if (!tcmdname.empty()) setCmdName(tcmdname);
if (!toptions.empty()) setOptions(toptions);
if (!tsecoptions.empty()) setSecOptions(tsecoptions);
if (!tcontents.empty()) setContents(tcontents);
+ if (!tseccontents.empty()) setSecContents(tseccontents);
if (lyxerr.debugging(Debug::PARSER))
lyxerr << "Command <" << cmd
<< "> == <" << getCommand()
<< "> == <" << getCmdName()
<< '|' << getContents()
+ << '|' << getSecContents()
<< '|' << getOptions()
<< '|' << getSecOptions() << '>' << endl;
}
@@ -151,6 +152,7 @@
s += '[' + getSecOptions() + ']';
}
s += '{' + getContents() + '}';
+ if(!getSecContents().empty()) s += '{' + getSecContents() + '}';
return s;
}
@@ -160,6 +162,7 @@
{
return o1.getCmdName() == o2.getCmdName()
&& o1.getContents() == o2.getContents()
+ && o1.getSecContents() == o2.getSecContents()
&& o1.getOptions() == o2.getOptions()
&& o1.getSecOptions() == o2.getSecOptions()
&& o1.preview() == o2.preview();
Index: insets/insetcommand.h
===================================================================
--- insets/insetcommand.h (revision 14934)
+++ insets/insetcommand.h (working copy)
@@ -5,7 +5,7 @@
* Licence details can be found in the file COPYING.
*
* \author Angus Leeming
- * \author Lars Gullik Bjønnes
+ * \author Lars Gullik Bjnnes
*
* Full author contact details are available in file CREDITS.
*/
@@ -91,6 +91,12 @@
p_.setCmdName(n);
}
///
+ void setSecContents(std::string const & c)
+ {
+ updateButtonLabel_ = true;
+ p_.setSecContents(c);
+ }
+ ///
void setOptions(std::string const & o)
{
updateButtonLabel_ = true;
Index: insets/insetcommandparams.h
===================================================================
--- insets/insetcommandparams.h (revision 14934)
+++ insets/insetcommandparams.h (working copy)
@@ -15,6 +15,7 @@
#include <string>
#include <iosfwd>
+#include "debug.h"
class LyXLex;
@@ -27,7 +28,8 @@
explicit InsetCommandParams(std::string const & n,
std::string const & c = std::string(),
std::string const & o = std::string(),
- std::string const & s = std::string());
+ std::string const & s = std::string(),
+ std::string const & sc = std::string());
///
void read(LyXLex &);
/// Parse the command
@@ -45,14 +47,20 @@
///
std::string const & getContents() const { return contents; }
///
+ std::string const & getSecContents() const { return sec_contents; }
+ ///
void setCmdName(std::string const & n) { cmdname = n; }
///
void setOptions(std::string const & o) { options = o; }
///
- void setSecOptions(std::string const & s) { sec_options = s; }
+ void setSecOptions(std::string const & s) { sec_options = s; if (lyxerr.debugging(Debug::PARSER))
+ lyxerr << "Sec options set as <" << s;
+}
///
void setContents(std::string const & c) { contents = c; }
///
+ void setSecContents(std::string const & s) { sec_contents = s; }
+ ///
bool preview() const { return preview_; }
///
void preview(bool p) { preview_ = p; }
@@ -63,6 +71,8 @@
///
std::string contents;
///
+ std::string sec_contents;
+ ///
std::string options;
///
std::string sec_options;
Index: insets/insetbase.C
===================================================================
--- insets/insetbase.C (revision 14934)
+++ insets/insetbase.C (working copy)
@@ -3,7 +3,7 @@
* This file is part of LyX, the document processor.
* Licence details can be found in the file COPYING.
*
- * \author André Pönitz
+ * \author Andr�P�itz
*
* Full author contact details are available in file CREDITS.
*/
@@ -63,6 +63,7 @@
InsetName("accent", InsetBase::ACCENT_CODE),
InsetName("math", InsetBase::MATH_CODE),
InsetName("index", InsetBase::INDEX_CODE),
+ InsetName("nomenclature", InsetBase::NOMENCL_CODE),
InsetName("include", InsetBase::INCLUDE_CODE),
InsetName("graphics", InsetBase::GRAPHICS_CODE),
InsetName("bibitem", InsetBase::BIBITEM_CODE),
@@ -81,6 +82,7 @@
InsetName("cite", InsetBase::CITE_CODE),
InsetName("float_list", InsetBase::FLOAT_LIST_CODE),
InsetName("index_print", InsetBase::INDEX_PRINT_CODE),
+ InsetName("nomencl_print", InsetBase::NOMENCL_PRINT_CODE),
InsetName("optarg", InsetBase::OPTARG_CODE),
InsetName("environment", InsetBase::ENVIRONMENT_CODE),
InsetName("hfill", InsetBase::HFILL_CODE),
Index: insets/insetcommand.C
===================================================================
--- insets/insetcommand.C (revision 14934)
+++ insets/insetcommand.C (working copy)
@@ -4,7 +4,7 @@
* Licence details can be found in the file COPYING.
*
* \author Angus Leeming
- * \author Lars Gullik Bjønnes
+ * \author Lars Gullik Bjnnes
*
* Full author contact details are available in file CREDITS.
*/
@@ -31,7 +31,7 @@
InsetCommand::InsetCommand(InsetCommandParams const & p,
string const & mailer_name)
- : p_(p.getCmdName(), p.getContents(), p.getOptions(), p.getSecOptions()),
+ : p_(p.getCmdName(), p.getContents(), p.getOptions(), p.getSecOptions(), p.getSecContents() ),
mailer_name_(mailer_name),
updateButtonLabel_(true)
{}
Index: insets/Makefile.am
===================================================================
--- insets/Makefile.am (revision 14934)
+++ insets/Makefile.am (working copy)
@@ -75,6 +75,8 @@
insetinclude.h \
insetindex.C \
insetindex.h \
+ insetnomencl.C \
+ insetnomencl.h \
insetlabel.C \
insetlabel.h \
insetlatexaccent.C \
Index: factory.C
===================================================================
--- factory.C (revision 14934)
+++ factory.C (working copy)
@@ -3,7 +3,7 @@
* This file is part of LyX, the document processor.
* Licence details can be found in the file COPYING.
*
- * \author André Pönitz
+ * \author Andr�P�itz
*
* Full author contact details are available in file CREDITS.
*/
@@ -37,6 +37,7 @@
#include "insets/insethfill.h"
#include "insets/insetinclude.h"
#include "insets/insetindex.h"
+#include "insets/insetnomencl.h"
#include "insets/insetlabel.h"
#include "insets/insetline.h"
#include "insets/insetmarginal.h"
@@ -168,6 +169,10 @@
icp.setContents(contents);
return new InsetIndex(icp);
}
+ case LFUN_NOMENCL_INSERT: {
+ InsetCommandParams icp("nomenclature");
+ return new InsetNomencl(icp);
+ }
case LFUN_TABULAR_INSERT: {
if (cmd.argument().empty())
@@ -193,6 +198,9 @@
case LFUN_INDEX_PRINT:
return new InsetPrintIndex(InsetCommandParams("printindex"));
+ case LFUN_NOMENCL_PRINT:
+ return new InsetPrintNomencl(InsetCommandParams("printglossary"));
+
case LFUN_TOC_INSERT:
return new InsetTOC(InsetCommandParams("tableofcontents"));
@@ -262,10 +270,16 @@
icp);
return new InsetIndex(icp);
- } else if (name == "label") {
+ } else if (name == "nomenclature") {
InsetCommandParams icp;
InsetCommandMailer::string2params(name, lyx::to_utf8(cmd.argument()),
icp);
+ return new InsetNomencl(icp);
+
+ }else if (name == "label") {
+ InsetCommandParams icp;
+ InsetCommandMailer::string2params(name, lyx::to_utf8(cmd.argument()),
+ icp);
return new InsetLabel(icp);
} else if (name == "ref") {
@@ -360,6 +374,8 @@
inset.reset(new InsetBibtex(inscmd));
} else if (cmdName == "index") {
inset.reset(new InsetIndex(inscmd));
+ } else if (cmdName == "nomenclature") {
+ inset.reset(new InsetNomencl(inscmd));
} else if (cmdName == "include") {
inset.reset(new InsetInclude(inscmd));
} else if (cmdName == "label") {
@@ -387,6 +403,10 @@
inset.reset(new InsetFloatList("table"));
} else if (cmdName == "printindex") {
inset.reset(new InsetPrintIndex(inscmd));
+ } else if (cmdName == "printnomencl") {
+ inset.reset(new InsetPrintIndex(inscmd));
+ } else if (cmdName == "printglossary") {
+ inset.reset(new InsetPrintNomencl(inscmd));
} else {
lyxerr << "unknown CommandInset '" << cmdName
<< "'" << std::endl;
Index: lyxfunc.C
===================================================================
--- lyxfunc.C (revision 14934)
+++ lyxfunc.C (working copy)
@@ -4,15 +4,15 @@
* Licence details can be found in the file COPYING.
*
* \author Alfredo Braunstein
- * \author Lars Gullik Bjønnes
+ * \author Lars Gullik Bjnnes
* \author Jean-Marc Lasgouttes
* \author Angus Leeming
* \author John Levon
- * \author André Pönitz
+ * \author Andr�P�itz
* \author Allan Rae
* \author Dekel Tsur
* \author Martin Vermeer
- * \author Jürgen Vigna
+ * \author Jrgen Vigna
*
* Full author contact details are available in file CREDITS.
*/
@@ -1191,6 +1191,7 @@
name == "label" ||
name == "ref" ||
name == "toc" ||
+ name == "nomenclature" ||
name == "url") {
InsetCommandParams p(name);
data = InsetCommandMailer::params2string(name, p);
@@ -1280,6 +1281,10 @@
dispatch(FuncRequest(LFUN_DIALOG_SHOW, "citation"));
break;
}
+ case LFUN_NOMENCL_INSERT: {
+ dispatch(FuncRequest(LFUN_DIALOG_SHOW_NEW_INSET, "nomenclature"));
+ break;
+ }
case LFUN_BUFFER_CHILD_OPEN: {
string const filename =
Index: LaTeX.C
===================================================================
--- LaTeX.C (revision 14934)
+++ LaTeX.C (working copy)
@@ -4,7 +4,7 @@
* Licence details can be found in the file COPYING.
*
* \author Alfredo Braunstein
- * \author Lars Gullik Bjønnes
+ * \author Lars Gullik Bjnnes
* \author Jean-Marc Lasgouttes
* \author Angus Leeming
* \author Dekel Tsur
@@ -156,6 +156,10 @@
string const ind = changeExtension(ofname, ".ind");
unlink(ind);
+ // makeindex file
+ string const gls = changeExtension(ofname, ".gls");
+ unlink(gls);
+
// Also remove the aux file
string const aux = changeExtension(ofname, ".aux");
unlink(aux);
@@ -275,6 +279,14 @@
&& fs::is_empty(changeExtension(file, ".idx"));
// run makeindex
+ if (head.haschanged(onlyFilename(changeExtension(file, ".glo")))) {
+ // no checks for now
+ lyxerr[Debug::LATEX] << "Running MakeIndex." << endl;
+ message(_("Running Makeindex for nomencl"));
+ string nomenclstr = " -s nomencl.ist -o " + changeExtension(file, ".gls");
+ rerun |= runMakeIndexForNonIDX(onlyFilename(changeExtension(file, ".glo")), runparams, nomenclstr);
+ }
+
if (head.haschanged(onlyFilename(changeExtension(file, ".idx")))) {
// no checks for now
lyxerr[Debug::LATEX] << "Running MakeIndex." << endl;
@@ -282,6 +294,7 @@
rerun |= runMakeIndex(onlyFilename(changeExtension(file, ".idx")), runparams);
}
+
// run bibtex
// if (scanres & UNDEF_CIT || scanres & RERUN || run_bibtex)
if (scanres & UNDEF_CIT || run_bibtex) {
@@ -350,6 +363,15 @@
rerun = runMakeIndex(onlyFilename(changeExtension(file, ".idx")), runparams);
}
+ // I am not pretty sure if need this twice.
+ if (head.haschanged(onlyFilename(changeExtension(file, ".glo")))) {
+ // no checks for now
+ lyxerr[Debug::LATEX] << "Running MakeIndex." << endl;
+ message(_("Running MakeIndex for nomencl"));
+ string nomenclstr1 = " -s nomencl.ist -o " + changeExtension(file, ".gls");
+ rerun |= runMakeIndexForNonIDX(onlyFilename(changeExtension(file, ".glo")), runparams, nomenclstr1);
+ }
+
// 2
// we will only run latex more if the log file asks for it.
// or if the sumchange() is true.
@@ -398,15 +420,34 @@
{
lyxerr[Debug::LATEX] << "idx file has been made,"
" running makeindex on file "
- << f << endl;
+ << f << endl;
string tmp = lyxrc.index_command + " ";
tmp = subst(tmp, "$$lang", runparams.document_language);
tmp += quoteName(f);
+ lyxerr[Debug::LATEX] << "idx file has been made,"
+ " running makeindex on file "
+ << tmp << endl;
Systemcall one;
one.startscript(Systemcall::Wait, tmp);
return true;
}
+bool LaTeX::runMakeIndexForNonIDX(string const & f, OutputParams const & runparams, string const & params)
+{
+ lyxerr[Debug::LATEX] << "glo file has been made,"
+ " running makeindex for nomencl on file "
+ << f << endl;
+ string tmp = lyxrc.index_command + " ";
+ tmp = subst(tmp, "$$lang", runparams.document_language);
+ tmp += quoteName(f);
+ tmp += params;
+ lyxerr[Debug::LATEX] << "idx file has been made,"
+ " running makeindex NMCL on file "
+ << tmp << endl;
+ Systemcall one;
+ one.startscript(Systemcall::Wait, tmp);
+ return true;
+}
vector<Aux_Info> const
LaTeX::scanAuxFiles(string const & file)
@@ -711,7 +752,7 @@
// (2) foundfile is in the tmpdir
// insert it into head
if (fs::exists(onlyfile)) {
- static regex unwanted("^.*\\.(aux|log|dvi|bbl|ind|glo)$");
+ static regex unwanted("^.*\\.(aux|log|dvi|bbl|ind)$");
if (regex_match(onlyfile, unwanted)) {
lyxerr[Debug::DEPEND]
<< "We don't want "
@@ -760,6 +801,7 @@
// but instead only a line like this into the log:
// Writing index file sample.idx
static regex reg5("Writing index file ([^ ]+).*");
+ static regex regnomencl("Writing glossary file ([^ ]+).*");
// If a toc should be created, MikTex does not write a line like
// \openout# = `sample.toc'.
// but only a line like this into the log:
@@ -771,7 +813,7 @@
ifstream ifs(logfile.c_str());
while (ifs) {
// Ok, the scanning of files here is not sufficient.
- // Sometimes files are named by "File: xxx" only
+ // Sometimes files are named by "File:xxx" only
// So I think we should use some regexps to find files instead.
// "(\([^ ]+\)" should match the "(file " variant, note
// that we can have several of these on one line.
@@ -808,6 +850,8 @@
handleFoundFile(sub.str(1), head);
else if (regex_match(token, sub, reg5))
handleFoundFile(sub.str(1), head);
+ else if (regex_match(token, sub, regnomencl))
+ handleFoundFile(sub.str(1), head);
else if (regex_match(token, sub, miktexTocReg))
handleFoundFile(changeExtension(file, ".toc"), head);
}
Index: frontends/gtk/Makefile.am
===================================================================
--- frontends/gtk/Makefile.am (revision 14934)
+++ frontends/gtk/Makefile.am (working copy)
@@ -101,6 +101,8 @@
GTexinfo.h \
GText.C \
GText.h \
+ GNomencl.C \
+ GNomencl.h \
GThesaurus.C \
GThesaurus.h \
GTimeout.C \
Index: frontends/gtk/glade/Makefile.am
===================================================================
--- frontends/gtk/glade/Makefile.am (revision 14934)
+++ frontends/gtk/glade/Makefile.am (working copy)
@@ -23,6 +23,7 @@
mathDelim.glade \
mathMatrix.glade \
mathPanel.glade \
+ nomencl.glade \
note.glade \
paragraph.glade \
preferences.glade \
Index: frontends/gtk/Dialogs.C
===================================================================
--- frontends/gtk/Dialogs.C (revision 14934)
+++ frontends/gtk/Dialogs.C (working copy)
@@ -56,6 +56,7 @@
#include "GAboutlyx.h"
#include "GText.h"
+#include "GNomencl.h"
#include "GMathDelim.h"
#include "GBibItem.h"
#include "GBibtex.h"
@@ -136,7 +137,7 @@
char const * const dialognames[] = {
"aboutlyx", "bibitem", "bibtex", "box", "branch", "changes", "character",
"citation", "document", "errorlist" , "ert", "external", "file",
-"findreplace", "float", "graphics", "include", "index", "label", "log",
+"findreplace", "float", "graphics", "include", "index","nomenclature", "label", "log",
"mathpanel", "mathaccents", "matharrows", "mathoperators", "mathrelations",
"mathgreek", "mathmisc", "mathdots", "mathbigoperators", "mathamsmisc",
"mathamsarrows", "mathamsrelations", "mathamsnegatedrelations",
@@ -264,6 +265,13 @@
dialog->setView(new GText(*dialog,
_("Index Entry"), _("Keyword:|#K")));
dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
+ } else if (name == "nomenclature") {
+ dialog->bc().view(new GBC(dialog->bc()));
+ dialog->setController(new ControlCommand(*dialog, name));
+ dialog->setView(new GNomencl(*dialog,
+ _("Notation Entry"),
+ _("Keyword:")));
+ dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
} else if (name == "label") {
dialog->bc().view(new GBC(dialog->bc()));
dialog->setController(new ControlCommand(*dialog, name));
Index: frontends/qt3/Makefile.am
===================================================================
--- frontends/qt3/Makefile.am (revision 14934)
+++ frontends/qt3/Makefile.am (working copy)
@@ -57,6 +57,7 @@
QGraphics.C QGraphics.h \
QInclude.C QInclude.h \
QIndex.C QIndex.h \
+ QNomencl.C QNomencl.h \
QLImage.C QLImage.h \
QLog.C QLog.h \
QViewSource.C QViewSource.h \
Index: frontends/qt3/Dialogs.C
===================================================================
--- frontends/qt3/Dialogs.C (revision 14934)
+++ frontends/qt3/Dialogs.C (working copy)
@@ -66,6 +66,7 @@
#include "QGraphics.h"
#include "QInclude.h"
#include "QIndex.h"
+#include "QNomencl.h"
#include "QLog.h"
#include "QViewSource.h"
#include "QMath.h"
@@ -104,7 +105,7 @@
char const * const dialognames[] = {
"aboutlyx", "bibitem", "bibtex", "box", "branch", "changes", "character",
"citation", "document", "errorlist", "ert", "external", "file",
-"findreplace", "float", "graphics", "include", "index", "label", "log", "view-source",
+"findreplace", "float", "graphics", "include", "index","nomenclature", "label", "log", "view-source",
"mathpanel", "mathdelimiter", "mathmatrix", "note", "paragraph",
"prefs", "print", "ref", "sendto", "spellchecker","tabular", "tabularcreate",
@@ -219,6 +220,12 @@
_("Index Entry"),
qt_("&Keyword:")));
dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
+ } else if (name == "nomenclature") {
+ dialog->setController(new ControlCommand(*dialog, name));
+ dialog->setView(new QNomencl(*dialog,
+ _("Notation Entry"),
+ qt_("&Keyword:")));
+ dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
} else if (name == "label") {
dialog->setController(new ControlCommand(*dialog, name));
dialog->setView(new QIndex(*dialog,
Index: frontends/qt4/Makefile.dialogs
===================================================================
--- frontends/qt4/Makefile.dialogs (revision 14934)
+++ frontends/qt4/Makefile.dialogs (working copy)
@@ -33,6 +33,7 @@
QGraphicsUi.ui \
QIncludeUi.ui \
QIndexUi.ui \
+ QNomenclUi.ui \
QLogUi.ui \
QViewSourceUi.ui \
QMathUi.ui \
@@ -104,6 +105,7 @@
QGraphicsDialog.C QGraphicsDialog.h \
QIncludeDialog.C QIncludeDialog.h \
QIndexDialog.C QIndexDialog.h \
+ QNomenclDialog.C QNomenclDialog.h \
QLogDialog.C QLogDialog.h \
QViewSourceDialog.C QViewSourceDialog.h \
QViewSource.C QViewSource.h \
Index: frontends/qt4/Makefile.am
===================================================================
--- frontends/qt4/Makefile.am (revision 14934)
+++ frontends/qt4/Makefile.am (working copy)
@@ -59,6 +59,7 @@
QGraphics.C QGraphics.h \
QInclude.C QInclude.h \
QIndex.C QIndex.h \
+ QNomencl.C QNomencl.h \
QLImage.C QLImage.h \
QLog.C QLog.h \
QViewSource.C QViewSource.h \
Index: frontends/qt4/Dialogs.C
===================================================================
--- frontends/qt4/Dialogs.C (revision 14934)
+++ frontends/qt4/Dialogs.C (working copy)
@@ -61,6 +61,7 @@
#include "QGraphics.h"
#include "QInclude.h"
#include "QIndex.h"
+#include "QNomencl.h"
#include "QLog.h"
#include "QViewSource.h"
#include "QMath.h"
@@ -100,7 +101,7 @@
char const * const dialognames[] = {
"aboutlyx", "bibitem", "bibtex", "box", "branch", "changes", "character",
"citation", "document", "errorlist", "ert", "external", "file",
-"findreplace", "float", "graphics", "include", "index", "label", "log", "view-source",
+"findreplace", "float", "graphics", "include", "index","nomenclature", "label", "log", "view-source",
"mathpanel", "mathdelimiter", "mathmatrix", "note", "paragraph",
"prefs", "print", "ref", "sendto", "spellchecker","tabular", "tabularcreate",
@@ -216,6 +217,12 @@
_("Index Entry"),
qt_("&Keyword:")));
dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
+ } else if (name == "nomenclature") {
+ dialog->setController(new ControlCommand(*dialog, name));
+ dialog->setView(new QNomencl(*dialog,
+ _("Notation Entry"),
+ qt_("&Keyword:")));
+ dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
} else if (name == "label") {
dialog->setController(new ControlCommand(*dialog, name));
dialog->setView(new QIndex(*dialog,
Index: text3.C
===================================================================
--- text3.C (revision 14934)
+++ text3.C (working copy)
@@ -4,11 +4,11 @@
* Licence details can be found in the file COPYING.
*
* \author Asger Alstrup
- * \author Lars Gullik Bjønnes
+ * \author Lars Gullik Bjønnes
* \author Alfredo Braunstein
* \author Angus Leeming
* \author John Levon
- * \author André Pönitz
+ * \author André Pönitz
*
* Full author contact details are available in file CREDITS.
*/
@@ -1195,6 +1195,7 @@
}
case LFUN_INDEX_PRINT:
+ case LFUN_NOMENCL_PRINT:
case LFUN_TOC_INSERT:
case LFUN_HFILL_INSERT:
case LFUN_LINE_INSERT:
@@ -1572,6 +1573,8 @@
code = InsetBase::INCLUDE_CODE;
else if (cmd.argument() == "index")
code = InsetBase::INDEX_CODE;
+ else if (cmd.argument() == "nomenclature")
+ code = InsetBase::NOMENCL_CODE;
else if (cmd.argument() == "label")
code = InsetBase::LABEL_CODE;
else if (cmd.argument() == "note")
@@ -1654,6 +1657,12 @@
case LFUN_INDEX_PRINT:
code = InsetBase::INDEX_PRINT_CODE;
break;
+ case LFUN_NOMENCL_INSERT:
+ code = InsetBase::NOMENCL_CODE;
+ break;
+ case LFUN_NOMENCL_PRINT:
+ code = InsetBase::NOMENCL_PRINT_CODE;
+ break;
case LFUN_TOC_INSERT:
code = InsetBase::TOC_CODE;
break;
Index: LaTeX.h
===================================================================
--- LaTeX.h (revision 14934)
+++ LaTeX.h (working copy)
@@ -4,7 +4,7 @@
* This file is part of LyX, the document processor.
* Licence details can be found in the file COPYING.
*
- * \author Lars Gullik Bjønnes
+ * \author Lars Gullik Bjnnes
* \author Angus Leeming
* \author Dekel Tsur
*
@@ -159,6 +159,9 @@
bool runMakeIndex(std::string const &, OutputParams const &);
///
+ bool runMakeIndexForNonIDX(std::string const & f, OutputParams const &, std::string const &);
+ ///
+
std::vector<Aux_Info> const scanAuxFiles(std::string const &);
///
Index: lfuns.h
===================================================================
--- lfuns.h (revision 14934)
+++ lfuns.h (working copy)
@@ -300,7 +300,7 @@
LFUN_ALL_CHANGES_ACCEPT, // Levon 20021016
// 225
LFUN_ALL_CHANGES_REJECT, // Levon 20021016
- LFUN_BIBITEM_INSERT, // André 14 Feb 2003
+ LFUN_BIBITEM_INSERT, // Andr�14 Feb 2003
LFUN_DIALOG_SHOW,
LFUN_DIALOG_SHOW_NEW_INSET,
LFUN_DIALOG_UPDATE,
@@ -366,7 +366,9 @@
LFUN_CLIPBOARD_PASTE,
// 280
LFUN_INSET_DISSOLVE, // jspitzm 20060807
-
+ LFUN_NOMENCL_INSERT, // Ugras
+ LFUN_NOMENCL_PRINT, // Ugras
+ //285
LFUN_LASTACTION // end of the table
};
nomencl_files.tgz
Description: GNU Zip compressed data
Index: ui/stdtoolbars.ui =================================================================== --- ui/stdtoolbars.ui (revision 14934) +++ ui/stdtoolbars.ui (working copy) @@ -76,6 +76,7 @@ Item "Insert cross-reference" "dialog-show-new-inset ref" Item "Insert citation" "dialog-show-new-inset citation" Item "Insert index entry" "index-insert" + Item "Insert notation entry" "nomencl-insert" Separator Item "Insert footnote" "footnote-insert" Item "Insert margin note" "marginalnote-insert" Index: ui/classic.ui =================================================================== --- ui/classic.ui (revision 14934) +++ ui/classic.ui (working copy) @@ -4,18 +4,18 @@ # This file is part of LyX, the document processor. # Licence details can be found in the file COPYING. -# author Lars Gullik Bjønnes +# author Lars Gullik Bjønnes # author Jean-Marc Lasgouttes # author Rob Lahaye # author Angus Leeming # author Edwin Leuven # author John Levon -# author André Pönitz +# author André Pönitz # author Allan Rae -# author Jürgen Spitzmüller +# author Jürgen Spitzmüller # author Kayvan Sylvan # author Dekel Tsur -# author Jürgen Vigna +# author Jürgen Vigna # author Herbert Voss # Full author contact details are available in file CREDITS. @@ -221,6 +221,7 @@ Item "Marginal Note|M" "marginalnote-insert" Item "Short Title" "optional-insert" Item "Index Entry|I" "index-insert" + Item "Notation Entry|I" "nomencl-insert" Item "URL...|U" "url-insert" Item "Note|N" "note-insert" Submenu "Lists & TOC|O" "insert_toc" @@ -310,6 +311,7 @@ Item "Table of Contents|C" "toc-insert" FloatListInsert Item "Index List|I" "index-print" + Item "Notation|N" "nomencl-print" Item "BibTeX Bibliography...|B" "dialog-show-new-inset bibtex" End Index: ui/stdmenus.ui =================================================================== --- ui/stdmenus.ui (revision 14934) +++ ui/stdmenus.ui (working copy) @@ -261,6 +261,7 @@ Item "Cross-reference...|r" "dialog-show-new-inset ref" Item "Label...|L" "label-insert" Item "Index Entry|d" "index-insert" + Item "Notation Entry|n" "nomencl-insert" Item "Date" "date-insert" # I'm going to kill this dumb dialog, but for now ... Separator @@ -355,6 +356,7 @@ Item "Table of Contents|C" "toc-insert" FloatListInsert Item "Index List|I" "index-print" + Item "Notation List|N" "nomencl-print" Item "BibTeX Bibliography...|B" "dialog-show-new-inset bibtex" End
