Add GUI support for nomencl options

This commit is contained in:
Juergen Spitzmueller 2024-08-22 08:11:18 +02:00
parent 0ca600b93b
commit 33869b62bf
9 changed files with 740 additions and 344 deletions

View File

@ -11,6 +11,8 @@ changes happened in particular if possible. A good example would be
* Format incremented to 628: Add support for nomentbl-style
nomencl insets:
\nomenclature[<prefix>]{<symbol>}{<description>}{<units>}{<note>}
New buffer param \nomencl_options which holds a comma-separated
list of options (of the nomencl package).
2024-08-12 Jürgen Spitzmüller <spitz@lyx.org>
* Format incremented to 627: Transform nomenclature inset to

View File

@ -9646,14 +9646,12 @@ Verbatim
\end_layout
\begin_layout Verbatim
This is Verbatim.
\end_layout
\begin_layout Verbatim
\noindent
\align block
The following 2 lines are empty:
\end_layout
@ -9666,7 +9664,6 @@ The following 2 lines are empty:
\end_layout
\begin_layout Verbatim
Almost everything is allowed in Verbatim:"%&$§#~'`
\backslash
}][{|
@ -9690,7 +9687,6 @@ Verbatim
\end_layout
\begin_layout Verbatim*
This is Verbatim*.
\end_layout
@ -36773,7 +36769,7 @@ Tabular
\family sans
Document\SpecialChar menuseparator
Settings\SpecialChar menuseparator
Indexes & Nomenclature
Nomenclature
\family default
.
With this,
@ -37282,6 +37278,8 @@ a
\end_layout
\begin_layout Standard
\change_deleted -712698321 1724304988
For subgrouping and tips for using sort entries see the
\series bold
nomencl
@ -37296,6 +37294,8 @@ literal "true"
\end_inset
.
\change_unchanged
\end_layout
\begin_layout Subsection
@ -37336,13 +37336,90 @@ The
\series bold
nomencl
\series default
package offers some options to adjust the appearance of the nomenclature.
Here are some of its options;
package offers
\change_deleted -712698321 1724303919
some
\change_inserted -712698321 1724303922
a range of
\change_unchanged
options to adjust the appearance of the nomenclature.
\change_inserted -712698321 1724303527
They can be set in
\family sans
Document\SpecialChar menuseparator
Settings\SpecialChar menuseparator
Nomenclature
\family default
:
\change_deleted -712698321 1724303912
Here are some of its options;
for more have a look at its documentation:
\change_unchanged
\end_layout
\begin_layout Description
refeq Appends the phrase
\change_inserted -712698321 1724303686
Nomenclature
\begin_inset space ~
\end_inset
style offers the selection between the default style,
which outputs the nomenclature as a list and a tabular style which sets it as a multipart table.
The latter style features two more constituents of the nomenclature entry:
a unit (which is typeset by means of the
\family sans
siunits
\family default
package) and an additional note.
\end_layout
\begin_layout Description
\change_inserted -712698321 1724303561
Add
\begin_inset space ~
\end_inset
to
\begin_inset space ~
\end_inset
table
\begin_inset space ~
\end_inset
of
\begin_inset space ~
\end_inset
contents adds the nomenclature list to the table of contents.
\end_layout
\begin_layout Description
\change_inserted -712698321 1724305361
Add
\begin_inset space ~
\end_inset
equation
\begin_inset space ~
\end_inset
references
\change_deleted -712698321 1724303715
refeq
\change_unchanged
\change_deleted -712698321 1724303716
A
\change_inserted -712698321 1724303717
a
\change_unchanged
ppends the phrase
\begin_inset Quotes eld
\end_inset
@ -37370,7 +37447,27 @@ eq
\end_layout
\begin_layout Description
refpage Appends the phrase
\change_deleted -712698321 1724303727
refpage
\change_inserted -712698321 1724305363
Add
\begin_inset space ~
\end_inset
page
\begin_inset space ~
\end_inset
references
\change_unchanged
\change_deleted -712698321 1724303734
A
\change_inserted -712698321 1724303734
a
\change_unchanged
ppends the phrase
\begin_inset Quotes eld
\end_inset
@ -37394,14 +37491,87 @@ page
page
\family default
\emph default
is the number of the page on which the nomenclature entry appeared
is the number of the page on which the nomenclature entry appear
\change_deleted -712698321 1724305457
ed
\change_inserted -712698321 1724305457
s
\change_unchanged
\end_layout
\begin_layout Description
intoc Inserts the nomenclature in the Table of Contents
\change_deleted -712698321 1724303752
intoc
\change_inserted -712698321 1724303758
Use
\begin_inset space ~
\end_inset
standard
\begin_inset space ~
\end_inset
subgroups
\change_unchanged
\change_deleted -712698321 1724303777
Inserts the nomenclature in the Table of Contents
\change_inserted -712698321 1724305020
uses predefined subgroups (Latin Letters,
Greek Letters,
Superscripts,
Subscripts) to structure the nomenclature list.
Please refer to the
\series bold
nomencl
\series default
documentation,
\begin_inset CommandInset citation
LatexCommand cite
key "nomencl"
literal "true"
\end_inset
,
if you need different subgrouping.
\change_unchanged
\end_layout
\begin_layout Description
\change_inserted -712698321 1724303903
Other
\begin_inset space ~
\end_inset
options lets you insert any of the other options the package provides.
Please refer to the
\series bold
nomencl
\series default
documentation,
\begin_inset CommandInset citation
LatexCommand cite
key "nomencl"
literal "true"
\end_inset
,
for details.
\change_unchanged
\end_layout
\begin_layout Standard
\change_deleted -712698321 1724303935
To use one or more of the options,
add them to the comma-separated document class options list in the
\family sans
@ -37418,73 +37588,183 @@ refpage,
\end_layout
\begin_layout Standard
\change_deleted -712698321 1724303935
\begin_inset VSpace bigskip
\end_inset
\change_unchanged
\end_layout
\begin_layout Standard
You can also use the first two options above only for certain nomenclature entries when you add one of the following commands as last entry to the
\change_deleted -712698321 1724303954
You can also use the first two options above
\change_inserted -712698321 1724306838
With the default style,
if you want to add page or equation references
\change_unchanged
only
\change_deleted -712698321 1724303972
for
\change_inserted -712698321 1724303972
to
\change_unchanged
\change_inserted -712698321 1724303974
selected
\change_deleted -712698321 1724303976
certain
\change_unchanged
nomenclature entries
\change_inserted -712698321 1724303985
,
you can do this by
\change_deleted -712698321 1724303987
when you
\change_unchanged
add
\change_inserted -712698321 1724303990
ing
\change_unchanged
one of the following commands
\change_inserted -712698321 1724304028
in \SpecialChar TeX
mode
\change_unchanged
a
\change_inserted -712698321 1724304042
t
\change_deleted -712698321 1724304042
s
\change_unchanged
\change_inserted -712698321 1724304098
the very end
\change_deleted -712698321 1724304050
last entry to
\change_inserted -712698321 1724304050
of
\change_unchanged
the
\family sans
Description
\family default
field in the nomenclature dialog:
field
\change_deleted -712698321 1724304011
in
\change_inserted -712698321 1724304011
of
\change_unchanged
the nomenclature
\change_inserted -712698321 1724304088
entry
\change_deleted -712698321 1724304016
dialog
\change_unchanged
:
\end_layout
\begin_layout Description
\backslash
nomrefeq Like the
nomrefeq
\change_deleted -712698321 1724304118
Like the
\series bold
refeq
\series default
option
\change_inserted -712698321 1724304130
for an equation reference
\change_unchanged
\end_layout
\begin_layout Description
\backslash
nomrefpage Like the
nomrefpage
\change_deleted -712698321 1724304133
Like the
\series bold
refpage
\series default
option
\change_inserted -712698321 1724304135
for a page reference
\change_unchanged
\end_layout
\begin_layout Description
\backslash
nomrefeqpage Short notation of
nomrefeqpage
\change_deleted -712698321 1724304161
Short notation of
\series bold
\backslash
nomrefeq
\backslash
nomrefpage
\change_inserted -712698321 1724304175
for a combined equation and page reference
\end_layout
\begin_layout Standard
\change_inserted -712698321 1724304216
If you have selected a reference option in document settings,
you can also disable it for selected entries by adding instead either of
\change_unchanged
\end_layout
\begin_layout Description
\backslash
nomnorefeq,
nomnorefeq
\change_deleted -712698321 1724304228
,
\begin_inset space ~
\end_inset
\change_inserted -712698321 1724304229
\end_layout
\begin_layout Description
\backslash
nomnorefpage,
nomnorefpage
\change_deleted -712698321 1724304230
,
\begin_inset space ~
\end_inset
\change_inserted -712698321 1724304231
\end_layout
\begin_layout Description
\backslash
nomnorefeqpage Turns off the corresponding options
nomnorefeqpage
\change_deleted -712698321 1724304230
Turns off the corresponding options
\change_unchanged
\end_layout
\begin_layout Standard
\change_inserted -712698321 1723460016
\change_inserted -712698321 1724306868
Note that you need to add
\begin_inset Flex Code
status collapsed
@ -37501,11 +37781,18 @@ protect
\end_inset
in front of the command if the nomenclature is in a section heading or caption.
in front of these command if the nomenclature is in a section heading or caption.
Also note that these commands do not work in tabular style.
\end_layout
\begin_layout Standard
\change_deleted -712698321 1724304289
Words like
\change_inserted -712698321 1724304292
Expressions such as
\change_unchanged
\begin_inset Quotes eld
\end_inset
@ -37514,7 +37801,11 @@ page
\end_inset
are automatically translated for most document languages.
If not,
If not
\change_inserted -712698321 1724304360
(or if you want a different wording)
\change_unchanged
,
add these lines in front of the nomenclature list as \SpecialChar TeX
code:
\end_layout
@ -37704,7 +37995,17 @@ Printing
\end_layout
\begin_layout Standard
To print the nomenclature,
To
\change_deleted -712698321 1724304544
print
\change_inserted -712698321 1724304545
input
\change_unchanged
the nomenclature
\change_inserted -712698321 1724304556
at the location where it should be printed
\change_unchanged
,
use the menu
\family sans
Insert\SpecialChar menuseparator
@ -37725,9 +38026,36 @@ Nomenclature
\end_inset
will show the place where the nomenclature is printed in the output.
By right-clicking on it,
the amount of space for symbols can be altered.
You can choose between these settings:
\change_inserted -712698321 1724304569
\end_layout
\begin_layout Standard
\change_inserted -712698321 1724304668
With default nomenclature style,
you can adjust the list appearance (space between symbol and description and list indentation)
\change_deleted -712698321 1724304607
B
\change_inserted -712698321 1724304610
b
\change_unchanged
y right-clicking on
\change_inserted -712698321 1724304620
this box.
\change_deleted -712698321 1724304636
it,
the amount of space for symbols can be altered
\change_unchanged
.
You can
\change_deleted -712698321 1724304674
choose
\change_inserted -712698321 1724304674
select
\change_unchanged
between these settings:
\end_layout
\begin_layout Description
@ -37776,14 +38104,14 @@ d
\change_inserted -712698321 1721576994
Note that this guessing might go wrong,
as \SpecialChar LyX
does not know how how the formatted output in your PDF will look like exactly.
does not know how the formatted output in your PDF will look like exactly.
\change_unchanged
\end_layout
\begin_layout Description
\change_inserted -712698321 1721577537
\change_inserted -712698321 1724304720
Longest
\begin_inset space ~
\end_inset
@ -37798,13 +38126,17 @@ width
(set) here you can enter the widest symbol yourself to use its width.
While this is more accurate than the second method,
the disadvantage is that you need to keep this up-to date if new (longer) entries are added to the nomenclature.
the disadvantage is that you need to keep this up to date if new (longer) entries are added to the nomenclature.
\change_unchanged
\end_layout
\begin_layout Description
Custom custom space
\change_inserted -712698321 1724304744
as specified in the widget.
\change_unchanged
\end_layout
\begin_layout Standard
@ -37851,7 +38183,13 @@ nomname{List of Symbols}}}
\end_layout
\begin_layout Standard
When you are using another document language than English,
\change_deleted -712698321 1724304772
When
\change_inserted -712698321 1724304772
If
\change_unchanged
you are using another document language than English,
replace
\begin_inset Newline newline
\end_inset
@ -37866,7 +38204,13 @@ captionsenglish
\series bold
\backslash
extras***
\change_deleted -712698321 1724304814
extras
\change_inserted -712698321 1724304814
captions
\change_unchanged
***
\series default
,
where *** is the name of the language used.
@ -52286,10 +52630,20 @@ nolink "false"
\end_inset
for details).
\change_inserted -712698321 1724303218
\change_inserted -712698321 1724253333
Moreover,
you can select a nomenclature style (see section
\end_layout
\begin_layout Section
\change_inserted -712698321 1724303226
Nomenclature
\end_layout
\begin_layout Standard
\change_inserted -712698321 1724303279
Here you can select a nomenclature style and select among some options that determine the output of the nomenclature list (see section
\begin_inset space ~
\end_inset

View File

@ -9302,12 +9302,10 @@ Unformatiert
\end_layout
\begin_layout Verbatim
Dies ist Unformatiert.
\end_layout
\begin_layout Verbatim
Die folgenden 2 Zeilen sind leer:
\end_layout
@ -9320,7 +9318,6 @@ Die folgenden 2 Zeilen sind leer:
\end_layout
\begin_layout Verbatim
Fast alles ist in Unformatiert erlaubt:"%&$§#~'`
\backslash
}][{|
@ -9346,7 +9343,6 @@ Unformatiert
\end_layout
\begin_layout Verbatim*
Dies ist Unformatiert*.
\end_layout
@ -35804,10 +35800,7 @@ Nomenklatur
\begin_layout Standard
Manchmal benötigen Sie vielleicht ein Verzeichnis von Symbolen oder Begriffen mit deren Bedeutung eine sogenannte Nomenklatur bzw.
\begin_inset space ~
\end_inset
ein Glossar.
ein Glossar.
\end_layout
\begin_layout Standard
@ -35876,7 +35869,11 @@ Nom
wird eingefügt.
Falls der Cursor direkt hinter einem Wort steht,
wird dieses hineinkopiert.
Ein Nomenklatur-Eintrag besteht im Standard-Stil aus zwei Hauptteilen:
\end_layout
\begin_layout Standard
Ein Nomenklatur-Eintrag besteht im Standard-Stil aus zwei Hauptteilen:
das
\family sans
Symbol
@ -35899,7 +35896,7 @@ Wenn Sie in
\family sans
Dokument\SpecialChar menuseparator
Einstellungen\SpecialChar menuseparator
Stichwortverzeichnis & Nomenklatur
Nomenklatur
\family default
den Nomenklatur-Stil
\begin_inset Quotes gld
@ -36095,24 +36092,6 @@ Einfügen
Dann stimmt die Sortierreihenfolge wieder.
\end_layout
\begin_layout Standard
Um verschachtelte Nomenklaturen zu erstellen,
lesen Sie bitte in der
\series bold
nomencl
\series default
-Dokumentation nach,
\begin_inset CommandInset citation
LatexCommand cite
key "nomencl"
literal "true"
\end_inset
.
\end_layout
\begin_layout Subsection
Nomenklatur-Optionen
\begin_inset Index idx
@ -36151,78 +36130,134 @@ Das Paket
\series bold
nomencl
\series default
bietet einige Optionen an um das Aussehen der Nomenklatur zu verändern.
Hier sind einige seiner Optionen,
für weitere siehe seine Dokumentation:
bietet eine Reihe von Optionen an,
um das Aussehen des Nomenklaturverzeichnisses zu verändern.
Diese können Sie in
\family sans
Dokument\SpecialChar menuseparator
Einstellungen\SpecialChar menuseparator
Nomenklatur
\family default
verwalten:
\end_layout
\begin_layout Description
refeq Verweis mit dem Ausdruck
Nomenklatur-Stil bietet Ihnen die Auswahl zwischen dem Standard-Stil,
der das Nomenklaturverzeichnis als Liste ausgibt,
und dem Tabellen-Stil,
der es als mehrseitige Tabelle setzt.
Im letzteren haben Sie zwei zusätzliche Konstituenten zur Verfügung:
(Maß-)Einheit (welche mithilfe des Pakets
\family sans
siunits
\family default
gesetzt wird) sowie ein Feld für zusätzliche Anmerkungen.
\end_layout
\begin_layout Description
Zum
\begin_inset space ~
\end_inset
Inhaltsverzeichnis
\begin_inset space ~
\end_inset
hinzufügen fügt das Nomenklaturverzeichnis ins Inhaltsverzeichnis ein.
\end_layout
\begin_layout Description
Gleichungsverweise
\begin_inset space ~
\end_inset
hinzufügen fügt den Einträgen den Zusatz
\family sans
„,
siehe Gleichung (#)
\family default
“ an,
wobei (#) die Nummer der letzten Gleichung vor dem jeweiligen Nomenklatureintrag ist.
\end_layout
\begin_layout Description
refpage Verweis mit dem Ausdruck
\family sans
„,
Seite (#)
\family default
\end_layout
\begin_layout Description
intoc fügt die Nomenklatur ins Inhaltsverzeichnis ein.
\end_layout
\begin_layout Standard
Um eine oder mehrere Optionen benutzen zu können,
fügen Sie sie,
durch Kommas getrennt,
in das Feld
\family sans
Optionen
\family default
von
\family sans
Dokument\SpecialChar menuseparator
Einstellungen\SpecialChar menuseparator
Dokumentklasse
\family default
ein.
In diesem Dokument werden die Optionen
\series bold
refpage,
intoc
\series default
verwendet.
\end_layout
\begin_layout Standard
\begin_inset VSpace bigskip
Seitenverweise
\begin_inset space ~
\end_inset
einfügen fügt den Einträgen den Zusatz
\family sans
„,
Seite #
\family default
“ an,
wobei # die Paginierung der Seite ist,
auf der der jeweilige Eintrag erscheint.
\end_layout
\begin_layout Description
Standard-Untergruppen
\begin_inset space ~
\end_inset
verwenden verwendet vordefinierte Untergruppen (lateinische Buchstaben,
griechische Buchstaben,
Hochgestellt,
Tiefgestellt),
um das Nomenklaturverzeichnis zu strukturieren.
Wenn Sie eine andere Strukturierung brauchen,
konsultieren Sie bitte die
\series bold
nomencl
\series default
-Dokumentation
\begin_inset CommandInset citation
LatexCommand cite
key "nomencl"
literal "true"
\end_inset
.
\end_layout
\begin_layout Description
Andere
\begin_inset space ~
\end_inset
Optionen ermöglicht es Ihnen,
jede weitere Option des Pakets einzufügen.
Bitte konsultieren Sie bitte die
\series bold
nomencl
\series default
-Dokumentation
\begin_inset CommandInset citation
LatexCommand cite
key "nomencl"
literal "true"
\end_inset
für Einzelheiten.
\end_layout
\begin_layout Standard
Die ersten beiden Optionen können Sie auch nur für gewisse Nomenklatureinträge benutzen,
Falls Sie Seiten- oder Gleichungsverweise nur für einzelne Nomenklatureinträge verwenden wollen,
können Sie dies im Standardstil tun,
wenn Sie als letzten Eintrag im Feld
\family sans
Beschreibung
\family default
folgendes schreiben:
im \SpecialChar TeX
-Modus folgendes schreiben:
\end_layout
\begin_layout Description
\backslash
nomrefeq wie die Option
\series bold
refeq
nomrefeq für einen Gleichungsverweis
\end_layout
\begin_layout Description
@ -36232,44 +36267,42 @@ refeq
\backslash
nomrefpage
\series default
wie die Option
\series bold
refpage
\series default
für einen Seitenverweis
\end_layout
\begin_layout Description
\backslash
nomrefeqpage ist die Kurzform von
\series bold
nomrefeqpage für einen kombinierten Gleichungs- und Seitenverweis
\end_layout
\backslash
nomrefeq
\begin_layout Standard
Falls Sie eine Verweis-Option in den Dokumenteinstellungen ausgewählt haben,
können Sie diese für einzelne Einträge auch deaktivieren.
Schreiben Sie hierfür an die genannte Position statt dessen eines dieser Befehle
\end_layout
\begin_layout Description
\backslash
nomnorefeq,
\begin_inset space ~
\end_inset
nomnorefeq
\end_layout
\begin_layout Description
\backslash
nomnorefpage,
\begin_inset space ~
\end_inset
nomnorefpage
\end_layout
\begin_layout Description
\backslash
nomnorefeqpage schaltet die entsprechende Option ab
nomnorefeqpage
\end_layout
\begin_layout Standard
Beachten Sie,
dass Sie dem Befehl
dass Sie den Befehlen
\begin_inset Flex Code
status collapsed
@ -36283,6 +36316,8 @@ protect
voranstellen müssen,
wenn sich der Nomenklatureintrag in einer Überschrift oder Legende befindet.
Beachten Sie weiterhin,
dass diese Befehle im Tabellenstil nichts bewirken.
\end_layout
\begin_layout Standard
@ -36297,7 +36332,7 @@ Seite
automatisch übersetzt.
Wenn Sie diese Übersetzungen ändern wollen,
fügen Sie diese Zeilen als \SpecialChar TeX
-Code vor dem Nomenklatueverzeichnis ein:
-Code vor dem Nomenklaturverzeichnis ein:
\end_layout
\begin_layout Standard
@ -36370,7 +36405,7 @@ Wenn die Nummern Hyperlinks sein sollen,
\family sans
Hyperref-Unterstützung
\family default
in den Documenteinstellungen unter
in den Dokumenteinstellungen unter
\family sans
PDF-Eigenschaften
\family default
@ -36445,7 +36480,7 @@ nobreakspace{}#1}}
\end_layout
\begin_layout Subsection
Nomenklatur drucken
Nomenklaturverzeichnis drucken
\begin_inset Index idx
range none
pageformat default
@ -36477,25 +36512,19 @@ Einfügen\SpecialChar menuseparator
Verzeichnis\SpecialChar menuseparator
Nomenklatur
\family default
können Sie ein Nomenklatur
\begin_inset ERT
status collapsed
\begin_layout Plain Layout
"=
\end_layout
\end_inset
Verzeichnis einfügen.
können Sie ein Nomenklaturverzeichnis einfügen.
An der Stelle erscheint ein Kästchen mit der Aufschrift
\family sans
„Nomenklatur
\family default
“,
und dort wird das Verzeichnis auch gedruckt.
Mit einem Rechtsklick auf das Kästchen kann man die verfügbare Breite für die Symbole einstellen.
\end_layout
\begin_layout Standard
Im Fall des Standardstils können Sie mit einem Rechtsklick auf das Kästchen einen Dialog öffnen,
in dem Sie das Aussehen der Liste (den Einzug und den Abstand zwischen Symbol und Beschreibung) anpassen können.
Sie können dabei zwischen diesen Einstellungen wählen:
\end_layout
@ -36560,7 +36589,7 @@ Marke
\end_layout
\begin_layout Description
Benutzerdefiniert benutzerdefinierte Breite
Benutzerdefiniert benutzerdefinierte Breite wie im Dialog eingegeben.
\end_layout
\begin_layout Standard
@ -36605,7 +36634,7 @@ captionsngerman
\series bold
\backslash
extras***
captions***
\series default
,
wobei *** der Name der verwendeten Sprache ist.
@ -50625,7 +50654,7 @@ nolink "false"
\end_layout
\begin_layout Section
Stichwortverzeichnis & Nomenklatur
Stichwortverzeichnis
\end_layout
\begin_layout Standard
@ -50647,7 +50676,15 @@ nolink "false"
\end_inset
für Details).
Außerdem können Sie hier einen Nomenklatur-Stil auswählen (siehe Abschnitt
\end_layout
\begin_layout Section
Nomenklatur
\end_layout
\begin_layout Standard
Hier können Sie hier Nomenklatur-Stil auswählen und einige Optionen verwalten,
die die Darstellung der Nomenklaturverzeichnisses bestimmten (siehe Abschnitt
\begin_inset space ~
\end_inset

View File

@ -1491,6 +1491,24 @@ GuiDocument::GuiDocument(GuiView & lv)
connect(indicesModule, SIGNAL(changed()),
this, SLOT(change_adaptor()));
// nomencl
nomenclModule = new UiWidget<Ui::NomenclUi>(this);
connect(nomenclModule->nomenclStyleCO, SIGNAL(activated(int)),
this, SLOT(change_adaptor()));
connect(nomenclModule->inTocCB, SIGNAL(clicked()),
this, SLOT(change_adaptor()));
connect(nomenclModule->eqRefCB, SIGNAL(clicked()),
this, SLOT(change_adaptor()));
connect(nomenclModule->pageRefCB, SIGNAL(clicked()),
this, SLOT(change_adaptor()));
connect(nomenclModule->subgroupsCB, SIGNAL(clicked()),
this, SLOT(change_adaptor()));
connect(nomenclModule->extraOptionsLE, SIGNAL(textChanged(const QString &)),
this, SLOT(change_adaptor()));
nomenclModule->nomenclStyleCO->clear();
nomenclModule->nomenclStyleCO->addItem(qt_("Default"), QString("default"));
nomenclModule->nomenclStyleCO->addItem(qt_("Tabular"), QString("tabular"));
// maths
mathsModule = new UiWidget<Ui::MathsUi>(this);
@ -1836,7 +1854,8 @@ GuiDocument::GuiDocument(GuiView & lv)
docPS->addPanel(changesModule, N_("Change Tracking"));
docPS->addPanel(numberingModule, N_("Numbering & TOC"));
docPS->addPanel(biblioModule, N_("Bibliography"));
docPS->addPanel(indicesModule, N_("Indexes & Nomenclature"));
docPS->addPanel(indicesModule, N_("Indexes"));
docPS->addPanel(nomenclModule, N_("Nomenclature"));
docPS->addPanel(pdfSupportModule, N_("PDF Properties"));
docPS->addPanel(mathsModule, N_("Math Options"));
docPS->addPanel(floatModule, N_("Float Settings"));
@ -3678,6 +3697,27 @@ void GuiDocument::applyView()
// Indices
indicesModule->apply(bp_);
// nomencl
vector<string> nomenclOpts;
if (nomenclModule->nomenclStyleCO->currentIndex() == 1)
nomenclOpts.push_back("nomentbl");
if (nomenclModule->inTocCB->isChecked())
nomenclOpts.push_back("intoc");
if (nomenclModule->eqRefCB->isChecked())
nomenclOpts.push_back("refeq");
if (nomenclModule->pageRefCB->isChecked())
nomenclOpts.push_back("refpage");
if (nomenclModule->subgroupsCB->isChecked())
nomenclOpts.push_back("stdsubgroups");
bp_.nomencl_opts = getStringFromVector(nomenclOpts);
if (!nomenclModule->extraOptionsLE->text().isEmpty()) {
if (!bp_.nomencl_opts.empty())
bp_.nomencl_opts += ",";
bp_.nomencl_opts += fromqstr(nomenclModule->extraOptionsLE->text());
}
// language & quotes
switch (langModule->encodingCO->currentIndex()) {
case EncodingSets::unicode: {
@ -4213,6 +4253,40 @@ void GuiDocument::paramsToDialog()
bool const isReadOnly = isBufferAvailable() ? buffer().isReadonly() : false;
indicesModule->update(bp_, isReadOnly);
// nomenclature
vector<string> nomencl_opts = getVectorFromString(bp_.nomencl_opts);
vector<string>::iterator it = std::find(nomencl_opts.begin(), nomencl_opts.end(), "nomentbl");
if (it != nomencl_opts.end()) {
nomenclModule->nomenclStyleCO->setCurrentIndex(1);
nomencl_opts.erase(it);
} else
nomenclModule->nomenclStyleCO->setCurrentIndex(0);
it = std::find(nomencl_opts.begin(), nomencl_opts.end(), "intoc");
if (it != nomencl_opts.end()) {
nomenclModule->inTocCB->setChecked(true);
nomencl_opts.erase(it);
} else
nomenclModule->inTocCB->setChecked(false);
it = std::find(nomencl_opts.begin(), nomencl_opts.end(), "refeq");
if (it != nomencl_opts.end()) {
nomenclModule->eqRefCB->setChecked(true);
nomencl_opts.erase(it);
} else
nomenclModule->eqRefCB->setChecked(false);
it = std::find(nomencl_opts.begin(), nomencl_opts.end(), "refpage");
if (it != nomencl_opts.end()) {
nomenclModule->pageRefCB->setChecked(true);
nomencl_opts.erase(it);
} else
nomenclModule->pageRefCB->setChecked(false);
it = std::find(nomencl_opts.begin(), nomencl_opts.end(), "stdsubgroups");
if (it != nomencl_opts.end()) {
nomenclModule->subgroupsCB->setChecked(true);
nomencl_opts.erase(it);
} else
nomenclModule->subgroupsCB->setChecked(false);
nomenclModule->extraOptionsLE->setText(toqstr(getStringFromVector(nomencl_opts)));
// language & quotes
int const pos = langModule->languageCO->findData(toqstr(
bp_.language->lang()));

View File

@ -32,6 +32,7 @@
#include "ui_MasterChildUi.h"
#include "ui_MathsUi.h"
#include "ui_ModulesUi.h"
#include "ui_NomenclUi.h"
#include "ui_NumberingUi.h"
#include "ui_OutputUi.h"
#include "ui_PageLayoutUi.h"
@ -192,6 +193,7 @@ private:
UiWidget<Ui::ModulesUi> *modulesModule;
UiWidget<Ui::OutputUi> *outputModule;
UiWidget<Ui::ListingsSettingsUi> *listingsModule;
UiWidget<Ui::NomenclUi> *nomenclModule;
PreambleModule * preambleModule;
LocalLayout * localLayout;

View File

@ -62,10 +62,6 @@ GuiIndices::GuiIndices(QWidget * parent)
indexCO->addItem(command, command);
}
nomenclStyleCO->clear();
nomenclStyleCO->addItem(qt_("Default"), QString("default"));
nomenclStyleCO->addItem(qt_("Tabular"), QString("tabular"));
indexOptionsLE->setValidator(new NoNewLineValidator(indexOptionsLE));
newIndexLE->setValidator(new NoNewLineValidator(newIndexLE));
}
@ -119,9 +115,6 @@ void GuiIndices::update(BufferParams const & params, bool const readonly)
indexOptionsLE->clear();
}
pos = (contains(params.nomencl_opts, "nomentbl")) ? 1 : 0;
nomenclStyleCO->setCurrentIndex(pos);
updateView();
}
@ -169,9 +162,6 @@ void GuiIndices::apply(BufferParams & params) const
params.use_indices = multipleIndicesCB->isChecked();
params.indiceslist() = indiceslist_;
if (nomenclStyleCO->currentIndex() == 1)
params.nomencl_opts = "nomentbl";
string const index_command =
fromqstr(indexCO->itemData(
indexCO->currentIndex()).toString());
@ -311,11 +301,6 @@ void GuiIndices::toggleColor(QTreeWidgetItem * item)
}
void GuiIndices::on_nomenclStyleCO_activated(int)
{
changed();
}
} // namespace frontend
} // namespace lyx

View File

@ -54,7 +54,6 @@ protected Q_SLOTS:
void on_indicesTW_itemSelectionChanged();
void on_colorPB_clicked();
void on_multipleIndicesCB_toggled(bool);
void on_nomenclStyleCO_activated(int);
private:
///

View File

@ -306,6 +306,7 @@ UIFILES = \
MathMatrixUi.ui \
MathsUi.ui \
ModulesUi.ui \
NomenclUi.ui \
NoteUi.ui \
NumberingUi.ui \
OutputUi.ui \

View File

@ -1,96 +1,78 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<ui version="4.0" >
<class>IndicesUi</class>
<widget class="QWidget" name="IndicesUi">
<property name="geometry">
<widget class="QWidget" name="IndicesUi" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>341</width>
<height>479</height>
<width>401</width>
<height>340</height>
</rect>
</property>
<property name="windowTitle">
<property name="windowTitle" >
<string/>
</property>
<layout class="QGridLayout" name="gridLayout_4">
<item row="1" column="0">
<widget class="QCheckBox" name="multipleIndicesCB">
<property name="toolTip">
<string>Check if you need multiple indexes (e.g., an Index of Names)</string>
</property>
<property name="text">
<string>&amp;Use multiple indexes</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="Line" name="line">
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QGroupBox" name="indexGB">
<property name="toolTip">
<layout class="QGridLayout" name="gridLayout" >
<item row="0" column="0" colspan="2" >
<widget class="QGroupBox" name="indexGB" >
<property name="toolTip" >
<string>Here you can define an alternative index processor and specify its options.</string>
</property>
<property name="title">
<property name="title" >
<string>Index Generation</string>
</property>
<property name="flat">
<property name="flat" >
<bool>true</bool>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<layout class="QHBoxLayout" name="horizontalLayout">
<layout class="QGridLayout" name="gridLayout_2" >
<item row="0" column="0" >
<layout class="QHBoxLayout" name="horizontalLayout" >
<item>
<widget class="QLabel" name="indexLA">
<property name="text">
<widget class="QLabel" name="indexLA" >
<property name="text" >
<string>&amp;Processor:</string>
</property>
<property name="buddy">
<property name="buddy" >
<cstring>indexCO</cstring>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="indexCO">
<property name="toolTip">
<widget class="QComboBox" name="indexCO" >
<property name="toolTip" >
<string>Select a processor</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="1" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item row="1" column="0" >
<layout class="QHBoxLayout" name="horizontalLayout_2" >
<item>
<widget class="QLabel" name="indexOptionsLA">
<property name="text">
<widget class="QLabel" name="indexOptionsLA" >
<property name="text" >
<string>&amp;Options:</string>
</property>
<property name="buddy">
<property name="buddy" >
<cstring>indexOptionsLE</cstring>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="indexOptionsLE">
<property name="toolTip">
<widget class="QLineEdit" name="indexOptionsLE" >
<property name="toolTip" >
<string>Define program options of the selected processor.</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="0" column="1" rowspan="2">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
<item rowspan="2" row="0" column="1" >
<spacer name="horizontalSpacer" >
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<property name="sizeHint" stdset="0" >
<size>
<width>183</width>
<height>20</height>
@ -101,169 +83,129 @@
</layout>
</widget>
</item>
<item row="3" column="0">
<layout class="QHBoxLayout">
<property name="spacing">
<item row="1" column="0" >
<widget class="QCheckBox" name="multipleIndicesCB" >
<property name="toolTip" >
<string>Check if you need multiple indexes (e.g., an Index of Names)</string>
</property>
<property name="text" >
<string>&amp;Use multiple indexes</string>
</property>
</widget>
</item>
<item row="2" column="0" colspan="2" >
<widget class="Line" name="line" >
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="3" column="0" colspan="2" >
<layout class="QHBoxLayout" >
<property name="spacing" >
<number>6</number>
</property>
<property name="margin" stdset="0">
<property name="margin" >
<number>0</number>
</property>
<item>
<widget class="QLabel" name="newIndexLA">
<property name="text">
<widget class="QLabel" name="newIndexLA" >
<property name="text" >
<string>&amp;New:[[index]]</string>
</property>
<property name="buddy">
<property name="buddy" >
<cstring>newIndexLE</cstring>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="newIndexLE">
<property name="toolTip">
<string>Enter the name of the desired index (e.g. &quot;Index of Names&quot;) and hit &quot;Add&quot;</string>
<widget class="QLineEdit" name="newIndexLE" >
<property name="toolTip" >
<string>Enter the name of the desired index (e.g. "Index of Names") and hit "Add"</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="addIndexPB">
<property name="toolTip">
<widget class="QPushButton" name="addIndexPB" >
<property name="toolTip" >
<string>Add a new index to the list</string>
</property>
<property name="text">
<property name="text" >
<string>&amp;Add</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="6" column="0">
<widget class="QGroupBox" name="nomenclGB">
<property name="title">
<string>Nomenclature</string>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="1">
<widget class="QComboBox" name="nomenclStyleCO"/>
</item>
<item row="0" column="0">
<widget class="QLabel" name="nomenclStyleLA">
<property name="text">
<string>Nomenclature St&amp;yle:</string>
</property>
<property name="buddy">
<cstring>nomenclStyleCO</cstring>
</property>
</widget>
</item>
<item row="0" column="2">
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
<item row="5" column="0">
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0" rowspan="4">
<widget class="QTreeWidget" name="indicesTW">
<column>
<property name="text">
<string>1</string>
</property>
</column>
</widget>
</item>
<item row="0" column="1">
<widget class="QPushButton" name="removePB">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Remove the selected index</string>
</property>
<property name="text">
<string>&amp;Remove</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QPushButton" name="renamePB">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Rename the selected index</string>
</property>
<property name="text">
<string>R&amp;ename...</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QPushButton" name="colorPB">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Define or change button color</string>
</property>
<property name="text">
<string>Alter Co&amp;lor...</string>
</property>
</widget>
</item>
<item row="3" column="1">
<spacer>
<property name="orientation">
<enum>Qt::Orientation::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Policy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>121</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item row="4" column="0">
<widget class="QLabel" name="availableLA">
<property name="text">
<item row="4" column="0" >
<widget class="QLabel" name="availableLA" >
<property name="text" >
<string>A&amp;vailable Indexes:</string>
</property>
<property name="buddy">
<property name="buddy" >
<cstring>indicesTW</cstring>
</property>
</widget>
</item>
<item rowspan="4" row="5" column="0" >
<widget class="QTreeWidget" name="indicesTW" >
<column>
<property name="text" >
<string>1</string>
</property>
</column>
</widget>
</item>
<item row="5" column="1" >
<widget class="QPushButton" name="removePB" >
<property name="toolTip" >
<string>Remove the selected index</string>
</property>
<property name="text" >
<string>&amp;Remove</string>
</property>
</widget>
</item>
<item row="6" column="1" >
<widget class="QPushButton" name="renamePB" >
<property name="toolTip" >
<string>Rename the selected index</string>
</property>
<property name="text" >
<string>R&amp;ename...</string>
</property>
</widget>
</item>
<item row="7" column="1" >
<widget class="QPushButton" name="colorPB" >
<property name="toolTip" >
<string>Define or change button color</string>
</property>
<property name="text" >
<string>Alter Co&amp;lor...</string>
</property>
</widget>
</item>
<item row="8" column="1" >
<spacer>
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType" >
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0" >
<size>
<width>20</width>
<height>121</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<includes>
<include location="local">qt_i18n.h</include>
<include location="local" >qt_i18n.h</include>
</includes>
<resources/>
<connections/>