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