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