]> git.lyx.org Git - lyx.git/blob - lib/layouts/moderncv.layout
Grammar
[lyx.git] / lib / layouts / moderncv.layout
1 #% Do not delete the line below; configure depends on this
2 #  \DeclareLaTeXClass[moderncv,ebgaramond.sty,fancyhdr.sty,fontawesome.sty,ifpdf.sty,marvosym.sty]{Modern CV}
3 #  \DeclareCategory{Curricula Vitae}
4 # textclass definition file for modernCV 2.0.x
5 # (also works with modernCV 1.5.x)
6 # Author : Uwe Stöhr (uwestoehr@web.de)
7
8
9 # General textclass parameters
10 Format 104
11
12 Columns         1
13 Sides           1
14 SecNumDepth     -1
15 TocDepth        -1
16
17 Provides hyperref       1
18 Provides url            1
19
20
21 # Standard style definition
22 Style Standard
23         Category        MainText
24         Margin          Static
25         LatexType       Paragraph
26         LatexName       dummy
27         ParIndent       MM
28         ParSkip         0.4
29         Align           Block
30         AlignPossible   Block, Left, Right, Center
31         LabelType       No_Label
32         DocBookTag  para
33 End
34
35 Input stdcounters.inc
36 Input stdinsets.inc
37 Input stdlists.inc
38
39 Style CVStyle
40         Margin          Dynamic
41         LatexType       Command
42         LatexName       moderncvstyle
43         Category        FrontMatter
44         InPreamble      1
45         ParSkip         0.4
46         LabelSep        xx
47         LabelType       Static
48         LabelString     "CV Style:"
49         LabelFont
50           Series        Bold
51           Color         textlabel1
52         EndFont
53         Argument 1
54           LabelString   "Style Options"
55           Tooltip               "Options for the CV style"
56         EndArgument
57         # For DocBook, in <info>, so that the next tags can be there. 
58         DocBookTag     IGNORE
59         DocBookInInfo  maybe
60 End
61
62 Style CVColor
63         CopyStyle       CVStyle
64         LatexName       moderncvcolor
65         LabelString     "CV Color Scheme:"
66         # For DocBook, in <info>, so that the next tags can be there. 
67         DocBookTag     IGNORE
68         DocBookInInfo  maybe
69 End
70
71 Style CVIcons
72         CopyStyle       CVStyle
73         LatexName       moderncvicons
74         LabelString     "CV Icon Set:"
75         # For DocBook, in <info>, so that the next tags can be there. 
76         DocBookTag     IGNORE
77         DocBookInInfo  maybe
78 End
79
80 Style CVColumnWidth
81         CopyStyle       CVStyle
82         LatexName       setlength{\hintscolumnwidth}
83         LabelString     "Column Width:"
84         # For DocBook, in <info>, so that the next tags can be there. 
85         DocBookTag     IGNORE
86         DocBookInInfo  maybe
87 End
88
89 Style PDF_Page_Mode
90         CopyStyle       CVStyle
91         LatexName       renewcommand{\pdfpagemode}
92         LabelString     "PDF Page Mode:"
93         # For DocBook, in <info>, so that the next tags can be there. 
94         DocBookTag     IGNORE
95         DocBookInInfo  maybe
96 End
97
98 Style Name
99         LatexType       command
100         LatexName       name
101         Category        FrontMatter
102         InPreamble      1
103         TopSep          0.7
104         Align           Center
105         Font
106           Family        Sans
107           Size          Largest
108         EndFont
109         Argument 1
110           LabelString   "First Name"
111           Tooltip       "First name"
112           Mandatory     1
113           # TODO: If this produces a DocBook tag <firstname>, the rest must be in <givename>, but that's not possible yet.
114         EndArgument
115         DocBookTag            personname
116         DocBookTagType        paragraph
117         DocBookWrapperTag     author
118         DocBookWrapperTagType block
119         DocBookInInfo         always
120 End
121
122 Style FirstName
123         CopyStyle       Name
124         LatexName       firstname
125         ResetArgs       0
126         ObsoletedBy     Name
127 End
128
129 Style FamilyName
130         CopyStyle       FirstName
131         LatexName       familyname
132         TopSep          0.3
133         LabelString     "Family Name:"
134         ObsoletedBy     Name
135 End
136
137 Style Title
138         Margin          Static
139         LatexType       Command
140         Category        FrontMatter
141         InPreamble      1
142         LatexName       title
143         ParSkip         0.4
144         ItemSep         0
145         TopSep          0.7
146         BottomSep       0.7
147         ParSep          1
148         Align           Center
149         LabelType       No_Label
150         Font
151           Size          Larger
152           Shape         Italic
153           EndFont
154         HTMLTag         h1
155         HTMLTitle       true
156         DocBookTag     title
157         DocBookTagType paragraph
158         DocBookInInfo  maybe
159 End
160
161 Style Address
162         CopyStyle       CVStyle
163         LatexName       address
164         LabelString     "Address:"
165         BottomSep       0.3
166         TopSep          0
167         Argument 1
168           LabelString   "Line 1"
169           Tooltip       "Optional address line"
170           Mandatory     1
171         EndArgument
172         Argument 2
173           LabelString   "Line 2"
174           Tooltip       "Optional address line"
175           Mandatory     1
176         EndArgument
177         DocBookTag            NONE
178         DocBookWrapperTag     address
179         DocBookWrapperTagType block
180         DocBookWrapperMergeWithPrevious true
181         DocBookInInfo         always
182 End
183
184 Style Phone
185         CopyStyle       CVStyle
186         LatexName       phone
187         LabelString     "Phone:"
188         Argument 1
189           LabelString   "Phone Type"
190           Tooltip       "can be fixed, mobile or fax"
191           # TODO: for DocBook, this should be translated into a role.
192           DocBookTag      emphasis
193           DocBookTagType  inline
194         EndArgument
195         DocBookTag            phone
196         DocBookTagType        paragraph
197         DocBookWrapperTag     address
198         DocBookWrapperTagType block
199         DocBookWrapperMergeWithPrevious true
200         DocBookInInfo         always
201 End
202
203 Style Mobile
204         CopyStyle       CVStyle
205         LatexName       mobile
206         LabelString     "Mobile:"
207         ObsoletedBy     Phone
208 End
209
210 Style Fax
211         CopyStyle       CVStyle
212         LatexName       fax
213         LabelString     "Fax:"
214         ObsoletedBy     Phone
215 End
216
217 Style Email
218         CopyStyle       CVStyle
219         LatexName       email
220         LabelString     "Email:"
221         DocBookTag            email
222         DocBookTagType        paragraph
223         DocBookWrapperTag     address
224         DocBookWrapperTagType block
225         DocBookWrapperMergeWithPrevious true
226         DocBookInInfo         always
227 End
228
229 Style Homepage
230         CopyStyle       CVStyle
231         LatexName       homepage
232         LabelString     "Homepage:"
233         DocBookTag            uri
234         DocBookAttr           type='homepage'
235         DocBookTagType        paragraph
236         DocBookWrapperTag     address
237         DocBookWrapperTagType block
238         DocBookWrapperMergeWithPrevious true
239         DocBookInInfo         always
240 End
241
242 Style Social
243         CopyStyle       CVStyle
244         LatexName       social
245         LabelString     "Social:"
246         Argument 1
247           LabelString   "Name"
248           Tooltip       "Name of the social network"
249           # TODO: for DocBook, this should be translated into a role.
250           DocBookTag      emphasis
251           DocBookTagType  inline
252         EndArgument
253         DocBookTag            uri
254         DocBookAttr           type='social-network'
255         DocBookTagType        paragraph
256         DocBookWrapperTag     address
257         DocBookWrapperTagType block
258         DocBookWrapperMergeWithPrevious true
259         DocBookInInfo         always
260 End
261
262 Style ExtraInfo
263         CopyStyle       CVStyle
264         LatexName       extrainfo
265         LabelString     "Extra Info:"
266         DocBookTag            otheraddr
267         DocBookTagType        paragraph
268         DocBookWrapperTag     address
269         DocBookWrapperTagType block
270         DocBookWrapperMergeWithPrevious true
271         DocBookInInfo         always
272 End
273
274 # Path to a digital image:
275 Style Photo
276         CopyStyle       CVStyle
277         Font
278           Family        typewriter
279         EndFont
280         LabelFont
281           Family        Roman
282           Series        Bold
283           Color         textlabel1
284         EndFont
285         LatexName       photo
286         LabelString     "Photo:"
287         Argument 1
288           LabelString   "Height"
289           Tooltip       "Height the photo is resized to"
290           PassThru      1
291         EndArgument
292         Argument 2
293           LabelString   "Thickness"
294           Tooltip       "Thickness of the surrounding frame"
295           PassThru      1
296         EndArgument
297         PassThru        1
298         DocBookTag            date
299         DocBookAttr           role='picture'
300         DocBookInInfo         always
301         DocBookWrapperTag     NONE
302     DocBookNoFontInside   true
303 End
304
305 Style Quote
306         CopyStyle       CVStyle
307         LatexName       quote
308         LabelType       No_Label
309         Align           Center
310         BottomSep       0.7
311         TopSep          0.5
312         Font
313           Shape         Italic
314           Size          Large
315         EndFont
316         DocBookTag     para
317         DocBookWrapperTag  blockquote
318         DocBookInInfo  false
319 End
320
321 Style Section
322         Category        Sectioning
323         Margin          Dynamic
324         LatexType       Command
325         LatexName       section
326         NeedProtect     1
327         NextNoIndent    1
328         ParSkip         0.4
329         TopSep          1.3
330         BottomSep       0.7
331         ParSep          0.7
332         Align           Block
333         LabelSep        xxx
334         LabelType       No_Label
335         Font
336           Family        Sans
337           Series        Bold
338         EndFont
339         TocLevel        1
340     HTMLTag         h2
341         DocBookTag      title
342         DocBookTagType  paragraph
343 End
344
345 Style EmptySection
346         CopyStyle       Section
347         LatexType       Command
348         LatexName       emptysection{}
349         KeepEmpty       1
350         LabelType       Static
351         LabelString     "Empty Section"
352         LabelFont
353           Color         textlabel2
354         EndFont
355 End
356
357 Style Subsection
358         CopyStyle       Section
359         LatexName       subsection
360         TopSep          0.9
361         BottomSep       0
362         ParSep          0.5
363         Font
364           Family        Sans
365           Series        Medium
366         EndFont
367         TocLevel        2
368 End
369
370 Style CloseSection
371         ObsoletedBy     Standard
372 End
373
374 Style Columns
375         Margin          Static
376         LatexType       Environment
377         LatexName       cvcolumns
378         NextNoIndent    1
379         LeftMargin      M
380         RightMargin     M
381         ParSkip         0.4
382         BottomSep       0.5
383         ParSep          0.7
384         Align           Block
385         LabelType       Centered
386         LabelString     "Columns:"
387         LabelBottomSep  0.5
388         LabelFont
389           Series        Bold
390           Color         textlabel1
391         EndFont
392         TocLevel        1
393         DocBookTag  NONE
394 End
395
396 InsetLayout Flex:Column
397         LyxType         custom
398         LatexType       Command
399         LaTeXName       cvcolumn
400         Argument 1
401           LabelString   "Width"
402           Tooltip       "Optional width"
403           PassThru      1
404           DocBookTag  IGNORE
405         EndArgument
406         Argument 2
407           Mandatory     1
408           AutoInsert    1
409           LabelString   "Header"
410           Tooltip       "Header content"
411           DocBookTag  title
412         EndArgument
413         LabelString     "Column"
414         LabelFont
415           Series        Bold
416           Color         textlabel1
417         EndFont
418         ResetsFont true
419         DocBookTag  sidebar
420         # TODO: issue with paragraphs inside, they do not get properly wrapped in <para> if required. Using a wrapper tag makes everything under <para>, including the title.
421 End
422
423 Style Entry
424         Margin          Dynamic
425         LatexType       Command
426         LatexName       cventry
427         Argument 1
428           Mandatory     1
429           LabelString   "Years"
430           Tooltip       "Years"
431           DocBookTag    phrase
432           DocBookAttr   role='years'
433         EndArgument
434         Argument 2
435           Mandatory     1
436           LabelString   "Title"
437           Tooltip       "Degree or job title"
438           Font
439             Series      Bold
440           EndFont
441           DocBookTag    phrase
442           DocBookAttr   role='title'
443         EndArgument
444         Argument 3
445           Mandatory     1
446           LabelString   "Affiliation"
447           Tooltip       "Institution or employer"
448           Font
449             Shape       Italic
450           EndFont
451           DocBookTag    phrase
452           DocBookAttr   role='affiliation'
453         EndArgument
454         Argument 4
455           Mandatory     1
456           LabelString   "Localization"
457           Tooltip       "City or country"
458           DocBookTag    phrase
459           DocBookAttr   role='localization'
460         EndArgument
461         Argument 5
462           Mandatory     1
463           LabelString   "Optional"
464           Tooltip       "Grade or other info"
465           DocBookTag    phrase
466           DocBookAttr   role='optional'
467         EndArgument
468         ParSkip         0.4
469         Align           Block
470         LabelSep        xx
471         LabelType       Static
472         LabelString     "Entry:"
473         LabelFont
474           Series        Bold
475           Color         textlabel1
476         EndFont
477         DocBookTag  para
478 End
479
480 Style Item
481         Margin          Dynamic
482         LatexType       Command
483         LatexName       cvitem
484         Argument 1
485           Mandatory     1
486           AutoInsert    1
487           LabelString   "Summary"
488           Tooltip       "Summary"
489           DocBookTag    phrase
490           DocBookAttr   role='summary'
491         EndArgument
492         ParSkip         0.4
493         Align           Block
494         LabelSep        xx
495         LabelType       Static
496         LabelString     "Item:"
497         LabelFont
498           Series        Bold
499           Color         textlabel1
500         EndFont
501         DocBookTag  para
502 End
503
504 Style ItemWithComment
505         CopyStyle       Item
506         LatexName       cvitemwithcomment
507         LabelString     "Item with Comment:"
508         KeepEmpty       1
509         ResetArgs       1
510         Argument 1
511           Mandatory     1
512           LabelString   "Summary"
513           Tooltip       "Summary"
514           DocBookTag    phrase
515           DocBookAttr   role='summary'
516         EndArgument
517         Argument 2
518           Mandatory     1
519           LabelString   "Text"
520           Tooltip       "Text"
521           Font
522             Series      Bold
523             Shape       Up
524           EndFont
525           DocBookTag    phrase
526           DocBookAttr   role='text'
527         EndArgument
528         Font
529           Shape         Italic
530         EndFont
531         LabelFont
532           Series        Bold
533           Color         textlabel1
534           Shape         Up
535         EndFont
536         DocBookTag  para
537 End
538
539 Style ListItem
540         CopyStyle       Item
541         LatexName       cvlistitem
542         LabelString     "List Item:"
543         ResetArgs       1
544 End
545
546 Style DoubleItem
547         CopyStyle       ListItem
548         LatexName       cvdoubleitem
549         LabelString     "Double Item:"
550         KeepEmpty       1
551         Argument 1
552           Mandatory     1
553           LabelString   "Left Summary"
554           Tooltip       "Left summary"
555         EndArgument
556         Argument 2
557           Mandatory     1
558           LabelString   "Left Text"
559           Tooltip       "Left text"
560         EndArgument
561         Argument 3
562           Mandatory     1
563           LabelString   "Right Summary"
564           Tooltip       "Right summary"
565         EndArgument
566 End
567
568 Style DoubleListItem
569         CopyStyle       ListItem
570         LatexName       cvlistdoubleitem
571         LabelString     "Double List Item:"
572         ResetArgs       1
573         Argument 1
574           Mandatory     1
575           AutoInsert    1
576           LabelString   "First Item"
577           Tooltip       "First item"
578         EndArgument
579 End
580
581 Style Language
582         ObsoletedBy     ItemWithComment
583 End
584
585 Style Computer
586         ObsoletedBy     DoubleItem
587 End
588
589 Style MakeCVtitle
590         CopyStyle       EmptySection
591         LatexName       makecvtitle{}
592         LabelString     "Make CV Title"
593         Category        FrontMatter
594         LabelFont
595           Size          Small
596         EndFont
597 End
598
599 Style MakeLetterTitle
600         CopyStyle       MakeCVtitle
601         LatexName       makelettertitle{}
602         LabelString     "Make Letter Title"
603         Category        Letter
604 End
605
606 Style MakeLetterClosing
607         CopyStyle       MakeCVtitle
608         LatexName       makeletterclosing{}
609         LabelString     "Close Letter"
610         Category        Letter
611 End
612
613 Style Bibliography
614         Category        BackMatter
615         Margin          First_Dynamic
616         LatexType       Bib_Environment
617         LatexName       thebibliography
618         NextNoIndent    1
619         ToggleIndent    Never
620         LeftMargin      MM
621         ParSkip         0.4
622         ItemSep         0
623         TopSep          0.7
624         BottomSep       0.7
625         ParSep          0.5
626         Align           Block
627         AlignPossible   Block, Left
628         LabelType       Bibliography
629         LabelString     "References"
630         LabelBottomSep  1.2
631         LabelFont
632           Series        Bold
633           Size          Larger
634           Family        Sans
635         EndFont
636         TocLevel        1
637         IsTocCaption    0
638         Argument listpreamble:1
639           LabelString    "Bib preamble"
640           MenuString     "Bibliography Preamble"
641           Tooltip        "LaTeX code to be inserted before the first bibliography item"
642           PassThru       1
643           Font
644             Family typewriter
645             Color latex
646           EndFont
647         EndArgument
648 End
649
650 Style Recipient
651         Margin          Dynamic
652         LatexType       Command
653         LatexName       recipient
654         Category        Letter
655         Argument 1
656           Mandatory     1
657           AutoInsert    1
658           LabelString   "Company Name"
659           Tooltip       "Company name"
660           #Font
661           #  Series     Bold
662           #EndFont
663         EndArgument
664         NextNoIndent    1
665         ParSkip         0.4
666         TopSep          1.3
667         BottomSep       0
668         ParSep          0.7
669         Align           Left
670         LabelSep        xxx
671         LabelType       No_Label
672         Font
673           Shape         Italic
674         EndFont
675 End
676
677 Style Date
678         CopyStyle       Recipient
679         LatexName       date
680         ResetArgs       1
681         TopSep          0
682         BottomSep       0
683         Align           Right
684         Font
685           Series        Medium
686         EndFont
687 End
688
689 Style Opening
690         CopyStyle       Date
691         LatexName       opening
692         TopSep          0
693         BottomSep       0.5
694         Align           Left
695 End
696
697 Style Closing
698         CopyStyle       Opening
699         LatexName       closing
700 End
701
702 Style Enclosing
703         Margin          Dynamic
704         CopyStyle       Opening
705         LatexName       enclosure
706         Argument 1
707           LabelString   "Alternative Name"
708           Tooltip       "Alternative instead of 'Enclosure'"
709         EndArgument
710         LabelSep        xx
711         LabelType       Static
712         LabelString     "Enclosing:"
713         Font
714           Shape         Italic
715         EndFont
716         LabelFont
717           Shape         Up
718           Series        Bold
719           Color         textlabel1
720         EndFont
721         
722 End
723