]> git.lyx.org Git - lyx.git/blob - lib/layouts/stdinsets.inc
Allow listings insets to be edited externally.
[lyx.git] / lib / layouts / stdinsets.inc
1 # Textclass definition file for LaTeX.
2 # Author : Martin vermeer <martin.vermeer@hut.fi>
3 # Inset layouts definition
4 #
5 # Detailed format description is available in the customization manual
6
7 Format 89
8
9 Provides stdinsets 1
10
11 OutlinerName marginalnote "Marginal notes"
12 OutlinerName footnote     "Footnotes"
13 OutlinerName note         "Notes"
14 OutlinerName branch       "Branches"
15 OutlinerName index        "Index Entries" #no AddToToc (built-in)
16 OutlinerName listing      "Listings" #no AddToToc (built-in)
17
18 InsetLayout Marginal
19         LabelString           margin
20         LatexType             command
21         LatexName             marginpar
22         Font
23           Size                Small
24         EndFont
25         LabelFont
26           Color               marginlabel
27           Size                Small
28         EndFont
29         MultiPar              true
30         NeedProtect           true
31         HTMLStyle
32                 div.marginal {
33                         border: 2px solid black;
34                         padding: 1ex;
35                         margin: 1ex;
36                         background-color: #F0F0F0;
37                         float:right;
38                         font-size: small;
39                         font-weight: medium;
40                         font-family: serif;
41                         font-variant: normal;
42                         font-style: normal;
43                 }
44         EndHTMLStyle
45         AddToToc              marginalnote
46         IsTocCaption          true
47         DocBookTag            para
48 End
49
50 InsetLayout Foot
51         LabelString           foot
52         LatexType             Command
53         LatexName             footnote
54         Counter               footnote
55         Font
56           Size                Small
57         EndFont
58         LabelFont
59           Color               footlabel
60           Size                Small
61         EndFont
62         MultiPar              true
63         RefPrefix             fn
64         HTMLLabel             \arabic{footnote}
65         HTMLInnerTag          div
66         HTMLStyle
67                 span.foot_label {
68                         vertical-align: super;
69                         font-size: smaller;
70                         font-weight: bold;
71                         text-decoration: underline;
72                 }
73                 div.foot {
74                         display: inline;
75                         font-size: small;
76                         font-weight: medium;
77                         font-family: serif;
78                         font-variant: normal;
79                         font-style: normal;
80                 }
81                 div.foot_inner { display: none; }
82                 div.foot:hover div.foot_inner {
83                         display: block;
84                         border: 1px double black;
85                         margin: 0em 1em;
86                         padding: 1em;
87                 }
88         EndHTMLStyle
89         AddToToc              footnote
90         IsTocCaption          true
91         DocBookTag            footnote
92         DocBookTagType        inline
93 End
94
95 InsetLayout Foot:InTitle
96         CopyStyle             Foot
97         LatexName             thanks
98         NeedProtect           true
99         Counter               thanks
100         MultiPar              false
101         HTMLLabel             \fnsymbol{thanks}
102         HTMLInnerTag          span
103         HTMLStyle
104                 span.foot_intitle_label {
105                         vertical-align: super;
106                         font-size: smaller;
107                         font-weight: bold;
108                         text-decoration: underline;
109                 }
110                 span.foot_intitle {
111                         display: inline;
112                         font-size: small;
113                         font-weight: medium;
114                         font-family: serif;
115                         font-variant: normal;
116                         font-style: normal;
117                 }
118                 span.foot_intitle_inner { display: none; }
119                 span.foot_intitle:hover span.foot_intitle_inner {
120                         display: block;
121                         border: 1px double black;
122                         margin: 0em 1em;
123                         padding: 1em;
124                 }
125         EndHTMLStyle
126 End
127
128 InsetLayout Foot:InFloatTable
129         CopyStyle             Foot
130         LatexName             tablefootnote
131         Requires              tablefootnote
132 End
133
134
135 InsetLayout Note:Comment
136         LabelString           Comment
137         LatexType             environment
138         LatexName             comment
139         Requires              verbatim
140         BgColor               commentbg
141         LabelFont
142           Color               comment
143           Size                Small
144         EndFont
145         MultiPar              true
146         Display               false
147         HTMLTag               div
148         HTMLIsBlock           true
149         HTMLStyle
150         div.note_comment {
151                 display: none;
152         }
153         EndHTMLStyle
154         AddToToc              note
155         IsTocCaption          true
156         NeedCProtect          true
157 End
158
159
160 InsetLayout Note:Note
161         LabelString           Note
162         LatexType             command
163         LatexName             note
164         BgColor               notebg
165         LabelFont
166           Color               note
167           Size                Small
168         EndFont
169         MultiPar              true
170         # Not output for XHTML
171         AddToToc              note
172         IsTocCaption          true
173 End
174
175
176 InsetLayout Note:Greyedout
177         LabelString           Greyedout
178         LatexType             environment
179         LatexName             lyxgreyedout
180         Requires              color,lyxgreyedout
181         BgColor               greyedoutbg
182         Font
183           Color               greyedouttext
184         EndFont
185         LabelFont
186           Color               greyedout
187           Size                Small
188         EndFont
189         MultiPar              true
190         Display               false
191         HTMLInnerTag div
192         HTMLStyle
193                 div.note_greyedout {
194                         display: inline;
195                         color: #A0A0A0;
196                         padding-left: 1ex;
197                         padding-right: 1ex;
198                 }
199         EndHTMLStyle
200         HTMLIsBlock           false
201         AddToToc              note
202         IsTocCaption          true
203         NeedCProtect          true
204 End
205
206 InsetLayout ERT
207         LabelString           ERT
208         LatexType             none
209         Decoration            minimalistic
210         Font
211           Color               latex
212           Family              typewriter
213         EndFont
214         LabelFont
215           Color               latex
216           Size                Small
217         EndFont
218         MultiPar              true
219         CustomPars            false
220         ForcePlain            true
221         PassThru              true
222         ParbreakIsNewline     true
223         KeepEmpty             true
224         FreeSpacing           true
225         ForceLTR              true
226         EditExternal          true
227 End
228
229 InsetLayout Phantom
230         Decoration            minimalistic
231         Font
232           Color               phantomtext
233         EndFont
234         MultiPar              false
235         CustomPars            false
236         ForcePlain            true
237 End
238
239 InsetLayout IPADeco
240         Decoration            minimalistic
241         Font
242           Color               foreground
243         EndFont
244         MultiPar              false
245         CustomPars            false
246         ForcePlain            true
247 End
248
249 InsetLayout TOC
250   HTMLTag h2
251   HTMLStyle
252     div.toc {
253       margin: 2em 0em;
254       border-style: solid;
255       border-width: 2px 0px;
256       padding: 1em 0em;
257     }
258     h2.tochead { font-size: x-large; font-weight: bold; }
259     div.lyxtoc-0 {
260       margin: 2em 0em 0em 0em;
261       font-size: xx-large;
262       font-weight: bold;
263     }
264     div.lyxtoc-1 {
265       margin: 1em 0em 0em 0em;
266       font-size: x-large;
267       font-weight: bold;
268     }
269     div.lyxtoc-2 {
270       margin: 0em 0.1em 0em 1em;
271       font-size: large;
272       font-weight: normal;
273     }
274     div.lyxtoc-3 { margin: 0em 0.1em 0em 0.5em; font-size: medium; }
275     div.lyxtoc-4 { margin: 0em 0.1em 0em 0.5em; }
276     div.lyxtoc-5 { margin: 0em 0.1em 0em 0.5em; }
277     div.lyxtoc-6 { margin: 0em 0.1em 0em 0.5em; }
278     a.tocentry {
279       text-decoration: none;
280       color: black;
281     }
282     a.tocentry:visited { color: black; }
283   EndHTMLStyle
284 End
285
286 InsetLayout TOC:Listings
287         # We need the [[List of Listings]] context, since "Listings" is also
288         # the name of the inset and translated differently.
289         # "Listings[[List of Listings]]" is the name of the "List of listings"
290         # ("Listings" is the predefined english name) in listings.sty, so it
291         # must be used here as well.
292         BabelPreamble
293                 \addto\captions$$lang{\renewcommand{\lstlistlistingname}{_(Listings[[List of Listings]])}}
294         EndBabelPreamble
295         # The command does not need to be defined in LangPreamble, since
296         # listings.sty does that already. However it needs to be redefined
297         # in order to be used for non-english single-language documents.
298         LangPreamble
299                 \renewcommand{\lstlistlistingname}{_(Listings[[List of Listings]])}
300         EndLangPreamble
301         FixedWidthPreambleEncoding true
302   HTMLTag h2
303   HTMLStyle
304     div.lyxtoc-flat {
305       margin: 0em 0em 0em 1em;
306       font-size: large;
307       font-weight: normal;
308     }
309   EndHTMLStyle
310 End
311
312 InsetLayout TOC:MintedListings
313         # "List of Listings" is the name of the "List of listings"
314         # in minted.sty so it must be used here as well.
315         BabelPreamble
316                 \addto\captions$$lang{\renewcommand{\listoflistingscaption}{_(List of Listings)}}
317         EndBabelPreamble
318         # The command does not need to be defined in LangPreamble, since
319         # minted.sty does that already. However it needs to be redefined
320         # in order to be used for non-english single-language documents.
321         LangPreamble
322                 \renewcommand{\listoflistingscaption}{_(List of Listings)}
323         EndLangPreamble
324         FixedWidthPreambleEncoding false
325   HTMLTag h2
326   HTMLStyle
327     div.lyxtoc-flat {
328       margin: 0em 0em 0em 1em;
329       font-size: large;
330       font-weight: normal;
331     }
332   EndHTMLStyle
333 End
334
335 InsetLayout Include:Listings
336         BabelPreamble
337                 \addto\captions$$lang{\renewcommand{\lstlistingname}{_(Listing)}}
338         EndBabelPreamble
339         # The command does not need to be defined in LangPreamble, since
340         # listings.sty does that already. However it needs to be redefined
341         # in order to be used for non-english single-language documents.
342         LangPreamble
343                 \renewcommand{\lstlistingname}{_(Listing)}
344         EndLangPreamble
345         FixedWidthPreambleEncoding true
346 End
347
348 InsetLayout Listings
349         CopyStyle Include:Listings
350         LabelString           Listings[[inset]]
351         LatexType             none
352         Decoration            minimalistic
353         Font
354           Color               foreground
355           Family              typewriter
356         EndFont
357         LabelFont
358           Color               foreground
359           Size                Small
360         EndFont
361         BgColor               listingsbg
362         MultiPar              true
363         PassThru              true
364         ParbreakIsNewline     true
365         KeepEmpty             true
366         FreeSpacing           true
367         ForceLTR              true
368         ForcePlain            true
369         NeedCProtect          true
370         RefPrefix             lst
371         EditExternal          true
372         HTMLTag               pre
373         HTMLStyle
374                 div.float-listings {
375                         border: 2px solid black;
376                         padding: 1ex;
377                         margin: 1ex;
378                 }
379                 div.listings-caption {
380                         text-align: center;
381                         border: 2px solid black;
382                         padding: 1ex;
383                         margin: 1ex;
384         }
385         EndHTMLStyle
386         DocBookTag            programlisting
387 End
388
389 InsetLayout MintedListings
390         CopyStyle Listings
391         BabelPreamble
392                 \addto\captions$$lang{\renewcommand{\listingscaption}{_(Listing)}}
393         EndBabelPreamble
394         # The command does not need to be defined in LangPreamble, since
395         # minted.sty does that already. However it needs to be redefined
396         # in order to be used for non-english single-language documents.
397         LangPreamble
398                 \renewcommand{\listingscaption}{_(Listing)}
399         EndLangPreamble
400         FixedWidthPreambleEncoding false
401 End
402
403 InsetLayout Branch
404         Decoration            classic
405         LabelFont
406           Color               branchlabel
407           Size                Small
408         EndFont
409         MultiPar              true
410         InToc                 true
411         HTMLIsBlock           false
412         AddToToc              branch
413         IsTocCaption          true
414 End
415
416 InsetLayout Index
417         LabelString           Idx
418         Decoration            classic
419         Font
420           Size                Small
421         EndFont
422         LabelFont
423           Color               indexlabel
424           Size                Small
425         EndFont
426         MultiPar              false
427         CustomPars            false
428         ForcePlain            true
429         ContentAsLabel        true
430         PassThruChars         @|!
431 End
432
433 InsetLayout Box
434         LabelFont
435           Color               foreground
436           Size                Small
437         EndFont
438         MultiPar              true
439         DocBookWrapperTag     sidebar
440         DocBookTag            para
441 End
442
443 InsetLayout Box:Frameless
444         CopyStyle Box
445         HTMLStyle
446                 div.Frameless { margin: 1em; }
447         EndHTMLStyle
448         DocBookWrapperTag     sidebar
449         DocBookTag            para
450         DocBookWrapperAttr    role='frameless'
451 End
452
453 InsetLayout Box:Shaded
454         CopyStyle Box
455         BgColor shaded
456         HTMLStyle
457                 div.Shaded {
458                         background-color: gray;
459                         padding: 0.5ex;
460                 }
461         EndHTMLStyle
462         DocBookWrapperTag     sidebar
463         DocBookTag            para
464         DocBookWrapperAttr    role='shaded'
465 End
466
467 InsetLayout Box:Boxed
468         CopyStyle Box
469         HTMLStyle
470                 div.Boxed {
471                         border: solid thick black;
472                         padding: 0.5ex;
473                 }
474         EndHTMLStyle
475         DocBookWrapperTag     sidebar
476         DocBookTag            para
477         DocBookWrapperAttr    role='boxed'
478 End
479
480 InsetLayout Box:Framed
481         CopyStyle Box
482         HTMLStyle
483                 div.Framed {
484                         border: solid thick black;
485                         padding: 0.5ex;
486                 }
487         EndHTMLStyle
488         DocBookWrapperTag     sidebar
489         DocBookTag            para
490         DocBookWrapperAttr    role='framed'
491 End
492
493 InsetLayout Box:ovalbox
494         CopyStyle Box
495         HTMLStyle
496                 div.ovalbox {
497                         border: groove medium black;
498                         padding: 0.5ex;
499                 }
500         EndHTMLStyle
501         DocBookWrapperTag     sidebar
502         DocBookTag            para
503         DocBookWrapperAttr    role='ovalbox'
504 End
505
506 InsetLayout Box:Ovalbox
507         CopyStyle Box
508         HTMLStyle
509                 div.Ovalbox {
510                         border: ridge thick black;
511                         padding: 0.5ex;
512                 }
513         EndHTMLStyle
514         DocBookWrapperTag     sidebar
515         DocBookTag            para
516         DocBookWrapperAttr    role='ovalbox-var'
517 End
518
519 InsetLayout Box:Shadowbox
520         CopyStyle Box
521         HTMLStyle
522                 div.Shadowbox { border: solid gray medium; border-bottom: solid black 1ex; border-right: solid black 1ex; padding: 0.5ex; }
523         EndHTMLStyle
524         DocBookWrapperTag     sidebar
525         DocBookTag            para
526         DocBookWrapperAttr    role='shadowbox'
527 End
528
529 InsetLayout Box:Doublebox
530         CopyStyle Box
531         HTMLStyle
532                 div.Doublebox {
533                         border: double thick black;
534                         padding: 0.5ex;
535                 }
536         EndHTMLStyle
537         DocBookWrapperTag     sidebar
538         DocBookTag            para
539         DocBookWrapperAttr    role='doublebox'
540 End
541
542 InsetLayout Float
543         LaTeXType             environment
544         LabelFont
545           Color               collapsible
546           Size                Small
547         EndFont
548         MultiPar              true
549         HTMLStyle
550                 div.float {
551                         border: 2px solid black;
552                         text-align: center;
553                 }
554         EndHTMLStyle
555 End
556
557 #InsetWrap requires these, independently of whether stdfloats.inc is included
558 OutlinerName table        "Tables" #no AddToToc (built-in)
559 OutlinerName figure       "Figures" #no AddToToc (built-in)
560
561 InsetLayout Wrap
562         LabelFont
563           Color               collapsible
564           Size                Small
565         EndFont
566         MultiPar              true
567         RefPrefix             wrap
568         HTMLStyle
569                 div.wrap {
570                         float: right;
571                         border: 2px solid black;
572                         padding: 1ex;
573                         margin: 1ex;
574                 }
575         EndHTMLStyle
576 End
577
578 InsetLayout "Flex:URL"
579         LyXType               standard
580         Decoration            classic
581         LabelString           URL
582         ContentAsLabel        true
583         LatexName             url
584         LatexType             command
585         Requires              url
586         MultiPar              false
587         CustomPars            false
588         ForcePlain            true
589         PassThru              true
590         FreeSpacing           true
591         ForceLTR              true
592         NeedCProtect          true
593         Font
594           Family              Typewriter
595           Color               urltext
596         EndFont
597         LabelFont
598           Family              Typewriter
599           Color               urllabel
600           Size                Small
601         EndFont
602         HTMLIsBlock           false
603         DocBookTag            link
604         DocBookTagType        inline
605 End
606
607 InsetLayout Argument
608         LabelString           Argument
609         LabelFont
610           Color               collapsible
611           Size                Small
612         EndFont
613         MultiPar              false
614         ForceLocalFontSwitch  1
615 End
616
617 InsetLayout Info
618         Decoration            conglomerate
619         HTMLStyle
620                 span.info { font-family: sans-serif; }
621         EndHTMLStyle
622         HTMLTag               span
623         MultiPar              false
624 End
625
626 InsetLayout Info:menu
627         CopyStyle             Info
628         LatexType             command
629         LatexName             menuitem
630         Preamble
631           \providecommand{\menuitem}[1]{\textsf{#1}}
632         EndPreamble
633         Decoration            conglomerate
634         Font
635           Family              sans
636         EndFont
637         HTMLAttr              "class='info menu'"
638         HTMLStyle
639                 span.menu { font-family: sans-serif; }
640         EndHTMLStyle
641         DocBookTag            guimenu
642         DocBookTagType        inline
643 End
644
645 InsetLayout Info:shortcut
646         CopyStyle             Info
647         LatexType             command
648         LatexName             shortcut
649         Preamble
650           \providecommand{\shortcut}[1]{\mbox{\textsf{#1}}}
651         EndPreamble
652         Decoration            conglomerate
653         Font
654           Family              sans
655         EndFont
656         HTMLAttr              "class='info shortcut'"
657         HTMLStyle
658                 span.shortcut { font-family: sans-serif; }
659         EndHTMLStyle
660         DocBookWrapperTag     keycombo
661         DocBookWrapperTagType inline
662         DocBookTag            keycap
663         DocBookTagType        inline
664 End
665
666 InsetLayout Info:shortcuts
667         CopyStyle             Info
668         LatexType             command
669         LatexName             shortcut
670         Preamble
671           \providecommand{\shortcut}[1]{\textsf{#1}}
672         EndPreamble
673         Decoration            conglomerate
674         Font
675           Family              sans
676         EndFont
677         HTMLAttr              "class='info shortcut'"
678         HTMLStyle
679                 span.shortcuts { font-family: sans-serif; }
680         EndHTMLStyle
681         DocBookWrapperTag     keycombo
682         DocBookWrapperTagType inline
683         DocBookTag            keycap
684         DocBookTagType        inline
685 End
686
687 InsetLayout Caption:Standard
688         LabelString          standard
689         LaTeXType            command
690         LatexName            caption
691         NeedProtect          1
692         MultiPar             false
693         Argument 1
694                 LabelString   "Short Title|S"
695                 Tooltip       "The caption as it appears in the list of figures/tables"
696                 InsertCotext  1
697         EndArgument
698         HTMLStyle
699                 div.float-caption {
700                         text-align: center;
701                         border: 2px solid black;
702                         padding: 1ex;
703                         margin: 1ex;
704                 }
705         EndHTMLStyle
706         HTMLAttr "class='float-caption float-caption-standard'"
707 End
708
709
710 InsetLayout Caption:Unnumbered
711         CopyStyle            Caption:Standard
712         LabelString          unlabelled
713         LatexName            caption*
714         ResetArgs            1
715 End
716
717
718 InsetLayout Preview
719         LabelString           Preview
720         Decoration            minimalistic
721         MultiPar              true
722 End
723
724
725 InsetLayout Script
726         LatexType       command
727         MultiPar        false
728         ForcePlain      1
729         CustomPars      0
730         InToc           1
731         HTMLIsBlock     0
732 End
733
734
735 InsetLayout Script:superscript
736         CopyStyle       Script
737         LaTeXName       textsuperscript
738         HTMLTag         sup
739 End
740
741
742 InsetLayout Script:subscript
743         CopyStyle       Script
744         Requires        subscript
745         LaTeXName       textsubscript
746         HTMLTag         sub
747 End
748
749
750 InsetLayout PrintNomencl
751         BabelPreamble
752                 \addto\captions$$lang{%
753                         \def\eqdeclaration#1{, _(see equation[[nomencl]])\nobreakspace(#1)}%
754                         \def\pagedeclaration#1{, _(page[[nomencl]])\nobreakspace#1}%
755                         \def\nomname{_(Nomenclature[[output]])}%
756                 }
757         EndBabelPreamble
758         # The command is defined for several languages in nomencl.sty. However, we need to define
759         # it anyway for the other, non suppported languages.
760         LangPreamble
761                 \def\eqdeclaration#1{, _(see equation[[nomencl]])\nobreakspace(#1)}
762                 \def\pagedeclaration#1{, _(page[[nomencl]])\nobreakspace#1}
763                 \def\nomname{_(Nomenclature[[output]])}
764         EndLangPreamble
765         HTMLTag h2
766 End
767
768 InsetLayout Tabular
769         HTMLStyle
770                 table {
771                         border-collapse: collapse;
772                         display: inline-block;
773                 }
774                 td {
775                         border: 1px solid black;
776                         padding: 0.5ex;
777                 }
778         EndHTMLStyle
779 End