]> git.lyx.org Git - features.git/blob - lib/layouts/stdinsets.inc
DocBook: fix margin notes.
[features.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 82
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 End
438
439 InsetLayout Box:Frameless
440         CopyStyle Box
441         HTMLStyle
442                 div.Frameless { margin: 1em; }
443         EndHTMLStyle
444 End
445
446 InsetLayout Box:Shaded
447         CopyStyle Box
448         BgColor shaded
449         HTMLStyle
450                 div.Shaded {
451                         background-color: gray;
452                         padding: 0.5ex;
453                 }
454         EndHTMLStyle
455 End
456
457 InsetLayout Box:Boxed
458         CopyStyle Box
459         HTMLStyle
460                 div.Boxed {
461                         border: solid thick black;
462                         padding: 0.5ex;
463                 }
464         EndHTMLStyle
465 End
466
467 InsetLayout Box:Framed
468         CopyStyle Box
469         HTMLStyle
470                 div.Framed {
471                         border: solid thick black;
472                         padding: 0.5ex;
473                 }
474         EndHTMLStyle
475 End
476
477 InsetLayout Box:ovalbox
478         CopyStyle Box
479         HTMLStyle
480                 div.ovalbox {
481                         border: groove medium black;
482                         padding: 0.5ex;
483                 }
484         EndHTMLStyle
485 End
486
487 InsetLayout Box:Ovalbox
488         CopyStyle Box
489         HTMLStyle
490                 div.Ovalbox {
491                         border: ridge thick black;
492                         padding: 0.5ex;
493                 }
494         EndHTMLStyle
495 End
496
497 InsetLayout Box:Shadowbox
498         CopyStyle Box
499         HTMLStyle
500                 div.Shadowbox { border: solid gray medium; border-bottom: solid black 1ex; border-right: solid black 1ex; padding: 0.5ex; }
501         EndHTMLStyle
502 End
503
504 InsetLayout Box:Doublebox
505         CopyStyle Box
506         HTMLStyle
507                 div.Doublebox {
508                         border: double thick black;
509                         padding: 0.5ex;
510                 }
511         EndHTMLStyle
512 End
513
514 InsetLayout Float
515         LaTeXType             environment
516         LabelFont
517           Color               collapsible
518           Size                Small
519         EndFont
520         MultiPar              true
521         HTMLStyle
522                 div.float {
523                         border: 2px solid black;
524                         text-align: center;
525                 }
526         EndHTMLStyle
527 End
528
529 #InsetWrap requires these, independently of whether stdfloats.inc is included
530 OutlinerName table        "Tables" #no AddToToc (built-in)
531 OutlinerName figure       "Figures" #no AddToToc (built-in)
532
533 InsetLayout Wrap
534         LabelFont
535           Color               collapsible
536           Size                Small
537         EndFont
538         MultiPar              true
539         RefPrefix             wrap
540         HTMLStyle
541                 div.wrap {
542                         float: right;
543                         border: 2px solid black;
544                         padding: 1ex;
545                         margin: 1ex;
546                 }
547         EndHTMLStyle
548 End
549
550 InsetLayout "Flex:URL"
551         LyXType               standard
552         Decoration            classic
553         LabelString           URL
554         ContentAsLabel        true
555         LatexName             url
556         LatexType             command
557         Requires              url
558         MultiPar              false
559         CustomPars            false
560         ForcePlain            true
561         PassThru              true
562         FreeSpacing           true
563         ForceLTR              true
564         NeedCProtect          true
565         Font
566           Family              Typewriter
567           Color               urltext
568         EndFont
569         LabelFont
570           Family              Typewriter
571           Color               urllabel
572           Size                Small
573         EndFont
574         HTMLIsBlock           false
575         DocBookTag            link
576 End
577
578 InsetLayout Argument
579         LabelString           Argument
580         LabelFont
581           Color               collapsible
582           Size                Small
583         EndFont
584         MultiPar              false
585         ForceLocalFontSwitch  1
586 End
587
588 InsetLayout Info
589         Decoration            conglomerate
590         HTMLStyle
591                 span.info { font-family: sans-serif; }
592         EndHTMLStyle
593         HTMLTag               span
594         MultiPar              false
595 End
596
597 InsetLayout Info:menu
598         CopyStyle             Info
599         LatexType             command
600         LatexName             menuitem
601         Preamble
602           \providecommand{\menuitem}[1]{\textsf{#1}}
603         EndPreamble
604         Decoration            conglomerate
605         Font
606           Family              sans
607         EndFont
608         HTMLAttr              "class='info menu'"
609         HTMLStyle
610                 span.menu { font-family: sans-serif; }
611         EndHTMLStyle
612 End
613
614 InsetLayout Info:shortcut
615         CopyStyle             Info
616         LatexType             command
617         LatexName             shortcut
618         Preamble
619           \providecommand{\shortcut}[1]{\mbox{\textsf{#1}}}
620         EndPreamble
621         Decoration            conglomerate
622         Font
623           Family              sans
624         EndFont
625         HTMLAttr              "class='info shortcut'"
626         HTMLStyle
627                 span.shortcut { font-family: sans-serif; }
628         EndHTMLStyle
629 End
630
631 InsetLayout Info:shortcuts
632         CopyStyle             Info
633         LatexType             command
634         LatexName             shortcut
635         Preamble
636           \providecommand{\shortcut}[1]{\textsf{#1}}
637         EndPreamble
638         Decoration            conglomerate
639         Font
640           Family              sans
641         EndFont
642         HTMLAttr              "class='info shortcut'"
643         HTMLStyle
644                 span.shortcuts { font-family: sans-serif; }
645         EndHTMLStyle
646 End
647
648 InsetLayout Caption:Standard
649         LabelString          standard
650         LaTeXType            command
651         LatexName            caption
652         NeedProtect          1
653         MultiPar             false
654         Argument 1
655                 LabelString   "Short Title|S"
656                 Tooltip       "The caption as it appears in the list of figures/tables"
657                 InsertCotext  1
658         EndArgument
659         HTMLStyle
660                 div.float-caption {
661                         text-align: center;
662                         border: 2px solid black;
663                         padding: 1ex;
664                         margin: 1ex;
665                 }
666         EndHTMLStyle
667         HTMLAttr "class='float-caption float-caption-standard'"
668 End
669
670
671 InsetLayout Caption:Unnumbered
672         CopyStyle            Caption:Standard
673         LabelString          unlabelled
674         LatexName            caption*
675         ResetArgs            1
676 End
677
678
679 InsetLayout Preview
680         LabelString           Preview
681         Decoration            minimalistic
682         MultiPar              true
683 End
684
685
686 InsetLayout Script
687         LatexType       command
688         MultiPar        false
689         ForcePlain      1
690         CustomPars      0
691         InToc           1
692         HTMLIsBlock     0
693 End
694
695
696 InsetLayout Script:superscript
697         CopyStyle       Script
698         LaTeXName       textsuperscript
699         HTMLTag         sup
700 End
701
702
703 InsetLayout Script:subscript
704         CopyStyle       Script
705         Requires        subscript
706         LaTeXName       textsubscript
707         HTMLTag         sub
708 End
709
710
711 InsetLayout PrintNomencl
712         BabelPreamble
713                 \addto\captions$$lang{%
714                         \def\eqdeclaration#1{, _(see equation[[nomencl]])\nobreakspace(#1)}%
715                         \def\pagedeclaration#1{, _(page[[nomencl]])\nobreakspace#1}%
716                         \def\nomname{_(Nomenclature[[output]])}%
717                 }
718         EndBabelPreamble
719         # The command is defined for several languages in nomencl.sty. However, we need to define
720         # it anyway for the other, non suppported languages.
721         LangPreamble
722                 \def\eqdeclaration#1{, _(see equation[[nomencl]])\nobreakspace(#1)}
723                 \def\pagedeclaration#1{, _(page[[nomencl]])\nobreakspace#1}
724                 \def\nomname{_(Nomenclature[[output]])}
725         EndLangPreamble
726         HTMLTag h2
727 End
728
729 InsetLayout Tabular
730         HTMLStyle
731                 table {
732                         border-collapse: collapse;
733                         display: inline-block;
734                 }
735                 td {
736                         border: 1px solid black;
737                         padding: 0.5ex;
738                 }
739         EndHTMLStyle
740 End