]> git.lyx.org Git - lyx.git/blob - lib/layouts/stdinsets.inc
8ebf2c709cb7adc93874155f56b82650776e2db3
[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         HTMLTag               pre
372         HTMLStyle
373                 div.float-listings {
374                         border: 2px solid black;
375                         padding: 1ex;
376                         margin: 1ex;
377                 }
378                 div.listings-caption {
379                         text-align: center;
380                         border: 2px solid black;
381                         padding: 1ex;
382                         margin: 1ex;
383         }
384         EndHTMLStyle
385         DocBookTag            programlisting
386 End
387
388 InsetLayout MintedListings
389         CopyStyle Listings
390         BabelPreamble
391                 \addto\captions$$lang{\renewcommand{\listingscaption}{_(Listing)}}
392         EndBabelPreamble
393         # The command does not need to be defined in LangPreamble, since
394         # minted.sty does that already. However it needs to be redefined
395         # in order to be used for non-english single-language documents.
396         LangPreamble
397                 \renewcommand{\listingscaption}{_(Listing)}
398         EndLangPreamble
399         FixedWidthPreambleEncoding false
400 End
401
402 InsetLayout Branch
403         Decoration            classic
404         LabelFont
405           Color               branchlabel
406           Size                Small
407         EndFont
408         MultiPar              true
409         InToc                 true
410         HTMLIsBlock           false
411         AddToToc              branch
412         IsTocCaption          true
413 End
414
415 InsetLayout Index
416         LabelString           Idx
417         Decoration            classic
418         Font
419           Size                Small
420         EndFont
421         LabelFont
422           Color               indexlabel
423           Size                Small
424         EndFont
425         MultiPar              false
426         CustomPars            false
427         ForcePlain            true
428         ContentAsLabel        true
429         PassThruChars         @|!
430 End
431
432 InsetLayout Box
433         LabelFont
434           Color               foreground
435           Size                Small
436         EndFont
437         MultiPar              true
438         DocBookWrapperTag     sidebar
439         DocBookTag            para
440 End
441
442 InsetLayout Box:Frameless
443         CopyStyle Box
444         HTMLStyle
445                 div.Frameless { margin: 1em; }
446         EndHTMLStyle
447         DocBookWrapperTag     sidebar
448         DocBookTag            para
449         DocBookWrapperAttr    role='frameless'
450 End
451
452 InsetLayout Box:Shaded
453         CopyStyle Box
454         BgColor shaded
455         HTMLStyle
456                 div.Shaded {
457                         background-color: gray;
458                         padding: 0.5ex;
459                 }
460         EndHTMLStyle
461         DocBookWrapperTag     sidebar
462         DocBookTag            para
463         DocBookWrapperAttr    role='shaded'
464 End
465
466 InsetLayout Box:Boxed
467         CopyStyle Box
468         HTMLStyle
469                 div.Boxed {
470                         border: solid thick black;
471                         padding: 0.5ex;
472                 }
473         EndHTMLStyle
474         DocBookWrapperTag     sidebar
475         DocBookTag            para
476         DocBookWrapperAttr    role='boxed'
477 End
478
479 InsetLayout Box:Framed
480         CopyStyle Box
481         HTMLStyle
482                 div.Framed {
483                         border: solid thick black;
484                         padding: 0.5ex;
485                 }
486         EndHTMLStyle
487         DocBookWrapperTag     sidebar
488         DocBookTag            para
489         DocBookWrapperAttr    role='framed'
490 End
491
492 InsetLayout Box:ovalbox
493         CopyStyle Box
494         HTMLStyle
495                 div.ovalbox {
496                         border: groove medium black;
497                         padding: 0.5ex;
498                 }
499         EndHTMLStyle
500         DocBookWrapperTag     sidebar
501         DocBookTag            para
502         DocBookWrapperAttr    role='ovalbox'
503 End
504
505 InsetLayout Box:Ovalbox
506         CopyStyle Box
507         HTMLStyle
508                 div.Ovalbox {
509                         border: ridge thick black;
510                         padding: 0.5ex;
511                 }
512         EndHTMLStyle
513         DocBookWrapperTag     sidebar
514         DocBookTag            para
515         DocBookWrapperAttr    role='ovalbox-var'
516 End
517
518 InsetLayout Box:Shadowbox
519         CopyStyle Box
520         HTMLStyle
521                 div.Shadowbox { border: solid gray medium; border-bottom: solid black 1ex; border-right: solid black 1ex; padding: 0.5ex; }
522         EndHTMLStyle
523         DocBookWrapperTag     sidebar
524         DocBookTag            para
525         DocBookWrapperAttr    role='shadowbox'
526 End
527
528 InsetLayout Box:Doublebox
529         CopyStyle Box
530         HTMLStyle
531                 div.Doublebox {
532                         border: double thick black;
533                         padding: 0.5ex;
534                 }
535         EndHTMLStyle
536         DocBookWrapperTag     sidebar
537         DocBookTag            para
538         DocBookWrapperAttr    role='doublebox'
539 End
540
541 InsetLayout Float
542         LaTeXType             environment
543         LabelFont
544           Color               collapsible
545           Size                Small
546         EndFont
547         MultiPar              true
548         HTMLStyle
549                 div.float {
550                         border: 2px solid black;
551                         text-align: center;
552                 }
553         EndHTMLStyle
554 End
555
556 #InsetWrap requires these, independently of whether stdfloats.inc is included
557 OutlinerName table        "Tables" #no AddToToc (built-in)
558 OutlinerName figure       "Figures" #no AddToToc (built-in)
559
560 InsetLayout Wrap
561         LabelFont
562           Color               collapsible
563           Size                Small
564         EndFont
565         MultiPar              true
566         RefPrefix             wrap
567         HTMLStyle
568                 div.wrap {
569                         float: right;
570                         border: 2px solid black;
571                         padding: 1ex;
572                         margin: 1ex;
573                 }
574         EndHTMLStyle
575 End
576
577 InsetLayout "Flex:URL"
578         LyXType               standard
579         Decoration            classic
580         LabelString           URL
581         ContentAsLabel        true
582         LatexName             url
583         LatexType             command
584         Requires              url
585         MultiPar              false
586         CustomPars            false
587         ForcePlain            true
588         PassThru              true
589         FreeSpacing           true
590         ForceLTR              true
591         NeedCProtect          true
592         Font
593           Family              Typewriter
594           Color               urltext
595         EndFont
596         LabelFont
597           Family              Typewriter
598           Color               urllabel
599           Size                Small
600         EndFont
601         HTMLIsBlock           false
602         DocBookTag            link
603         DocBookTagType        inline
604 End
605
606 InsetLayout Argument
607         LabelString           Argument
608         LabelFont
609           Color               collapsible
610           Size                Small
611         EndFont
612         MultiPar              false
613         ForceLocalFontSwitch  1
614 End
615
616 InsetLayout Info
617         Decoration            conglomerate
618         HTMLStyle
619                 span.info { font-family: sans-serif; }
620         EndHTMLStyle
621         HTMLTag               span
622         MultiPar              false
623 End
624
625 InsetLayout Info:menu
626         CopyStyle             Info
627         LatexType             command
628         LatexName             menuitem
629         Preamble
630           \providecommand{\menuitem}[1]{\textsf{#1}}
631         EndPreamble
632         Decoration            conglomerate
633         Font
634           Family              sans
635         EndFont
636         HTMLAttr              "class='info menu'"
637         HTMLStyle
638                 span.menu { font-family: sans-serif; }
639         EndHTMLStyle
640         DocBookTag            guimenu
641         DocBookTagType        inline
642 End
643
644 InsetLayout Info:shortcut
645         CopyStyle             Info
646         LatexType             command
647         LatexName             shortcut
648         Preamble
649           \providecommand{\shortcut}[1]{\mbox{\textsf{#1}}}
650         EndPreamble
651         Decoration            conglomerate
652         Font
653           Family              sans
654         EndFont
655         HTMLAttr              "class='info shortcut'"
656         HTMLStyle
657                 span.shortcut { font-family: sans-serif; }
658         EndHTMLStyle
659         DocBookWrapperTag     keycombo
660         DocBookWrapperTagType inline
661         DocBookTag            keycap
662         DocBookTagType        inline
663 End
664
665 InsetLayout Info:shortcuts
666         CopyStyle             Info
667         LatexType             command
668         LatexName             shortcut
669         Preamble
670           \providecommand{\shortcut}[1]{\textsf{#1}}
671         EndPreamble
672         Decoration            conglomerate
673         Font
674           Family              sans
675         EndFont
676         HTMLAttr              "class='info shortcut'"
677         HTMLStyle
678                 span.shortcuts { font-family: sans-serif; }
679         EndHTMLStyle
680         DocBookWrapperTag     keycombo
681         DocBookWrapperTagType inline
682         DocBookTag            keycap
683         DocBookTagType        inline
684 End
685
686 InsetLayout Caption:Standard
687         LabelString          standard
688         LaTeXType            command
689         LatexName            caption
690         NeedProtect          1
691         MultiPar             false
692         Argument 1
693                 LabelString   "Short Title|S"
694                 Tooltip       "The caption as it appears in the list of figures/tables"
695                 InsertCotext  1
696         EndArgument
697         HTMLStyle
698                 div.float-caption {
699                         text-align: center;
700                         border: 2px solid black;
701                         padding: 1ex;
702                         margin: 1ex;
703                 }
704         EndHTMLStyle
705         HTMLAttr "class='float-caption float-caption-standard'"
706 End
707
708
709 InsetLayout Caption:Unnumbered
710         CopyStyle            Caption:Standard
711         LabelString          unlabelled
712         LatexName            caption*
713         ResetArgs            1
714 End
715
716
717 InsetLayout Preview
718         LabelString           Preview
719         Decoration            minimalistic
720         MultiPar              true
721 End
722
723
724 InsetLayout Script
725         LatexType       command
726         MultiPar        false
727         ForcePlain      1
728         CustomPars      0
729         InToc           1
730         HTMLIsBlock     0
731 End
732
733
734 InsetLayout Script:superscript
735         CopyStyle       Script
736         LaTeXName       textsuperscript
737         HTMLTag         sup
738 End
739
740
741 InsetLayout Script:subscript
742         CopyStyle       Script
743         Requires        subscript
744         LaTeXName       textsubscript
745         HTMLTag         sub
746 End
747
748
749 InsetLayout PrintNomencl
750         BabelPreamble
751                 \addto\captions$$lang{%
752                         \def\eqdeclaration#1{, _(see equation[[nomencl]])\nobreakspace(#1)}%
753                         \def\pagedeclaration#1{, _(page[[nomencl]])\nobreakspace#1}%
754                         \def\nomname{_(Nomenclature[[output]])}%
755                 }
756         EndBabelPreamble
757         # The command is defined for several languages in nomencl.sty. However, we need to define
758         # it anyway for the other, non suppported languages.
759         LangPreamble
760                 \def\eqdeclaration#1{, _(see equation[[nomencl]])\nobreakspace(#1)}
761                 \def\pagedeclaration#1{, _(page[[nomencl]])\nobreakspace#1}
762                 \def\nomname{_(Nomenclature[[output]])}
763         EndLangPreamble
764         HTMLTag h2
765 End
766
767 InsetLayout Tabular
768         HTMLStyle
769                 table {
770                         border-collapse: collapse;
771                         display: inline-block;
772                 }
773                 td {
774                         border: 1px solid black;
775                         padding: 0.5ex;
776                 }
777         EndHTMLStyle
778 End