]> git.lyx.org Git - lyx.git/blob - lib/ui/stdmenus.inc
Disable the Edit->Math menu when not in math.
[lyx.git] / lib / ui / stdmenus.inc
1 # -*- text -*-
2
3 # file stdmenus.inc
4 # This file is part of LyX, the document processor.
5 # Licence details can be found in the file COPYING.
6
7 # author Jean-Marc Lasgouttes
8 # author John Levon
9 # author Michael Gerz
10
11 # Full author contact details are available in file CREDITS.
12
13 # The interface is designed (partially) following the KDE Human Interface
14 # Guidelines (http://usability.kde.org/hig/)
15
16 Menuset
17
18         Menubar
19 # Make the first 4 menus be as much as expected as possible
20                 Submenu "File|F" "file"
21                 Submenu "Edit|E" "edit"
22                 Submenu "View|V" "view"
23                 Submenu "Insert|I" "insert"
24                 Submenu "Navigate|N" "navigate"
25                 Submenu "Document|D" "document"
26                 Submenu "Tools|T" "tools"
27                 Submenu "Help|H" "help"
28         End
29
30 #
31 # FILE MENU
32 #
33
34         Menu "file"
35                 Item "New|N" "buffer-new"
36                 Item "New from Template...|m" "buffer-new-template"
37                 Item "Open...|O" "file-open"
38                 Submenu "Open Recent|t" "file_lastfiles"
39                 Separator
40                 Item "Close|C" "buffer-close"
41                 Item "Save|S" "buffer-write"
42                 Item "Save As...|A" "buffer-write-as"
43                 Item "Save All|l" "buffer-write-all"
44                 Item "Revert to Saved|R" "buffer-reload"
45                 Submenu "Version Control|V" "file_vc"
46                 Separator
47                 Submenu "Import|I" "file_import"
48                 Submenu "Export|E" "file_export"
49                 Item "Print...|P" "dialog-show print"
50                 OptItem "Fax...|F" "buffer-export fax"
51                 Separator
52                 Item "New Window|W" "window-new"
53                 Item "Close Window|d" "window-close"
54                 Separator
55                 Item "Exit|x" "lyx-quit"
56         End
57
58         Menu "file_lastfiles"
59                 Lastfiles
60         End
61
62         Menu "file_vc"
63                 OptItem "Register...|R" "vc-register"
64                 OptItem "Check In Changes...|I" "vc-check-in"
65                 OptItem "Check Out for Edit|O" "vc-check-out"
66                 OptItem "Revert to Repository Version|R" "vc-revert"
67                 OptItem "Undo Last Check In|U" "vc-undo-last"
68                 OptItem "Show History...|H" "dialog-show vclog"
69         End
70
71         Menu "file_import"
72                 ImportFormats
73         End
74
75         Menu "file_export"
76                 ExportFormats
77                 Item "Custom...|C" "buffer-export custom"
78         End
79
80 #
81 # EDIT MENU
82 #
83
84         Menu "edit"
85                 Item "Undo|U" "undo"
86                 Item "Redo|R" "redo"
87                 Separator
88                 Item "Cut" "cut"
89                 Item "Copy" "copy"
90                 Item "Paste" "paste"
91                 Submenu "Paste Recent|e" "edit_pasterecent"
92                 Submenu "Paste Special" "edit_paste"
93                 Separator
94                 Item "Select All" "command-sequence buffer-begin ; buffer-end-select"
95                 Separator
96                 Item "Find & Replace...|F" "dialog-show findreplace"
97                 Item "Find LyX...|X" "dialog-show findreplaceadv"
98                 Separator
99                 Item "Move Paragraph Up|o" "paragraph-move-up"
100                 Item "Move Paragraph Down|v" "paragraph-move-down"
101                 Separator
102                 Submenu "Text Style|S" "edit_textstyles"
103                 Item "Paragraph Settings...|P" "layout-paragraph"
104                 Separator
105 # Mathed b0rkage means these don't work properly
106                 OptSubmenu "Table|T" "edit_tabular"
107                 OptSubmenu "Math|M" "edit_math"
108                 OptSubmenu "Rows & Columns|C" "edit_tabular_features"
109                 Separator
110 # This is where the context-specific stuff is supposed to go.
111 # The idea is that everything on here can disappear and should
112 # only appear when relevant (getStatus). Only stuff that needs
113 # a right-click to bring up the dialog should appear here (it is not
114 # obvious what the context is for the others)
115                 OptItem "Increase List Depth|I" "depth-increment"
116                 OptItem "Decrease List Depth|D" "depth-decrement"
117                 OptItem "Dissolve Inset|l" "inset-dissolve"
118                 OptItem "TeX Code Settings...|C" "inset-settings ert"
119 # 'a' shortcut to match Insert entry, shouldn't clash with Table Settings
120                 OptItem "Float Settings...|a" "inset-settings float"
121                 OptItem "Text Wrap Settings...|W" "inset-settings wrap"
122                 OptItem "Note Settings...|N" "inset-settings note"
123                 OptItem "Branch Settings...|B" "inset-settings branch"
124                 OptItem "Box Settings...|x" "inset-settings box"
125                 OptItem "Listings Settings...|g" "inset-settings listings"
126 # Hey, guess what's broken ? Surprise surprise, it's tabular stuff
127 # This is in the Table submenu instead for now.
128 #       OptItem "Table Settings...|a" "inset-settings tabular"
129                 OptItem "Table Settings...|a" "layout-tabular"
130         End
131
132         Menu "edit_paste"
133                 Item "Plain Text|T" "clipboard-paste"
134                 Item "Plain Text, Join Lines|J" "clipboard-paste paragraph"
135                 Separator
136                 Item "Selection|S" "primary-selection-paste"
137                 Item "Selection, Join Lines|i" "primary-selection-paste paragraph"
138                 Separator
139                 Item "Paste As LinkBack PDF" "paste linkback"
140                 Item "Paste As PDF" "paste pdf"
141                 Item "Paste As PNG" "paste png"
142                 Item "Paste As JPEG" "paste jpeg"
143         End
144
145         Menu "edit_pasterecent"
146                 PasteRecent
147         End
148
149         Menu "edit_textstyles"
150                 Item "Dissolve CharStyle" "inset-dissolve charstyle"
151                 CharStyles
152                 Elements
153                 Separator
154                 Item "Customized...|C" "dialog-show character"
155                 Separator
156                 Item "Capitalize|a" "word-capitalize"
157                 Item "Uppercase|U" "word-upcase"
158                 Item "Lowercase|L" "word-lowcase"
159         End
160
161 # not much we can do to help here
162         Menu "edit_tabular"
163                 Item "Multicolumn|M" "tabular-feature multicolumn"
164                 Separator
165                 Item "Top Line|T" "tabular-feature toggle-line-top"
166                 Item "Bottom Line|B" "tabular-feature toggle-line-bottom"
167                 Item "Left Line|L" "tabular-feature toggle-line-left"
168                 Item "Right Line|R" "tabular-feature toggle-line-right"
169                 Separator
170                 Item "Top|p" "tabular-feature tabular-valign-top"
171                 Item "Middle|i" "tabular-feature tabular-valign-middle"
172                 Item "Bottom|o" "tabular-feature tabular-valign-bottom" 
173         End
174
175         Menu "edit_tabular_features"
176                 Item "Left|L" "tabular-feature align-left"
177                 Item "Center|C" "tabular-feature align-center"
178                 Item "Right|R" "tabular-feature align-right"
179                 Separator
180                 Item "Top|T" "tabular-feature valign-top"
181                 Item "Middle|M" "tabular-feature valign-middle"
182                 Item "Bottom|B" "tabular-feature valign-bottom"
183                 Separator
184                 Item "Add Row|A" "tabular-feature append-row"
185                 Item "Delete Row|D" "tabular-feature delete-row"
186                 Item "Copy Row|o" "tabular-feature copy-row"
187                 # Item "Swap Rows|S" "tabular-feature swap-row" # currently broken
188                 Separator
189                 Item "Add Column|u" "tabular-feature append-column"
190                 Item "Delete Column|e" "tabular-feature delete-column"
191                 Item "Copy Column|p" "tabular-feature copy-column"
192                 # Item "Swap Columns|w" "tabular-feature swap-column" # currently broken
193         End
194
195         Menu "edit_math"
196                 Item "Number whole Formula|N" "math-number-toggle"
197                 Item "Number this Line|u" "math-number-line-toggle"
198                 Submenu "Change Limits Type|L" "edit_math_limits"
199                 Submenu "Macro Definition" "edit_math_macro_definition"
200                 Separator
201                 Submenu "Change Formula Type|F" "edit_math_mutate"
202                 Separator
203                 Submenu "Text Style|T" "edit_math_fontstyles"
204                 Separator
205                 Submenu "Use Computer Algebra System|S" "edit_math_extern"
206                 Separator
207                 Item "Split Cell|C" "cell-split"
208                 Separator
209                 Item "Add Line Above|A" "tabular-feature add-hline-above"
210                 Item "Add Line Below|B" "tabular-feature add-hline-below"
211                 Item "Delete Line Above|D" "tabular-feature delete-hline-above"
212                 Item "Delete Line Below|e" "tabular-feature delete-hline-below"
213                 Separator
214                 Item "Add Line to Left" "tabular-feature add-vline-left"
215                 Item "Add Line to Right" "tabular-feature add-vline-right"
216                 Item "Delete Line to Left" "tabular-feature delete-vline-left"
217                 Item "Delete Line to Right" "tabular-feature delete-vline-right"
218         End
219
220         Menu "edit_math_macro_definition"
221                 Item "Append Argument" "math-macro-add-param"
222                 Item "Remove Last Argument" "math-macro-remove-param"
223                 Separator
224                 Item "Make First Non-Optional into Optional Argument" "math-macro-make-optional"
225                 Item "Make Last Optional into Non-Optional Argument" "math-macro-make-nonoptional"
226                 Item "Insert Optional Argument" "math-macro-add-optional-param"
227                 Item "Remove Optional Argument" "math-macro-remove-optional-param"
228                 Separator
229                 Item "Append Argument Eating From The Right" "math-macro-append-greedy-param"
230                 Item "Append Optional Argument Eating From The Right" "math-macro-add-greedy-optional-param"
231                 Item "Remove Last Argument Spitting Out To The Right" "math-macro-remove-greedy-param"
232         End
233
234         Menu "edit_math_limits"
235                  Item "Default|t"  "math-limits empty"
236                  Item "Display|D"  "math-limits limits"
237                  Item "Inline|I"  "math-limits nolimits"
238         End
239
240         Menu "edit_math_fontstyles"
241                 Item "Math Normal Font|N" "math-font-style mathnormal"
242                 Separator
243                 Item "Math Calligraphic Family|C" "math-font-style mathcal"
244                 Item "Math Fraktur Family|F" "math-font-style mathfrak"
245                 Item "Math Roman Family|R" "math-font-style mathrm"
246                 Item "Math Sans Serif Family|S" "math-font-style mathsf"
247                 Separator
248                 Item "Math Bold Series|B" "math-font-style mathbf"
249                 Separator
250                 Item "Text Normal Font|T" "math-font-style textnormal"
251                 Separator
252                 Item "Text Roman Family" "math-font-style textrm"
253                 Item "Text Sans Serif Family" "math-font-style textsf"
254                 Item "Text Typewriter Family" "math-font-style texttt"
255                 Separator
256                 Item "Text Bold Series" "math-font-style textbf"
257                 Item "Text Medium Series" "math-font-style textmd"
258                 Separator
259                 Item "Text Italic Shape" "math-font-style textit"
260                 Item "Text Small Caps Shape" "math-font-style textsc"
261                 Item "Text Slanted Shape" "math-font-style textsl"
262                 Item "Text Upright Shape" "math-font-style textup"
263         End
264
265         Menu "edit_math_extern"
266                 Item "Octave|O" "math-extern octave"
267                 Item "Maxima|M" "math-extern maxima"
268                 Item "Mathematica|a" "math-extern mathematica"
269                 Separator
270                 Item "Maple, simplify|s" "math-extern maple simplify"
271                 Item "Maple, factor|f" "math-extern maple factor"
272                 Item "Maple, evalm|e" "math-extern maple evalm"
273                 Item "Maple, evalf|v" "math-extern maple evalf"
274         End
275
276         Menu "edit_math_mutate"
277                 Item "Inline Formula|I" "math-mutate simple"
278                 Item "Displayed Formula|D" "math-mutate equation"
279                 Item "Eqnarray Environment|E" "math-mutate eqnarray"
280                 Item "AMS align Environment|a" "math-mutate align"
281                 Item "AMS alignat Environment|t" "math-mutate alignat"
282                 Item "AMS flalign Environment|f" "math-mutate flalign"
283                 Item "AMS gather Environment|g" "math-mutate gather"
284                 Item "AMS multline Environment|m" "math-mutate multline"
285         End
286
287 #
288 # VIEW MENU
289 #
290
291         Menu "view"
292                 Item "Open All Insets|O" "all-insets-toggle open"
293                 Item "Close All Insets|C" "all-insets-toggle close"
294                 Separator
295                 Item "Unfold Math Macro" "math-macro-unfold"
296                 Item "Fold Math Macro" "math-macro-fold"
297                 Separator
298                 Item "View Source|S" "dialog-toggle view-source"
299                 Submenu "Update|U" "view_update"
300                 ViewFormats
301                 Separator
302                 Item "Split View Into Left And Right Half|i" "split-view horizontal"
303                 Item "Split View Into Upper And Lower Half|V" "split-view vertical"
304                 Item "Close Tab Group|G" "close-tab-group"
305                 Item "Fullscreen|l" "ui-toggle fullscreen"
306                 Submenu "Toolbars|b" "toolbars"
307                 Separator
308             Documents
309         End
310
311         Menu "view_update"
312                 UpdateFormats
313         End
314
315         Menu "toolbars"
316                 Toolbars
317         End
318 #
319 # INSERT MENU
320 #
321         Menu "insert"
322 # Try and group things a little better, and percolate the most
323 # commonly used to good positions (exception being mathed, but
324 # most people using mathed learn key shortcuts quite quickly anyway)
325                 Submenu "Math|h" "insert_math"
326                 Submenu "Special Character|p" "insert_special"
327                 Submenu "Formatting|o" "insert_formatting"
328                 Submenu "List / TOC|i" "insert_toc"
329                 Submenu "Float|a" "insert_float"
330                 Submenu "Note|N" "insert_note"
331                 Submenu "Branch|B" "insert_branches"
332                 Submenu "Custom insets" "insert_custom"
333                 Submenu "File|e" "insert_file"
334                 Item "Box[[Menu]]" "box-insert Frameless"
335                 Separator
336                 Item "Citation...|C" "dialog-show-new-inset citation"
337                 Item "Cross-Reference...|R" "dialog-show-new-inset ref"
338                 Item "Label...|L" "label-insert"
339                 Item "Caption" "caption-insert"
340                 Item "Index Entry|d" "index-insert"
341                 Item "Nomenclature Entry...|y" "nomencl-insert"
342                 Separator
343                 Item "Table...|T" "tabular-insert"
344                 Item "Graphics...|G" "dialog-show-new-inset graphics"
345                 Item "URL" "flex-insert URL"
346                 Item "Hyperlink|k" "href-insert"
347                 Item "Footnote|F" "footnote-insert"
348                 Item "Marginal Note|M" "marginalnote-insert"
349                 Item "Short Title|S" "optional-insert"
350                 Item "TeX Code|X" "ert-insert"
351                 Item "Program Listing[[Menu]]" "listing-insert"
352                 Item "Date" "date-insert"
353                 Item "Regexp" "regexp-mode"
354         End
355
356         Menu "insert_special"
357                 Item "Symbols...|b" "dialog-show symbols"
358                 Item "Ellipsis|i" "specialchar-insert dots"
359                 Item "End of Sentence|E" "specialchar-insert end-of-sentence"
360                 Item "Ordinary Quote|Q" "self-insert \""
361                 Item "Single Quote|S" "quote-insert single"
362                 Item "Protected Hyphen|y" "specialchar-insert nobreakdash"
363                 Item "Breakable Slash|a" "specialchar-insert slash"
364                 Item "Menu Separator|M" "specialchar-insert menu-separator"
365                 Item "Phonetic Symbols|P" "command-sequence math-mode on; math-insert \text\textipa ; char-forward ;"
366         End
367
368         Menu "insert_formatting"
369                 Item "Superscript|S" "command-sequence math-mode on; math-superscript; math-insert \text;"
370                 Item "Subscript|u" "command-sequence math-mode on; math-subscript; math-insert \text;"
371                 Separator
372                 Item "Protected Space|P" "space-insert protected"
373                 Item "Inter-word Space|w" "space-insert normal"
374                 Item "Thin Space|T" "space-insert thin"
375                 Item "Horizontal Space...|o" "dialog-show-new-inset space"
376                 Item "Horizontal Line|L" "line-insert"
377                 Item "Vertical Space...|V" "dialog-show-new-inset vspace"
378                 Separator
379                 Item "Hyphenation Point|H" "specialchar-insert hyphenation"
380                 Item "Ligature Break|k" "specialchar-insert ligature-break"
381                 Item "Ragged Line Break|R" "newline-insert newline"
382                 Item "Justified Line Break|J" "newline-insert linebreak"
383                 Separator
384                 Item "New Page|N" "newpage-insert newpage"
385                 Item "Page Break|a" "newpage-insert pagebreak"
386                 Item "Clear Page|C" "newpage-insert clearpage"
387                 Item "Clear Double Page|D" "newpage-insert cleardoublepage"
388         End
389
390         Menu "insert_math"
391                 Item "Inline Formula|I" "math-mode on"
392                 Item "Display Formula|D" "math-display"
393                 Item "Numbered Formula|N" "command-sequence math-display; math-number-toggle;"
394                 Item "Eqnarray Environment|E" "command-sequence math-mode on; math-mutate eqnarray;"
395                 Item "AMS align Environment|a" "command-sequence math-mode on; math-mutate align;"
396                 Item "AMS alignat Environment|t" "command-sequence math-mode on; math-mutate alignat;"
397                 Item "AMS flalign Environment|f" "command-sequence math-mode on; math-mutate flalign;"
398                 Item "AMS gather Environment|g" "command-sequence math-mode on; math-mutate gather;"
399                 Item "AMS multline Environment|m" "command-sequence math-mode on; math-mutate multline;"
400                 Separator
401                 Item "Array Environment|y" "math-matrix 2 2"
402                 Item "Cases Environment|C" "command-sequence math-mode on; math-insert \cases"
403                 Item "Aligned Environment|l" "command-sequence math-mode on; math-insert \aligned; tabular-feature append-column"
404                 Item "AlignedAt Environment|v" "command-sequence math-mode on; math-insert \alignedat; tabular-feature append-column"
405                 Item "Gathered Environment|h" "command-sequence math-mode on; math-insert \gathered"
406                 Item "Split Environment|S" "command-sequence math-mode on; math-insert \split; tabular-feature append-column"
407                 Separator
408                 Item "Delimiters...|r" "dialog-show mathdelimiter"
409                 Item "Matrix...|x" "dialog-show mathmatrix"
410                 Item "Macro|o" "math-macro newmacroname newcommand"
411         End
412
413         Menu "insert_float"
414                 FloatInsert
415 # This has got to be better than "Wrap", anyway
416                 Item "Figure Wrap Float|F" "wrap-insert figure"
417                 Item "Table Wrap Float|T" "wrap-insert table"
418         End
419
420         Menu "insert_toc"
421                 Item "Table of Contents|C" "toc-insert"
422                 FloatListInsert
423                 Item "Index List|I" "index-print"
424                 Item "Nomenclature|N" "nomencl-print"
425                 Item "BibTeX Bibliography...|B" "dialog-show-new-inset bibtex"
426         End
427
428         Menu "insert_file"
429                 Item "LyX Document...|X" "file-insert"
430                 Item "Plain Text...|T" "file-insert-plaintext"
431                 Item "Plain Text, Join Lines...|J" "file-insert-plaintext-para"
432                 Separator
433                 Item "External Material...|M" "dialog-show-new-inset external"
434                 Item "Child Document...|d" "dialog-show-new-inset include"
435         End
436
437         Menu "insert_note"
438                 Item "LyX Note|N" "note-insert Note"
439                 Item "Comment|C" "note-insert Comment"
440                 Item "Greyed Out|G" "note-insert Greyedout"
441         End
442
443         Menu "insert_branches"
444                 Branches
445         End
446
447         Menu "insert_custom"
448                 Custom
449         End
450
451 #
452 # DOCUMENT MENU
453 #
454
455         Menu "document"
456                 Submenu "Change Tracking|C" "document_change"
457                 OptItem "Build Program|B" "build-program"
458                 Item "LaTeX Log|L" "dialog-show latexlog"
459                 Item "Outline|O" "dialog-toggle toc"
460                 Item "Start Appendix Here|A" "appendix"
461                 Separator
462                 Item "Save in Bundled Format|F" "buffer-toggle-embedding"
463                 Item "Compressed|m" "buffer-toggle-compression"
464                 Item "Settings...|S" "dialog-show document"
465         End
466
467         Menu "document_change"
468                 Item "Track Changes|T" "changes-track"
469                 Item "Merge Changes...|M" "changes-merge"
470                 Item "Accept Change|A" "change-accept"
471                 Item "Reject Change|R" "change-reject"
472                 Item "Accept All Changes|c" "all-changes-accept"
473                 Item "Reject All Changes|e" "all-changes-reject"
474                 Item "Show Changes in Output|S" "changes-output"
475         End
476
477 #
478 # NAVIGATE MENU
479 #
480         Menu "navigate"
481                 Submenu "Bookmarks|B" "navigate_bookmarks"
482                 Item "Next Note|N" "note-next"
483                 Item "Next Change|C" "change-next"
484                 Item "Next Cross-Reference|R" "reference-next"
485                 Item "Go to Label|L" "label-goto"
486                 Separator
487                 Toc
488         End
489
490         Menu "navigate_bookmarks"
491                 Item "Save Bookmark 1|S" "bookmark-save 1"
492                 Item "Save Bookmark 2" "bookmark-save 2"
493                 Item "Save Bookmark 3" "bookmark-save 3"
494                 Item "Save Bookmark 4" "bookmark-save 4"
495                 Item "Save Bookmark 5" "bookmark-save 5"
496                 Item "Clear Bookmarks|C" "bookmark-clear"
497                 Separator
498                 Bookmarks
499         End
500
501 #
502 # TOOLS MENU
503 #
504
505         Menu "tools"
506                 Item "Spellchecker...|S" "dialog-show spellchecker"
507                 OptItem "Thesaurus...|T" "thesaurus-entry"
508                 Item "Statistics...|a" "statistics"
509                 OptItem "Check TeX|h" "buffer-chktex"
510                 Item "TeX Information|I" "dialog-show texinfo"
511                 Separator
512 # A LOT of applications have Tools->Prefs. Remember this
513 # should be rarely used - Edit menu is not a good place to
514 # have it.
515                 Item "Reconfigure|R" "reconfigure"
516                 Item "Preferences...|P" "dialog-show prefs"
517         End
518
519 #
520 # HELP MENU
521 #
522         Menu "help"
523                 Item "Introduction|I" "help-open Intro"
524                 Item "Tutorial|T" "help-open Tutorial"
525                 Item "User's Guide|U" "help-open UserGuide"
526                 Item "Additional Features|F" "help-open Extended"
527                 Item "Embedded Objects|O" "help-open EmbeddedObjects"
528                 Item "Math|M" "help-open Math"
529                 Item "Customization|C" "help-open Customization"
530                 Item "Shortcuts|S" "help-open Shortcuts"
531                 Item "LyX Functions|y" "help-open LFUNs"
532                 Item "LaTeX Configuration|L" "help-open LaTeXConfig"
533                 Submenu "Specific Manuals|p" "examples"
534                 Separator
535                 Item "About LyX|X" "dialog-show aboutlyx"
536         End
537
538         Menu "examples"
539                 Item "Linguistics Manual|L" "help-open linguistics"
540                 Item "Braille Manual|B" "help-open Braille"
541                 Item "XY-pic Manual|X" "help-open xypic"
542                 Item "Multicolumn Manual|M" "help-open multicol"
543         End
544
545
546 End
547