From b5af05b4a75a792b17dbe4f1d75b7f1a6918699c Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Thu, 4 Apr 2019 18:43:29 +0200 Subject: [PATCH] Make module categories (almost) great again The category tag was rarely used and thus not very useful. This adds categorization to most modules (the rest will follow) and uses the \DeclareCategory tag we use in layouts rather than the extra syntax we used in modules. Categories are now added to the po files and translated. Note that this is work in progress: the current categories are still subject to change. The ultimate goal of this is to sort the modules in the GUI by category as we do with layouts, examples and templates (and add a filter to search for specific modules) As it is now (with the many modules we accumulated), the module selector is not really usable anymore. If you don't happen to know how exactly a module is named, selecting a module is really a PITA. --- lib/configure.py | 2 +- lib/doc/Customization.lyx | 53 +++++++++++++++++-- lib/layouts/InStar.module | 1 + lib/layouts/algorithm2e.module | 1 + lib/layouts/braille.module | 1 + lib/layouts/endnotes.module | 3 +- lib/layouts/enumitem.module | 1 + lib/layouts/eqs-within-sections.module | 1 + lib/layouts/fix-cm.module | 1 + lib/layouts/fixltx2e.module | 3 +- lib/layouts/fixme.module | 1 + lib/layouts/foottoend.module | 1 + lib/layouts/graphicboxes.module | 1 + lib/layouts/hanging.module | 1 + lib/layouts/initials.module | 1 + lib/layouts/knitr.module | 2 +- lib/layouts/logicalmkup.module | 2 +- lib/layouts/minimalistic.module | 1 + lib/layouts/noweb.module | 2 +- lib/layouts/paralist.module | 1 + lib/layouts/pdfcomment.module | 1 + lib/layouts/pdfform.module | 1 + lib/layouts/sectionbox.module | 1 + lib/layouts/shapepar.module | 1 + lib/layouts/soul.module | 1 + lib/layouts/subequations.module | 1 + lib/layouts/sweave.module | 2 +- lib/layouts/tcolorbox.module | 1 + lib/layouts/theorems-ams-chap-bytype.module | 1 + .../theorems-ams-extended-bytype.module | 1 + .../theorems-ams-extended-chap-bytype.module | 1 + lib/layouts/theorems-ams-extended.module | 2 +- lib/layouts/theorems-ams.module | 2 +- lib/layouts/theorems-bytype.module | 1 + lib/layouts/theorems-chap-bytype.module | 1 + lib/layouts/theorems-chap.module | 2 +- lib/layouts/theorems-named.module | 1 + lib/layouts/theorems-sec.module | 2 +- lib/layouts/theorems-starred.module | 2 +- lib/layouts/theorems-std.module | 2 +- lib/layouts/todonotes.module | 1 + lib/layouts/varwidth.module | 1 + src/ModuleList.h | 2 +- src/frontends/qt4/GuiDocument.cpp | 3 +- 44 files changed, 95 insertions(+), 19 deletions(-) diff --git a/lib/configure.py b/lib/configure.py index 680b7fe052..1f962081eb 100644 --- a/lib/configure.py +++ b/lib/configure.py @@ -1517,7 +1517,7 @@ def processModuleFile(file, filename, bool_docbook): remods = re.compile(b'\s*#\s*\\\\DeclareLyXModule\s*(?:\[([^]]*?)\])?{(.*)}') rereqs = re.compile(b'\s*#+\s*Requires: (.*)') reexcs = re.compile(b'\s*#+\s*Excludes: (.*)') - recaty = re.compile(b'\s*#+\s*Category: (.*)') + recaty = re.compile(b'\\s*#\\s*\\\\DeclareCategory{(.*)}\\s*$') redbeg = re.compile(b'\s*#+\s*DescriptionBegin\s*$') redend = re.compile(b'\s*#+\s*DescriptionEnd\s*$') diff --git a/lib/doc/Customization.lyx b/lib/doc/Customization.lyx index 07895b6736..c953b42662 100644 --- a/lib/doc/Customization.lyx +++ b/lib/doc/Customization.lyx @@ -8545,12 +8545,39 @@ A module must begin with a line like the following: \begin_layout LyX-Code # \backslash -DeclareLyXModule[endnotes.sty]{Endnotes} +DeclareLyXModule[endnotes.sty]{Endnotes} +\change_inserted -712698321 1554395911 + +\end_layout + +\begin_layout LyX-Code + +\change_inserted -712698321 1554395924 + +\size small +# +\backslash +DeclareCategory{Foot- and Endnotes} +\change_deleted -712698321 1554395911 + +\size default + +\change_unchanged + \end_layout \begin_layout Standard -The mandatory argument, in curly brackets, is the name of the module, as - it should appear in +The mandatory argument +\change_inserted -712698321 1554395956 + of +\family typewriter + +\backslash +DeclareLyXModule +\change_unchanged + +\family default +, in curly brackets, is the name of the module, as it should appear in \begin_inset Flex Noun status collapsed @@ -8598,10 +8625,28 @@ to \end_inset '. + +\change_inserted -712698321 1554396133 + The +\family typewriter + +\backslash +DeclareCategory +\family default + declaration is not strictly mandatory, but you should add it, since it + is helpful to find the module. + Please have a look at the existing module categories and if appropriate, + use one of those. +\change_unchanged + \end_layout \begin_layout Standard -The module declaration should then be followed by lines like the following: +The module +\change_inserted -712698321 1554395988 +and category +\change_unchanged +declaration should then be followed by lines like the following: \begin_inset Foot status collapsed diff --git a/lib/layouts/InStar.module b/lib/layouts/InStar.module index d436ac7091..bfdec71e20 100644 --- a/lib/layouts/InStar.module +++ b/lib/layouts/InStar.module @@ -1,4 +1,5 @@ #\DeclareLyXModule{Title and Preamble Hacks} +#\DeclareCategory{Fixes and Hacks} #DescriptionBegin #Provides two new styles: #1. An 'In Preamble' style that puts whatever is entered into it into the preamble. diff --git a/lib/layouts/algorithm2e.module b/lib/layouts/algorithm2e.module index f47a705f30..43893f460a 100644 --- a/lib/layouts/algorithm2e.module +++ b/lib/layouts/algorithm2e.module @@ -1,4 +1,5 @@ #\DeclareLyXModule[algorithm2e.sty]{Algorithm2e} +#\DeclareCategory{Floats} #DescriptionBegin # Use the algorithm2e package for algorithm floats rather # than LyX's home-brewed algorithm floats. Use the Algorithm diff --git a/lib/layouts/braille.module b/lib/layouts/braille.module index 0cfd7e02ae..b7cfff704a 100644 --- a/lib/layouts/braille.module +++ b/lib/layouts/braille.module @@ -1,4 +1,5 @@ #\DeclareLyXModule[braille.sty]{Braille} +#\DeclareCategory{Accessibility} #DescriptionBegin #Defines an environment to typeset Braille. #For more details see Braille.lyx in examples. diff --git a/lib/layouts/endnotes.module b/lib/layouts/endnotes.module index 0f29b75418..f9f0467227 100644 --- a/lib/layouts/endnotes.module +++ b/lib/layouts/endnotes.module @@ -1,4 +1,5 @@ -#\DeclareLyXModule[endnotes.sty]{Endnote} +#\DeclareLyXModule[endnotes.sty]{Endnotes} +#\DeclareCategory{Foot- and Endnotes} #DescriptionBegin #Adds an endnote inset, in addition to footnotes. You will need to add #\theendnotes in TeX-code where you want the endnotes to appear. diff --git a/lib/layouts/enumitem.module b/lib/layouts/enumitem.module index 4ab1418c37..0837f4889a 100644 --- a/lib/layouts/enumitem.module +++ b/lib/layouts/enumitem.module @@ -1,4 +1,5 @@ #\DeclareLyXModule[enumitem.sty]{Customisable Lists (enumitem)} +#\DeclareCategory{List Enhancements} #DescriptionBegin # Controls the layout of enumerate, itemize, description, and list/labeling. # See section Customized Lists of the User's Guide for a detailed description. diff --git a/lib/layouts/eqs-within-sections.module b/lib/layouts/eqs-within-sections.module index 11e0b54285..dfc6d69ed9 100644 --- a/lib/layouts/eqs-within-sections.module +++ b/lib/layouts/eqs-within-sections.module @@ -1,4 +1,5 @@ #\DeclareLyXModule{Number Equations by Section} +#\DeclareCategory{Maths} #DescriptionBegin #Resets the equation number at section start and prepends #the section number to the equation number, as in '(2.1)'. diff --git a/lib/layouts/fix-cm.module b/lib/layouts/fix-cm.module index 377582fb60..e1991c1b1d 100644 --- a/lib/layouts/fix-cm.module +++ b/lib/layouts/fix-cm.module @@ -1,4 +1,5 @@ #\DeclareLyXModule{Fix cm} +#\DeclareCategory{Fixes and Hacks} #DescriptionBegin #Fix-cm improves the appearance of Computer Modern fonts and makes them #available with arbitrary sizes. For details see the documentation diff --git a/lib/layouts/fixltx2e.module b/lib/layouts/fixltx2e.module index 36aa278837..bad78d6b33 100644 --- a/lib/layouts/fixltx2e.module +++ b/lib/layouts/fixltx2e.module @@ -1,4 +1,5 @@ -#\DeclareLyXModule{Fix LaTeX} +#\DeclareLyXModule{Fix LaTeX (Obsolete)} +#\DeclareCategory{Fixes and Hacks} #DescriptionBegin #Loads the LaTeX package fixltx2e which contains some bug fixes for LaTeX. #Those fixes were not part of older LaTeX kernels because of backward compatibility. diff --git a/lib/layouts/fixme.module b/lib/layouts/fixme.module index 7e6fc5bff5..d98d47a387 100644 --- a/lib/layouts/fixme.module +++ b/lib/layouts/fixme.module @@ -1,4 +1,5 @@ #\DeclareLyXModule[fixme.sty]{FiXme} +#\DeclareCategory{Annotations} #DescriptionBegin #Provides 'FiXme' (marginal) annotations for document revision purposes. #A list of annotations can be produced by using the 'List of FIXMEs' paragraph style. diff --git a/lib/layouts/foottoend.module b/lib/layouts/foottoend.module index fd8af1a3e7..3ba3afd6a2 100644 --- a/lib/layouts/foottoend.module +++ b/lib/layouts/foottoend.module @@ -1,4 +1,5 @@ #\DeclareLyXModule[endnotes.sty]{Foot to End} +#\DeclareCategory{Foot- and Endnotes} #DescriptionBegin #Sets all footnotes as endnotes. You will need to add \theendnotes #in TeX-code where you want the endnotes to appear. diff --git a/lib/layouts/graphicboxes.module b/lib/layouts/graphicboxes.module index e045608b44..d65347b093 100644 --- a/lib/layouts/graphicboxes.module +++ b/lib/layouts/graphicboxes.module @@ -1,4 +1,5 @@ #\DeclareLyXModule{GraphicBoxes} +#\DeclareCategory{Boxes} #DescriptionBegin #Boxes to scale and rotate its contents #DescriptionEnd diff --git a/lib/layouts/hanging.module b/lib/layouts/hanging.module index 757e34d6ce..a9ac37d47f 100644 --- a/lib/layouts/hanging.module +++ b/lib/layouts/hanging.module @@ -1,4 +1,5 @@ #\DeclareLyXModule{Hanging} +#\DeclareCategory{Paragraph Styles} #DescriptionBegin #Adds an environment for hanging paragraphs. #Hanging paragraph is a paragraph in which the first line is set to the left margin, but all subsequent lines are indented. diff --git a/lib/layouts/initials.module b/lib/layouts/initials.module index c7a4e1b82e..aedd3da1be 100644 --- a/lib/layouts/initials.module +++ b/lib/layouts/initials.module @@ -1,4 +1,5 @@ #\DeclareLyXModule{Initials} +#\DeclareCategory{Paragraph Styles} #DescriptionBegin #Define a style for paragraphs with an initial. #See the EmbeddedObjects manual for a detailed description. diff --git a/lib/layouts/knitr.module b/lib/layouts/knitr.module index a3c808f4fd..6ba0a6becb 100644 --- a/lib/layouts/knitr.module +++ b/lib/layouts/knitr.module @@ -1,9 +1,9 @@ #\DeclareLyXModule[knitr->latex]{Rnw (knitr)} +#\DeclareCategory{Literate Programming} #DescriptionBegin #Uses the knitr package in R for dynamic report generation. This R package has to be installed for this module to work: install.packages('knitr'). Note it depends on R >= 2.14.1. #For more info see http://yihui.name/knitr #DescriptionEnd -#Category: literate #Excludes: lilypond | sweave Format 72 diff --git a/lib/layouts/logicalmkup.module b/lib/layouts/logicalmkup.module index 5176b2b5f0..c1f6bdf9e4 100644 --- a/lib/layouts/logicalmkup.module +++ b/lib/layouts/logicalmkup.module @@ -1,8 +1,8 @@ #\DeclareLyXModule{Logical Markup} +#\DeclareCategory{Text Markup} #DescriptionBegin #Defines some character styles for logical markup: noun, emph, strong, and code. #DescriptionEnd -#Category: charstyles # Author : Martin vermeer diff --git a/lib/layouts/minimalistic.module b/lib/layouts/minimalistic.module index cdda4bb385..554754459b 100644 --- a/lib/layouts/minimalistic.module +++ b/lib/layouts/minimalistic.module @@ -1,4 +1,5 @@ #\DeclareLyXModule{Minimalistic} +#\DeclareCategory{Fixes and Hacks} #DescriptionBegin # Redefines several insets (Index, Branch, URL) as being Minimalistic. #DescriptionEnd diff --git a/lib/layouts/noweb.module b/lib/layouts/noweb.module index 028ecb0529..bff3586910 100644 --- a/lib/layouts/noweb.module +++ b/lib/layouts/noweb.module @@ -1,8 +1,8 @@ #\DeclareLyXModule[literate->latex,noweb.sty]{Noweb} +#\DeclareCategory{Literate Programming} #DescriptionBegin #Allows to use Noweb as a literate programming tool. #DescriptionEnd -#Category: literate Format 72 Input litinsets.inc diff --git a/lib/layouts/paralist.module b/lib/layouts/paralist.module index 448b86d2e4..9542e5f977 100644 --- a/lib/layouts/paralist.module +++ b/lib/layouts/paralist.module @@ -1,4 +1,5 @@ #\DeclareLyXModule[paralist.sty]{Paragraph Lists (paralist)} +#\DeclareCategory{List Enhancements} #DescriptionBegin # The package paralist provides some new list environments. # Itemized and enumerated lists can be typeset within paragraphs, as diff --git a/lib/layouts/pdfcomment.module b/lib/layouts/pdfcomment.module index 80c114082c..93322a062e 100644 --- a/lib/layouts/pdfcomment.module +++ b/lib/layouts/pdfcomment.module @@ -1,4 +1,5 @@ #\DeclareLyXModule[datetime.sty,fmtcount.sty]{PDF Comments} +#\DeclareCategory{Annotations} #DescriptionBegin #Provides various kinds of annotations for the PDF output. The module uses #the pdfcomment package. Please consult the LyX example file PDF-comment.lyx diff --git a/lib/layouts/pdfform.module b/lib/layouts/pdfform.module index b5d8942bd7..700dc8544b 100644 --- a/lib/layouts/pdfform.module +++ b/lib/layouts/pdfform.module @@ -1,4 +1,5 @@ #\DeclareLyXModule{PDF Form} +#\DeclareCategory{Annotations} #DescriptionBegin #Provides fields and buttons for PDF forms. The module uses #the LaTeX package hyperref. Please consult the LyX example file PDF-form.lyx diff --git a/lib/layouts/sectionbox.module b/lib/layouts/sectionbox.module index 24f67b5204..68c477e03c 100644 --- a/lib/layouts/sectionbox.module +++ b/lib/layouts/sectionbox.module @@ -1,4 +1,5 @@ #\DeclareLyXModule[sectionbox.sty]{Section Boxes} +#\DeclareCategory{Boxes} #DescriptionBegin #Defines Boxes with section header. Mainly intended for #the SciPoster class. diff --git a/lib/layouts/shapepar.module b/lib/layouts/shapepar.module index fb8464aeec..1a0fd84a40 100644 --- a/lib/layouts/shapepar.module +++ b/lib/layouts/shapepar.module @@ -1,4 +1,5 @@ #\DeclareLyXModule[shapepar.sty]{Custom Paragraph Shapes} +#\DeclareCategory{Paragraph Styles} #DescriptionBegin #Provides several paragraph shapes as well as commands to define custom #shapes. For a description see LyX's Additional diff --git a/lib/layouts/soul.module b/lib/layouts/soul.module index 05849355ee..8738889611 100644 --- a/lib/layouts/soul.module +++ b/lib/layouts/soul.module @@ -1,4 +1,5 @@ #\DeclareLyXModule[soul.sty]{Hyphenatable Text Markup (Soul)} +#\DeclareCategory{Text Markup} #DescriptionBegin #Defines text styles to highlight, space-out, strike-through, #underline and capitalize/small-cap text by means of the soul package. diff --git a/lib/layouts/subequations.module b/lib/layouts/subequations.module index ce69bea11f..d1f3c82bcd 100644 --- a/lib/layouts/subequations.module +++ b/lib/layouts/subequations.module @@ -1,4 +1,5 @@ #\DeclareLyXModule{Subequations} +#\DeclareCategory{Maths} #DescriptionBegin #Provide a straightforward way to segregate subequations in LyX. See the subequations.lyx example file. #DescriptionEnd diff --git a/lib/layouts/sweave.module b/lib/layouts/sweave.module index 7ca439d8aa..5ae235145a 100644 --- a/lib/layouts/sweave.module +++ b/lib/layouts/sweave.module @@ -1,9 +1,9 @@ #\DeclareLyXModule[sweave->latex,fancyvrb.sty]{Sweave} +#\DeclareCategory{Literate Programming} #DescriptionBegin #Allows to use the statistical language S/R as a literate programming tool via the Sweave() function. #For more info see the LyX example file sweave.lyx. #DescriptionEnd -#Category: literate #Excludes: lilypond Format 72 diff --git a/lib/layouts/tcolorbox.module b/lib/layouts/tcolorbox.module index c0f7394ea5..7f9ebdb7a1 100644 --- a/lib/layouts/tcolorbox.module +++ b/lib/layouts/tcolorbox.module @@ -1,4 +1,5 @@ #\DeclareLyXModule[tcolorbox.sty,environ.sty,etoolbox.sty,pgf.sty]{Fancy Colored Boxes} +#\DeclareCategory{Boxes} #DescriptionBegin #Adds custom insets that support colored boxes via the tcolorbox package. #See the tcolorbox documentation for details. diff --git a/lib/layouts/theorems-ams-chap-bytype.module b/lib/layouts/theorems-ams-chap-bytype.module index 4871242d37..02dfd40a9a 100644 --- a/lib/layouts/theorems-ams-chap-bytype.module +++ b/lib/layouts/theorems-ams-chap-bytype.module @@ -1,4 +1,5 @@ #\DeclareLyXModule{Theorems (AMS, Numbered by Type within Chapters)} +#\DeclareCategory{Theorems} #DescriptionBegin #Defines theorem environments and the proof environment using the extended #AMS machinery. Both numbered and unnumbered types are provided. Contrary to the diff --git a/lib/layouts/theorems-ams-extended-bytype.module b/lib/layouts/theorems-ams-extended-bytype.module index dbcca8f5e0..990b9faaf4 100644 --- a/lib/layouts/theorems-ams-extended-bytype.module +++ b/lib/layouts/theorems-ams-extended-bytype.module @@ -1,4 +1,5 @@ #\DeclareLyXModule{Theorems (AMS-Extended, Numbered by Type)} +#\DeclareCategory{Theorems} #DescriptionBegin #Defines some additional theorem environments for use with the #AMS theorems packages. Includes Criterion, Algorithm, Axiom, diff --git a/lib/layouts/theorems-ams-extended-chap-bytype.module b/lib/layouts/theorems-ams-extended-chap-bytype.module index 2f846897e6..c09346ff6c 100644 --- a/lib/layouts/theorems-ams-extended-chap-bytype.module +++ b/lib/layouts/theorems-ams-extended-chap-bytype.module @@ -1,4 +1,5 @@ #\DeclareLyXModule{Theorems (AMS-Extended, Numbered by Type within Chapters)} +#\DeclareCategory{Theorems} #DescriptionBegin #Defines some additional theorem environments for use with the #AMS theorems packages. Includes Criterion, Algorithm, Axiom, diff --git a/lib/layouts/theorems-ams-extended.module b/lib/layouts/theorems-ams-extended.module index 2c0581cb19..59ab8078ab 100644 --- a/lib/layouts/theorems-ams-extended.module +++ b/lib/layouts/theorems-ams-extended.module @@ -1,4 +1,5 @@ #\DeclareLyXModule{Theorems (AMS-Extended)} +#\DeclareCategory{Theorems} #DescriptionBegin #Defines some additional theorem environments for use with the #AMS theorems packages. Includes Criterion, Algorithm, Axiom, @@ -7,7 +8,6 @@ #forms. #DescriptionEnd #Requires: theorems-ams -#Category: theorems # Original Author : David L. Johnson # Probably broken by Jean-Marc Lasgouttes diff --git a/lib/layouts/theorems-ams.module b/lib/layouts/theorems-ams.module index d0ee647b3f..e332539617 100644 --- a/lib/layouts/theorems-ams.module +++ b/lib/layouts/theorems-ams.module @@ -1,4 +1,5 @@ #\DeclareLyXModule{Theorems (AMS)} +#\DeclareCategory{Theorems} #DescriptionBegin #Defines theorem environments and the proof environment using the extended #AMS machinery. Both numbered and unnumbered types are provided. By default, @@ -6,7 +7,6 @@ #changed by loading one of the 'Theorems (Numbered by ...)' modules. #DescriptionEnd #Excludes: theorems-std | theorems-starred -#Category: theorems # Original Author : David L. Johnson # Probably broken by Jean-Marc Lasgouttes diff --git a/lib/layouts/theorems-bytype.module b/lib/layouts/theorems-bytype.module index e570d114b0..1abb188620 100644 --- a/lib/layouts/theorems-bytype.module +++ b/lib/layouts/theorems-bytype.module @@ -1,4 +1,5 @@ #\DeclareLyXModule{Theorems (Numbered by Type)} +#\DeclareCategory{Theorems} #DescriptionBegin #Defines some theorem environments for use with non-AMS classes. Contrary to the #plain Theorem module, the different theorem types provided here each have a separate diff --git a/lib/layouts/theorems-chap-bytype.module b/lib/layouts/theorems-chap-bytype.module index d298283e95..664d136523 100644 --- a/lib/layouts/theorems-chap-bytype.module +++ b/lib/layouts/theorems-chap-bytype.module @@ -1,4 +1,5 @@ #\DeclareLyXModule{Theorems (Numbered by Type within Chapters)} +#\DeclareCategory{Theorems} #DescriptionBegin #Defines some theorem environments for use with non-AMS classes. Contrary to the #plain Theorem module, the different theorem types provided here each have a separate diff --git a/lib/layouts/theorems-chap.module b/lib/layouts/theorems-chap.module index b3fbb7cdf4..3b1c2277eb 100644 --- a/lib/layouts/theorems-chap.module +++ b/lib/layouts/theorems-chap.module @@ -1,4 +1,5 @@ #\DeclareLyXModule{Theorems (Numbered by Chapter)} +#\DeclareCategory{Theorems} #DescriptionBegin #Numbers theorems and the like by chapter (i.e., the counter is reset at #each chapter start). Use this module only with document classes that provide a chapter @@ -6,7 +7,6 @@ #DescriptionEnd #Requires: theorems-std | theorems-ams #Excludes: theorems-sec -#Category: theorems # Author: Richard Heck diff --git a/lib/layouts/theorems-named.module b/lib/layouts/theorems-named.module index ae17d4b689..072fe402e4 100644 --- a/lib/layouts/theorems-named.module +++ b/lib/layouts/theorems-named.module @@ -1,5 +1,6 @@ #% Do not delete the line below; configure depends on this #\DeclareLyXModule{Named Theorems} +#\DeclareCategory{Theorems} #DescriptionBegin # Facilitates the use of named theorems. The name of the theorem # goes into the 'Additional Theorem Text' argument. diff --git a/lib/layouts/theorems-sec.module b/lib/layouts/theorems-sec.module index 032e47519c..0c5317fab3 100644 --- a/lib/layouts/theorems-sec.module +++ b/lib/layouts/theorems-sec.module @@ -1,11 +1,11 @@ #\DeclareLyXModule{Theorems (Numbered by Section)} +#\DeclareCategory{Theorems} #DescriptionBegin #Numbers theorems and the like by section (i.e., the counter is reset at #each section start). #DescriptionEnd #Requires: theorems-std | theorems-ams #Excludes: theorems-chap -#Category: theorems # Author: Richard Heck diff --git a/lib/layouts/theorems-starred.module b/lib/layouts/theorems-starred.module index 3fe87ff6a6..62cd989b8b 100644 --- a/lib/layouts/theorems-starred.module +++ b/lib/layouts/theorems-starred.module @@ -1,10 +1,10 @@ #\DeclareLyXModule{Theorems (Unnumbered)} +#\DeclareCategory{Theorems} #DescriptionBegin #Defines only unnumbered theorem environments, and the proof environment, using #the extended AMS machinery. #DescriptionEnd #Excludes: theorems-std | theorems-ams -#Category: theorems # Author: Richard Heck diff --git a/lib/layouts/theorems-std.module b/lib/layouts/theorems-std.module index 33f8585dc2..01106f8815 100644 --- a/lib/layouts/theorems-std.module +++ b/lib/layouts/theorems-std.module @@ -1,11 +1,11 @@ #\DeclareLyXModule{Theorems} +#\DeclareCategory{Theorems} #DescriptionBegin #Defines some theorem environments for use with non-AMS classes. By default, #the theorems are numbered consecutively throughout the document. This can be #changed by loading one of the 'Theorems (Numbered by ...)' modules. #DescriptionEnd #Excludes: theorems-ams | theorems-starred -#Category: theorems # Author: Richard Heck diff --git a/lib/layouts/todonotes.module b/lib/layouts/todonotes.module index 1b184a55bd..d073945799 100644 --- a/lib/layouts/todonotes.module +++ b/lib/layouts/todonotes.module @@ -1,4 +1,5 @@ #\DeclareLyXModule[todonotes.sty]{TODO Notes} +#\DeclareCategory{Annotations} #DescriptionBegin #Provides custom insets to insert TODO items in your document #(using the todonotes package). In order to generate a 'List of TODOs', diff --git a/lib/layouts/varwidth.module b/lib/layouts/varwidth.module index 996f6c978d..8c0e3da31e 100644 --- a/lib/layouts/varwidth.module +++ b/lib/layouts/varwidth.module @@ -1,4 +1,5 @@ #\DeclareLyXModule{Variable-width Minipages} +#\DeclareCategory{Boxes} #DescriptionBegin # Adds a 'Minipage (Var. Width)' inset using the varwidth LaTeX package. # The varwidth package provides a variable-width minipage, whose resulting diff --git a/src/ModuleList.h b/src/ModuleList.h index e2d4a28f02..9194f031e0 100644 --- a/src/ModuleList.h +++ b/src/ModuleList.h @@ -31,12 +31,12 @@ namespace lyx { * The requires and excludes are given in comments within the module file, * which must begin roughly so: * #\DeclareLyXModule{Theorems (By Section)} + * #\DeclateCategory{Theorems} * #DescriptionBegin * #Numbers theorems and the like by section. * #DescriptionEnd * #Requires: theorems-std | theorems-ams * #Excludes: theorems-chap - * #Category: theorems * The description is used in the gui to give information to the user. The * Requires, Excludes, and Category lines are read by the configuration script * and written to a file lyxmodules.lst in the user configuration directory. diff --git a/src/frontends/qt4/GuiDocument.cpp b/src/frontends/qt4/GuiDocument.cpp index 371099c67f..59e04aa73e 100644 --- a/src/frontends/qt4/GuiDocument.cpp +++ b/src/frontends/qt4/GuiDocument.cpp @@ -2902,7 +2902,8 @@ void GuiDocument::updateModuleInfo() if (!cat.empty()) { if (!desc.empty()) desc += "\n"; - desc += bformat(_("Category: %1$s."), cat); + desc += bformat(_("Category: %1$s."), + translateIfPossible(cat)); } vector pkglist = getPackageList(modName); -- 2.39.2