mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
add cv class
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2138 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
11d542be6b
commit
b4cc4030bc
@ -1,3 +1,9 @@
|
||||
2001-06-18 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
|
||||
|
||||
* tex/cv.cls:
|
||||
* layouts/cv.layout:
|
||||
* examples/cv.lyx: add class cv (version 1.5)
|
||||
|
||||
2001-06-15 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
|
||||
|
||||
* bind/fr_menus.bind: removed
|
||||
|
149
lib/examples/cv.lyx
Normal file
149
lib/examples/cv.lyx
Normal file
@ -0,0 +1,149 @@
|
||||
#LyX 1.1 created this file. For more info see http://www.lyx.org/
|
||||
\lyxformat 218
|
||||
\textclass cv
|
||||
\begin_preamble
|
||||
%% You can modify the fonts used in the document be using the
|
||||
%% following macros. They take one parameter which is the font
|
||||
%% changing command.
|
||||
%% \headerfont: the font used in both headers.
|
||||
%% Defaults to sans serif.
|
||||
%% \titlefont: the font used for the title.
|
||||
%% Defaults to \LARGE sans-serif semi bold condensed.
|
||||
%% \sectionfont: the font used by \section when beginning a new topic.
|
||||
%% Defaults to sans-serif semi bold condensed.
|
||||
%% \itemfont: the font used in descriptions of items.
|
||||
%% Defaults to sans-serif slanted.
|
||||
% to make your name even bigger, uncomment the following line:
|
||||
% \titlefont{\Huge}
|
||||
%%
|
||||
%% You can modify the following parameters using \renewcommand:
|
||||
%% \topicmargin: the left margin inside topics.
|
||||
%% Defaults to 20% of the text width (0.20\textwidth).
|
||||
% To get more room for left column of Topic layouts, uncomment following line:
|
||||
% \setlength{\topicmargin}{0.3\textwidth}
|
||||
\end_preamble
|
||||
\language english
|
||||
\inputencoding default
|
||||
\fontscheme default
|
||||
\graphics default
|
||||
\paperfontsize default
|
||||
\spacing single
|
||||
\papersize Default
|
||||
\paperpackage a4
|
||||
\use_geometry 0
|
||||
\use_amsmath 0
|
||||
\paperorientation portrait
|
||||
\secnumdepth -1
|
||||
\tocdepth -1
|
||||
\paragraph_separation indent
|
||||
\defskip medskip
|
||||
\quotes_language english
|
||||
\quotes_times 2
|
||||
\papercolumns 1
|
||||
\papersides 1
|
||||
\paperpagestyle default
|
||||
|
||||
\layout Left Header
|
||||
|
||||
123 Hamlet Street
|
||||
\newline
|
||||
Stratford-upon-Avon
|
||||
\layout Right Header
|
||||
|
||||
TEL: 888-PUCK
|
||||
\newline
|
||||
|
||||
\family typewriter
|
||||
\size small
|
||||
bill@globe.org
|
||||
\layout Title
|
||||
|
||||
William Shakespeare
|
||||
\layout Standard
|
||||
|
||||
Some people put a summary here.
|
||||
Note: there are many LaTeX variables you can set in the preamble to change
|
||||
the look of the CV.
|
||||
Look there (choose
|
||||
\family sans
|
||||
\bar under
|
||||
L
|
||||
\bar default
|
||||
ayout
|
||||
\family default
|
||||
\SpecialChar \menuseparator
|
||||
|
||||
\family sans
|
||||
\bar under
|
||||
L
|
||||
\bar default
|
||||
\latex latex
|
||||
{}
|
||||
\latex default
|
||||
aTeX\SpecialChar ~
|
||||
Preamble...
|
||||
\family default
|
||||
) for examples.
|
||||
\layout Section
|
||||
|
||||
Work Experience
|
||||
\layout Topic
|
||||
\labelwidthstring MMMMM
|
||||
|
||||
1593--1609 Wrote and produced plays for the Queen, and then for the King.
|
||||
He really liked them a lot, but they reminded him of plays by this guy,
|
||||
the Earl of Oxford.
|
||||
\layout Topic
|
||||
\labelwidthstring MMMMM
|
||||
|
||||
\SpecialChar ~
|
||||
If a topic does not have a subtitle, you have to put a protected space
|
||||
there.
|
||||
This is a shortcoming of LyX.
|
||||
\begin_deeper
|
||||
\layout Standard
|
||||
|
||||
But you can also use the paragraph depth setting, depending on what you
|
||||
want to do.
|
||||
\end_deeper
|
||||
\layout Section
|
||||
|
||||
Education
|
||||
\layout Topic
|
||||
\labelwidthstring MMMMM
|
||||
|
||||
1577--78 My Dad taught me stuff.
|
||||
\layout Topic
|
||||
\labelwidthstring MMMMM
|
||||
|
||||
April\SpecialChar ~
|
||||
to\SpecialChar ~
|
||||
May\SpecialChar ~
|
||||
1581 Tried high school.
|
||||
Hated my English teacher.
|
||||
[Two things here: first, note (on paper) how a linebreak is inserted if
|
||||
your subtitle is too long; second, note that you have to use unbreakable
|
||||
spaces to embed spaces in the subtitle.]
|
||||
\layout Section
|
||||
|
||||
Publications
|
||||
\layout Bibliography
|
||||
\labelwidthstring Publications
|
||||
\bibitem {firstref}
|
||||
|
||||
First Folio.
|
||||
Me.
|
||||
1623.
|
||||
\layout Bibliography
|
||||
\labelwidthstring Publications
|
||||
\bibitem {secondref}
|
||||
|
||||
These references could have been entered via BibTeX\SpecialChar \ldots{}
|
||||
In any case, here I
|
||||
can cite my work of
|
||||
\begin_inset LatexCommand \cite{firstref}
|
||||
|
||||
\end_inset
|
||||
|
||||
.
|
||||
\the_end
|
162
lib/layouts/cv.layout
Normal file
162
lib/layouts/cv.layout
Normal file
@ -0,0 +1,162 @@
|
||||
#% Do not delete the line below; configure depends on this
|
||||
# \DeclareLaTeXClass{Curriculum Vitae}
|
||||
# CV textclass definition file.
|
||||
# Author : Jean-Marc Lasgouttes (Jean-Marc.Lasgouttes@inria.fr)
|
||||
|
||||
# General textclass parameters
|
||||
Columns 1
|
||||
Sides 1
|
||||
SecNumDepth -1
|
||||
TocDepth -1
|
||||
MaxCounter Counter_Section
|
||||
|
||||
# Standard style definition
|
||||
Style Standard
|
||||
Margin Static
|
||||
LatexType Paragraph
|
||||
LatexName dummy
|
||||
ParIndent MM
|
||||
ParSkip 0.4
|
||||
Align Block
|
||||
AlignPossible Block, Left, Right, Center
|
||||
LabelType No_Label
|
||||
End
|
||||
|
||||
# Section style definition
|
||||
Style Section
|
||||
Margin Dynamic
|
||||
LatexType Command
|
||||
LatexName section
|
||||
NeedProtect 1
|
||||
NextNoIndent 1
|
||||
LabelSep xxx
|
||||
ParSkip 0.4
|
||||
TopSep 1.3
|
||||
BottomSep 0.7
|
||||
ParSep 0.7
|
||||
Align Block
|
||||
AlignPossible Block, Left
|
||||
LabelType No_Label
|
||||
|
||||
# standard font definition
|
||||
Font
|
||||
Family Sans
|
||||
Series Bold
|
||||
EndFont
|
||||
End
|
||||
|
||||
# Section style definition
|
||||
Style SubSection
|
||||
CopyStyle Section
|
||||
LatexName subsection
|
||||
Margin Static
|
||||
LeftMargin MMM
|
||||
End
|
||||
|
||||
# Topic style definition
|
||||
Style Topic
|
||||
Margin Manual
|
||||
LatexType Item_environment
|
||||
LatexName topic
|
||||
NextNoIndent 1
|
||||
LabelSep xxx
|
||||
ParSkip 0.4
|
||||
ItemSep 0.2
|
||||
TopSep 0.7
|
||||
BottomSep 0.7
|
||||
ParSep 0.3
|
||||
Align Block
|
||||
AlignPossible Block, Left
|
||||
LabelType Manual
|
||||
LabelString MMMMM
|
||||
|
||||
# label font definition
|
||||
LabelFont
|
||||
Family Sans
|
||||
Shape Slanted
|
||||
EndFont
|
||||
End
|
||||
|
||||
# Itemize style definition
|
||||
Style Itemize
|
||||
Margin Static
|
||||
LatexType Item_Environment
|
||||
LatexName itemize
|
||||
NextNoIndent 1
|
||||
LeftMargin MMN
|
||||
LabelSep xx
|
||||
ItemSep 0.2
|
||||
TopSep 0.7
|
||||
BottomSep 0.7
|
||||
ParSep 0.3
|
||||
Align Block
|
||||
AlignPossible Block, Left
|
||||
LabelType Static
|
||||
LabelString *
|
||||
End
|
||||
|
||||
# Left header
|
||||
Style Left_Header
|
||||
CopyStyle Standard
|
||||
LatexType Command
|
||||
LatexName leftheader
|
||||
InTitle 1
|
||||
ParIndent ""
|
||||
ParSkip 0.4
|
||||
BottomSep 1
|
||||
Align Block
|
||||
AlignPossible Block, Left, Right, Center
|
||||
LabelType No_Label
|
||||
|
||||
Font
|
||||
Family Sans
|
||||
EndFont
|
||||
|
||||
End
|
||||
|
||||
# Right header
|
||||
Style Right_Header
|
||||
CopyStyle "Left Header"
|
||||
LatexName rightheader
|
||||
Margin Right_Address_Box
|
||||
End
|
||||
|
||||
# Title
|
||||
Style Title
|
||||
Margin Static
|
||||
LatexType Command
|
||||
InTitle 1
|
||||
LatexName title
|
||||
ParSkip 0.4
|
||||
ItemSep 0
|
||||
TopSep 0
|
||||
BottomSep 1
|
||||
ParSep 1
|
||||
Align Center
|
||||
AlignPossible Center
|
||||
LabelType No_Label
|
||||
|
||||
# standard font definition
|
||||
Font
|
||||
Family Sans
|
||||
Series Bold
|
||||
Size Largest
|
||||
EndFont
|
||||
|
||||
End
|
||||
|
||||
# Bibliography style definition
|
||||
Style Bibliography
|
||||
CopyStyle Topic
|
||||
LatexName thebibliography
|
||||
LabelType Bibliography
|
||||
LabelString ""
|
||||
LabelBottomSep 0.7
|
||||
|
||||
# standard font definition
|
||||
LabelFont
|
||||
Size Tiny
|
||||
EndFont
|
||||
|
||||
End
|
||||
|
239
lib/tex/cv.cls
Normal file
239
lib/tex/cv.cls
Normal file
@ -0,0 +1,239 @@
|
||||
%%%% This is the cv document class, intended to provide a simple way
|
||||
%%%% to write your curriculum vitaes (resume)
|
||||
%%%% Author: Jean-Marc Lasgouttes (Jean-Marc.Lasgouttes@inria.fr)
|
||||
%%%% (with lot of help from Amir Karger <karger@bead.aecom.yu.edu>,
|
||||
%%%% Reuben Thomas <rrt@dcs.gla.ac.uk>
|
||||
%%%% and Dekel Tsur <dekelts@tau.ac.il>)
|
||||
%%%% WARNING: this document class is really simple. Don't expect too much.
|
||||
%%%% You can do what you want with this code.
|
||||
%%
|
||||
%%% Basic usage:
|
||||
%% \leftheader{text} : defines what should appear in the upper
|
||||
%% left of the first page. `Text' may contain \\ to break lines.
|
||||
%% \rightheader{text} : like \leftheader, but for the upper right of
|
||||
%% the first page
|
||||
%% \title{text} : defines a title, will will appear centered below the
|
||||
%% headers (or above, if the `titleabove' option is used)
|
||||
%% \maketitle: actually typesets the header.
|
||||
%%
|
||||
%% \section{text} : gives a title for a new topic of the CV.
|
||||
%%
|
||||
%% `topic' environment: begins an itemize-like environment where the
|
||||
%% argument of \item[] is typeset in font \itemfont. A line break is
|
||||
%% automatically inserted if the label is too long to fit in the
|
||||
%% margin (this can be controlled by option `notopicbreak').
|
||||
%%
|
||||
%% The cv document class also has some support for bibliography.
|
||||
%% You can use the `thebibliography' environment as usual, in
|
||||
%% particular wih BibTeX . The output is similar to the `topic'
|
||||
%% environment. If you separate your bibliography into several
|
||||
%% sections, you may want to use the `contbibnum' document class
|
||||
%% option.
|
||||
%%
|
||||
%% Note that this class also has support for right-to-left languages,
|
||||
%% such as hebrew (courtesy Dekel Tsur).
|
||||
%%
|
||||
%% The document class accepts some options (along with the usual
|
||||
%% article.cls options):
|
||||
%% sf (default) produce title and headers in sans serif fonts
|
||||
%% plain produce all output in roman fonts.
|
||||
%% notopicbreak do not add a line break after longtopic labels.
|
||||
%% contbibnum let the numbering of bibliography items be
|
||||
%% continuous when there are several thebibliography
|
||||
%% environments
|
||||
%% titleabove output the title above the left and right headers,
|
||||
%% not below
|
||||
%%
|
||||
%% You can also modify directly the fonts used in the document be
|
||||
%% using the following macros. They take one parameter which is the font
|
||||
%% changing command.
|
||||
%% \headerfont: the font used in both headers.
|
||||
%% Defaults to sans serif.
|
||||
%% \titlefont: the font used for the title.
|
||||
%% Defaults to \LARGE sans-serif semi bold condensed.
|
||||
%% \sectionfont: the font used by \section when beginning a new topic.
|
||||
%% Defaults to sans-serif semi bold condensed.
|
||||
%% \subsectionfont: the font used by \subsection when beginning a new
|
||||
%% topic.
|
||||
%% Defaults to sans-serif semi bold condensed.
|
||||
%% \itemfont: the font used in descriptions of items.
|
||||
%% Defaults to sans-serif slanted.
|
||||
%%
|
||||
%% You can modify the following parameters using \renewcommand:
|
||||
%% \topicmargin: the left margin inside topics.
|
||||
%% Defaults to 20% of the text width (0.20\textwidth).
|
||||
|
||||
%%% CHANGES:
|
||||
%% - 1.0 1998/03/23: First public release.
|
||||
%% - 1.1 1998/11/06: Better documentation, in order to release it for
|
||||
%% LyX ,added \refname, disabled all sectionning commands other that
|
||||
%% \section, disabled numbering of sections.
|
||||
%% - 1.2 1998/12/01:
|
||||
%% * Refined the algorithm to display the headers. In
|
||||
%% particular, \leftheader and \rightheader do not exist
|
||||
%% anymore.
|
||||
%% * Changed the justification of items labels
|
||||
%% [Thanks to Amir Karger <karger@bead.aecom.yu.edu> for the two
|
||||
%% changes above]
|
||||
%% * Added command \title
|
||||
%% * Changed the semantics of \topicfont and \itemfont, and added
|
||||
%% \titlefont and \headerfont
|
||||
%%
|
||||
%% - 1.3 1999/02/09:
|
||||
%% * The thebibliography environment does not add a section by
|
||||
%% itself anymore. This means that you can/should add your own
|
||||
%% and that \refname does not exist anymore.
|
||||
%% [Thanks to Reuben Thomas for the idea]
|
||||
%% * Added support for subsections (with associated font command
|
||||
%% \subsectionfont).
|
||||
%% * Added class options `sf' and `plain'.
|
||||
%% - 1.4 2001/05/04
|
||||
%% * Added `notopicbreak' class option.
|
||||
%% - 1.5 2001/06/18
|
||||
%% * Added hebrew support (from Dekel Tsur).
|
||||
%% * \topicmargin is now a macro and defaults to 20% of text width.
|
||||
%% * Added `contbibnum' class option.
|
||||
%% * Added `titleabove' class option.
|
||||
%% * some variables renaming and cleanups.
|
||||
|
||||
|
||||
%% Basic definition to have a real LaTeX document class
|
||||
\NeedsTeXFormat{LaTeX2e}
|
||||
\ProvidesClass{cv}[2001/06/18 Curriculum vitae version 1.5]
|
||||
|
||||
%% The fonts used in the layout
|
||||
\newcommand{\sectionfont}[1]{\def\cv@sec@fnt{#1}}
|
||||
\newcommand{\subsectionfont}[1]{\def\cv@ssec@fnt{#1}}
|
||||
\newcommand{\itemfont}[1]{\def\cv@it@fnt{#1}}
|
||||
\newcommand{\headerfont}[1]{\def\cv@hd@fnt{#1}}
|
||||
\newcommand{\titlefont}[1]{\def\cv@tit@fnt{#1}}
|
||||
|
||||
% Some document class options.
|
||||
\DeclareOption{sf}{
|
||||
\sectionfont{\sffamily\fontseries{sbc}\selectfont}
|
||||
\subsectionfont{\sffamily\fontseries{sbc}\selectfont}
|
||||
\itemfont{\sffamily\slshape}
|
||||
\headerfont{\sffamily}
|
||||
\titlefont{\sffamily\fontseries{sbc}\selectfont\LARGE}
|
||||
}
|
||||
\DeclareOption{plain}{
|
||||
\sectionfont{\bfseries}
|
||||
\subsectionfont{\bfseries}
|
||||
\itemfont{\itshape}
|
||||
\headerfont{}
|
||||
\titlefont{\bfseries\LARGE}
|
||||
}
|
||||
\newif\if@cv@topic@break \@cv@topic@breaktrue
|
||||
\DeclareOption{notopicbreak}{
|
||||
\@cv@topic@breakfalse
|
||||
}
|
||||
\newif\if@cv@cont@bib@num \@cv@cont@bib@numfalse
|
||||
\DeclareOption{contbibnum}{
|
||||
\@cv@cont@bib@numtrue
|
||||
\newcounter{cv@save@bib@num}
|
||||
}
|
||||
\newif\if@cv@title@above \@cv@title@abovefalse
|
||||
\DeclareOption{titleabove}{
|
||||
\@cv@title@abovetrue
|
||||
}
|
||||
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
|
||||
\ExecuteOptions{sf,letterpaper,10pt,oneside,onecolumn,final}
|
||||
\ProcessOptions
|
||||
\LoadClass{article}
|
||||
|
||||
% Support for RTL (Hebrew). This will be defined and set by babel for
|
||||
% RtL languages, but we define it here for the benefit of others.
|
||||
\newif\if@rl
|
||||
|
||||
%% stuff needed for the header
|
||||
\newcommand{\leftheader}[1]{\def\cv@lh{#1}}
|
||||
\newcommand{\rightheader}[1]{\def\cv@rh{#1}}
|
||||
\renewcommand{\title}[1]{\def\cv@tit{#1}}
|
||||
% Default to empty.
|
||||
\leftheader{}\rightheader{}\title{}
|
||||
% And now a command to actually show the headers
|
||||
\newcommand{\cv@header}[1]{%
|
||||
\if@rl%
|
||||
\begin{tabular}[t]{@{\cv@hd@fnt\beginR}l@{\endR}}%
|
||||
\else%
|
||||
\begin{tabular}[t]{@{\cv@hd@fnt}l@{}}%
|
||||
\fi%
|
||||
#1%
|
||||
\end{tabular}}
|
||||
\newcommand{\cv@do@title}{\par\bigskip
|
||||
\begin{center} \cv@tit@fnt\cv@tit\end{center}}
|
||||
\renewcommand{\maketitle}{%
|
||||
\if@cv@title@above\cv@do@title\fi
|
||||
\par\noindent%
|
||||
\begin{tabular*}{\textwidth}{@{}l@{\extracolsep{\fill}}l@{}}
|
||||
\cv@header{\cv@lh}&\cv@header{\cv@rh}
|
||||
\end{tabular*}
|
||||
\par
|
||||
\if@cv@title@above\else\cv@do@title\fi
|
||||
\bigskip\par}
|
||||
|
||||
%% Redefine \section to use \cv@sec@fnt
|
||||
\renewcommand{\section}{
|
||||
\@startsection{section}{1}{\z@}
|
||||
{-3.5ex \@plus -1ex \@minus -.2ex}
|
||||
{2.3ex \@plus .2ex}{\cv@sec@fnt}}
|
||||
\renewcommand{\subsection}{
|
||||
\@startsection{subsection}{1}{3em}
|
||||
{-3.5ex \@plus -1ex \@minus -.2ex}
|
||||
{2.3ex \@plus .2ex}{\cv@ssec@fnt}}
|
||||
% the other ones do not exist.
|
||||
\let\subsubsection=\relax
|
||||
\let\paragraph=\relax \let\subparagraph=\relax
|
||||
% we do not want any numbering
|
||||
\setcounter{secnumdepth}{0}
|
||||
|
||||
%% Define the topic environment
|
||||
% The left margin for topics
|
||||
\newcommand{\topicmargin}{0.20\textwidth}
|
||||
\newlength{\t@picmargin}
|
||||
% The label stuff
|
||||
\newcommand{\@topic@makelabel}[1]{\cv@it@fnt #1\hfill}
|
||||
\let\@topic@old@item=\@item
|
||||
\newlength{\topic@label@length}
|
||||
\def\@topic@item[#1]{%
|
||||
\if@cv@topic@break%
|
||||
\settowidth{\topic@label@length}{#1}%
|
||||
\@topic@old@item[#1]%
|
||||
\ifdim\topic@label@length>\labelwidth\mbox{}\\*\fi%
|
||||
\else%
|
||||
\@topic@old@item[#1]%
|
||||
\fi}
|
||||
\newcommand{\@topic@setup}{%
|
||||
\setlength{\t@picmargin}{\topicmargin}
|
||||
\if@rl%
|
||||
\setlength{\leftmargin}{0cm}%
|
||||
\setlength{\rightmargin}{\t@picmargin}%
|
||||
\else%
|
||||
\setlength{\leftmargin}{\t@picmargin}%
|
||||
\setlength{\rightmargin}{0cm}%
|
||||
\fi%
|
||||
\setlength{\labelwidth}{0.8\t@picmargin}%
|
||||
\let\makelabel=\@topic@makelabel}
|
||||
\newenvironment{topic}
|
||||
{\list{}
|
||||
{ \@topic@setup%
|
||||
\let\@item=\@topic@item}}
|
||||
{\endlist}
|
||||
|
||||
%% Redefine the thebibliography environment to look like the topic
|
||||
%% environment. The argument of thebibliography is ignored
|
||||
\renewenvironment{thebibliography}[1]
|
||||
{\list{\@biblabel{\theenumiv}}{%
|
||||
\@topic@setup%
|
||||
\@openbib@code%
|
||||
\usecounter{enumiv}%
|
||||
\let\p@enumiv\@empty%
|
||||
\renewcommand\theenumiv{\@arabic\c@enumiv}}%
|
||||
\if@cv@cont@bib@num%
|
||||
\setcounter{enumiv}{\value{cv@save@bib@num}}%
|
||||
\fi%
|
||||
\sloppy \clubpenalty 4000 \widowpenalty 4000 \sfcode`\.=\@m}%
|
||||
{\endlist%
|
||||
\if@cv@cont@bib@num%
|
||||
\setcounter{cv@save@bib@num}{\value{enumiv}}%
|
||||
\fi}
|
Loading…
Reference in New Issue
Block a user