% ====================[ moderncv-lyx.sty                   ]====================
%                     [ Time-stamp: "2009-04-18 19:29:36 leycec" ]
%
% --------------------( SYNOPSIS                           )--------------------
% This LyX-compatible LaTeX package loads and configures moderncv and all
% moderncv-required subpackages. moderncv is a LaTeX package for printing
% modern day-styled curriculum vitae in a fairly configurable fashion.
%
% --------------------( INSTALLATION                       )--------------------
% This package is intended to be explicitly loaded in the LaTeX preamble of your
% curriculum vitae's ".lyx" file like so:
%
%   % Copy the following three lines to the head of every ".lyx" file!
%   \begin_preamble
%   \RequirePackage{moderncv-lyx}
%   \end_preamble
%
% If you reuse the sample ".lyx" file provided along with this file, then this
% has already been done for you. Sweet succulence of life, no?
%
% --------------------( CONFIGURATION                      )--------------------
% This package is quite configurable. Since changes to this configuration change
% the resulting output, often dramatically, please so prior to beginning your
% thesis in LyX. At the moment, this requires you manually edit commands in
% another LaTeX document, "moderncv-lyx-conf.sty". Happily, the commands are
% fairly straightforward and require no previous understanding of LaTeX. To
% configure this package, please:
%
% * Open "moderncv-lyx-conf.sty" in your favorite text editor.
% * Edit default values for the configuration commands this file defines as
%   needed by your curriculum vitae.
%
% Because "moderncv-lyx.sty" loads "moderncv-lyx-conf.sty" when loaded, editing
% the latter configures the former and, thus, every ".lyx" document loading the
% former from its LaTeX preamble.
%
% This is not an ideal solution, since your manual edits to the
% "moderncv-lyx-conf.sty" package will be overwritten when upgrading to a
% a new version. Our sincere apologies! Please "watch out" for this, later. :(
%
% --------------------( DOCUMENT CLASSES                   )--------------------
% This package is intended to be used with the moderncv document class. Since
% LyX handles document classes graphically, rather than in the LaTeX preamble,
% this is different from how the non-LyX version handles document classes. To
% change the document class and options in LyX:
%
% * Run LyX and open the desired ".lyx" file.
% * Set this document's document class. In the original moderncv structure,
%   this was done by manually editing the preamble for "moderncv.tex". LyX,
%   however, requires that a document's document class be graphically configured
%   through the LyX GUI at:
%
%     Document Settings --> Document Class
%
% * Set this document's document class to "moderncv".
% * Set this document's document class options. Again, LyX requires that they be
%   graphically configured through the LyX GUI at:
%
%     Document Settings --> Document Class --> Class options
%
% * Consider setting these recommended options:
%
%     11pt,a4paper11pt
%
% Unfortunately, the LyX document class and document class options cannot be
% shared between the related ".lyx" files comprising moderncv-lyx. Each
% separate ".lyx" file must repeat whichever document class and document class
% options you selected, and these should be the same for every such file. This
% is very annoying, but I'm afraid there is no way about it at the moment. Cue
% sad face here.
%
% --------------------( SEE ALSO                           )--------------------
% This bundle of LyX-compatible LaTeX packages is courtesy earnest efforts of:
%
% * Xavier Danaux. "moderncv."
%   http://www.ctan.org/tex-archive/help/Catalogue/entries/moderncv.html
% * Stephen Hurder. "Preparing Your Curriculum Vitae," for example vitae having
%   both input LaTeX and output PDF document for each such example.
%   http://www.math.uic.edu/~hurder/math589/vita.html
%
% --------------------( CHANGELOG                          )--------------------
% 2009-09-12  Cecil Curry  <http://raiazome.com>
%   * Created.
%
% --------------------( TODO                               )--------------------
% * Incorporate options for also prefixing this CV with a cover letter.
% * Generate a proper LyX layout.
% * Provide an option for selecting fontset: i.e., which collection of fonts to
%   use. The default Palatino fontset could be substituted, for example, by an
%   alternative Minion Pro fontset.
% * Submit LyX-compatibility changes to "moderncv.cls". Good Gods! This file
%   was highly erroneous. I suspect bad changes committed between 0.5 to 0.7; in
%   any advent, I've corrected them and they require submission. Jeesus, man.
% * LyX's prebundled "moderncv.layout" files appears to contain a number of
%   factual inconsistencies. For example, the "Item" environment (expanding to
%   the \cvitem command) accepts one optional argument rather than one optional
%   argument and one manual argument.
% * Correct theme-specific \maketitle functions. They fail with obscure errors
%   when \familyname, et al. are not defined.

% ....................{ PROVIDES                           }....................
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{moderncv-lyx}[2009/09/12 v0.0.1 moderncv cum LyX]

% ....................{ DEPENDENCIES                       }....................
% Import the "kvoptions" package, facilitating handling of multi-valued package
% and command options and arguments (e.g., obeying a "key1=val,key2=val" format).
%\RequirePackage{kvoptions}

% ....................{ OPTIONS                            }....................
% The following sections define user-settable options as true or false booleans. 
% Please set these options in the "moderncv-lyx-conf.sty" file corresponding to
% your particular document.
%
% Note that all options defined below default to false unless otherwise stated.
% These defaults should produce aesthetically pleasing output across a wide
% variety of software platforms and "real world" thesis dictates; as such, they
% shouldn't need much tweaking on your behalf. (This is good. Spend your
% dilegency academically, rather than hacking academic LaTeX.)

