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