% Initialize the "kvoptions" package specific to this package.
%\SetupKeyvalOptions{family=mcvl,prefix=mcvl@}

% Declare an option for selecting which of the several available moderncv theme
% packages to use. This is a multi-value option accepting these strings:
% * "casual", which selects the "moderncvthemecasual.sty" package. This is the
%   default theme due to its moderately pleasing appearance.
% * "classic", which selects the "moderncvthemeclassic.sty" package.
% * "empty", which selects the "moderncvthemeempty.sty" package.
%\DeclareStringOption[-postmodern]{theme}

% Declare an option for selecting which color variant of the above theme
% package to use. This is a multi-value option accepting these strings:
% "blue", "orange", "green", "red", and "grey".
%\DeclareStringOption[blue]{themecolor}

%FIXME: Ensure the above options are local rather than global.
% Process the above package options, as externally passed to us by our caller.
%\ProcessKeyvalOptions*

% ....................{ PAGINATION                         }....................
% Prohibit single lines at the start of paragraphs.
\clubpenalty = 10000

% Prohibit single lines at the end of paragraphs and formulae.
\widowpenalty = 10000 
\displaywidowpenalty = 10000 % formulas

% ....................{ PACKAGES                           }....................
% Import the "moderncv-lyx-conf-theme" package. This establishes the moderncv
% theme imported below, and options passed into this theme. Note that because
% this implicitly loads the "hyperref" package, this command should be the last
% \Require command in this file.
\RequirePackage{moderncv-lyx-conf-theme}

% Import the "moderncv-lyx-conf" package. This configures all other document-
% specific settings.
\RequirePackage{moderncv-lyx-conf}

% Import and configure the moderncv theme package as specified by the "theme"
% package option. Note that because this implicitly loads the "hyperref"
% package, this command should be the last \Require command in this file.
%\Requiremoderncvtheme[\mcvl@themecolor]{\mcvl@theme}
%\Requiremoderncvtheme[blue]{casual}

\endinput
% --------------------( COPYRIGHT AND LICENSE              )--------------------
% The information below applies to everything in this distribution,
% except where noted.
%              
% Copyleft 2009, 2010 by Cecil Curry.
%   
%   http://www.raiazome.com
% 
% This program is free software; you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation; either version 3 of the License, or
% (at your option) any later version.
%
% This program is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with this program. If not, see <http://www.gnu.org/licenses/>.
